Added swaylock on boot and lid close, added plymouth boot animation, added auto unencrypt and mount of SD card for source folder

This commit is contained in:
Nathan Anderson 2024-10-25 11:32:35 -06:00
parent 9598efa9b0
commit 8dfbd75747
5 changed files with 117 additions and 10 deletions

View File

@ -48,11 +48,40 @@ in
"nix-command" "flakes" "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;
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.hostName = deskCfg.hostName; # Define your hostname.
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
networking.wireless.iwd.enable = true; networking.wireless.iwd.enable = true;
@ -77,9 +106,16 @@ in
## TODO move all of this into a hyprland config ## TODO move all of this into a hyprland config
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
cryptsetup
nwg-hello nwg-hello
cage 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.hyprland.enable = true;
# programs.steam.enable = true; # programs.steam.enable = true;
# For electron apps in wayland # For electron apps in wayland

View File

@ -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

View File

@ -1,16 +1,25 @@
image=~/.config/swaylock/lock.png screenshot
fade-in=0.2 effect-pixelate=18
effect-vignette=0.7:0.5
clock 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-bs-hl-color=f4dbd6
caps-lock-key-hl-color=a6da95 caps-lock-key-hl-color=a6da95
inside-color=00000000 inside-color=666a8f
inside-clear-color=00000000 inside-clear-color=00000000
inside-caps-lock-color=00000000 inside-caps-lock-color=00000000
inside-ver-color=00000000 inside-ver-color=00000000
inside-wrong-color=00000000 inside-wrong-color=00000000
key-hl-color=a6da95 key-hl-color=67bf4a
layout-bg-color=00000000 layout-bg-color=00000000
layout-border-color=00000000 layout-border-color=00000000
layout-text-color=cad3f5 layout-text-color=cad3f5

View File

@ -8,10 +8,16 @@
[ (modulesPath + "/installer/scan/not-detected.nix") [ (modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.systemd.enable = true;
boot.initrd.availableKernelModules = [ "xhci_pci" "usb_storage" "sd_mod" "sdhci_pci" ]; boot.initrd.availableKernelModules = [ "xhci_pci" "usb_storage" "sd_mod" "sdhci_pci" ];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
# boot.initrd.luks.devices."enc_source" = {
# device = "/dev/disk/by-uuid/80c9bd6b-5730-4daf-8f7e-ab13a3875921";
# keyFile = "/root/keyfile";
# crypttabExtraOpts = ["nofail"];
# };
fileSystems."/" = fileSystems."/" =
{ device = "/dev/disk/by-uuid/97472fe9-155a-4081-9c30-7515d261a184"; { device = "/dev/disk/by-uuid/97472fe9-155a-4081-9c30-7515d261a184";
@ -24,6 +30,12 @@
options = [ "fmask=0077" "dmask=0077" ]; 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 = swapDevices =
[ { device = "/dev/disk/by-uuid/2698a2f4-fa59-4c1b-9d89-c3c802c78404"; } [ { device = "/dev/disk/by-uuid/2698a2f4-fa59-4c1b-9d89-c3c802c78404"; }
]; ];

View File

@ -60,12 +60,14 @@
# Autostart # Autostart
exec-once = exec-once =
[ [
"swaylock" "swaylock -C ~/.config/swaylock/boot-config"
"swaybg -i ~/.config/hypr/nix.png" "swaybg -i ~/.config/hypr/nix.png"
"nwg-panel" "nwg-panel"
"nm-applet --indicator" "nm-applet --indicator"
# May need to kill mako if nwg-panel starts it # May need to kill mako if nwg-panel starts it
"swaync" "swaync"
# Disable keyboard's power button
"hyprctl keyword 'device[power-button]:enabled' 'false'"
]; ];
input = { input = {
repeat_rate = 50; repeat_rate = 50;
@ -87,7 +89,7 @@
rounding = 8; rounding = 8;
inactive_opacity = 0.8; inactive_opacity = 0.8;
# Perf improvement # Perf improvement
blur = { blur = {
enabled = false; enabled = false;
}; };
drop_shadow = false; drop_shadow = false;
@ -153,6 +155,10 @@
"$mod, F10, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+" "$mod, F10, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+"
# "$mod, XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle" # "$mod, XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
]; ];
# Lid switch binds
bindl = [
", switch:Lid Switch, exec, swaylock"
];
misc = { misc = {
"vfr" = true; "vfr" = true;
force_default_wallpaper = 0; force_default_wallpaper = 0;
@ -390,4 +396,10 @@
[icon theme] [icon theme]
Inherits=Catppuccin-Macchiato-Lavender-Cursors Inherits=Catppuccin-Macchiato-Lavender-Cursors
''; '';
services.wlsunset = {
enable = true;
sunrise = "07:00";
sunset = "17:00";
temperature.night = 3500;
};
} }