diff --git a/scrappy/desktop-configuration.nix b/scrappy/desktop-configuration.nix index 7f87176..dfa4aee 100644 --- a/scrappy/desktop-configuration.nix +++ b/scrappy/desktop-configuration.nix @@ -48,11 +48,40 @@ in "nix-command" "flakes" ]; - # Use the systemd-boot EFI boot loader. - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; # boot.plymouth.enable = true; + boot = { + plymouth = { + enable = true; + theme = "circle_flow"; + themePackages = with pkgs; [ + # By default we would install all themes + (adi1090x-plymouth-themes.override { + selected_themes = [ "circle_flow" ]; + }) + ]; + }; + + # Enable "Silent Boot" + consoleLogLevel = 0; + initrd.verbose = false; + kernelParams = [ + "quiet" + "splash" + "boot.shell_on_fail" + "loglevel=3" + "rd.systemd.show_status=false" + "rd.udev.log_level=3" + "udev.log_priority=3" + ]; + # Hide the OS choice for bootloaders. + # It's still possible to open the bootloader list by pressing any key + # It will just not appear on screen unless a key is pressed + loader.timeout = 0; + # Use the systemd-boot EFI boot loader. + loader.systemd-boot.enable = true; + loader.efi.canTouchEfiVariables = true; + }; networking.hostName = deskCfg.hostName; # Define your hostname. networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. networking.wireless.iwd.enable = true; @@ -77,9 +106,16 @@ in ## TODO move all of this into a hyprland config environment.systemPackages = with pkgs; [ + cryptsetup nwg-hello cage ]; + # Get block UUID with + # `sudo blkid /dev/mmcblk1p1` + # Makes encrypted device available under /dev/mapper/enc_source + environment.etc.crypttab.text = '' + enc_source UUID=6e131a4e-1cba-4db7-b635-42381e4fd790 /root/keyfile + ''; programs.hyprland.enable = true; # programs.steam.enable = true; # For electron apps in wayland diff --git a/scrappy/dotfiles/swaylock/boot-config b/scrappy/dotfiles/swaylock/boot-config new file mode 100644 index 0000000..cf3d644 --- /dev/null +++ b/scrappy/dotfiles/swaylock/boot-config @@ -0,0 +1,38 @@ +image=~/.config/swaylock/lock.png +clock +indicator +ignore-empty-password +show-failed-attempts + +font=Overpass Nerd Font Mono +timestr=%I:%M %p +datestr=%A %b %e + +bs-hl-color=f4dbd6 +caps-lock-bs-hl-color=f4dbd6 +caps-lock-key-hl-color=a6da95 +inside-color=00000000 +inside-clear-color=00000000 +inside-caps-lock-color=00000000 +inside-ver-color=00000000 +inside-wrong-color=00000000 +key-hl-color=67bf4a +layout-bg-color=00000000 +layout-border-color=00000000 +layout-text-color=cad3f5 +line-color=00000000 +line-clear-color=00000000 +line-caps-lock-color=00000000 +line-ver-color=00000000 +line-wrong-color=00000000 +ring-color=b7bdf8 +ring-clear-color=f4dbd6 +ring-caps-lock-color=f5a97f +ring-ver-color=8aadf4 +ring-wrong-color=ee99a0 +separator-color=00000000 +text-color=363a4f +text-clear-color=f4dbd6 +text-caps-lock-color=f5a97f +text-ver-color=8aadf4 +text-wrong-color=ee99a0 diff --git a/scrappy/dotfiles/swaylock/config b/scrappy/dotfiles/swaylock/config index 11c9535..325b7cd 100644 --- a/scrappy/dotfiles/swaylock/config +++ b/scrappy/dotfiles/swaylock/config @@ -1,16 +1,25 @@ -image=~/.config/swaylock/lock.png -fade-in=0.2 +screenshot +effect-pixelate=18 +effect-vignette=0.7:0.5 clock -indicator +indicator-idle-visible +ignore-empty-password +show-failed-attempts +font=Overpass Nerd Font Mono +timestr=%I:%M %p +datestr=%A %b %e +fade-in=0.5 + +bs-hl-color=f4dbd6 caps-lock-bs-hl-color=f4dbd6 caps-lock-key-hl-color=a6da95 -inside-color=00000000 +inside-color=666a8f inside-clear-color=00000000 inside-caps-lock-color=00000000 inside-ver-color=00000000 inside-wrong-color=00000000 -key-hl-color=a6da95 +key-hl-color=67bf4a layout-bg-color=00000000 layout-border-color=00000000 layout-text-color=cad3f5 diff --git a/scrappy/hardware-configuration.nix b/scrappy/hardware-configuration.nix index 3d76518..32aa3cd 100644 --- a/scrappy/hardware-configuration.nix +++ b/scrappy/hardware-configuration.nix @@ -8,10 +8,16 @@ [ (modulesPath + "/installer/scan/not-detected.nix") ]; + boot.initrd.systemd.enable = true; boot.initrd.availableKernelModules = [ "xhci_pci" "usb_storage" "sd_mod" "sdhci_pci" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; + # boot.initrd.luks.devices."enc_source" = { + # device = "/dev/disk/by-uuid/80c9bd6b-5730-4daf-8f7e-ab13a3875921"; + # keyFile = "/root/keyfile"; + # crypttabExtraOpts = ["nofail"]; + # }; fileSystems."/" = { device = "/dev/disk/by-uuid/97472fe9-155a-4081-9c30-7515d261a184"; @@ -24,6 +30,12 @@ options = [ "fmask=0077" "dmask=0077" ]; }; + fileSystems."/home/scrappy/source" = { + device = "/dev/mapper/enc_source"; + fsType = "ext4"; + options = [ "nofail" ]; # Allow the boot to continue even if the mount fails + }; + swapDevices = [ { device = "/dev/disk/by-uuid/2698a2f4-fa59-4c1b-9d89-c3c802c78404"; } ]; diff --git a/scrappy/modules/home-manager/home.nix b/scrappy/modules/home-manager/home.nix index 4958d76..48cd8c6 100644 --- a/scrappy/modules/home-manager/home.nix +++ b/scrappy/modules/home-manager/home.nix @@ -60,12 +60,14 @@ # Autostart exec-once = [ - "swaylock" + "swaylock -C ~/.config/swaylock/boot-config" "swaybg -i ~/.config/hypr/nix.png" "nwg-panel" "nm-applet --indicator" # May need to kill mako if nwg-panel starts it "swaync" + # Disable keyboard's power button + "hyprctl keyword 'device[power-button]:enabled' 'false'" ]; input = { repeat_rate = 50; @@ -87,7 +89,7 @@ rounding = 8; inactive_opacity = 0.8; # Perf improvement - blur = { + blur = { enabled = false; }; drop_shadow = false; @@ -153,6 +155,10 @@ "$mod, F10, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+" # "$mod, XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle" ]; + # Lid switch binds + bindl = [ + ", switch:Lid Switch, exec, swaylock" + ]; misc = { "vfr" = true; force_default_wallpaper = 0; @@ -390,4 +396,10 @@ [icon theme] Inherits=Catppuccin-Macchiato-Lavender-Cursors ''; + services.wlsunset = { + enable = true; + sunrise = "07:00"; + sunset = "17:00"; + temperature.night = 3500; + }; }