PatOS is born!

This commit is contained in:
Lars Sjöström 2024-09-12 21:57:01 +02:00
parent 0f3b2072f4
commit 44d8f9c90d
No known key found for this signature in database
12 changed files with 383 additions and 0 deletions

41
modules/generic.nix Normal file
View file

@ -0,0 +1,41 @@
{ pkgs, config, ... }: {
boot.uki.name = "patos";
boot.kernelParams = [ "console=ttyS0" ];
system.nixos.release = "2024-09";
system.nixos.codeName = "Finn";
system.nixos.distroId = "patos";
system.nixos.distroName = "PatOS";
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";
boot.initrd.systemd.enable = true;
# 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";
}