-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
90 lines (75 loc) · 2.44 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
{
description = "Your new nix config";
nixConfig = {
extra-substituters = ["https://cache.oak.decent.id"];
extra-trusted-public-keys = ["cache.oak.decent.id:rf560rkaTPzpc8cg56bnPmmgqro8Lbn624jJSDF5YyY="];
};
inputs = {
# Nixpkgs
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.05";
ags.url = "github:Aylur/ags/v1";
anyrun.url = "github:Kirottu/anyrun";
anyrun.inputs.nixpkgs.follows = "nixpkgs";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
impermanence.url = "github:nix-community/impermanence";
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
sops-nix.url = "github:Mic92/sops-nix";
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = {
self,
nixpkgs,
...
} @ inputs: let
inherit (self) outputs;
supportedSystems = ["x86_64-linux" "aarch64-linux"];
pkgsPlatform = nixpkgs.lib.genAttrs supportedSystems (system:
import nixpkgs {
inherit system;
config.allowUnfree = true;
});
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
in {
nixosModules = import ./modules/nixos;
homeManagerModules = import ./modules/home-manager;
overlays = import ./overlays {inherit inputs outputs;};
# bootstrapping and repo tooling
devShells = forAllSystems (system: let
pkgs = pkgsPlatform.${system};
in {
default = pkgs.mkShell {
NIX_CONFIG = "extra-experimental-features = nix-command flakes";
buildInputs = with pkgs; [
nix
git
sops
ssh-to-age
gnupg
age
];
};
});
# NixOS configuration entrypoint
# Available through 'nixos-rebuild --flake .#oak'
nixosConfigurations = {
magnolia = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs outputs;};
modules = [./hosts/magnolia/configuration.nix];
};
oak = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs outputs;};
modules = [./hosts/oak/configuration.nix];
};
redbud = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs outputs;};
modules = [./hosts/redbud/configuration.nix];
};
warden = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs outputs;};
modules = [./hosts/warden/configuration.nix];
};
};
};
}