Compare commits

...
3 Commits
Author SHA1 Message Date
Jan-Bulthuis 68c241f31a Changed location of some persistence files 2025-05-29 18:32:08 +02:00
Jan-Bulthuis 81c37abadd Fixed impermanence not mounting persist 2025-05-29 17:05:15 +02:00
Jan-Bulthuis 85c962fd6d Updated REAME.md 2025-05-29 17:04:58 +02:00
5 changed files with 21 additions and 5 deletions

No files matched your search

+6 -2
View File
@@ -2,6 +2,10 @@
My NixOS configuration.
## Usage
## Installation
Clone the repository to some directory. And build with `sudo nixos-rebuild switch --flake /directory/containing/flake.nix/`.
For disk configuration we use disko, this means that installing the system from the configuration is just a single command:
```
sudo nix --experimental-features "nix-command flakes" run "github:nix-community/disko/latest#disko-install" -- --flake git+https://git.bulthuis.dev/Jan/dotfiles#<hostname> --disk main /dev/sda
```
+2 -1
View File
@@ -24,9 +24,10 @@ in
};
config = mkIf cfg.enable {
home.persistence."/persist/home" = {
home.persistence."/persist/home/${config.home.username}" = {
enable = true;
hideMounts = true;
allowOther = true;
directories = cfg.directories;
files = cfg.files;
};
+4
View File
@@ -30,8 +30,12 @@ in
};
config = mkIf cfg.enable {
fileSystems."/persist".neededForBoot = true;
boot.initrd.postResumeCommands = mkAfter cfg.resetScript;
# For home-manager persistence
programs.fuse.userAllowOther = true;
environment.persistence."/persist/system" = {
enable = true;
hideMounts = true;
+8
View File
@@ -19,6 +19,14 @@ in
modules = {
bootloader.enable = mkDefault true;
ssh.enable = mkDefault true;
# Setup sensible default persistent data
impermanence.directories = [
"/var/lib/nixos"
];
impermanence.files = [
"/etc/shadow"
];
};
# Localization
+1 -2
View File
@@ -25,7 +25,6 @@ in
};
impermanence = {
enable = true;
directories = [ "/var/lib/nixos" ];
resetScript = ''
# Revert to the blank state for the root directory
zfs rollback -r tank/root@blank
@@ -39,7 +38,7 @@ in
initialPassword = "local";
extraGroups = [ "wheel" ];
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKKxoQSxfYqf9ITN8Fhckk8WbY4dwtBAXOhC9jxihJvq jan@bulthuis.dev"
"ssh-ed25519 jan@bulthuis.dev"
];
};