-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
69 lines (65 loc) · 2.04 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
{
description = "NixOS Configuration";
inputs = {
nixos.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
hardware.url = "github:nixos/nixos-hardware";
home-manager.url = "github:nix-community/home-manager";
impermanence.url = "github:nix-community/impermanence";
neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay";
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
sops-nix = {
url = "github:mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {
self,
nixpkgs,
home-manager,
...
} @ inputs: let
inherit (self) outputs;
lib = nixpkgs.lib // home-manager.lib;
systems = ["x86_64-linux" "aarch64-linux"];
forEachSystem = f: lib.genAttrs systems (system: f pkgsFor.${system});
pkgsFor = lib.genAttrs systems (system:
import nixpkgs {
inherit system;
config.allowUnfree = true;
});
in {
# add custom packages
packages = forEachSystem (pkgs: import ./pkgs {inherit pkgs;});
# set formmatter for this flake
formatter = forEachSystem (pkgs: pkgs.alejandra);
# system configurations
nixosConfigurations = {
live-cd-minimal-x86_64-linux = lib.nixosSystem {
modules = [
./hosts/live-cd-minimal
./hosts/common/optional/minimal-x86_64-linux-hardware-configuration.nix
];
specialArgs = {inherit inputs outputs;};
};
live-cd-graphical-x86_64-linux = lib.nixosSystem {
modules = [
./hosts/live-cd-graphical
./hosts/common/optional/minimal-x86_64-linux-hardware-configuration.nix
];
specialArgs = {inherit inputs outputs;};
};
beelink-ser7 = lib.nixosSystem {
modules = [./hosts/beelink-ser7];
specialArgs = {inherit inputs outputs;};
};
vm = lib.nixosSystem {
modules = [./hosts/vm];
specialArgs = {inherit inputs outputs;};
};
};
};
}