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;
|
||||
withGnome = false;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{ ... }: {
|
||||
user = false;
|
||||
full = false;
|
||||
|
||||
withNiri = false;
|
||||
withGnome = false;
|
||||
|
|
|
@ -1,13 +1,6 @@
|
|||
{ lib, pkgs, ... }: let
|
||||
disks = {
|
||||
boot = "";
|
||||
crypt = "";
|
||||
root = "";
|
||||
};
|
||||
in{
|
||||
{ lib, config, pkgs, ... }: {
|
||||
imports = [
|
||||
./options.nix
|
||||
./impermanence.nix
|
||||
];
|
||||
|
||||
nixpkgs = {
|
||||
|
@ -21,10 +14,10 @@ in{
|
|||
boot = {
|
||||
initrd = {
|
||||
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 ''
|
||||
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
|
||||
mkdir -p /btrfs_tmp/old_roots
|
||||
timestamp=$(date --date="@$(stat -c %Y /btrfs_tmp/root)" "+%Y-%m-%-d_%H:%M:%S")
|
||||
|
@ -61,28 +54,28 @@ in{
|
|||
|
||||
fileSystems = {
|
||||
"/boot" = {
|
||||
device = "/dev/disk/by-uuid/${disks.boot}";
|
||||
device = "/dev/disk/by-uuid/${config.disks.boot}";
|
||||
fsType = "vfat";
|
||||
};
|
||||
"/" = {
|
||||
device = "/dev/disk/by-uuid/${disks.root}";
|
||||
device = "/dev/disk/by-uuid/${config.disks.root}";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=root" "compress=zstd" "noatime" ];
|
||||
};
|
||||
"/nix" = {
|
||||
device = "/dev/disk/by-uuid/${disks.root}";
|
||||
device = "/dev/disk/by-uuid/${config.disks.root}";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=nix" "compress=zstd" "noatime" ];
|
||||
neededForBoot = true;
|
||||
};
|
||||
"/persist" = {
|
||||
device = "/dev/disk/by-uuid/${disks.root}";
|
||||
device = "/dev/disk/by-uuid/${config.disks.root}";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=persist" "compress=zstd" "noatime" ];
|
||||
neededForBoot = true;
|
||||
};
|
||||
"/swap" = {
|
||||
device = "/dev/disk/by-uuid/${disks.root}";
|
||||
device = "/dev/disk/by-uuid/${config.disks.root}";
|
||||
fsType = "btrfs";
|
||||
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;
|
||||
withGnome = false;
|
||||
|
@ -9,6 +9,8 @@
|
|||
|
||||
withGames = true;
|
||||
|
||||
withImpermanence = true;
|
||||
|
||||
hwmonPath = "/sys/class/hwmon/hwmon1/temp1_input";
|
||||
|
||||
stateVersion = "24.05";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue