nix/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/release-22.11";
11 inputs.nixpkgs.follows = "nixpkgs";
12 };
13
14 neovim.url = "github:nix-community/neovim-nightly-overlay";
15
16 darwin = {
17 url = "github:lnl7/nix-darwin/master";
18 inputs.nixpkgs.follows = "nixpkgs";
19 };
20
21 prompt = {
22 url = "git+https://git.peppe.rs/cli/prompt";
23 inputs.nixpkgs.follows = "nixpkgs";
24 };
25 };
26
27 outputs =
28 { self
29 , nixpkgs
30 , nixos-hardware
31 , home-manager
32 , neovim
33 , prompt
34 , darwin
35 , ...
36 } @ inputs: {
37
38 overlays = {
39 nvim-nightly = neovim.overlay;
40 prompt = prompt.overlay;
41 };
42
43 darwinConfigurations = {
44 syl = darwin.lib.darwinSystem {
45 system = "x86_64-darwin";
46 modules = [
47 {
48 imports = [ ./hosts/syl/configuration.nix ];
49 _module.args.self = self;
50 }
51 home-manager.darwinModules.home-manager
52 {
53 home-manager.useGlobalPkgs = true;
54 home-manager.useUserPackages = true;
55 home-manager.users.icy = {
56 imports = [ ./darwin/home.nix ];
57 _module.args.self = self;
58 _module.args.host = "syl";
59 _module.args.inputs = inputs;
60 };
61 }
62 ];
63 };
64
65 kvothe = darwin.lib.darwinSystem {
66 system = "aarch64-darwin";
67 modules = [
68 {
69 imports = [ ./hosts/kvothe/configuration.nix ];
70 _module.args.self = self;
71 }
72 home-manager.darwinModules.home-manager
73 {
74 home-manager.useGlobalPkgs = true;
75 home-manager.useUserPackages = true;
76 home-manager.users.icy = {
77 imports = [ ./darwin/home.nix ];
78 _module.args.self = self;
79 _module.args.host = "kvothe";
80 _module.args.inputs = inputs;
81 };
82 }
83 ];
84 };
85 };
86
87 nixosConfigurations = {
88 wyndle = nixpkgs.lib.nixosSystem {
89 system = "x86_64-linux";
90 modules = [
91 {
92 imports = [ ./hosts/wyndle/configuration.nix ];
93 _module.args.self = self;
94 }
95 home-manager.nixosModules.home-manager
96 {
97 home-manager.useGlobalPkgs = true;
98 home-manager.useUserPackages = true;
99 home-manager.users.icy = {
100 imports = [ ./home.nix ];
101 _module.args.self = self;
102 _module.args.host = "wyndle";
103 _module.args.inputs = inputs;
104 };
105 }
106 ];
107 };
108 };
109 };
110
111}