-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
89 lines (79 loc) · 2.93 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
{
description = "NixOS configuration";
inputs.nixpkgs.url = "nixpkgs/nixos-unstable";
inputs.home-manager.url = "github:nix-community/home-manager";
inputs.home-manager.inputs.nixpkgs.follows = "nixpkgs";
inputs.plasma-manager.url = "github:pjones/plasma-manager";
inputs.plasma-manager.inputs.nixpkgs.follows = "nixpkgs";
inputs.plasma-manager.inputs.home-manager.follows = "home-manager";
inputs.impermanence.url = "github:nix-community/impermanence";
inputs.code-sandbox.url = "sourcehut:~gotlou/code-sandbox";
inputs.code-sandbox.inputs.nixpkgs.follows = "nixpkgs";
inputs.archiver.url = "sourcehut:~gotlou/archiveurl";
inputs.archiver.inputs.nixpkgs.follows = "nixpkgs";
inputs.sshield.url = "github:gotlougit/sshield";
inputs.sshield.inputs.nixpkgs.follows = "nixpkgs";
inputs.stylix.url = "github:danth/stylix";
inputs.stylix.inputs.nixpkgs.follows = "nixpkgs";
outputs = inputs@{ self, nixpkgs, impermanence, code-sandbox, archiver
, home-manager, plasma-manager, sshield, stylix }:
let
system = "x86_64-linux";
aarch64System = "aarch64-linux";
in {
nixpkgs.overlays = [
import
(inputs.code-sandbox)
import
(inputs.archiver)
import
(inputs.sshield)
];
images = {
mimir = (self.nixosConfigurations.mimir.extendModules {
modules = [
"${nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64-new-kernel-no-zfs-installer.nix"
];
}).config.system.build.sdImage;
};
nixosConfigurations = {
kratos = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = { inherit inputs; };
modules = [
home-manager.nixosModules.home-manager
{
# Pass flake input to home-manager
home-manager.extraSpecialArgs = { inherit inputs; };
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
# Ref: https://github.com/pjones/plasma-manager/issues/14
# This is the way to import "plasma-manager" in home-manager
# in such a config
home-manager.sharedModules =
[ plasma-manager.homeManagerModules.plasma-manager ];
home-manager.users.gotlou = import ./home;
}
./hosts/kratos
./system
];
};
mimir = nixpkgs.lib.nixosSystem {
system = aarch64System;
specialArgs = { inherit inputs; };
modules = [
./hosts/mimir/base.nix
./hosts/mimir/configuration.nix
./hosts/mimir/systemprograms.nix
./hosts/mimir/services/tailscale.nix
./system/networking.nix
./system/zram.nix
./system/dns-resolver.nix
./system/oom.nix
./system/standard-services.nix
./system/nix.nix
];
};
};
};
}