64 lines
1.3 KiB
Nix
64 lines
1.3 KiB
Nix
{
|
|
pkgs,
|
|
config,
|
|
lib,
|
|
...
|
|
}:
|
|
{
|
|
|
|
boot = {
|
|
enableContainers = false;
|
|
initrd.systemd.enable = true;
|
|
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.
|
|
|
|
system.nixos = {
|
|
codeName = "Finn";
|
|
distroId = "patos";
|
|
distroName = "PatOS";
|
|
release = "2024-09";
|
|
};
|
|
|
|
system.switch.enable = false;
|
|
|
|
# Make the current system version visible in the prompt.
|
|
programs.bash.promptInit = ''
|
|
export PS1="\u@\h (version ${config.system.image.version}) \w $ "
|
|
'';
|
|
|
|
# Not compatible with system.etc.overlay.enable yet.
|
|
# users.mutableUsers = false;
|
|
|
|
services.getty.autologinUser = "root";
|
|
|
|
# Temporary files
|
|
boot.tmp.cleanOnBoot = true;
|
|
boot.tmp.useTmpfs = true;
|
|
systemd.services.nix-daemon = {
|
|
environment.TMPDIR = "/var/tmp";
|
|
};
|
|
|
|
services.journald.extraConfig = ''
|
|
SystemMaxUse=10M
|
|
'';
|
|
|
|
services.fstrim.enable = true;
|
|
|
|
# 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";
|
|
}
|