Update nixpkgs, remove swapfile for old k3s config
This commit is contained in:
parent
74ff6e8886
commit
1f4601ccf3
12
flake.lock
12
flake.lock
|
@ -9,11 +9,11 @@
|
||||||
"utils": "utils"
|
"utils": "utils"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1711733382,
|
"lastModified": 1711973905,
|
||||||
"narHash": "sha256-XuKlYhc9Hk6jMIIwWTP6CTQVUWi0Sq3nJApnUJk6bu8=",
|
"narHash": "sha256-UFKME/N1pbUtn+2Aqnk+agUt8CekbpuqwzljivfIme8=",
|
||||||
"owner": "serokell",
|
"owner": "serokell",
|
||||||
"repo": "deploy-rs",
|
"repo": "deploy-rs",
|
||||||
"rev": "2bad21828ee2c5d1e42588d5f4c53f5b10300c6a",
|
"rev": "88b3059b020da69cbe16526b8d639bd5e0b51c8b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -58,11 +58,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1711703276,
|
"lastModified": 1712163089,
|
||||||
"narHash": "sha256-iMUFArF0WCatKK6RzfUJknjem0H9m4KgorO/p3Dopkk=",
|
"narHash": "sha256-Um+8kTIrC19vD4/lUCN9/cU9kcOsD1O1m+axJqQPyMM=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "d8fe5e6c92d0d190646fb9f1056741a229980089",
|
"rev": "fd281bd6b7d3e32ddfa399853946f782553163b5",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
19
flake.nix
19
flake.nix
|
@ -139,10 +139,6 @@
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
fallocate -l 4G /swapfile
|
|
||||||
chmod 0600 /swapfile
|
|
||||||
mkswap /swapfile
|
|
||||||
|
|
||||||
echo "Creating two partitions"
|
echo "Creating two partitions"
|
||||||
fdisk -w always /dev/nvme0n1 << EOL
|
fdisk -w always /dev/nvme0n1 << EOL
|
||||||
g
|
g
|
||||||
|
@ -169,7 +165,6 @@
|
||||||
|
|
||||||
btrfs subvolume create /btrfs/nvme/@k3s-config
|
btrfs subvolume create /btrfs/nvme/@k3s-config
|
||||||
btrfs subvolume create /btrfs/nvme/@snapshots
|
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-lib-rancher
|
||||||
btrfs subvolume create /btrfs/nvme/@var-log-pods
|
btrfs subvolume create /btrfs/nvme/@var-log-pods
|
||||||
|
|
||||||
|
@ -237,11 +232,6 @@
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = defaultOptions ++ [ "subvol=@garage" ];
|
options = defaultOptions ++ [ "subvol=@garage" ];
|
||||||
};
|
};
|
||||||
"/swap" = {
|
|
||||||
inherit device;
|
|
||||||
fsType = "btrfs";
|
|
||||||
options = defaultOptions ++ [ "subvol=@swap" ];
|
|
||||||
};
|
|
||||||
"/var/lib/rancher" = {
|
"/var/lib/rancher" = {
|
||||||
inherit device;
|
inherit device;
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
|
@ -259,15 +249,6 @@
|
||||||
else
|
else
|
||||||
{ };
|
{ };
|
||||||
|
|
||||||
swapDevices =
|
|
||||||
let
|
|
||||||
swapFile = {
|
|
||||||
device = "/swap/file";
|
|
||||||
size = (1024 * 4);
|
|
||||||
};
|
|
||||||
in
|
|
||||||
if unlockMounts && mountVolumes then [ swapFile ] else [ ];
|
|
||||||
|
|
||||||
services.nfs.server = {
|
services.nfs.server = {
|
||||||
enable = unlockMounts && mountVolumes;
|
enable = unlockMounts && mountVolumes;
|
||||||
exports = ''
|
exports = ''
|
||||||
|
|
Loading…
Reference in a new issue