some more fixing
This commit is contained in:
parent
7b7d7a0c55
commit
aa3f6ada93
5 changed files with 13 additions and 45 deletions
|
@ -1,5 +1,5 @@
|
||||||
{ ... }: {
|
{ ... }: {
|
||||||
user = true;
|
full = true;
|
||||||
|
|
||||||
withNiri = true;
|
withNiri = true;
|
||||||
withGnome = false;
|
withGnome = false;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{ ... }: {
|
{ ... }: {
|
||||||
user = false;
|
full = false;
|
||||||
|
|
||||||
withNiri = false;
|
withNiri = false;
|
||||||
withGnome = false;
|
withGnome = false;
|
||||||
|
|
|
@ -1,13 +1,6 @@
|
||||||
{ lib, pkgs, ... }: let
|
{ lib, config, pkgs, ... }: {
|
||||||
disks = {
|
|
||||||
boot = "";
|
|
||||||
crypt = "";
|
|
||||||
root = "";
|
|
||||||
};
|
|
||||||
in{
|
|
||||||
imports = [
|
imports = [
|
||||||
./options.nix
|
./options.nix
|
||||||
./impermanence.nix
|
|
||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs = {
|
nixpkgs = {
|
||||||
|
@ -21,10 +14,10 @@ in{
|
||||||
boot = {
|
boot = {
|
||||||
initrd = {
|
initrd = {
|
||||||
availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" ];
|
availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" ];
|
||||||
luks.devices.root.device = "/dev/disk/by-uuid/${disks.crypt}";
|
luks.devices.root.device = "/dev/disk/by-uuid/${config.disks.crypt}";
|
||||||
postDeviceCommands = lib.mkAfter ''
|
postDeviceCommands = lib.mkAfter ''
|
||||||
mkdir /btrfs_tmp
|
mkdir /btrfs_tmp
|
||||||
mount /dev/disk/by-uuid/${disks.root} /btrfs_tmp
|
mount /dev/disk/by-uuid/${config.disks.root} /btrfs_tmp
|
||||||
if [[ -e /btrfs_tmp/root ]]; then
|
if [[ -e /btrfs_tmp/root ]]; then
|
||||||
mkdir -p /btrfs_tmp/old_roots
|
mkdir -p /btrfs_tmp/old_roots
|
||||||
timestamp=$(date --date="@$(stat -c %Y /btrfs_tmp/root)" "+%Y-%m-%-d_%H:%M:%S")
|
timestamp=$(date --date="@$(stat -c %Y /btrfs_tmp/root)" "+%Y-%m-%-d_%H:%M:%S")
|
||||||
|
@ -61,28 +54,28 @@ in{
|
||||||
|
|
||||||
fileSystems = {
|
fileSystems = {
|
||||||
"/boot" = {
|
"/boot" = {
|
||||||
device = "/dev/disk/by-uuid/${disks.boot}";
|
device = "/dev/disk/by-uuid/${config.disks.boot}";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
"/" = {
|
"/" = {
|
||||||
device = "/dev/disk/by-uuid/${disks.root}";
|
device = "/dev/disk/by-uuid/${config.disks.root}";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = [ "subvol=root" "compress=zstd" "noatime" ];
|
options = [ "subvol=root" "compress=zstd" "noatime" ];
|
||||||
};
|
};
|
||||||
"/nix" = {
|
"/nix" = {
|
||||||
device = "/dev/disk/by-uuid/${disks.root}";
|
device = "/dev/disk/by-uuid/${config.disks.root}";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = [ "subvol=nix" "compress=zstd" "noatime" ];
|
options = [ "subvol=nix" "compress=zstd" "noatime" ];
|
||||||
neededForBoot = true;
|
neededForBoot = true;
|
||||||
};
|
};
|
||||||
"/persist" = {
|
"/persist" = {
|
||||||
device = "/dev/disk/by-uuid/${disks.root}";
|
device = "/dev/disk/by-uuid/${config.disks.root}";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = [ "subvol=persist" "compress=zstd" "noatime" ];
|
options = [ "subvol=persist" "compress=zstd" "noatime" ];
|
||||||
neededForBoot = true;
|
neededForBoot = true;
|
||||||
};
|
};
|
||||||
"/swap" = {
|
"/swap" = {
|
||||||
device = "/dev/disk/by-uuid/${disks.root}";
|
device = "/dev/disk/by-uuid/${config.disks.root}";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = [ "subvol=swap" "noatime" ];
|
options = [ "subvol=swap" "noatime" ];
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,27 +0,0 @@
|
||||||
{ config, ... }: {
|
|
||||||
environment.persistence."/persist" = {
|
|
||||||
enable = true;
|
|
||||||
directories = [
|
|
||||||
"/var/log"
|
|
||||||
"/var/lib/bluetooth"
|
|
||||||
"/var/lib/nixos"
|
|
||||||
"/var/lib/iwd"
|
|
||||||
];
|
|
||||||
files = [
|
|
||||||
"/etc/machine-id"
|
|
||||||
"/etc/passwd"
|
|
||||||
"/etc/shadow"
|
|
||||||
];
|
|
||||||
|
|
||||||
users.${config.username}= {
|
|
||||||
directories = [
|
|
||||||
"Documents"
|
|
||||||
"Pictures"
|
|
||||||
"Videos"
|
|
||||||
"code"
|
|
||||||
{ directory = ".local/share/keyrings"; mode = "0700"; }
|
|
||||||
".local/share/direnv"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,5 +1,5 @@
|
||||||
{ ... }: {
|
{ ... }: {
|
||||||
user = true;
|
full = true;
|
||||||
|
|
||||||
withNiri = true;
|
withNiri = true;
|
||||||
withGnome = false;
|
withGnome = false;
|
||||||
|
@ -9,6 +9,8 @@
|
||||||
|
|
||||||
withGames = true;
|
withGames = true;
|
||||||
|
|
||||||
|
withImpermanence = true;
|
||||||
|
|
||||||
hwmonPath = "/sys/class/hwmon/hwmon1/temp1_input";
|
hwmonPath = "/sys/class/hwmon/hwmon1/temp1_input";
|
||||||
|
|
||||||
stateVersion = "24.05";
|
stateVersion = "24.05";
|
||||||
|
|
Loading…
Add table
Reference in a new issue