feat(PABU): cleanup and add deploy helper

This commit is contained in:
Jacob Bachmann 2025-08-19 16:18:46 +02:00
parent 69f9f9d51a
commit ce5aa85b30
5 changed files with 140 additions and 69 deletions

27
hosts/PABU/system.nix Normal file
View file

@ -0,0 +1,27 @@
{ lib, pkgs, ... }: {
# Installing a new system within the nspawn means that the /sbin/init script
# just needs to be updated, as there is no bootloader.
system.build.installBootLoader = pkgs.writeScript "install-sbin-init.sh" ''
#!${pkgs.runtimeShell}
${pkgs.coreutils}/bin/ln -fs "$1/init" /sbin/init
'';
system.activationScripts.installInitScript = lib.mkForce ''
${pkgs.coreutils}/bin/ln -fs $systemConfig/init /sbin/init
'';
boot.isContainer = true;
nix = {
settings = {
experimental-features = [ "nix-command" "flakes" ];
auto-optimise-store = true;
};
};
security.sudo.wheelNeedsPassword = false;
system.stateVersion = "24.05";
}