diff --git a/monosodium-glutamate-g/configuration.nix b/monosodium-glutamate-g/configuration.nix index cc19bb9..a6fa843 100644 --- a/monosodium-glutamate-g/configuration.nix +++ b/monosodium-glutamate-g/configuration.nix @@ -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? diff --git a/monosodium-glutamate-g/hardware-configuration.nix b/monosodium-glutamate-g/hardware-configuration.nix index 1c92a40..44fc9e5 100644 --- a/monosodium-glutamate-g/hardware-configuration.nix +++ b/monosodium-glutamate-g/hardware-configuration.nix @@ -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 diff --git a/potatobook-g/configuration.nix b/potatobook-g/configuration.nix index a34a999..c3fdd12 100644 --- a/potatobook-g/configuration.nix +++ b/potatobook-g/configuration.nix @@ -163,35 +163,35 @@ RuntimeDirectorySize=12G ''; - networking = { + #networking = { #nameservers = [ #"192.168.8.205" #]; - wireguard = { - enable = true; - interfaces = { - wg-maxim-vpn = { - privateKey = "CLcq8sCnusXz0jFHz6ODAZBD2Sn2vb9a5BCfbQGrrXk="; - listenPort = 21124; - ips = [ - "10.0.0.4/32" - ]; - peers = [ - { - allowedIPs = [ - "10.0.0.0/24" - "192.168.8.0/24" + #wireguard = { + #enable = true; + #interfaces = { + #wg-maxim-vpn = { + #privateKey = "CLcq8sCnusXz0jFHz6ODAZBD2Sn2vb9a5BCfbQGrrXk="; + #listenPort = 21124; + #ips = [ + #"10.0.0.4/32" + #]; + #peers = [ + #{ + #allowedIPs = [ + #"10.0.0.0/24" + #"192.168.8.0/24" #"0.0.0.0/0" - "::/0" - ]; - endpoint = "vpn.local.germannr4.com:51820"; - persistentKeepalive = 25; - publicKey = "coP4Hh1smQvVI52ftZFyPfmzvsKZcT/hHa8zHMrlZwE="; - } - ]; - }; - }; - }; + #"::/0" + #]; + #endpoint = "vpn.local.germannr4.com:51820"; + #persistentKeepalive = 25; + #publicKey = "coP4Hh1smQvVI52ftZFyPfmzvsKZcT/hHa8zHMrlZwE="; + #} + #]; + #}; + #}; + #}; }; #fileSystems."/swap" = {