mirror of
https://github.com/tomasriveral/nixos.git
synced 2026-08-12 02:28:37 +02:00
Auto: cleanup-2026-06-04T16-10-09Z
This commit is contained in:
@@ -1,78 +1,117 @@
|
|||||||
_: {
|
_: {
|
||||||
flake.diskoConfigurations.desktop = _: {
|
flake.diskoConfigurations.desktop = _: {
|
||||||
disko.devices = {
|
disko.devices = {
|
||||||
disk = {
|
disk = {
|
||||||
ssd = {
|
ssd = {
|
||||||
# Replace with actual disk id from:
|
# Replace with actual disk id from:
|
||||||
# ls -l /dev/disk/by-id
|
# ls -l /dev/disk/by-id
|
||||||
device = "/dev/disk/by-id/REPLACE_SSD_ID";
|
device = "/dev/disk/by-id/REPLACE_SSD_ID";
|
||||||
|
|
||||||
type = "disk";
|
type = "disk";
|
||||||
|
|
||||||
content = {
|
content = {
|
||||||
type = "gpt";
|
type = "gpt";
|
||||||
|
|
||||||
partitions = {
|
partitions = {
|
||||||
ESP = {
|
ESP = {
|
||||||
size = "1G";
|
size = "1G";
|
||||||
type = "EF00";
|
type = "EF00";
|
||||||
|
|
||||||
content = {
|
content = {
|
||||||
type = "filesystem";
|
type = "filesystem";
|
||||||
format = "vfat";
|
format = "vfat";
|
||||||
mountpoint = "/boot";
|
mountpoint = "/boot";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
luks = {
|
||||||
|
size = "100%";
|
||||||
|
|
||||||
|
content = {
|
||||||
|
type = "luks";
|
||||||
|
name = "cryptroot";
|
||||||
|
|
||||||
|
# You will type this password at boot.
|
||||||
|
settings.allowDiscards = true;
|
||||||
|
|
||||||
|
content = {
|
||||||
|
type = "btrfs";
|
||||||
|
|
||||||
|
extraArgs = ["-f"];
|
||||||
|
|
||||||
|
subvolumes = {
|
||||||
|
"@root" = {
|
||||||
|
mountpoint = "/";
|
||||||
|
mountOptions = [
|
||||||
|
"compress=zstd"
|
||||||
|
"noatime"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
"@home" = {
|
||||||
|
mountpoint = "/home";
|
||||||
|
mountOptions = [
|
||||||
|
"compress=zstd"
|
||||||
|
"noatime"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
"@nix" = {
|
||||||
|
mountpoint = "/nix";
|
||||||
|
mountOptions = [
|
||||||
|
"compress=zstd"
|
||||||
|
"noatime"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
"@snapshots" = {
|
||||||
|
mountpoint = "/.snapshots";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Keyfile storage.
|
||||||
|
# This subvolume will contain the key used
|
||||||
|
# to unlock the HDD automatically.
|
||||||
|
"@keys" = {
|
||||||
|
mountpoint = "/keys";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
luks = {
|
hdd = {
|
||||||
size = "100%";
|
# Replace with actual disk id
|
||||||
|
device = "/dev/disk/by-id/REPLACE_HDD_ID";
|
||||||
|
|
||||||
content = {
|
type = "disk";
|
||||||
type = "luks";
|
|
||||||
name = "cryptroot";
|
|
||||||
|
|
||||||
# You will type this password at boot.
|
content = {
|
||||||
settings.allowDiscards = true;
|
type = "gpt";
|
||||||
|
|
||||||
content = {
|
partitions = {
|
||||||
type = "btrfs";
|
luks = {
|
||||||
|
size = "100%";
|
||||||
|
|
||||||
extraArgs = [ "-f" ];
|
content = {
|
||||||
|
type = "luks";
|
||||||
|
|
||||||
subvolumes = {
|
name = "cryptdata";
|
||||||
"@root" = {
|
|
||||||
mountpoint = "/";
|
# IMPORTANT:
|
||||||
mountOptions = [
|
# This keyfile will be created after installation.
|
||||||
"compress=zstd"
|
# The SSD unlocks first.
|
||||||
"noatime"
|
# Then this keyfile unlocks the HDD automatically.
|
||||||
];
|
settings = {
|
||||||
|
keyFile = "/keys/hdd.key";
|
||||||
};
|
};
|
||||||
|
|
||||||
"@home" = {
|
content = {
|
||||||
mountpoint = "/home";
|
type = "filesystem";
|
||||||
mountOptions = [
|
format = "ext4";
|
||||||
"compress=zstd"
|
mountpoint = "/data";
|
||||||
"noatime"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
"@nix" = {
|
|
||||||
mountpoint = "/nix";
|
|
||||||
mountOptions = [
|
|
||||||
"compress=zstd"
|
|
||||||
"noatime"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
"@snapshots" = {
|
|
||||||
mountpoint = "/.snapshots";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Keyfile storage.
|
|
||||||
# This subvolume will contain the key used
|
|
||||||
# to unlock the HDD automatically.
|
|
||||||
"@keys" = {
|
|
||||||
mountpoint = "/keys";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -80,43 +119,6 @@ disk = {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
hdd = {
|
|
||||||
# Replace with actual disk id
|
|
||||||
device = "/dev/disk/by-id/REPLACE_HDD_ID";
|
|
||||||
|
|
||||||
type = "disk";
|
|
||||||
|
|
||||||
content = {
|
|
||||||
type = "gpt";
|
|
||||||
|
|
||||||
partitions = {
|
|
||||||
luks = {
|
|
||||||
size = "100%";
|
|
||||||
|
|
||||||
content = {
|
|
||||||
type = "luks";
|
|
||||||
|
|
||||||
name = "cryptdata";
|
|
||||||
|
|
||||||
# IMPORTANT:
|
|
||||||
# This keyfile will be created after installation.
|
|
||||||
# The SSD unlocks first.
|
|
||||||
# Then this keyfile unlocks the HDD automatically.
|
|
||||||
settings = {
|
|
||||||
keyFile = "/keys/hdd.key";
|
|
||||||
};
|
|
||||||
|
|
||||||
content = {
|
|
||||||
type = "filesystem";
|
|
||||||
format = "ext4";
|
|
||||||
mountpoint = "/data";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
};};}
|
|
||||||
|
|||||||
@@ -50,7 +50,6 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
## Desktop
|
## Desktop
|
||||||
flake.nixosModules.autoCleanup-desktop = {
|
flake.nixosModules.autoCleanup-desktop = {
|
||||||
pkgs,
|
pkgs,
|
||||||
@@ -102,7 +101,7 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
perSystem = {pkgs, ...}: {
|
perSystem = {pkgs, ...}: {
|
||||||
packages.custom-cleanNix-laptop = pkgs.writeShellApplication {
|
packages.custom-cleanNix-laptop = pkgs.writeShellApplication {
|
||||||
name = "custom-cleanNix";
|
name = "custom-cleanNix";
|
||||||
|
|
||||||
|
|||||||
@@ -91,7 +91,7 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
perSystem = {pkgs, ...}: {
|
perSystem = {pkgs, ...}: {
|
||||||
packages.custom-autoupdate-laptop = pkgs.writeShellApplication {
|
packages.custom-autoupdate-laptop = pkgs.writeShellApplication {
|
||||||
name = "custom-autoupdate";
|
name = "custom-autoupdate";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user