flake.nix (view raw)
1{
2 description = "icy's nixos config";
3
4 inputs = {
5 nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
6
7 nixos-hardware.url = "github:nixos/nixos-hardware";
8
9 home-manager = {
10 url = "github:nix-community/home-manager";
11 inputs.nixpkgs.follows = "nixpkgs";
12 };
13
14
15 darwin = {
16 url = "github:lnl7/nix-darwin/master";
17 inputs.nixpkgs.follows = "nixpkgs";
18 };
19
20 prompt = {
21 url = "git+https://git.peppe.rs/cli/prompt";
22 inputs.nixpkgs.follows = "nixpkgs";
23 };
24
25 nix-snapshotter = {
26 url = "github:pdtpartners/nix-snapshotter";
27 inputs.nixpkgs.follows = "nixpkgs";
28 };
29
30 nix-your-shell = {
31 url = "github:MercuryTechnologies/nix-your-shell";
32 inputs.nixpkgs.follows = "nixpkgs";
33 };
34 };
35
36 outputs =
37 { self
38 , nixpkgs
39 , nixos-hardware
40 , nix-snapshotter
41 , nix-your-shell
42 , home-manager
43 , prompt
44 , darwin
45 , ...
46 } @ inputs: {
47
48 overlays = {
49 prompt = prompt.overlay;
50 };
51
52 darwinConfigurations = {
53 syl = darwin.lib.darwinSystem {
54 system = "x86_64-darwin";
55 modules = [
56 {
57 imports = [ ./hosts/syl/configuration.nix ];
58 _module.args.self = self;
59 }
60 home-manager.darwinModules.home-manager
61 {
62 home-manager.useGlobalPkgs = true;
63 home-manager.useUserPackages = true;
64 home-manager.users.icy = {
65 imports = [ ./darwin/home.nix ];
66 _module.args.self = self;
67 _module.args.host = "syl";
68 _module.args.inputs = inputs;
69 };
70 }
71 ];
72 };
73
74 kvothe = darwin.lib.darwinSystem {
75 system = "aarch64-darwin";
76 modules = [
77 {
78 imports = [ ./hosts/kvothe/configuration.nix ];
79 _module.args.self = self;
80 }
81 home-manager.darwinModules.home-manager
82 {
83 home-manager.useGlobalPkgs = true;
84 home-manager.useUserPackages = true;
85 home-manager.users.icy = {
86 imports = [ ./darwin/home.nix ];
87 _module.args.self = self;
88 _module.args.host = "kvothe";
89 _module.args.inputs = inputs;
90 };
91 }
92 ];
93 };
94 };
95
96 nixosConfigurations = {
97 wyndle = nixpkgs.lib.nixosSystem {
98 system = "x86_64-linux";
99 modules = [
100 {
101 imports = [ ./hosts/wyndle/configuration.nix ];
102 _module.args.self = self;
103 nixpkgs.overlays = [ nix-your-shell.overlays.default ];
104 }
105 home-manager.nixosModules.home-manager
106 {
107 home-manager.useGlobalPkgs = true;
108 home-manager.useUserPackages = true;
109 home-manager.users.icy = {
110 imports = [ ./home.nix ];
111 _module.args.self = self;
112 _module.args.host = "wyndle";
113 _module.args.inputs = inputs;
114 };
115 }
116 ];
117 };
118 };
119
120 nixosConfigurations = {
121 sini = nixpkgs.lib.nixosSystem {
122 system = "x86_64-linux";
123 modules = [
124 ({ config = { nix.registry.nixpkgs.flake = nixpkgs; }; })
125 # ({ pkgs, ... }: {
126 # imports = [ nix-snapshotter.nixosModules.default ];
127 # nixpkgs.overlays = [ nix-snapshotter.overlays.default ];
128 # })
129 {
130 imports = [ ./hosts/sini/configuration.nix ];
131 _module.args.self = self;
132 }
133 ];
134 };
135 };
136 };
137
138}