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
31 outputs =
32 { self
33 , nixpkgs
34 , nixos-hardware
35 , nix-snapshotter
36 , home-manager
37 , prompt
38 , darwin
39 , ...
40 } @ inputs: {
41
42 overlays = {
43 prompt = prompt.overlay;
44 };
45
46 darwinConfigurations = {
47 syl = darwin.lib.darwinSystem {
48 system = "x86_64-darwin";
49 modules = [
50 {
51 imports = [ ./hosts/syl/configuration.nix ];
52 _module.args.self = self;
53 }
54 home-manager.darwinModules.home-manager
55 {
56 home-manager.useGlobalPkgs = true;
57 home-manager.useUserPackages = true;
58 home-manager.users.icy = {
59 imports = [ ./darwin/home.nix ];
60 _module.args.self = self;
61 _module.args.host = "syl";
62 _module.args.inputs = inputs;
63 };
64 }
65 ];
66 };
67
68 kvothe = darwin.lib.darwinSystem {
69 system = "aarch64-darwin";
70 modules = [
71 {
72 imports = [ ./hosts/kvothe/configuration.nix ];
73 _module.args.self = self;
74 }
75 home-manager.darwinModules.home-manager
76 {
77 home-manager.useGlobalPkgs = true;
78 home-manager.useUserPackages = true;
79 home-manager.users.icy = {
80 imports = [ ./darwin/home.nix ];
81 _module.args.self = self;
82 _module.args.host = "kvothe";
83 _module.args.inputs = inputs;
84 };
85 }
86 ];
87 };
88 };
89
90 nixosConfigurations = {
91 wyndle = nixpkgs.lib.nixosSystem {
92 system = "x86_64-linux";
93 modules = [
94 {
95 imports = [ ./hosts/wyndle/configuration.nix ];
96 _module.args.self = self;
97 }
98 home-manager.nixosModules.home-manager
99 {
100 home-manager.useGlobalPkgs = true;
101 home-manager.useUserPackages = true;
102 home-manager.users.icy = {
103 imports = [ ./home.nix ];
104 _module.args.self = self;
105 _module.args.host = "wyndle";
106 _module.args.inputs = inputs;
107 };
108 }
109 ];
110 };
111 };
112
113 nixosConfigurations = {
114 sini = nixpkgs.lib.nixosSystem {
115 system = "x86_64-linux";
116 modules = [
117 ({ config = { nix.registry.nixpkgs.flake = nixpkgs; }; })
118 # ({ pkgs, ... }: {
119 # imports = [ nix-snapshotter.nixosModules.default ];
120 # nixpkgs.overlays = [ nix-snapshotter.overlays.default ];
121 # })
122 {
123 imports = [ ./hosts/sini/configuration.nix ];
124 _module.args.self = self;
125 }
126 ];
127 };
128 };
129 };
130
131}