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

View file

@ -1,71 +1,9 @@
{ lib, pkgs, modulesPath, ... }@inputs: {
imports = [ (modulesPath + "/profiles/minimal.nix") ];
# 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;
networking.hostName = "PABU";
nix = {
settings = {
experimental-features = [ "nix-command" "flakes" ];
auto-optimise-store = true;
};
};
users.groups.gandalf = { gid = 1000; };
users.users.gandalf = {
isNormalUser = true;
home = "/home/gandalf";
createHome = true;
group = "gandalf";
extraGroups = [ "wheel" ];
};
security.sudo.wheelNeedsPassword = false;
# welcome to nix
programs.nix-ld = { enable = true; };
environment.systemPackages = with pkgs; [
# bare essentials
git
neovim
# mason needs stuff
gcc
clang-tools
cargo
nodejs_24
jdk
tree-sitter
python3
go
# mason needs stuff
unzip
# telescope
fzf
ripgrep
# stuff
nixfmt-rfc-style
inputs.agenix.packages.x86_64-linux.default
{ modulesPath, ... }: {
imports = [
(modulesPath + "/profiles/minimal.nix")
./applications.nix
./network.nix
./system.nix
./user.nix
];
system.stateVersion = "24.05";
}