Update nixpkgs, remove swapfile for old k3s config

This commit is contained in:
asonix 2024-04-04 14:02:01 -05:00
parent 74ff6e8886
commit 1f4601ccf3
2 changed files with 6 additions and 25 deletions

View file

@ -9,11 +9,11 @@
"utils": "utils"
},
"locked": {
"lastModified": 1711733382,
"narHash": "sha256-XuKlYhc9Hk6jMIIwWTP6CTQVUWi0Sq3nJApnUJk6bu8=",
"lastModified": 1711973905,
"narHash": "sha256-UFKME/N1pbUtn+2Aqnk+agUt8CekbpuqwzljivfIme8=",
"owner": "serokell",
"repo": "deploy-rs",
"rev": "2bad21828ee2c5d1e42588d5f4c53f5b10300c6a",
"rev": "88b3059b020da69cbe16526b8d639bd5e0b51c8b",
"type": "github"
},
"original": {
@ -58,11 +58,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1711703276,
"narHash": "sha256-iMUFArF0WCatKK6RzfUJknjem0H9m4KgorO/p3Dopkk=",
"lastModified": 1712163089,
"narHash": "sha256-Um+8kTIrC19vD4/lUCN9/cU9kcOsD1O1m+axJqQPyMM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d8fe5e6c92d0d190646fb9f1056741a229980089",
"rev": "fd281bd6b7d3e32ddfa399853946f782553163b5",
"type": "github"
},
"original": {

View file

@ -139,10 +139,6 @@
set -e
fallocate -l 4G /swapfile
chmod 0600 /swapfile
mkswap /swapfile
echo "Creating two partitions"
fdisk -w always /dev/nvme0n1 << EOL
g
@ -169,7 +165,6 @@
btrfs subvolume create /btrfs/nvme/@k3s-config
btrfs subvolume create /btrfs/nvme/@snapshots
btrfs subvolume create /btrfs/nvme/@swap
btrfs subvolume create /btrfs/nvme/@var-lib-rancher
btrfs subvolume create /btrfs/nvme/@var-log-pods
@ -237,11 +232,6 @@
fsType = "btrfs";
options = defaultOptions ++ [ "subvol=@garage" ];
};
"/swap" = {
inherit device;
fsType = "btrfs";
options = defaultOptions ++ [ "subvol=@swap" ];
};
"/var/lib/rancher" = {
inherit device;
fsType = "btrfs";
@ -259,15 +249,6 @@
else
{ };
swapDevices =
let
swapFile = {
device = "/swap/file";
size = (1024 * 4);
};
in
if unlockMounts && mountVolumes then [ swapFile ] else [ ];
services.nfs.server = {
enable = unlockMounts && mountVolumes;
exports = ''