Quite a large commit but I set everything up to have a decent start on both my laptop (date) and desktop (yuzu).
Also rekeyed age files after adding new public keys for the new hosts.
E5WANV7PYNPZFSJE4AMZABQ76TUNKVZN3M6ZFD5V6CKAFKG444NAC XXCZUXUYVBHUUNKUHFUKW6WYC4A6HEZHJZUMHSABFVTOIZOTMDFQC USORQI4YM2FOILPSRJ444BEV6APPCI76CLGI5ZBDBOGCWAUALEQQC TECVLWPUOQ4D2WKME4ZMRALDA7GV6EI2AKRR3J7Z3UESO4H2J73QC NXH6QM5S5OM2GWIB5PLFHG62HSZ7IAVCEGFCOY2CCO3KT3HOQYGQC 354Y3VPLRRUOOZAFDG7RGEFDWBAX4DY2Y72EEGHRQTTV3D4E55MAC JMH2EBAW4KHIFGZ2DQ55MBWCJZRGC6SQPVTLOOLSXOREJOSRST7AC FVDI3W7T2DSM3XQGMLLNWFMVGHHKCWGCSFI4PN3FBPZ2KN7SIWHQC 4NYCEHYAWPTFWSQ53SDQFC2NQ6C3CY2PUZPYIXRPLWK77LW55XTAC BDDKGGL7QNTFAX3ARMV4VK2XQCLOVJNFLXFCZB7IFCGEATCMVBIAC RNWOGVNATUUYTVBM44BM57OMCKDNOA5J4OKUNB5OJI2QGLFTTEIQC 4GGQX4QFLTB4FMCYJOIBPOAMZVC5FXUNEZGF3A7E7GUNNVM5WQHAC P5QV3CCWAECHHBFH5VZDWJMMQQ45I4YE75Y4YMY4KNXFHKFLDQRAC 536UGGBYLNT7PYVG6DMOFVED73SFIEKTGX47PP5LGF56UCES5MNAC A4ACJV52DCYZKECMEKKQ7N2Q6VT2EYOQ3G3ERHJSZFHBRUX5VM6AC AHAA7UNL2RRXP7KERGVCC42GB564WS5BYSSFEOXW3EKVMB2UVEOAC 4R56PJDQPYZ5FLFAMZSNY7UI5TKF6N5YCHCJU3ZBV5FHB46GYM5QC DQKCPBYIW34BPR3BNMCBID7HL3MHGKR47LGBJ6B7VSIKMCOV3EFAC QRPPLHLL6YZU3Z35JNJFXHMBY3BX4THHN4A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publicKeys = [ plum ] ++ admins;"hosts/plum/password.age".publicKeys = [ plum ] ++ admins;"hosts/plum/forgejo-password.age".publicKeys = [ plum ] ++ admins;
"hosts/plum/id.age".publicKeys = [ plum ] ++ admins;"hosts/plum/password.age".publicKeys = [ plum ] ++ admins;"hosts/plum/forgejo-password.age".publicKeys = [ plum ] ++ admins;
"hosts/kiwi/id.age".publicKeys = [ kiwi ] ++ admins;"hosts/kiwi/password.age".publicKeys = [ kiwi ] ++ admins;
"hosts/kiwi/id.age".publicKeys = [ kiwi ] ++ admins;"hosts/kiwi/password.age".publicKeys = [ kiwi ] ++ admins;"hosts/pear/id.age".publicKeys = [ pear ] ++ admins;"hosts/pear/password.age".publicKeys = [ pear ] ++ admins;
"hosts/pear/id.age".publicKeys = [ pear ] ++ admins;"hosts/pear/password.age".publicKeys = [ pear ] ++ admins;
"hosts/date/id.age".publicKeys = [ date ] ++ admins;"hosts/date/password.age".publicKeys = [ date ] ++ admins;"hosts/yuzu/id.age".publicKeys = [ yuzu ] ++ admins;"hosts/yuzu/password.age".publicKeys = [ yuzu ] ++ admins;
{ config, lib, pkgs, ... }: letinherit (lib) mkIf enabled;in mkIf config.isDesktopNotWsl {environment.systemPackages = [pkgs.waybar];home-manager.sharedModules = [{programs.waybar = with config.theme.withHashtag; enabled {settings = {mainBar = {layer = "top";position = "top";height = 24;modules-left = [ "hyprland/workspaces" ];modules-center = [ "hyprland/window" ];modules-right = [ "tray" "pulseaudio" "cpu" "memory" "network" "battery" "clock" ];"hyprland/workspaces" = {format = "{icon}";format-icons = {default = "";active = "";};persistent-workspaces."*" = 8;};"hyprland/window" = {max-length = 50;separate-outputs = true;rewrite = {"(.*) — Zen" = " $1";"(.*) - Discord" = " $1";"(.*) — nu" = " $1";};};tray = {reverse-direction = true;spacing = 5;};pulseaudio = {format = "{format_source} {icon} {volume}%";format-muted = "{format_source} ";format-source = "";format-source-muted = "";format-icons = {default = [ "" "" "" ];};};cpu = {format = " {usage}%";tooltip = false;};memory = {format = " {}%";tooltip = false;};network = {format-wifi = " {signalStrength}%";format-ethernet = " {ipaddr}/{cidr}";format-disconnected = " ";format-linked = " {ifname} (No IP)";};battery = {format = "{icon} {capacity}%";format-charging = " {capacity}%";format-plugged = " {capacity}%";format-icons = [ "" "" "" "" "" "" "" "" "" "" ];states = {warning = 30;critical = 15;};};clock = {interval = 60;format = "{:%H:%M}";tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";};};};style = ''* {border: none;border-radius: 0;font-family: "${config.theme.font.mono.name}";font-size: 11px;}#waybar {background: ${base00};color: ${base07};}#window {color: ${base07};}#workspaces button:nth-child(1) { color: ${base08}; }#workspaces button:nth-child(2) { color: ${base09}; }#workspaces button:nth-child(3) { color: ${base0A}; }#workspaces button:nth-child(4) { color: ${base0B}; }#workspaces button:nth-child(5) { color: ${base0C}; }#workspaces button:nth-child(6) { color: ${base0D}; }#workspaces button:nth-child(7) { color: ${base0E}; }#workspaces button:nth-child(8) { color: ${base0F}; }#workspaces button.empty {color: ${base02};}#workspaces button.active {color: ${base07};background: ${base02};}#tray, #pulseaudio, #cpu, #memory, #network, #battery, #clock {margin-left: 10px;padding: 0 ${toString config.theme.padding}px;color: ${base07}; /* Use highest contrast text */}#battery.critical:not(.charging) {animation-name: blink;animation-duration: 0.5s;animation-timing-function: linear;animation-iteration-count: infinite;animation-direction: alternate;color: ${base08};}@keyframes blink {to {color: ${base05};}}'';};}];}
{ config, lib, pkgs, ... }: letinherit (lib) enabled mkIf;in mkIf config.isDesktop {programs.thunar = enabled;environment.systemPackages = [pkgs.xfce.tumbler];}
{ config, lib, pkgs, ... }: letinherit (lib) enabled mkIf;in mkIf config.isDesktopNotWsl {# NetworkManager for network configuration.networking.networkmanager = enabled {wifi.powersave = false;};# Add user to networkmanager group.users.users.jam.extraGroups = [ "networkmanager" ];# Bluetooth support.hardware.bluetooth = enabled {powerOnBoot = true;};services.blueman = enabled;# System configuration GUI tools.environment.systemPackages = with pkgs; [# Audio.pavucontrol # Audio mixer GUI.# Network.networkmanagerapplet # Network manager system tray.# Bluetooth.blueman # Bluetooth manager.# System utilities.lshw # Hardware info.usbutils # USB device info.pciutils # PCI device info.];# Enable system tray for network/bluetooth applets.programs.nm-applet = enabled;}
{ config, lib, ... }: letinherit (lib) enabled mkIf;in mkIf config.isDesktop {services.pipewire = enabled {audio.enable = true;pulse.enable = true;jack.enable = true;alsa = enabled {support32Bit = true;};};security.rtkit.enable = true;}
{ config, lib, pkgs, ... }: letinherit (lib) enabled mkIf;in mkIf config.isDesktopNotWsl {hardware.graphics = enabled;xdg.portal = enabled {config.common.default = "*";extraPortals = [ pkgs.xdg-desktop-portal-hyprland ];configPackages = [ pkgs.hyprland ];};programs.xwayland = enabled;environment.systemPackages = [pkgs.hyprland];home-manager.sharedModules = [{wayland.windowManager.hyprland = enabled {settings = {# Monitor configuration - auto-detect setupmonitor = [# Primary monitor configs for different setups"DP-1,3840x1440@80,0x0,1" # 4K main if available"DP-2,1920x1080@280,3840x0,1" # 1080p secondary if available",1920x1080@144,auto,1" # Fallback for single monitor];bind = [# Config and window controls"SUPER, O, exec, hyprctl reload""SUPER, Q, killactive""SUPER, M, exec, hyprctl dispatch movetoworkspace special"# Focus windows"SUPER, H, movefocus, l""SUPER, J, movefocus, d""SUPER, K, movefocus, u""SUPER, L, movefocus, r"# Move windows"SUPER SHIFT, H, movewindow, l""SUPER SHIFT, J, movewindow, d""SUPER SHIFT, K, movewindow, u""SUPER SHIFT, L, movewindow, r""SUPER SHIFT, Return, layoutmsg, swapwithmaster"# Window toggles"SUPER, T, togglefloating""SUPER SHIFT, F, fullscreen, 1"# Workspaces"SUPER, 1, workspace, 1""SUPER, 2, workspace, 2""SUPER, 3, workspace, 3""SUPER, 4, workspace, 4""SUPER, 5, workspace, 5""SUPER, 6, workspace, 6""SUPER, 7, workspace, 7""SUPER, 8, workspace, 8"# Move windows to workspaces"SUPER SHIFT, 1, movetoworkspace, 1""SUPER SHIFT, 2, movetoworkspace, 2""SUPER SHIFT, 3, movetoworkspace, 3""SUPER SHIFT, 4, movetoworkspace, 4""SUPER SHIFT, 5, movetoworkspace, 5""SUPER SHIFT, 6, movetoworkspace, 6""SUPER SHIFT, 7, movetoworkspace, 7""SUPER SHIFT, 8, movetoworkspace, 8"# Launcher"CTRL, BackSpace, exec, fuzzel"];# Resize controlsbinde = ["SUPER, equal, resizeactive, 50 0""SUPER, minus, resizeactive, -50 0""SUPER SHIFT, equal, resizeactive, 0 50""SUPER SHIFT, minus, resizeactive, 0 -50"];# Auto-start waybarexec-once = ["waybar"];# Basic appearancegeneral = with config.theme.with0x; {gaps_in = 0;gaps_out = 0;border_size = config.theme.borderWidth;"col.active_border" = "0xFF${config.theme.colors.base0D}";"col.inactive_border" = "0xFF${config.theme.colors.base02}";};decoration = {rounding = config.theme.cornerRadius;};input = {kb_layout = "us";follow_mouse = 1;touchpad = {natural_scroll = false;};};};};}];}
{ config, lib, ... }: letinherit (lib) mkIf enabled;in mkIf config.isDesktopNotWsl {# Enable OpenGL and hardware acceleration.hardware.graphics = enabled {enable32Bit = true; # Required for Steam and 32-bit applications.};# For Wayland.services.xserver.videoDrivers = [ "nvidia" ];hardware.nvidia = {# Enable modesetting (required for Wayland).modesetting.enable = true;powerManagement.enable = false;powerManagement.finegrained = false;# Use open source kernel modules (recommended for RTX/GTX 16xx+).open = true;# Enable nvidia-settings menu.nvidiaSettings = true;package = config.boot.kernelPackages.nvidiaPackages.stable;};# Environment variables for NVIDIA on Wayland.environment.sessionVariables = {GBM_BACKEND = "nvidia-drm";__GLX_VENDOR_LIBRARY_NAME = "nvidia";WLR_NO_HARDWARE_CURSORS = "1"; # Cursor fix.};boot.kernelModules = [ "nvidia" "nvidia_modeset" "nvidia_uvm" "nvidia_drm" ];}
{ config, lib, pkgs, ... }: letinherit (lib) mkIf enabled;in mkIf config.isDesktop {environment.systemPackages = [pkgs.gammastep];home-manager.sharedModules = [{services.gammastep = enabled {provider = "geoclue2";};}];}
{ config, lib, pkgs, ... }: letinherit (lib) mkIf enabled;in mkIf (config.isDesktopNotWsl && config.isGaming) {programs.steam = enabled {remotePlay.openFirewall = true;dedicatedServer.openFirewall = true;localNetworkGameTransfers.openFirewall = true;gamescopeSession.enable = true;};# Performance.programs.gamemode.enable = true;environment.systemPackages = with pkgs; [protontrickswinetricks];# Hardware acceleration and 32-bit graphics support.hardware.graphics = {enable = true;enable32Bit = true; # Required for Steam and 32-bit games};# Audio settings for gamingsecurity.rtkit.enable = true; # For low-latency audio}
{ config, lib, pkgs, ... }: letinherit (lib) mkIf;in mkIf config.isDesktop {environment.systemPackages = [pkgs.fuzzel];home-manager.sharedModules = [{programs.fuzzel.enable = true;}];}
{ config, lib, pkgs, ... }: letinherit (lib) mkIf;in mkIf config.isDesktop {environment.systemPackages = [pkgs.dunst];home-manager.sharedModules = [{services.dunst.enable = true;}];}
# Gruvbox hard Base16 color definitions.gruvbox_colors = {dark = {base00 = "1d2021"; # Background.base01 = "3c3836"; # Background 1.base02 = "504945"; # Background 2.base03 = "665c54"; # Background 3.base04 = "bdae93"; # Foreground 2.base05 = "d5c4a1"; # Foreground 1.base06 = "ebdbb2"; # Foreground 0.base07 = "fbf1c7"; # Foreground.base08 = "fb4934"; # Red.base09 = "fe8019"; # Orange.base0A = "fabd2f"; # Yellow.base0B = "b8bb26"; # Green.base0C = "8ec07c"; # Aqua.base0D = "83a598"; # Blue.base0E = "d3869b"; # Purple.base0F = "d65d0e"; # Brown.};light = {base00 = "f9f5d7"; # Background.base01 = "ebdbb2"; # Background 1.base02 = "d5c4a1"; # Background 2.base03 = "bdae93"; # Background 3.base04 = "665c54"; # Foreground 2.base05 = "504945"; # Foreground 1.base06 = "3c3836"; # Foreground 0.base07 = "282828"; # Foreground.base08 = "9d0006"; # Red.base09 = "af3a03"; # Orange.base0A = "b57614"; # Yellow.base0B = "79740e"; # Green.base0C = "427b58"; # Aqua.base0D = "076678"; # Blue.base0E = "8f3f71"; # Purple.base0F = "d65d0e"; # Brown.};};# Current color scheme.colors = if is_dark then gruvbox_colors.dark else gruvbox_colors.light;
# program-specific theme names
# Base16 color scheme.inherit colors;# Color helpers with prefixes.withHashtag = lib.mapAttrs (name: value: "#${value}") colors;with0x = lib.mapAttrs (name: value: "0x${value}") colors;# Design tokens.cornerRadius = 4;borderWidth = 2;margin = 8;padding = 8;# Font configuration.font = {size = {normal = 16;big = 20;small = 12;};mono = {name = "JetBrainsMono Nerd Font";family = "JetBrainsMono Nerd Font Mono";};};# Program-specific theme names.
{ modulesPath, ... }: {imports = [(modulesPath + "/installer/scan/not-detected.nix")];boot.loader = {systemd-boot.enable = true;efi.canTouchEfiVariables = true;grub.device = "nodev";};# Hardware-specific kernel modulesboot.initrd.availableKernelModules = ["ahci""nvme""xhci_pci""usb_storage""sd_mod"];# Filesystem configuration with your actual labelsfileSystems."/" = {device = "/dev/disk/by-label/nixos";fsType = "ext4";};fileSystems."/boot" = {device = "/dev/disk/by-label/BOOT";fsType = "vfat";};}
lib: letinherit (lib) inputs enabled;interface = "ts0";in {class = "nixos";config = lib.nixosSystem' {system = "x86_64-linux";modules = [({ pkgs, lib, config, keys, self, ... }: {imports = [(self + /modules/system.nix)(self + /modules/nix.nix)./hardware.nix];type = "desktop";isGaming = true;nixpkgs.hostPlatform.system = "x86_64-linux";# Allow unfree packages for gaming and graphicsunfree.allowedNames = ["nvidia-x11""nvidia-settings""nvidia-persistenced""steam""steam-original""steam-unwrapped""steamPackages.steam"];age.secrets.id.file = ./id.age;services.openssh = enabled {hostKeys = [{type = "ed25519";path = config.age.secrets.id.path;}];settings = {PasswordAuthentication = false;KbdInteractiveAuthentication = false;AcceptEnv = "SHELLS COLORTERM";};};age.secrets.password.file = ./password.age;users.users = {root = {shell = pkgs.nushell;hashedPasswordFile = config.age.secrets.password.path;openssh.authorizedKeys.keys = keys.admins;};jam = {description = "Jam";isNormalUser = true;shell = pkgs.nushell;hashedPasswordFile = config.age.secrets.password.path;openssh.authorizedKeys.keys = keys.admins;extraGroups = [ "wheel" "networkmanager" ];};build = {description = "Build";isNormalUser = true;createHome = false;openssh.authorizedKeys.keys = keys.all;extraGroups = [ "build" ];};};home-manager.users = {root = {};jam = {};};networking = {hostName = "yuzu";firewall = enabled {trustedInterfaces = [ interface ];allowedTCPPorts = [ 22 ];};useDHCP = lib.mkDefault true;interfaces = {};};home-manager.sharedModules = [{home.stateVersion = "24.11";}];system.stateVersion = "24.11";})];};}
{ modulesPath, ... }: {imports = [(modulesPath + "/installer/scan/not-detected.nix")];boot.loader = {systemd-boot.enable = true;efi.canTouchEfiVariables = true;grub.device = "nodev";};# Hardware-specific kernel modulesboot.initrd.availableKernelModules = ["ahci""nvme""xhci_pci""usb_storage""sd_mod"];# Filesystem configuration with your actual labelsfileSystems."/" = {device = "/dev/disk/by-label/nixos";fsType = "ext4";};fileSystems."/boot" = {device = "/dev/disk/by-label/BOOT";fsType = "vfat";};}
lib: letinherit (lib) inputs enabled;interface = "ts0";in {class = "nixos";config = lib.nixosSystem' {system = "x86_64-linux";modules = [({ pkgs, lib, config, keys, self, ... }: {imports = [(self + /modules/system.nix)(self + /modules/nix.nix)./hardware.nix];type = "desktop";nixpkgs.hostPlatform.system = "x86_64-linux";# Allow unfree packages for graphicsunfree.allowedNames = ["nvidia-x11""nvidia-settings""nvidia-persistenced"];age.secrets.id.file = ./id.age;services.openssh = enabled {hostKeys = [{type = "ed25519";path = config.age.secrets.id.path;}];settings = {PasswordAuthentication = false;KbdInteractiveAuthentication = false;AcceptEnv = "SHELLS COLORTERM";};};age.secrets.password.file = ./password.age;users.users = {root = {shell = pkgs.nushell;hashedPasswordFile = config.age.secrets.password.path;openssh.authorizedKeys.keys = keys.admins;};jam = {description = "Jam";isNormalUser = true;shell = pkgs.nushell;hashedPasswordFile = config.age.secrets.password.path;openssh.authorizedKeys.keys = keys.admins;extraGroups = [ "wheel" "networkmanager" ];};build = {description = "Build";isNormalUser = true;createHome = false;openssh.authorizedKeys.keys = keys.all;extraGroups = [ "build" ];};};home-manager.users = {root = {};jam = {};};networking = {hostName = "date";firewall = enabled {trustedInterfaces = [ interface ];allowedTCPPorts = [ 22 ];};useDHCP = lib.mkDefault true;interfaces = {};};home-manager.sharedModules = [{home.stateVersion = "24.11";}];system.stateVersion = "24.11";})];};}