-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
49 lines (44 loc) · 1.05 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
{
description = "Nixos config flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nur.url = "github:nix-community/NUR";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {
self,
nixpkgs,
home-manager,
...
} @ inputs: let
mkSystem = name: system:
nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = inputs // {inherit system;};
modules = [
./hosts/${name}/configuration.nix
];
};
mkHome = name: system:
home-manager.lib.homeManagerConfiguration {
pkgs = import nixpkgs {
inherit system;
};
modules = [
./hosts/${name}/default.nix
];
};
in {
nixosConfigurations = {
desktop = mkSystem "desktop" "x86_64-linux";
dam = mkSystem "dam" "x86_64-linux";
smoker = mkSystem "smoker" "x86_64-linux";
};
homeConfigurations = {
wsl = mkHome "wsl" "x86_64-linux";
};
};
}