-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
executable file
·87 lines (86 loc) · 1.99 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
{
inputs = {
nixpkgs = {
url = "github:NixOS/nixpkgs/nixos-unstable";
};
nixpkgs-unstable = {
url = "github:NixOS/nixpkgs/nixos-unstable";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-hardware = {
url = "github:NixOS/nixos-hardware";
};
nix-darwin.url = "github:LnL7/nix-darwin";
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
nixos-wsl.url = "github:nix-community/NixOS-WSL/main";
};
outputs =
inputs@{
self,
nixpkgs,
nixpkgs-unstable,
nix-darwin,
home-manager,
nixos-hardware,
nixos-wsl
}:
let
allUsers = [
"mj"
"vim"
"kalki"
"root"
];
hostnameroot = "URIEL";
system = "x86_64-linux";
user = "mj";
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
pkgs-unstable = import nixpkgs-unstable {
inherit system;
config.allowUnfree = true;
};
lib = nixpkgs.lib;
in
rec {
nixosConfigurations = import ./flake/system/system.nix {
inherit (nixpkgs) lib;
inherit
inputs
allUsers
user
system
home-manager
hostnameroot
pkgs
pkgs-unstable
nixos-wsl
nixos-hardware
;
};
# Home-Manager Configuration
homeConfigurations = builtins.listToAttrs (
builtins.map (username: {
name = username;
value = home-manager.lib.homeManagerConfiguration {
pkgs = pkgs;
modules = [
{
home.stateVersion = "24.05";
home.username = username;
home.homeDirectory = "/home/${username}";
imports = [
./home/users/${username}.nix
];
}
];
};
}) allUsers
);
};
}