From c2c37cc50a89bd7ca8967f951b3382d4c7934ce9 Mon Sep 17 00:00:00 2001 From: Benno Lorenz Date: Wed, 25 Mar 2026 15:25:40 +0100 Subject: [PATCH] update swaylock settings --- hosts/default/host-packages.nix | 4 --- hosts/voyager/default.nix | 6 ++++ hosts/voyager/hardware.nix | 33 +++++++++++++++++++ hosts/voyager/host-packages.nix | 25 +++++++++++++++ hosts/voyager/variables.nix | 57 +++++++++++++++++++++++++++++++++ modules/core/swaylock.nix | 15 +++------ modules/home/default.nix | 2 +- modules/home/stylix.nix | 2 +- modules/home/swaylock.nix | 45 ++++++++++++++++++++++++++ 9 files changed, 172 insertions(+), 17 deletions(-) create mode 100644 hosts/voyager/default.nix create mode 100644 hosts/voyager/hardware.nix create mode 100644 hosts/voyager/host-packages.nix create mode 100644 hosts/voyager/variables.nix create mode 100644 modules/home/swaylock.nix diff --git a/hosts/default/host-packages.nix b/hosts/default/host-packages.nix index 4770675..5209692 100644 --- a/hosts/default/host-packages.nix +++ b/hosts/default/host-packages.nix @@ -12,10 +12,6 @@ # Browser inputs.zen-browser.packages."x86_64-linux".default - # Screen locking (niri) - swaylock - swayidle - # Dev tools nodejs python3 diff --git a/hosts/voyager/default.nix b/hosts/voyager/default.nix new file mode 100644 index 0000000..1ef7d77 --- /dev/null +++ b/hosts/voyager/default.nix @@ -0,0 +1,6 @@ +{ ... }: { + imports = [ + ./hardware.nix + ./host-packages.nix + ]; +} diff --git a/hosts/voyager/hardware.nix b/hosts/voyager/hardware.nix new file mode 100644 index 0000000..0884fcf --- /dev/null +++ b/hosts/voyager/hardware.nix @@ -0,0 +1,33 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "sd_mod" "rtsx_pci_sdmmc" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/6c8580c1-d4cb-40be-bc28-fa98a4ad9b57"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/1801-0D6D"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/c3bdf4bd-fc46-4443-9282-a8a1de81c5c2"; } + ]; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/hosts/voyager/host-packages.nix b/hosts/voyager/host-packages.nix new file mode 100644 index 0000000..5209692 --- /dev/null +++ b/hosts/voyager/host-packages.nix @@ -0,0 +1,25 @@ +{ + pkgs, + pkgs-unstable, + inputs, + ... +}: { + environment.systemPackages = with pkgs; [ + # Communication + pkgs-unstable.signal-desktop + element-desktop + + # Browser + inputs.zen-browser.packages."x86_64-linux".default + + # Dev tools + nodejs + python3 + gnumake + gcc + + # Security + gnupg + kdePackages.kleopatra + ]; +} diff --git a/hosts/voyager/variables.nix b/hosts/voyager/variables.nix new file mode 100644 index 0000000..de539a8 --- /dev/null +++ b/hosts/voyager/variables.nix @@ -0,0 +1,57 @@ +{ + # Git Configuration + gitUsername = "Benno Lorenz"; + gitEmail = "benno@benno-lorenz.com"; + + # Desktop Environment — Niri (scrolling tiling WM) + desktopEnvironment = "niri"; + + # Display Manager + # `tui` for text login, `sddm` for graphical GUI + displayManager = "sddm"; + + # Bundled application toggles + tmuxEnable = true; + alacrittyEnable = false; + weztermEnable = false; + ghosttyEnable = true; + vscodeEnable = true; + helixEnable = false; + doomEmacsEnable = false; + + # Monitor settings (adjust per-machine) + extraMonitorSettings = " + "; + + # Waybar settings + clock24h = true; + + # Default browser (must be installed separately in host-packages.nix) + browser = "zen"; + + # Default terminal emulator + terminal = "ghostty"; + + # Keyboard layout + keyboardLayout = "de"; + keyboardVariant = ""; + consoleKeyMap = "de"; + + # NFS support + enableNFS = false; + + # Printing support + printEnable = false; + + # Thunar GUI file manager (Yazi is default) + thunarEnable = true; + + # Stylix theme image — sets the system color palette + stylixImage = ../../wallpapers/Amagi.jpeg; + + # Waybar style + waybarChoice = ../../modules/home/waybar/waybar-curved.nix; + + # Network host ID (needed for zfs, otherwise leave as-is) + hostId = "5ab03f50"; +} diff --git a/modules/core/swaylock.nix b/modules/core/swaylock.nix index 098c57f..530b0db 100644 --- a/modules/core/swaylock.nix +++ b/modules/core/swaylock.nix @@ -1,13 +1,6 @@ -{ config, pkgs, host, ... }: -let - vars = import ../../../hosts/${host}/variables.nix; -in +{ pkgs, ... }: { - services.udev.extraRules = ""; - - environment.etc."swaylock/config".text = '' - color=${config.lib.stylix.colors.base00} - ''; - - environment.systemPackages = [ pkgs.swaylock ]; + # swaylock-effects config is managed via home-manager (modules/home/swaylock.nix) + # PAM auth is in security.nix + environment.systemPackages = [ pkgs.swayidle ]; } diff --git a/modules/home/default.nix b/modules/home/default.nix index d00c86b..8b4a57b 100644 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -43,7 +43,7 @@ in ./zoxide.nix ./zsh ] - ++ (if desktopEnvironment == "niri" then [ ./niri ] else [ ]) + ++ (if desktopEnvironment == "niri" then [ ./niri ./swaylock.nix ] else [ ]) ++ (if helixEnable then [ ./evil-helix.nix ] else [ ]) ++ (if vscodeEnable then [ ./vscode.nix ] else [ ]) ++ ( diff --git a/modules/home/stylix.nix b/modules/home/stylix.nix index 25d1567..7a0217a 100644 --- a/modules/home/stylix.nix +++ b/modules/home/stylix.nix @@ -4,7 +4,7 @@ _: { rofi.enable = false; hyprland.enable = false; hyprlock.enable = true; - swaylock.enable = true; + swaylock.enable = false; ghostty.enable = true; qt = { enable = true; diff --git a/modules/home/swaylock.nix b/modules/home/swaylock.nix new file mode 100644 index 0000000..63ccdec --- /dev/null +++ b/modules/home/swaylock.nix @@ -0,0 +1,45 @@ +{ config, pkgs, ... }: +let + colors = config.lib.stylix.colors; +in +{ + programs.swaylock = { + enable = true; + package = pkgs.swaylock-effects; + settings = { + screenshot = true; + clock = true; + indicator = true; + indicator-radius = 100; + indicator-thickness = 7; + effect-blur = "7x5"; + effect-vignette = "0.5:0.5"; + grace = 2; + fade-in = 0.2; + + font = "Sans"; + timestr = "%H:%M"; + datestr = "%a, %b %e"; + + bs-hl-color = "${colors.base08}"; + key-hl-color = "${colors.base0B}"; + separator-color = "00000000"; + inside-color = "00000088"; + inside-clear-color = "${colors.base0A}88"; + inside-ver-color = "${colors.base0D}88"; + inside-wrong-color = "${colors.base08}88"; + line-color = "00000000"; + line-clear-color = "00000000"; + line-ver-color = "00000000"; + line-wrong-color = "00000000"; + ring-color = "${colors.base02}"; + ring-clear-color = "${colors.base0A}"; + ring-ver-color = "${colors.base0D}"; + ring-wrong-color = "${colors.base08}"; + text-color = "${colors.base05}"; + text-clear-color = "${colors.base00}"; + text-ver-color = "${colors.base00}"; + text-wrong-color = "${colors.base00}"; + }; + }; +}