Compare commits
3
Commits
b0a8874a93
..
disko
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
68c241f31a | ||
|
|
81c37abadd | ||
|
|
85c962fd6d |
No files matched your search
@@ -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
|
||||
```
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user