Kitty too is in this impermanence update
This commit is contained in:
parent
8f66c8bf92
commit
297b57bbaa
4 changed files with 83 additions and 40 deletions
|
@ -2,6 +2,7 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./boot
|
./boot
|
||||||
|
./disko
|
||||||
./filesystems
|
./filesystems
|
||||||
./firewall
|
./firewall
|
||||||
./hardware
|
./hardware
|
||||||
|
|
75
hosts/kitty/disko/default.nix
Normal file
75
hosts/kitty/disko/default.nix
Normal file
|
@ -0,0 +1,75 @@
|
||||||
|
{ config, disko, ... }:
|
||||||
|
{
|
||||||
|
imports = [ disko.nixosModules.disko ];
|
||||||
|
|
||||||
|
disko.devices = {
|
||||||
|
disk = {
|
||||||
|
"${config.networking.hostName}" = {
|
||||||
|
type = "disk";
|
||||||
|
device = "/dev/nvme0n1";
|
||||||
|
content = {
|
||||||
|
type = "gpt";
|
||||||
|
partitions = {
|
||||||
|
ESP = {
|
||||||
|
priority = 1;
|
||||||
|
size = "2G";
|
||||||
|
type = "EF00";
|
||||||
|
content = {
|
||||||
|
type = "filesystem";
|
||||||
|
format = "vfat";
|
||||||
|
mountpoint = "/boot";
|
||||||
|
mountOptions = [ "umask=0077" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
main = {
|
||||||
|
size = "100%";
|
||||||
|
content = {
|
||||||
|
type = "lvm_pv";
|
||||||
|
vg = "${config.networking.hostName}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
lvm_vg = {
|
||||||
|
"${config.networking.hostName}" = {
|
||||||
|
type = "lvm_vg";
|
||||||
|
lvs = {
|
||||||
|
root = {
|
||||||
|
size = "100%";
|
||||||
|
content = {
|
||||||
|
type = "btrfs";
|
||||||
|
extraArgs = [ "-f" ];
|
||||||
|
subvolumes = {
|
||||||
|
"/root" = {
|
||||||
|
mountpoint = "/";
|
||||||
|
mountOptions = [ "compress=zstd" "noatime" "ssd" ];
|
||||||
|
};
|
||||||
|
"/prev" = {
|
||||||
|
mountpoint = "/prev";
|
||||||
|
mountOptions = [ "compress=zstd" "noatime" "ssd" "noexec" ];
|
||||||
|
};
|
||||||
|
"/nix" = {
|
||||||
|
mountpoint = "/nix";
|
||||||
|
mountOptions = [ "compress=zstd" "noatime" "ssd" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
swap = {
|
||||||
|
size = "4G";
|
||||||
|
content = {
|
||||||
|
type = "swap";
|
||||||
|
discardPolicy = "both";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Needed for impermanence
|
||||||
|
fileSystems."/persist".neededForBoot = true;
|
||||||
|
}
|
|
@ -1,43 +1,10 @@
|
||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
fileSystems = {
|
fileSystems."/persist" = {
|
||||||
"/" = {
|
device = "/dev/disk/by-uuid/acf95700-8669-45c7-9a72-bf3215b3c325";
|
||||||
device = "/dev/disk/by-uuid/b8b7ed47-c98c-4a49-af01-b2832dde1287";
|
fsType = "btrfs";
|
||||||
fsType = "btrfs";
|
neededForBoot = true;
|
||||||
options = [ "subvol=root" "compress=zstd" "noatime" "ssd" ];
|
options = [ "subvol=persist" "compress=zstd" "noatime" ];
|
||||||
};
|
|
||||||
"/prev" = {
|
|
||||||
device = "/dev/disk/by-uuid/b8b7ed47-c98c-4a49-af01-b2832dde1287";
|
|
||||||
fsType = "btrfs";
|
|
||||||
options = [ "subvol=prev" "compress=zstd" "noatime" "ssd" "noexec" ];
|
|
||||||
};
|
|
||||||
"/nix" = {
|
|
||||||
device = "/dev/disk/by-uuid/b8b7ed47-c98c-4a49-af01-b2832dde1287";
|
|
||||||
fsType = "btrfs";
|
|
||||||
options = [ "subvol=nix" "compress=zstd" "noatime" "ssd" ];
|
|
||||||
};
|
|
||||||
"/boot" = {
|
|
||||||
device = "/dev/disk/by-uuid/CD94-1D3F";
|
|
||||||
fsType = "vfat";
|
|
||||||
options = [ "umask=0077" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
# Impermanence and subvols
|
|
||||||
"/persist" = {
|
|
||||||
device = "/dev/disk/by-uuid/acf95700-8669-45c7-9a72-bf3215b3c325";
|
|
||||||
fsType = "btrfs";
|
|
||||||
neededForBoot = true;
|
|
||||||
options = [ "subvol=persist" "compress=zstd" "noatime" ];
|
|
||||||
};
|
|
||||||
"/export/KittyNFS" = {
|
|
||||||
depends = [ "/persist" ];
|
|
||||||
device = "/persist/export/KittyNFS";
|
|
||||||
fsType = "none";
|
|
||||||
options = [ "bind" ];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
environment.persistence."/persist".directories = [ "/export/KittyNFS" ];
|
||||||
swapDevices = [
|
|
||||||
{ device = "/dev/disk/by-uuid/57178cfc-3e71-4d35-8c7f-e355f9dc84df"; }
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
};
|
};
|
||||||
main = {
|
main = {
|
||||||
size = "100%";
|
size = "100%";
|
||||||
content = {
|
content = {
|
||||||
type = "lvm_pv";
|
type = "lvm_pv";
|
||||||
vg = "${config.networking.hostName}";
|
vg = "${config.networking.hostName}";
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue