Nixos label fixing regex, fixes #10

This commit is contained in:
EsVagy42 2026-01-18 14:37:45 +01:00
parent 44f24f05ac
commit 6182e09a41
2 changed files with 8 additions and 6 deletions

View file

@ -134,9 +134,11 @@ in
boot.loader.grub.efiSupport = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.grub.useOSProber = true;
system.nixos.label = builtins.replaceStrings [ "\n" " " ] [ "" "_" ] (
builtins.readFile ./commit_text
);
system.nixos.label = lib.pipe (builtins.readFile ./commit_text) [
(lib.strings.trim)
(lib.strings.split "[^[:alnum:]:_.-]+")
(lib.strings.concatMapStrings (s: if lib.isList s then "_" else s))
];
# Needed for audio to work
boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux_latest;
@ -398,7 +400,7 @@ in
productive = {
inheritParentConfig = true;
configuration = {
environment.etc."specialisation".text = "productive";
environment.etc."specialisation".text = "productive";
environment.systemPackages = basePackages;
programs.steam.enable = lib.mkOverride 99 false;
}
@ -413,7 +415,7 @@ in
no_yt = {
inheritParentConfig = true;
configuration = {
environment.etc."specialisation".text = "no_yt";
environment.etc."specialisation".text = "no_yt";
environment.systemPackages = basePackages ++ unproductivePackages;
}
// blocky_config (