1 Commits

Author SHA1 Message Date
andromeda
ab263e5184 migrate to impermanence? 2026-01-02 23:15:56 +01:00
4 changed files with 95 additions and 36 deletions

62
flake.lock generated
View File

@@ -180,15 +180,58 @@
"flake-parts": { "flake-parts": {
"inputs": { "inputs": {
"nixpkgs-lib": [ "nixpkgs-lib": [
"nur",
"nixpkgs" "nixpkgs"
] ]
}, },
"locked": { "locked": {
"lastModified": 1765835352, "lastModified": 1733312601,
"narHash": "sha256-XswHlK/Qtjasvhd1nOa1e8MgZ8GS//jBoTqWtrS1Giw=", "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "a34fae9c08a15ad73f295041fec82323541400a9", "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_2": {
"inputs": {
"nixpkgs-lib": [
"nvf",
"nixpkgs"
]
},
"locked": {
"lastModified": 1760948891,
"narHash": "sha256-TmWcdiUUaWk8J4lpjzu4gCGxWY6/Ok7mOK4fIFfBuU4=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "864599284fc7c0ba6357ed89ed5e2cd5040f0c04",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_3": {
"inputs": {
"nixpkgs-lib": [
"stylix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1763759067,
"narHash": "sha256-LlLt2Jo/gMNYAwOgdRQBrsRoOz7BPRkzvNaI/fzXi2Q=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "2cccadc7357c0ba201788ae99c4dfa90728ef5e0",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -446,9 +489,7 @@
}, },
"nur": { "nur": {
"inputs": { "inputs": {
"flake-parts": [ "flake-parts": "flake-parts",
"flake-parts"
],
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
] ]
@@ -495,9 +536,7 @@
"nvf": { "nvf": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_2", "flake-compat": "flake-compat_2",
"flake-parts": [ "flake-parts": "flake-parts_2",
"flake-parts"
],
"mnw": "mnw", "mnw": "mnw",
"ndg": "ndg", "ndg": "ndg",
"nixpkgs": [ "nixpkgs": [
@@ -542,7 +581,6 @@
"root": { "root": {
"inputs": { "inputs": {
"agenix": "agenix", "agenix": "agenix",
"flake-parts": "flake-parts",
"home-manager": "home-manager_2", "home-manager": "home-manager_2",
"impermanence": "impermanence", "impermanence": "impermanence",
"nixos-mailserver": "nixos-mailserver", "nixos-mailserver": "nixos-mailserver",
@@ -561,9 +599,7 @@
"base16-helix": "base16-helix", "base16-helix": "base16-helix",
"base16-vim": "base16-vim", "base16-vim": "base16-vim",
"firefox-gnome-theme": "firefox-gnome-theme", "firefox-gnome-theme": "firefox-gnome-theme",
"flake-parts": [ "flake-parts": "flake-parts_3",
"flake-parts"
],
"gnome-shell": "gnome-shell", "gnome-shell": "gnome-shell",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"

View File

@@ -4,10 +4,6 @@
url = "github:ryantm/agenix"; url = "github:ryantm/agenix";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
flake-parts = {
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
home-manager = { home-manager = {
url = "github:nix-community/home-manager"; url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
@@ -25,12 +21,10 @@
nur = { nur = {
url = "github:nix-community/NUR"; url = "github:nix-community/NUR";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-parts.follows = "flake-parts";
}; };
nvf = { nvf = {
url = "github:notashelf/nvf"; url = "github:notashelf/nvf";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-parts.follows = "flake-parts";
}; };
phoenix = { phoenix = {
url = "github:celenityy/Phoenix"; url = "github:celenityy/Phoenix";
@@ -39,12 +33,10 @@
stylix = { stylix = {
url = "github:nix-community/stylix"; url = "github:nix-community/stylix";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-parts.follows = "flake-parts";
}; };
}; };
outputs = inputs @ { outputs = {
agenix, agenix,
flake-parts,
home-manager, home-manager,
impermanence, impermanence,
nixos-mailserver, nixos-mailserver,
@@ -103,17 +95,10 @@
} }
noshell.nixosModules.default noshell.nixosModules.default
]); ]);
in in {
flake-parts.lib.mkFlake {inherit inputs;} (top @ { nixosConfigurations =
config,
withSystem,
moduleWithSystem,
...
}: {
systems = ["x86_64-linux"];
flake.nixosConfigurations =
builtins.mapAttrs builtins.mapAttrs
(hostname: value: configurationWithHomeManager value) (hostname: value: configurationWithHomeManager value)
machines; machines;
}); };
} }

View File

@@ -4,6 +4,10 @@
machine, machine,
... ...
}: { }: {
imports = [
./impermanence.nix
(modulesPath + "/profiles/qemu-guest.nix")
];
# roundcube config # roundcube config
services.roundcube = { services.roundcube = {
enable = true; enable = true;
@@ -46,8 +50,12 @@
# system config # system config
system.stateVersion = "25.11"; system.stateVersion = "25.11";
nix.settings.experimental-features = ["flakes" "nix-command"]; nix.settings.experimental-features = ["flakes" "nix-command"];
imports = [(modulesPath + "/profiles/qemu-guest.nix")];
fileSystems."/" = { fileSystems."/" = {
device = "none";
fsType = "tmpfs";
options = ["defaults" "size=60%" "mode=755"];
};
fileSystems."/nix" = {
device = "/dev/sda1"; device = "/dev/sda1";
fsType = "ext4"; fsType = "ext4";
}; };

View File

@@ -0,0 +1,30 @@
{
environment.persistence."/nix/persist" = {
enable = true;
hideMounts = true;
directories = [
# logs
"/var/log"
"/var/lib/systemd/coredump"
# users
"/var/lib/nixos"
# private ssh keys
"/etc/ssh"
# mailserver
"/var/vmail"
"/var/dkim"
"/var/lib/dovecot"
"/var/lib/postfix"
"/var/lib/postgresql"
"/var/lib/redis-rspamd"
"/var/lib/roundcube"
"/var/lib/secrets"
];
files = [
"/etc/machine-id"
];
};
}