-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
101 lines (98 loc) · 2.97 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
90
91
92
93
94
95
96
97
98
99
100
101
{
inputs = {
flake-utils.url = "github:numtide/flake-utils";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable";
nixos-stable.url = "github:nixos/nixpkgs/nixos-22.11";
zjstatus.url = "github:dj95/zjstatus";
darwin = {
url = "github:lnl7/nix-darwin/master";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
home-manager-nixos = {
url = "github:nix-community/home-manager/release-22.11";
inputs.nixpkgs.follows = "nixos-stable";
};
home-manager-master = {
url = "github:nix-community/home-manager/master";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
};
outputs =
inputs@{ self
, home-manager-master
, home-manager-nixos
, nixpkgs-unstable
, nixos-stable
, darwin
, flake-utils
, zjstatus
}:
let
overlays = [
(final: prev: {
zjstatus = zjstatus.packages.${prev.system}.default;
})
(import ./overlay/vimPlugins.nix)
];
config = {
allowUnfree = true;
allowUnfreePredicate = _: true;
};
nixosSystem-stable = nixos-stable.lib.nixosSystem;
darwinSystem = darwin.lib.darwinSystem;
in
flake-utils.lib.eachDefaultSystem
(system: {
devShells.default = import ./shell.nix {
pkgs =
if builtins.elem system [ "aarch64-darwin" "x86_64-darwin" ]
then import nixpkgs-unstable { inherit overlays system config; }
else import nixos-stable { inherit overlays system config; };
};
})
//
{
nixosConfigurations.ghastly = nixosSystem-stable rec {
system = "aarch64-linux";
modules = [
./host/ghastly/configuration.nix
home-manager-nixos.nixosModules.home-manager
{
home-manager.users.ocean = import ./home/console-user.nix {
pkgs = import nixos-stable { inherit overlays system config; };
config = {
user = "ocean";
home = "/home/ocean";
state_version = "22.11";
};
theme-config.helix = "base16_transparent";
};
}
];
};
darwinConfigurations.Armstrong = darwinSystem {
system = "aarch64-darwin";
specialArgs = {
inherit inputs;
overlays = overlays ++ [
(import ./overlay/theme { source = ./host/armstrong/theme.nix; })
];
};
modules = [
./host/armstrong/configuration.nix
home-manager-master.darwinModules.home-manager
{
nixpkgs.config = config;
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users."ocean.lewis" =
import ./home/desktop-user.nix {
username = "ocean.lewis";
homeDirectory = "/Users/ocean.lewis";
stateVersion = "22.11";
};
}
];
};
};
}