katja's git: nixfiles

ctucx' nixfiles

1 
2 
3 
4 
5 
6 
7 
8 
9 
10 
11 
12 
13 
14 
15 
16 
17 
18 
19 
20 
21 
22 
23 
24 
25 
26 
27 
28 
29 
30 
31 
32 
33 
34 
35 
36 
37 
38 
39 
40 
41 
42 
43 
44 
45 
46 { inputs, config, lib, pkgs, ... }:

{

  services.openssh.hostKeys = [
    {
      bits = 4096;
      path = "/nix/persist/etc/ssh/ssh_host_rsa_key";
      type = "rsa";
    }
    {
      path = "/nix/persist/etc/ssh/ssh_host_ed25519_key";
      type = "ed25519";
    }
  ];

  age.identityPaths = [ "/nix/persist/etc/ssh/ssh_host_ed25519_key" ];

  environment.persistence."/nix/persist" = {
    directories = [
      "/var/log"
      "/var/lib"
    ];
    files = [
      "/etc/machine-id"
    ];
  };

  programs.fuse.userAllowOther = true;

  home-manager.users.katja = {
    imports = [ inputs.impermanence.homeManagerModules.default ];

    home.persistence."/nix/persist/home/katja" = {
      allowOther = true;
      directories = [
        "syncthing"
      ];
      files = [
        ".bash_history"
        ".local/share/mcfly/history.db"
      ];
    };
  };

}