This repository has been archived by the owner on Oct 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
70 lines (68 loc) · 1.72 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
{
description = "NixOS config flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
chaotic.url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
home-manager = {
url = "github:nix-community/home-manager/master";
inputs.nixpkgs.follows = "nixpkgs";
};
stylix = {
url = "github:danth/stylix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{
nixpkgs,
...
}@inputs:
let
preset =
{ username, hostname }:
nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs;
inherit username;
inherit hostname;
};
modules = [
./hosts/${hostname}/configuration.nix
./nixosModules
inputs.chaotic.nixosModules.default
inputs.stylix.nixosModules.stylix
inputs.home-manager.nixosModules.home-manager
{
home-manager = {
extraSpecialArgs = {
inherit inputs;
inherit username;
inherit hostname;
};
useGlobalPkgs = true;
useUserPackages = true;
# backupFileExtension = "backup";
users.${username} = {
imports = [
./hosts/${hostname}/home.nix
./homeModules
];
};
};
}
];
};
in
{
nixosConfigurations = {
T16G1 = preset {
username = "seolcu";
hostname = "T16G1";
};
T480s = preset {
username = "seolcu";
hostname = "T480s";
};
};
};
}