-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
113 lines (99 loc) · 3.11 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
{
description = "Nixos config flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
nixpkgs-unstable.url = "github:NixOS/nixpkgs";
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=v0.1.0";
nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions";
# pomatez-flake.url = "github:rlad78/pomatez-flake";
nixarr = {
url = "github:rlad78/nixarr/prod";
# url = "path:/home/richard/nixarr/";
};
};
outputs = { self, nixpkgs, nixpkgs-unstable, nixos-hardware, nix-flatpak, nix-vscode-extensions, nixarr, home-manager, ... }@inputs:
let
# secrets = builtins.fromJSON (builtins.readFile "${self}/secrets/secrets.json");
# hosts = builtins.fromJSON (builtins.readFile "${self}/secrets/hosts.json");
# builders = builtins.fromJSON (builtins.readFile "${self}/system/builders.json");
pkgsBaseArgs = add-config: {
system = "x86_64-linux";
config = { allowUnfree = true; } // add-config;
};
distributeInputs = {
util = import ./util.nix nixpkgs.lib;
secrets = builtins.fromJSON (builtins.readFile "${self}/secrets/secrets.json");
hosts = builtins.fromJSON (builtins.readFile "${self}/secrets/hosts.json");
builders = builtins.fromJSON (builtins.readFile "${self}/system/builders.json");
inherit nix-flatpak;
inherit nix-vscode-extensions;
inherit nixarr;
inherit home-manager;
};
systemMake = {
pkg-base ? nixpkgs-unstable,
pkg-args ? {},
pkg-config-args ? {},
module-paths ? [],
}:
let
pkgsBuild = pkg: import pkg (
(pkgsBaseArgs pkg-config-args)
// pkg-args
);
in
pkg-base.lib.nixosSystem {
specialArgs = rec {
pkgs = pkgsBuild pkg-base;
pkgs-unstable =
if pkg-base == nixpkgs-unstable
then pkgs
else pkgsBuild nixpkgs-unstable;
} // distributeInputs;
modules = module-paths;
};
in
{
nixosConfigurations = {
nixarf = systemMake {
pkg-base = nixpkgs;
module-paths = [ ./hosts/nixarf ];
};
nix-go = systemMake {
module-paths = [
./hosts/nix-go
nixos-hardware.nixosModules.microsoft-surface-pro-intel
nix-flatpak.nixosModules.nix-flatpak
];
};
hatab = systemMake {
module-paths = [
./hosts/hatab
nixos-hardware.nixosModules.microsoft-surface-pro-intel
];
};
snootflix = systemMake {
pkg-config-args = {
permittedInsecurePackages = [
"aspnetcore-runtime-6.0.36"
"aspnetcore-runtime-wrapped-6.0.36"
"dotnet-sdk-6.0.428"
"dotnet-sdk-wrapped-6.0.428"
];
};
module-paths = [
./hosts/snootflix
nixarr.nixosModules.default
];
};
nixps = systemMake {
module-paths = [
./hosts/nixps
nixos-hardware.nixosModules.dell-xps-15-9570-intel
nix-flatpak.nixosModules.nix-flatpak
];
};
};
};
}