Adhere to NixOS systems #1

Merged
wymiller merged 6 commits from suite-switch into master 2024-09-08 15:52:47 -05:00
5 changed files with 110 additions and 39 deletions
Showing only changes of commit baae8c6292 - Show all commits

View File

@ -1,41 +1,112 @@
{pkgs, ...}: let {pkgs, ...}: let
dirs = { dirs = {
defaults = ../../defaults; defaults = ./defaults;
}; };
in { in {
wayland.windowManager.sway = { wayland.windowManager.sway = {
enable = pkgs.stdenv.isLinux; enable = pkgs.stdenv.isLinux;
extraOptions = []; # Extra arguments to pass into sway. If sway goes haywire, we might need something in here extraOptions = []; # Extra arguments to pass into sway. If sway goes haywire, we might need something in here
xwayland = true; xwayland = true;
systemd = true; systemd.enable = true;
# Install packages that will be installed with sway # Install packages that will be installed with sway
extraPackages = with pkgs; [ # extraPackages = with pkgs; [
wl-clipboard # wl-clipboard
wofi # wofi
mako # mako
wttrbar # wttrbar
light # light
brightnessctl # brightnessctl
playerctl # playerctl
grim # grim
slurp # slurp
cliphist # cliphist
]; # ];
wrapperFeatures = { wrapperFeatures = {
gtk = true; gtk = true;
}; };
}; };
xdg.configFile."sway/config".source = dirs.defaults + /sway/config;
programs.wofi.enable = pkgs.stdenv.isLinux; programs.wofi.enable = pkgs.stdenv.isLinux;
programs.waybar = { programs.waybar = {
enable = pkgs.stdenv.isLinux; enable = pkgs.stdenv.isLinux;
systemd.enable = true; systemd.enable = true;
}; style = ''
* {
xdg.configFile."waybar/config".source = dirs.defaults + /waybar/config.json; border: none;
xdg.configFile."waybar/style.css".source = dirs.defaults + /waybar/style.css; 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;
}
'';
};
} }

View File

@ -6,5 +6,5 @@
programs.kitty = { programs.kitty = {
enable = false; # TODO: to enable later enable = false; # TODO: to enable later
} };
} }

View File

@ -53,9 +53,9 @@
# # If you press and hold certain keyboard keys when in a text area, the keys character begins to repeat. # # If you press and hold certain keyboard keys when in a text area, the keys character begins to repeat.
# # This is very useful for vim users, they use `hjkl` to move cursor. # # This is very useful for vim users, they use `hjkl` to move cursor.
# # sets how long it takes before it starts repeating. # # 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. # # 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 # NSAutomaticCapitalizationEnabled = false; # disable auto capitalization
# NSAutomaticDashSubstitutionEnabled = false; # disable auto dash substitution # NSAutomaticDashSubstitutionEnabled = false; # disable auto dash substitution
@ -130,19 +130,19 @@
# keyboard settings is not very useful on macOS # keyboard settings is not very useful on macOS
# the most important thing is to remap option key to alt key globally, # the most important thing is to remap option key to alt key globally,
# but it's not supported by macOS yet. # but it's not supported by macOS yet.
keyboard = { # keyboard = {
# enableKeyMapping = true; # enable key mapping so that we can use `option` as `control` # 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 # # 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 # 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 # # swap left command and left alt
# # so it matches common keyboard layout: `ctrl | command | alt` # # so it matches common keyboard layout: `ctrl | command | alt`
# # # #
# # disabled, caused only problems! # # disabled, caused only problems!
# swapLeftCommandAndLeftAlt = false; # swapLeftCommandAndLeftAlt = false;
}; # };
}; };
# Add ability to used TouchID for sudo authentication # Add ability to used TouchID for sudo authentication

View File

@ -7,10 +7,10 @@
# Set up networking configuration # Set up networking configuration
networking.hostName = hostname; networking.hostName = hostname;
networking.computerName = 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.allowedTCPPorts = [];
# networking.firewall.allowedUDPPorts = []; # 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; system.defaults.smb.NetBIOSName = hostname;
# Set up user accounts # Set up user accounts
@ -21,10 +21,6 @@
then "/Users/${userName}" then "/Users/${userName}"
else "/home/${userName}"; else "/home/${userName}";
description = userName; description = userName;
extraGroups =
if pkgs.stdenv.isLinux
then ["wheel" "video"]
else [];
}; };
nix.settings.trusted-users = [userName]; nix.settings.trusted-users = [userName];

View File

@ -3,6 +3,7 @@
config, config,
lib, lib,
pkgs, pkgs,
userName,
... ...
}: { }: {
# Bring in the hardware configuration # Bring in the hardware configuration
@ -114,4 +115,7 @@
remotePlay.openFirewall = true; remotePlay.openFirewall = true;
localNetworkGameTransfers = true; localNetworkGameTransfers = true;
}; };
# Add username to groups "wheel" and "video" - more may be added here later
users.users.${userName}.extraGroups = ["wheel" "video"];
} }