Adhere to NixOS systems #1
111
home/sway.nix
111
home/sway.nix
@ -1,41 +1,112 @@
|
||||
{pkgs, ...}: let
|
||||
dirs = {
|
||||
defaults = ../../defaults;
|
||||
defaults = ./defaults;
|
||||
};
|
||||
in {
|
||||
wayland.windowManager.sway = {
|
||||
enable = pkgs.stdenv.isLinux;
|
||||
extraOptions = []; # Extra arguments to pass into sway. If sway goes haywire, we might need something in here
|
||||
xwayland = true;
|
||||
systemd = true;
|
||||
systemd.enable = true;
|
||||
|
||||
# Install packages that will be installed with sway
|
||||
extraPackages = with pkgs; [
|
||||
wl-clipboard
|
||||
wofi
|
||||
mako
|
||||
wttrbar
|
||||
light
|
||||
brightnessctl
|
||||
playerctl
|
||||
grim
|
||||
slurp
|
||||
cliphist
|
||||
];
|
||||
# extraPackages = with pkgs; [
|
||||
# wl-clipboard
|
||||
# wofi
|
||||
# mako
|
||||
# wttrbar
|
||||
# light
|
||||
# brightnessctl
|
||||
# playerctl
|
||||
# grim
|
||||
# slurp
|
||||
# cliphist
|
||||
# ];
|
||||
|
||||
wrapperFeatures = {
|
||||
gtk = true;
|
||||
};
|
||||
};
|
||||
|
||||
xdg.configFile."sway/config".source = dirs.defaults + /sway/config;
|
||||
|
||||
programs.wofi.enable = pkgs.stdenv.isLinux;
|
||||
programs.waybar = {
|
||||
enable = pkgs.stdenv.isLinux;
|
||||
systemd.enable = true;
|
||||
};
|
||||
|
||||
xdg.configFile."waybar/config".source = dirs.defaults + /waybar/config.json;
|
||||
xdg.configFile."waybar/style.css".source = dirs.defaults + /waybar/style.css;
|
||||
style = ''
|
||||
* {
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
font-family: "Monaspace Krypton";
|
||||
font-size: 13px;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background: #1f2335;
|
||||
border-bottom: 1px solid #24283b;
|
||||
color: #c0caf5;
|
||||
opacity: 0.808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
padding: 5px;
|
||||
padding-left: 12px;
|
||||
padding-right: 12px;
|
||||
background: transparent;
|
||||
color: #c0caf5;
|
||||
border-bottom: 1px solid transparent;
|
||||
}
|
||||
|
||||
#workspaces button.focused {
|
||||
background: #c0caf5;
|
||||
color: #1d2021;
|
||||
border-bottom: 1px solid #c0caf5;
|
||||
}
|
||||
|
||||
#cpu,
|
||||
#memory,
|
||||
#pulseaudio,
|
||||
#network,
|
||||
#battery,
|
||||
#clock,
|
||||
#custom-playerctl {
|
||||
padding: 0 10px;
|
||||
margin: 0 5px;
|
||||
}
|
||||
|
||||
#battery.charging {
|
||||
color: #9ece6a;
|
||||
}
|
||||
|
||||
#battery.warning:not(.charging) {
|
||||
color: #ff9e64;
|
||||
}
|
||||
|
||||
@keyframes blink {
|
||||
to {
|
||||
background-color: #1d2021;
|
||||
color: #ebdbb2;
|
||||
}
|
||||
}
|
||||
|
||||
#battery.critical:not(.charging) {
|
||||
background: #f7768e;
|
||||
color: #ebdbb2;
|
||||
border-bottom: 1px solid #ebdbb2;
|
||||
animation-name: blink;
|
||||
animation-duration: 0.5s;
|
||||
animation-timing-function: linear;
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
|
||||
#network.disconnected {
|
||||
color: #cc241d;
|
||||
}
|
||||
|
||||
#pulseaudio.muted {
|
||||
color: #cc241d;
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
@ -6,5 +6,5 @@
|
||||
|
||||
programs.kitty = {
|
||||
enable = false; # TODO: to enable later
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -53,9 +53,9 @@
|
||||
# # If you press and hold certain keyboard keys when in a text area, the key’s character begins to repeat.
|
||||
# # This is very useful for vim users, they use `hjkl` to move cursor.
|
||||
# # sets how long it takes before it starts repeating.
|
||||
InitialKeyRepeat = 15; # normal minimum is 15 (225 ms), maximum is 120 (1800 ms)
|
||||
# InitialKeyRepeat = 15; # normal minimum is 15 (225 ms), maximum is 120 (1800 ms)
|
||||
# # sets how fast it repeats once it starts.
|
||||
KeyRepeat = 3; # normal minimum is 2 (30 ms), maximum is 120 (1800 ms)
|
||||
# KeyRepeat = 3; # normal minimum is 2 (30 ms), maximum is 120 (1800 ms)
|
||||
|
||||
# NSAutomaticCapitalizationEnabled = false; # disable auto capitalization
|
||||
# NSAutomaticDashSubstitutionEnabled = false; # disable auto dash substitution
|
||||
@ -130,19 +130,19 @@
|
||||
# keyboard settings is not very useful on macOS
|
||||
# the most important thing is to remap option key to alt key globally,
|
||||
# but it's not supported by macOS yet.
|
||||
keyboard = {
|
||||
# keyboard = {
|
||||
# enableKeyMapping = true; # enable key mapping so that we can use `option` as `control`
|
||||
|
||||
# # NOTE: do NOT support remap capslock to both control and escape at the same time
|
||||
# remapCapsLockToControl = false; # remap caps lock to control, useful for emac users
|
||||
remapCapsLockToEscape = true; # remap caps lock to escape, useful for vim users
|
||||
# remapCapsLockToEscape = true; # remap caps lock to escape, useful for vim users
|
||||
|
||||
# # swap left command and left alt
|
||||
# # so it matches common keyboard layout: `ctrl | command | alt`
|
||||
# #
|
||||
# # disabled, caused only problems!
|
||||
# swapLeftCommandAndLeftAlt = false;
|
||||
};
|
||||
# };
|
||||
};
|
||||
|
||||
# Add ability to used TouchID for sudo authentication
|
||||
|
@ -7,10 +7,10 @@
|
||||
# Set up networking configuration
|
||||
networking.hostName = hostname;
|
||||
networking.computerName = hostname;
|
||||
networking.firewall.enable = true; # VERY important, do not touch
|
||||
# networking.firewall.enable = true; # VERY important, do not touch
|
||||
# networking.firewall.allowedTCPPorts = [];
|
||||
# networking.firewall.allowedUDPPorts = [];
|
||||
networking.networkmanager.enable = pkgs.stdenv.isLinux; # Linux tool for managing network connections
|
||||
# networking.networkmanager.enable = pkgs.stdenv.isLinux; # Linux tool for managing network connections
|
||||
system.defaults.smb.NetBIOSName = hostname;
|
||||
|
||||
# Set up user accounts
|
||||
@ -21,10 +21,6 @@
|
||||
then "/Users/${userName}"
|
||||
else "/home/${userName}";
|
||||
description = userName;
|
||||
extraGroups =
|
||||
if pkgs.stdenv.isLinux
|
||||
then ["wheel" "video"]
|
||||
else [];
|
||||
};
|
||||
|
||||
nix.settings.trusted-users = [userName];
|
||||
|
@ -3,6 +3,7 @@
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
userName,
|
||||
...
|
||||
}: {
|
||||
# Bring in the hardware configuration
|
||||
@ -114,4 +115,7 @@
|
||||
remotePlay.openFirewall = true;
|
||||
localNetworkGameTransfers = true;
|
||||
};
|
||||
|
||||
# Add username to groups "wheel" and "video" - more may be added here later
|
||||
users.users.${userName}.extraGroups = ["wheel" "video"];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user