Personal Nix setup
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add swaylock, swayidle, and systemd idle settings

+95
+1
home/desktop/default.nix
··· 8 8 ./waybar.nix 9 9 ./mako.nix 10 10 ./wofi.nix 11 + ./lock.nix 11 12 ]; 12 13 13 14 fonts.fontconfig.enable = true;
+73
home/desktop/lock.nix
··· 1 + { pkgs, ... } @ inputs: 2 + 3 + let 4 + inherit (import ../../lib/colors.nix inputs) hex; 5 + inherit (pkgs) hyprland swayidle; 6 + swaylock = pkgs.swaylock-effects; 7 + in { 8 + services.swayidle = let 9 + dpms = "${hyprland}/bin/hyprctl dispatch dpms"; 10 + lock = "${swaylock}/bin/swaylock"; 11 + in { 12 + enable = true; 13 + package = swayidle; 14 + systemdTarget = "graphical-session.target"; 15 + extraArgs = [ 16 + "idlehint 60" 17 + ]; 18 + events = [ 19 + { 20 + event = "lock"; 21 + command = "${lock}"; 22 + } 23 + { 24 + event = "before-sleep"; 25 + command = "${lock}"; 26 + } 27 + { 28 + event = "after-resume"; 29 + command = "${dpms} on"; 30 + } 31 + ]; 32 + timeouts = [ 33 + { 34 + timeout = 120; 35 + command = "systemctl suspend-then-hibernate"; 36 + resumeCommand = "${dpms} on"; 37 + } 38 + ]; 39 + }; 40 + 41 + programs.swaylock = { 42 + enable = true; 43 + package = swaylock; 44 + settings = { 45 + screenshots = true; 46 + clock = true; 47 + indicator = true; 48 + indicator-radius = 100; 49 + fade-in = 0.2; 50 + effect-blur = "16x3"; 51 + effect-vignette = "0.5:0.5"; 52 + timestr = "%H:%M"; 53 + font = "Inter"; 54 + key-hl-color = "${hex.brightBlue}"; 55 + inside-color = "00000088"; 56 + inside-caps-lock-color = "00000088"; 57 + inside-ver-color = "00000088"; 58 + inside-wrong-color = "00000088"; 59 + inside-clear-color = "${hex.cyan}"; 60 + text-color = "${hex.white}"; 61 + text-clear-color = "${hex.white}"; 62 + text-caps-lock-color = "${hex.white}"; 63 + text-ver-color = "${hex.white}"; 64 + text-wrong-color = "${hex.white}"; 65 + layout-text-color = "${hex.white}"; 66 + ring-color = "${hex.blue}"; 67 + ring-caps-lock-color = "${hex.brightBlue}"; 68 + ring-ver-color = "${hex.purple}"; 69 + ring-wrong-color = "${hex.red}"; 70 + ring-clear-color = "${hex.cyan}"; 71 + }; 72 + }; 73 + }
+17
machines/pepper/hardware.nix
··· 58 58 { device = "/dev/disk/by-uuid/${swapUUID}"; } 59 59 ]; 60 60 61 + boot.resumeDevice = "/dev/disk/by-uuid/${swapUUID}"; 62 + 63 + # prefer suspend-then-hibernate 64 + services.logind = { 65 + lidSwitch = "suspend-then-hibernate"; 66 + extraConfig = '' 67 + HandlePowerKey=hybrid-sleep 68 + LidSwitchIgnoreInhibited=no 69 + IdleAction=suspend-then-hibernate 70 + IdleActionSec=1m 71 + ''; 72 + }; 73 + 74 + systemd.sleep.extraConfig = '' 75 + HibernateDelaySec=2h 76 + ''; 77 + 61 78 # set host and allow unfree 62 79 nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; 63 80 nixpkgs.config.allowUnfree = true;
+2
modules/base/linux.nix
··· 30 30 }; 31 31 32 32 boot = { 33 + consoleLogLevel = 2; 34 + 33 35 loader = { 34 36 timeout = mkDefault 2; 35 37 systemd-boot.configurationLimit = mkDefault 3;
+2
modules/desktop/session.nix
··· 79 79 ]; 80 80 }; 81 81 82 + security.pam.services.swaylock = {}; 83 + 82 84 systemd.user.services.polkit-agent = { 83 85 description = "Polkit Authentication Agent"; 84 86 wantedBy = [ "graphical-session.target" ];