patos/modules/generic.nix

65 lines
1.3 KiB
Nix
Raw Normal View History

{
pkgs,
config,
lib,
...
}:
{
boot = {
2024-10-04 20:39:07 +02:00
enableContainers = false;
initrd.systemd.enable = true;
2024-10-04 20:39:07 +02:00
kernelParams = [
"console=ttyS0"
];
loader.efi.canTouchEfiVariables = true;
loader.grub.enable = false;
loader.systemd-boot.enable = true;
uki.name = "patos";
};
system.image.version = "0.0.1"; # FIXME: Use epoch version.
2024-10-04 20:39:07 +02:00
system.nixos = {
codeName = "Finn";
distroId = "patos";
distroName = "PatOS";
release = "2024-09";
};
2024-09-12 21:57:01 +02:00
system.switch.enable = false;
2024-09-12 21:57:01 +02:00
# Make the current system version visible in the prompt.
programs.bash.promptInit = ''
2024-10-13 23:18:17 +02:00
export PS1="\u@\h (version ${config.system.image.version}) \w $ "
2024-09-12 21:57:01 +02:00
'';
# Not compatible with system.etc.overlay.enable yet.
# users.mutableUsers = false;
services.getty.autologinUser = "root";
# Temporary files
2024-09-12 21:57:01 +02:00
boot.tmp.cleanOnBoot = true;
boot.tmp.useTmpfs = true;
systemd.services.nix-daemon = {
environment.TMPDIR = "/var/tmp";
};
2024-09-12 21:57:01 +02:00
services.journald.extraConfig = ''
SystemMaxUse=10M
'';
services.fstrim.enable = true;
2024-09-12 21:57:01 +02:00
# Debugging
environment.systemPackages = with pkgs; [
(runCommand "systemd-sysupdate" { } ''
mkdir -p $out/bin
ln -s ${config.systemd.package}/lib/systemd/systemd-sysupdate $out/bin
'')
];
system.stateVersion = "24.11";
}