ljdsalkjdaslkj

This commit is contained in:
2025-04-01 02:11:38 +02:00
parent 6b3861126d
commit 2f3ed7e377
6 changed files with 38 additions and 16 deletions

View File

@@ -5,8 +5,8 @@
boot.loader.efi.canTouchEfiVariables = true;
#boot.kernel.sysctl."vm.swappiness" = lib.mkDefault 10; # 0-100, commonly 60
zramSwap.enable = true;
# swapDevices = lib.mkForce [];
# for testing only, not for building
boot.binfmt.addEmulatedSystemsToNixSandbox = false;

View File

@@ -5,14 +5,19 @@
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.efi.efiSysMountPoint = "/boot/efi";
#boot.kernel.sysctl."vm.swappiness" = lib.mkDefault 10; # 0-100, commonly 60
zramSwap.enable = true;
swapDevices = lib.mkForce [];
# amdgpu audio fix when at 4k@60fps
boot.kernelPackages = pkgs.linuxPackages_latest;
services.displayManager.autoLogin.enable = true;
services.displayManager.autoLogin.user = "pbsds";
# tmp: https://github.com/NixOS/nixpkgs/issues/103746#issuecomment-945091229
systemd.services."getty@tty1".enable = false;
systemd.services."autovt@tty1".enable = false;
boot.kernelPackages = pkgs.linuxPackages_latest; # amdgpu audio fix when at 4k@60fps
imports = [
./hardware-configuration.nix
../../../profiles/sshd

View File

@@ -23,9 +23,10 @@
fsType = "vfat";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/cd7b72b7-738a-4399-a887-ad69f6aa6ec9"; }
];
swapDevices = [{
device = "/dev/disk/by-uuid/cd7b72b7-738a-4399-a887-ad69f6aa6ec9";
# randomEncryption.enable = true;
}];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's

View File

@@ -5,6 +5,14 @@
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# add driver to stage-1 to make the usb dock not prevent boot
# https://github.com/NixOS/nixpkgs/issues/171625#issuecomment-2068283656
boot.kernelModules = [ "xhci_pci" ];
#boot.kernel.sysctl."vm.swappiness" = lib.mkDefault 10; # 0-100, commonly 60
zramSwap.enable = true;
swapDevices = lib.mkForce [];
# for testing only, not for building
boot.binfmt.addEmulatedSystemsToNixSandbox = false;
boot.binfmt.emulatedSystems = [
@@ -15,9 +23,6 @@
#nix.settings.system = "x86_64-linux";
#nix.settings.extra-platforms = [ "i686-linux" ];
boot.kernel.sysctl."vm.swappiness" = lib.mkDefault 10; # 0-100, commonly 60
boot.kernelModules = [ "xhci_pci" ]; # add driver to stage-1 to make the usb dock not prevent boot - https://github.com/NixOS/nixpkgs/issues/171625#issuecomment-2068283656
services.displayManager.autoLogin.enable = true;
services.displayManager.autoLogin.user = "pbsds";
# tmp: https://github.com/NixOS/nixpkgs/issues/103746#issuecomment-945091229

View File

@@ -23,9 +23,10 @@
fsType = "vfat";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/e9b56879-e406-44c7-ab60-fcd374fdf0ea"; }
];
swapDevices = [{
device = "/dev/disk/by-uuid/e9b56879-e406-44c7-ab60-fcd374fdf0ea";
# randomEncryption.enable = true;
}];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's

18
lib.nix
View File

@@ -65,10 +65,20 @@ let
"container"
else
null;
mounts = lib.pipe cfg.fileSystems [
(lib.filterAttrs (mount: fs: fs.fsType != "nfs")) # spammy
(lib.mapAttrs (mount: fs: "${fs.fsType}://${fs.device}"))
];
mounts =
lib.pipe cfg.fileSystems [
(lib.filterAttrs (mount: fs: fs.fsType != "nfs")) # spammy
(lib.mapAttrs (mount: fs: "${fs.fsType}://${fs.device}"))
]
// lib.pipe cfg.swapDevices [
(lib.map (s: s.device or s.label))
(
sx:
lib.optionalAttrs (sx != [ ]) {
swap = if lib.length sx == 1 then lib.head sx else sx;
}
)
];
}
// lib.optionalAttrs cfg.services.nginx.enable {
nginx-vhosts = lib.pipe cfg.services.nginx.virtualHosts [