-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
42 lines (40 loc) · 1.29 KB
/
flake.nix
File metadata and controls
42 lines (40 loc) · 1.29 KB
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
{
description = "NixOS dotfiles";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
astal.url = "github:aylur/astal";
astal.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs, home-manager, astal }@inputs: let
pkgs = nixpkgs.legacyPackages.${host.system};
utils = import ./lib/utils.nix;
users = utils.importUsers ./users { inherit pkgs utils; };
host = {
system = "x86_64-linux";
name = "nixos";
timezone = "Asia/Jakarta";
locale = "en_US.UTF-8";
};
in {
nixosConfigurations.${host.name} = nixpkgs.lib.nixosSystem {
specialArgs = { inherit host users inputs; libutils = utils; };
modules = [ ./host/configuration.nix ];
};
homeConfigurations = builtins.foldl'
(acc: user: acc // {
${user.userAtMachine} = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = { inherit utils astal inputs; };
modules = [
./lib/user-config.nix
{ user-config = builtins.removeAttrs user ["groups" "userAtMachine"] // { enable = true; }; }
];
};
})
{}
users
;
};
}