diff --git a/bin/lib/cmds.nu b/bin/lib/cmds.nu index fb3fa97..78293d6 100644 --- a/bin/lib/cmds.nu +++ b/bin/lib/cmds.nu @@ -315,8 +315,8 @@ export def "skyg build-image" [ cd $REPO_ROOT let spec = (match $target { "iso" => { config: "iso", out: "iso", attr: "isoImage" } - "pi1" => { config: "hl-pi1-sd-image", out: "sd-image", attr: "sdImage" } - "pi2" => { config: "hl-pi2-sd-image", out: "sd-image", attr: "sdImage" } + "pi1" => { config: "hl-pi1", out: "sd-image", attr: "sdImage" } + "pi2" => { config: "hl-pi2", out: "sd-image", attr: "sdImage" } _ => { error make { msg: $"Unknown image target '($target)'. Expected: iso, pi1, pi2" } } }) nix build $".#nixosConfigurations.($spec.config).config.system.build.($spec.attr)" diff --git a/flake.nix b/flake.nix index 97e2e99..3c592a8 100644 --- a/flake.nix +++ b/flake.nix @@ -279,7 +279,7 @@ ./hosts/hl-minipc3.hardware-configuration.nix ]; }; - hl-pi1 = lib.makeNixOs { + hl-pi1 = lib.makeSdImage { system = "aarch64-linux"; hostName = "hl-pi1"; configuration = [ @@ -287,16 +287,7 @@ ./hosts/hl-pi1.hardware-configuration.nix ]; }; - # Fully-baked bootable SD card image for hl-pi1 — builds the whole - # target system off-Pi (see nix.buildMachines/binfmt on fwdesk / - # hl-bigbox1) so flashing it needs no on-device rebuild. - hl-pi1-sd-image = lib.makeSdImage { - hostName = "hl-pi1"; - configuration = [ - ./hosts/hl-pi1.nix - ]; - }; - hl-pi2 = lib.makeNixOs { + hl-pi2 = lib.makeSdImage { system = "aarch64-linux"; hostName = "hl-pi2"; configuration = [ @@ -304,14 +295,6 @@ ./hosts/hl-pi2.hardware-configuration.nix ]; }; - # Fully-baked bootable SD card image for hl-pi2 — builds the whole - # target system off-Pi so flashing it needs no on-device rebuild. - hl-pi2-sd-image = lib.makeSdImage { - hostName = "hl-pi2"; - configuration = [ - ./hosts/hl-pi2.nix - ]; - }; hl-terra1 = lib.makeNixOs { hostName = "hl-terra1"; configuration = [ diff --git a/hosts/hl-pi2.hardware-configuration.nix b/hosts/hl-pi2.hardware-configuration.nix index 8b7cf0a..ec78191 100644 --- a/hosts/hl-pi2.hardware-configuration.nix +++ b/hosts/hl-pi2.hardware-configuration.nix @@ -6,6 +6,7 @@ boot.initrd.kernelModules = [ ]; boot.kernelModules = [ ]; boot.extraModulePackages = [ ]; + boot.zfs.forceImportRoot = false; fileSystems."/" = { device = "/dev/disk/by-label/NIXOS_SD"; diff --git a/hosts/hl-pi2.nix b/hosts/hl-pi2.nix index 2df4492..70b91a4 100644 --- a/hosts/hl-pi2.nix +++ b/hosts/hl-pi2.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, determinate, ... }: +{ lib, pkgs, config, determinate, ... }: { skyg = { user.enable = true; @@ -13,6 +13,7 @@ tiler = { enable = true; hyprland.enable = true; + hyprland.configLink.enable = false; noctalia.enable = false; quickshell.enable = true; }; @@ -38,6 +39,18 @@ # Serial console, useful for headless debugging over UART. boot.kernelParams = [ "console=ttyS0,115200n8" "console=tty0" ]; - # SD image has no swap partition; use compressed RAM swap instead. zramSwap.enable = true; + programs.dank-material-shell.greeter = { + enable = true; + compositor.name = "hyprland"; + configHome = "/home/${config.skyg.user.name}"; + }; + services.displayManager.autoLogin = { + enable = true; + user = config.skyg.user.name; + }; + services.displayManager.defaultSession = "hyprland"; + environment.systemPackages = with pkgs; [ + foot + ]; } diff --git a/modules/nixos/desktop/tiler/hyprland.nix b/modules/nixos/desktop/tiler/hyprland.nix index 7655ab9..7bd17d6 100644 --- a/modules/nixos/desktop/tiler/hyprland.nix +++ b/modules/nixos/desktop/tiler/hyprland.nix @@ -26,6 +26,16 @@ in Defaults to the machine's hostName (e.g. `fwbook` -> `configs/fwbook/hypr`). ''; }; + configLink = { + enable = lib.mkOption { + type = lib.types.bool; + default = true; + description = '' + Whether to symlink `~/.config/hypr` -> `configs//hypr`. + Disable on hosts that manage their own Hyprland config elsewhere. + ''; + }; + }; }; }; config = lib.mkIf cfg.enable { @@ -58,10 +68,12 @@ in ]; # Symlink ~/.config/hypr -> configs//hypr (host-specific). - system.userActivationScripts.hyprlandConfig.text = skygUtils.makeHyperlinkScriptToConfigs { - filePath = "${cfg.configName}/hypr"; - targetPath = "hypr"; - configSource = "/home/${config.skyg.user.name}/nixos-setup/configs"; + system.userActivationScripts.hyprlandConfig = lib.mkIf cfg.configLink.enable { + text = skygUtils.makeHyperlinkScriptToConfigs { + filePath = "${cfg.configName}/hypr"; + targetPath = "hypr"; + configSource = "/home/${config.skyg.user.name}/nixos-setup/configs"; + }; }; }; } diff --git a/secrets/glmain.json.age b/secrets/glmain.json.age index 329d0f2..dbac892 100644 Binary files a/secrets/glmain.json.age and b/secrets/glmain.json.age differ