Compare commits

..

No commits in common. "1639b071d857ba84c5eb089a7d0a1e9a61a9f8e0" and "5e247589dc2be3721142e2625fe33ca760a74651" have entirely different histories.

5 changed files with 1 additions and 91 deletions

View file

@ -33,21 +33,6 @@
"type": "indirect"
}
},
"impermanence": {
"locked": {
"lastModified": 1694622745,
"narHash": "sha256-z397+eDhKx9c2qNafL1xv75lC0Q4nOaFlhaU1TINqb8=",
"owner": "nix-community",
"repo": "impermanence",
"rev": "e9643d08d0d193a2e074a19d4d90c67a874d932e",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "impermanence",
"type": "github"
}
},
"nixos-mailserver": {
"inputs": {
"blobs": "blobs",
@ -138,7 +123,6 @@
"root": {
"inputs": {
"flake-parts": "flake-parts",
"impermanence": "impermanence",
"nixos-mailserver": "nixos-mailserver",
"nixpkgs": "nixpkgs",
"sops-nix": "sops-nix"

View file

@ -14,9 +14,6 @@
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
impermanence = {
url = "github:nix-community/impermanence";
};
};
outputs = inputs@{ flake-parts, ... }:

View file

@ -12,7 +12,6 @@
imports = [
(import (./. + "/machines/${name}/configuration.nix") inputs)
inputs.sops-nix.nixosModules.sops
inputs.impermanence.nixosModules.impermanence
];
};
in lib.genAttrs machines makeSystem);

View file

@ -1,42 +0,0 @@
{lib, config, ...} :
let
inherit (lib)
mkEnableOption
mkIf
mkOption
types
;
cfg = config.impermanence;
in
{
imports = [ ];
options.impermanence = {
enable = mkEnableOption "impermanence";
storagePath = mkOption {
type = types.path;
default = "/persist";
description = "The path where persistent data is stored";
};
name = mkOption {
type = types.str;
default = "persist";
description = "the name of the persistent data store";
};
};
config = mkIf cfg.enable {
environment.persistence.${cfg.name} = {
persistentStoragePath = cfg.storagePath;
directories = [
"/var/log"
"/etc/ssh"
"/var/lib/nixos"
];
};
environment.etc.machine-id.source = "${cfg.storagePath}/machine-id";
};
}

View file

@ -1,32 +1,4 @@
{pkgs, config, lib, ...} : {
imports = [
./admins.nix
./nix_keys.nix
../modules/impermanence.nix
];
nix = {
extraOptions = ''
experimental-features = nix-command flakes
builders-use-substitutes = true
'';
};
networking = {
firewall = { # these shoud be default, but better make sure!
enable = true;
allowPing = true;
};
nftables.enable = true;
useDHCP = false; # We don't speak DHCP and even if we would, we should enable it per interface
# hosts = # TODO write something to autogenerate ip adresses!
};
users = {
mutableUsers = false;
};
impermanence.enable = true;
{ ... } : {
sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
}