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 ]; # networking.firewall.allowedTCPPorts = [ 4713 ];
systemd.services."NetworkManager-wait-online".enable = false; systemd.services."NetworkManager-wait-online".enable = false;
systemd.tmpfiles.rules = [
"L+ /opt/rocm/hip - - - - ${pkgs.hip}"
];
services.xserver.enable = true; 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 # release channel
system.stateVersion = "22.05"; # Did you read the comment? system.stateVersion = "22.05"; # Did you read the comment?

View file

@ -30,7 +30,10 @@
fsType = "vfat"; 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 # 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 # (the default) this is the recommended approach. When using systemd-networkd it's

View file

@ -163,35 +163,35 @@
RuntimeDirectorySize=12G RuntimeDirectorySize=12G
''; '';
networking = { #networking = {
#nameservers = [ #nameservers = [
#"192.168.8.205" #"192.168.8.205"
#]; #];
wireguard = { #wireguard = {
enable = true; #enable = true;
interfaces = { #interfaces = {
wg-maxim-vpn = { #wg-maxim-vpn = {
privateKey = "CLcq8sCnusXz0jFHz6ODAZBD2Sn2vb9a5BCfbQGrrXk="; #privateKey = "CLcq8sCnusXz0jFHz6ODAZBD2Sn2vb9a5BCfbQGrrXk=";
listenPort = 21124; #listenPort = 21124;
ips = [ #ips = [
"10.0.0.4/32" #"10.0.0.4/32"
]; #];
peers = [ #peers = [
{ #{
allowedIPs = [ #allowedIPs = [
"10.0.0.0/24" #"10.0.0.0/24"
"192.168.8.0/24" #"192.168.8.0/24"
#"0.0.0.0/0" #"0.0.0.0/0"
"::/0" #"::/0"
]; #];
endpoint = "vpn.local.germannr4.com:51820"; #endpoint = "vpn.local.germannr4.com:51820";
persistentKeepalive = 25; #persistentKeepalive = 25;
publicKey = "coP4Hh1smQvVI52ftZFyPfmzvsKZcT/hHa8zHMrlZwE="; #publicKey = "coP4Hh1smQvVI52ftZFyPfmzvsKZcT/hHa8zHMrlZwE=";
} #}
]; #];
}; #};
}; #};
}; #};
}; };
#fileSystems."/swap" = { #fileSystems."/swap" = {