-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
89 lines (75 loc) · 2.41 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
{
description = "Nix Configuration";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nixos-wsl.url = "github:nix-community/NixOS-WSL/main";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
nix-darwin.url = "github:lnl7/nix-darwin";
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
flake-parts.url = "github:hercules-ci/flake-parts";
nixos-flake.url = "github:srid/nixos-flake";
nix-index-database.url = "github:nix-community/nix-index-database";
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = inputs@{
home-manager,
nix-darwin,
nixos-wsl,
nixpkgs,
self,
...
}:
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
debug = false;
systems = [ "x86_64-linux" "aarch64-darwin" ];
imports = [
inputs.nixos-flake.flakeModule
];
flake = {
nixosConfigurations.crash = self.nixos-flake.lib.mkLinuxSystem {
imports = [
./hosts/crash
./common/configuration.nix
./common/autoupgrade.nix
nixos-wsl.nixosModules.default
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.shadow = import ./home-manager/shadow.nix;
}
];
};
darwinConfigurations.bass = self.nixos-flake.lib.mkMacosSystem {
imports = [
./hosts/bass
./common/configuration.nix
home-manager.darwinModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.shadow = import ./home-manager/shadow.nix;
}
];
};
};
perSystem = { self', inputs', pkgs, system, config, ... }: {
legacyPackages.homeConfiguration.shadow =
self.nixos-flake.lib.mkHomeConfiguration pkgs {
imports = [
./home-manager/shadow.nix
];
};
nixos-flake = {
primary-inputs = [
"home-manager"
"nix-darwin"
"nix-index-database"
"nixos-flake"
"nixos-wsl"
"nixpkgs"
];
};
packages.default = self'.packages.activate;
};
};
}