Skip to content

Commit ed9d23c

Browse files
committed
adama nixos config
1 parent 212416e commit ed9d23c

File tree

12 files changed

+66
-49
lines changed

12 files changed

+66
-49
lines changed

darwin-modules/context.nix

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,8 @@ in
1818
nixpkgs-path = mkOption {
1919
type = path;
2020
};
21+
nixpkgs-unstable-path = mkOption {
22+
type = path;
23+
};
2124
};
2225
}

flake.nix

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,18 @@
7979

8080
system.stateVersion = 4;
8181
nixpkgs-path = inputs.nixpkgs;
82+
nixpkgs-unstable-path = inputs.nixpkgs-unstable;
8283
}
8384
inputs.home-manager.darwinModules.home-manager
8485
({ config, ... }: {
8586
home-manager.users.${config.mainUser} = {
8687
imports = [
8788
./home-configurations/peteresselius.nix
8889
./home-modules/default.nix
90+
inputs.agenix.homeManagerModules.default
91+
inputs.krewfile.homeManagerModules.krewfile
92+
inputs.nix-index-database.hmModules.nix-index
93+
inputs.nixvim.homeManagerModules.nixvim
8994
];
9095
};
9196
home-manager.extraSpecialArgs = { inherit inputs; };
@@ -114,8 +119,39 @@
114119
nix = ./home-modules/nix.nix;
115120
neovim = ./home-modules/neovim.nix;
116121
};
122+
123+
nixosConfigurations.adama = inputs.nixpkgs-nixos.lib.nixosSystem {
124+
modules = [
125+
./nixos-configurations/adama.nix
126+
./nixos-modules/default.nix
127+
inputs.raspberry-pi-nix.nixosModules.raspberry-pi
128+
inputs.agenix.nixosModules.default
129+
inputs.authentik-nix.nixosModules.default
130+
{
131+
_module.args.mkAuthentikScope = inputs.authentik-nix.lib.mkAuthentikScope;
132+
nixpkgs-path = inputs.nixpkgs-nixos;
133+
nixpkgs-unstable-path = inputs.nixpkgs-unstable;
134+
}
135+
inputs.home-manager-nixos.nixosModules.home-manager
136+
({ config, ... }: {
137+
home-manager.users.${config.mainUser} = {
138+
imports = [
139+
./home-configurations/peteresselius.nix
140+
./home-modules/default.nix
141+
inputs.agenix.homeManagerModules.default
142+
inputs.krewfile.homeManagerModules.krewfile
143+
inputs.nix-index-database.hmModules.nix-index
144+
inputs.nixvim.homeManagerModules.nixvim
145+
];
146+
};
147+
home-manager.extraSpecialArgs = { inherit inputs; };
148+
})
149+
];
150+
specialArgs = { inherit inputs; };
151+
};
117152
};
118153

154+
119155
dev.enable = true;
120156
};
121157
}

home-configurations/peteresselius.nix

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{ inputs, config, ... }:
1+
{ config, ... }:
22

33
{
44
imports = [
@@ -10,10 +10,6 @@
1010
../home-modules/git.nix
1111
../home-modules/ssh.nix
1212
../home-modules/profiles
13-
inputs.agenix.homeManagerModules.default
14-
inputs.krewfile.homeManagerModules.krewfile
15-
inputs.nix-index-database.hmModules.nix-index
16-
inputs.nixvim.homeManagerModules.nixvim
1713
];
1814

1915
config = {

home-modules/agenix.nix

Lines changed: 0 additions & 5 deletions
This file was deleted.

nixos-configurations/adama.nix

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
1-
{ inputs, ezModules, config, ... }:
1+
{ config, ... }:
22

33
{
4-
_module.args.mkAuthentikScope = inputs.authentik-nix.lib.mkAuthentikScope;
5-
64
imports = [
7-
ezModules.authentik-blueprints
8-
ezModules.sshd
9-
ezModules.user-peteresselius
10-
ezModules.ca
11-
ezModules.nginx
12-
ezModules.nix-gc
13-
ezModules.hardware-rpi5
5+
../nixos-modules/authentik-blueprints.nix
6+
../nixos-modules/sshd.nix
7+
../nixos-modules/user-peteresselius.nix
8+
../nixos-modules/ca.nix
9+
../nixos-modules/nginx.nix
10+
../nixos-modules/nix-gc.nix
11+
../nixos-modules/hardware-rpi5.nix
1412
];
1513

1614
nixpkgs.hostPlatform = "aarch64-linux";

nixos-modules/agenix.nix

Lines changed: 0 additions & 7 deletions
This file was deleted.

nixos-modules/context.nix

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
let
44
inherit (lib) mkOption;
5-
inherit (lib.types) enum str;
5+
inherit (lib.types) enum str path;
66
in
77
{
88
options = {
@@ -15,5 +15,11 @@ in
1515
mainUser = mkOption {
1616
type = str;
1717
};
18+
nixpkgs-path = mkOption {
19+
type = path;
20+
};
21+
nixpkgs-unstable-path = mkOption {
22+
type = path;
23+
};
1824
};
1925
}

nixos-modules/default.nix

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
{ ezModules, ... }:
1+
{ ... }:
22

33
{
44
imports = [
5-
ezModules.context
6-
ezModules.agenix
7-
ezModules.nix
8-
ezModules.profiles
5+
./context.nix
6+
./nix.nix
7+
./profiles
98
../overlays.nix
109
];
1110
}

nixos-modules/hardware-rpi5.nix

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
1-
{ inputs, lib, config, ... }:
1+
{ lib, config, ... }:
22

33
let
44
cfg = config.hardware-rpi5;
55
in
66
{
7-
imports = [
8-
inputs.raspberry-pi-nix.nixosModules.raspberry-pi
9-
];
10-
117
options.hardware-rpi5 = {
128
enable = lib.mkEnableOption "Enable extra Raspberry Pi 5 hardware features";
139
enableNVMe = lib.mkEnableOption "Enable NVMe support";

nixos-modules/nix.nix

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{ inputs, ... }:
1+
{ config, ... }:
22

33
{
44
nix = {
@@ -8,16 +8,14 @@
88

99
settings.trusted-users = [ "root" "@wheel" ];
1010

11-
registry.nixpkgs.flake = inputs.nixpkgs;
12-
1311
optimise = {
1412
automatic = true;
1513
dates = [ "03:45" ];
1614
};
1715

1816
nixPath = [
19-
"nixpkgs=${inputs.nixpkgs}"
20-
"nixpkgs-unstable=${inputs.nixpkgs-unstable}"
17+
"nixpkgs=${config.nixpkgs-path}"
18+
"nixpkgs-unstable=${config.nixpkgs-unstable-path}"
2119
];
2220
};
2321
}

0 commit comments

Comments
 (0)