nix/flake.nix (view raw)
1{
2 description = "icy's nixos config";
3
4 inputs = {
5 nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";
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
26 outputs =
27 { self
28 , nixpkgs
29 , nixos-hardware
30 , home-manager
31 , prompt
32 , darwin
33 , ...
34 } @ inputs: {
35
36 overlays = {
37 prompt = prompt.overlay;
38 };
39
40 darwinConfigurations = {
41 syl = darwin.lib.darwinSystem {
42 system = "x86_64-darwin";
43 modules = [
44 {
45 imports = [ ./hosts/syl/configuration.nix ];
46 _module.args.self = self;
47 }
48 home-manager.darwinModules.home-manager
49 {
50 home-manager.useGlobalPkgs = true;
51 home-manager.useUserPackages = true;
52 home-manager.users.icy = {
53 imports = [ ./darwin/home.nix ];
54 _module.args.self = self;
55 _module.args.host = "syl";
56 _module.args.inputs = inputs;
57 };
58 }
59 ];
60 };
61
62 kvothe = darwin.lib.darwinSystem {
63 system = "aarch64-darwin";
64 modules = [
65 {
66 imports = [ ./hosts/kvothe/configuration.nix ];
67 _module.args.self = self;
68 }
69 home-manager.darwinModules.home-manager
70 {
71 home-manager.useGlobalPkgs = true;
72 home-manager.useUserPackages = true;
73 home-manager.users.icy = {
74 imports = [ ./darwin/home.nix ];
75 _module.args.self = self;
76 _module.args.host = "kvothe";
77 _module.args.inputs = inputs;
78 };
79 }
80 ];
81 };
82 };
83
84 nixosConfigurations = {
85 wyndle = nixpkgs.lib.nixosSystem {
86 system = "x86_64-linux";
87 modules = [
88 {
89 imports = [ ./hosts/wyndle/configuration.nix ];
90 _module.args.self = self;
91 }
92 home-manager.nixosModules.home-manager
93 {
94 home-manager.useGlobalPkgs = true;
95 home-manager.useUserPackages = true;
96 home-manager.users.icy = {
97 imports = [ ./home.nix ];
98 _module.args.self = self;
99 _module.args.host = "wyndle";
100 _module.args.inputs = inputs;
101 };
102 }
103 ];
104 };
105 };
106 };
107
108}