patos/modules/generic.nix
Daniel Lundin b16bf9bcb8
All checks were successful
ci/woodpecker/pr/ci Pipeline was successful
feat(sysupdate): Download from dl.patagia.dev. Add gpg authentication.
2024-10-04 00:12:42 +02:00

50 lines
1,020 B
Nix

{
pkgs,
config,
lib,
...
}:
{
boot = {
uki.name = "patos";
kernelParams = [ "console=ttyS0" ];
initrd.systemd.enable = true;
};
system.nixos = {
codeName = "Finn";
distroId = "patos";
distroName = "PatOS";
release = "2024-09";
};
system.image.version = "0.0.1"; # FIXME: Use epoch version.
# Make the current system version visible in the prompt.
programs.bash.promptInit = ''
export PS1="\u@\h (version ${config.system.image.version}) $ "
'';
# Not compatible with system.etc.overlay.enable yet.
# users.mutableUsers = false;
services.getty.autologinUser = "root";
# Don't accumulate crap.
boot.tmp.cleanOnBoot = true;
services.journald.extraConfig = ''
SystemMaxUse=10M
'';
# Debugging
environment.systemPackages = with pkgs; [
parted
(runCommand "systemd-sysupdate" { } ''
mkdir -p $out/bin
ln -s ${config.systemd.package}/lib/systemd/systemd-sysupdate $out/bin
'')
];
system.stateVersion = "24.11";
}