-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
73 lines (61 loc) · 2.28 KB
/
flake.nix
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
{
description = "Home Configuration";
inputs = {
nixpkgs = {
url = "github:nixos/nixpkgs/nixos-unstable";
};
homemanager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
homeage = {
url = "github:jordanisaacs/homeage";
inputs.nixpkgs.follows = "nixpkgs";
};
utils = {
url = "github:numtide/flake-utils";
};
};
outputs = { self, nixpkgs, homemanager, homeage, ... }@inputs:
let
inherit (self) outputs;
mkHome = usermods: pkgs: homemanager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [
inputs.homeage.homeManagerModules.homeage
] ++ usermods;
};
in
{
homeConfigurations = {
"root@anubis" = mkHome [ ./home/root/default.nix ] nixpkgs.legacyPackages."x86_64-linux";
"root@chnum" = mkHome [ ./home/root/default.nix ] nixpkgs.legacyPackages."x86_64-linux";
"thomas@anubis" = mkHome [ ./home/thomas/default.nix ] nixpkgs.legacyPackages."x86_64-linux";
"thomas@chnum" = mkHome [ ./home/thomas/default.nix ] nixpkgs.legacyPackages."x86_64-linux";
"anna@anubis" = mkHome [ ./home/anna/default.nix ] nixpkgs.legacyPackages."x86_64-linux";
"anna@chnum" = mkHome [ ./home/anna/default.nix ] nixpkgs.legacyPackages."x86_64-linux";
"adrian@anubis" = mkHome [ ./home/adrian/default.nix ] nixpkgs.legacyPackages."x86_64-linux";
"adrian@chnum" = mkHome [ ./home/adrian/default.nix ] nixpkgs.legacyPackages."x86_64-linux";
"tabea@anubis" = mkHome [ ./home/tabea/default.nix ] nixpkgs.legacyPackages."x86_64-linux";
"tabea@chnum" = mkHome [ ./home/tabea/default.nix ] nixpkgs.legacyPackages."x86_64-linux";
};
} // inputs.utils.lib.eachDefaultSystem
(system:
let
pkgs = import inputs.nixpkgs { inherit system; };
in
{
devShell = pkgs.mkShell {
buildInputs = with pkgs; [
git
home-manager
rage
];
shellHook = ''
alias age-encrypt="${pkgs.rage}/bin/rage -e -a -i ~/.ssh/id_ed25519"
alias age-decrypt="${pkgs.rage}/bin/rage -d -a -i ~/.ssh/id_ed25519"
'';
};
}
);
}