-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
135 lines (123 loc) · 3.7 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
{
description = "Martin's NixOS and Home-Manager flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs-stable.url = "github:NixOS/nixpkgs/release-23.05";
# Home manager
hm.url = "github:nix-community/home-manager";
hm.inputs.nixpkgs.follows = "nixpkgs";
sops-nix.url = "github:Mic92/sops-nix";
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
sops-nix.inputs.nixpkgs-stable.follows = "nixpkgs-stable";
envfs.url = "github:Mic92/envfs";
envfs.inputs.nixpkgs.follows = "nixpkgs";
# Nix Colors
nix-colors.url = "github:Misterio77/nix-colors";
};
outputs =
{
self,
nixpkgs,
hm,
nix-colors,
envfs,
...
}@inputs:
let
inherit (self) outputs;
forAllSystems = nixpkgs.lib.genAttrs [ "x86_64-linux" ];
in
rec {
packages = forAllSystems (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
import ./pkgs { inherit pkgs; }
);
devShells = forAllSystems (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
import ./shell.nix { inherit pkgs; }
);
overlays = import ./overlays { inherit inputs; };
# -----------------------------------------------
# nix-gt
# -----------------------------------------------
nixosConfigurations.nix-gt = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs outputs;
};
modules = [
envfs.nixosModules.envfs
./nixos/base.nix
./nixos/wireguard.nix
./nixos/printer.nix
./nixos/machines/nix-gt.nix
./nixos/wm/hyprland.nix
] ++ import ./modules/nixos;
};
homeConfigurations = {
"mrtn@nix-gt" = hm.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
extraSpecialArgs = {
inherit inputs outputs;
};
modules = [
nix-colors.homeManagerModules.default
./hm/home.nix
./hm/hyprland
./hm/users/mrtn/nix-gt.nix
] ++ import ./modules/hm;
};
};
# -----------------------------------------------
# nix-nb
# -----------------------------------------------
nixosConfigurations.nix-nb = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs outputs;
};
modules = [
envfs.nixosModules.envfs
./nixos/base.nix
./nixos/wireguard.nix
./nixos/printer.nix
./nixos/container/template.nix
./nixos/machines/nix-nb.nix
./nixos/wm/hyprland.nix
] ++ import ./modules/nixos;
};
homeConfigurations = {
"mrtn@nix-nb" = hm.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
extraSpecialArgs = {
inherit inputs outputs;
};
modules = [
nix-colors.homeManagerModules.default
./hm/home.nix
./hm/hyprland
./hm/users/mrtn/nix-nb.nix
] ++ import ./modules/hm;
};
};
# -----------------------------------------------
# irene
# -----------------------------------------------
homeConfigurations = {
"martinLi@irene" = hm.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
extraSpecialArgs = {
inherit inputs outputs;
};
modules = [
nix-colors.homeManagerModules.default
./hm/users/martinLi/irene.nix
];
};
};
};
}