This commit is contained in:
Schrottkatze 2023-02-26 21:47:04 +01:00
parent f1c3523374
commit 9adb086e45
3 changed files with 45 additions and 30 deletions

View file

@ -72,12 +72,24 @@
# networking.firewall.allowedTCPPorts = [ 4713 ];
systemd.services."NetworkManager-wait-online".enable = false;
systemd.tmpfiles.rules = [
"L+ /opt/rocm/hip - - - - ${pkgs.hip}"
];
services.xserver.enable = true;
services.xserver.videoDrivers = [ "amdgpu" ];
systemd.services = {
create-swapfile = {
serviceConfig.Type = "oneshot";
wantedBy = [ "swap-swapfile.swap" ];
script = ''
swapfile="/swap/swapfile"
if [[ -f "$swapfile" ]]; then
echo "Swap file $swapfile already exists, taking no action"
else
echo "Setting up swap file $swapfile"
${pkgs.coreutils}/bin/truncate -s 0 "$swapfile"
${pkgs.e2fsprogs}/bin/chattr +C "$swapfile"
fi
'';
};
};
# release channel
system.stateVersion = "22.05"; # Did you read the comment?

View file

@ -30,7 +30,10 @@
fsType = "vfat";
};
swapDevices = [ ];
swapDevices = [{
device = "/swap/swapfile";
size = (1024 * 64) + (1024 * 8); # 72G
} ];
# 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