feat(PABU): cleanup and add deploy helper
This commit is contained in:
parent
69f9f9d51a
commit
ce5aa85b30
5 changed files with 140 additions and 69 deletions
27
hosts/PABU/system.nix
Normal file
27
hosts/PABU/system.nix
Normal 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";
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue