-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
124 lines (108 loc) · 4.27 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
{
inputs = {
agenix.inputs.nixpkgs.follows = "nixpkgs";
alloy.inputs.nixpkgs.follows = "nixpkgs";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
hydra.inputs.nixpkgs.follows = "nixpkgs";
musnix.inputs.nixpkgs.follows = "nixpkgs";
nixd.inputs.nixpkgs.follows = "nixpkgs";
notes.inputs.nixpkgs.follows = "nixpkgs";
stylix.inputs.nixpkgs.follows = "nixpkgs";
xmonad.inputs.nixpkgs.follows = "nixpkgs";
alloy.url = "github:head-gardener/alloy";
# alloy.url = "git+file:/home/hunter/Code/alloy";
notes.url = "github:head-gardener/notes";
# notes.url = "git+file:/home/hunter/notes/";
xmonad.url = "github:head-gardener/xmonad";
# xmonad.url = "git+file:/home/hunter/xmonad/";
agenix.url = "github:ryantm/agenix";
dmenu-conf.url = "github:head-gardener/nixpkgs/master";
flake-parts.url = "github:hercules-ci/flake-parts";
home-manager.url = "github:nix-community/home-manager/release-24.11";
hydra.url = "github:NixOS/hydra";
impermanence.url = "github:nix-community/impermanence";
musnix.url = "github:musnix/musnix";
neovim-nightly.url = "github:nix-community/neovim-nightly-overlay";
nixd.url = "github:nix-community/nixd";
nixos-hardware.url = "github:NixOS/nixos-hardware";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
stylix.url = "github:danth/stylix";
unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = inputs: with inputs; flake-parts.lib.mkFlake { inherit inputs; } {
imports = [
alloy.flakeModule
./flake/modules.nix
];
modules = {
nixosRoot = ./modules;
homeRoot = ./home;
withPrefix = [ "vm" ];
};
flake = {
lib = import ./lib.nix inputs nixpkgs.lib;
overlays = self.lib.mkOverlays inputs ./overlays // {
packages = final: _: import ./pkgs final;
};
images = {
installer = self.nixosConfigurations.installer.config.system.build.isoImage;
digitalocean = self.nixosConfigurations.digitalocean.config.system.build.digitalOceanImage;
};
nixosModules = {
defaultImports = {
imports = [
self.nixosModules.default
self.nixosModules.share
{ nixpkgs.overlays = nixpkgs.lib.attrValues self.overlays; }
inputs.agenix.nixosModules.default
inputs.impermanence.nixosModules.impermanence
inputs.stylix.nixosModules.stylix
inputs.xmonad.nixosModules.myxmonad
];
};
};
alloy.config = ./alloy_config.nix;
alloy.extraSpecialArgs = { inherit self; };
alloy.nixosConfigurations = {
distortion = self.lib.mkDesktop "x86_64-linux" "distortion" [ ];
shears = self.lib.mkDesktop "x86_64-linux" "shears" [ ];
ambrosia = self.lib.mkDesktop "x86_64-linux" "ambrosia" [ ];
apple = self.lib.mkHost "x86_64-linux" "apple" [ ];
blueberry = self.lib.mkHost "x86_64-linux" "blueberry" [ ];
cherry = self.lib.mkHost "x86_64-linux" "cherry" [ ];
elderberry = self.lib.mkHost "x86_64-linux" "elderberry" [
"${nixpkgs}/nixos/modules/virtualisation/digital-ocean-image.nix"
];
digitalocean = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
modules = [
"${nixpkgs}/nixos/modules/virtualisation/digital-ocean-image.nix"
];
};
installer = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
modules = [
({ pkgs, modulesPath, lib, ... }: {
imports = [
"${modulesPath}/installer/cd-dvd/installation-cd-minimal.nix"
];
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.supportedFilesystems = lib.mkForce [ "btrfs" "reiserfs" "vfat" "f2fs" "xfs" "ntfs" "cifs" ];
})
(self.lib.mkKeys' self "nixos" "hunter")
self.nixosModules.tmux
self.nixosModules.tools
];
};
};
};
systems = [ "x86_64-linux" ];
perSystem = { pkgs, system, self', ... }: {
_module.args.pkgs = self.lib.nixpkgsFor system;
packages = import ./pkgs pkgs;
legacyPackages = pkgs;
};
};
}