chore: clean up flake

This commit is contained in:
Leon Schwarzäugl 2025-07-02 01:16:42 +02:00
parent 178d51cde6
commit 6ca7717d3e
Signed by: swarsel
GPG key ID: 26A54C31F2A4FD84
63 changed files with 5134 additions and 1157 deletions

16
nix/globals-general.nix Normal file
View file

@ -0,0 +1,16 @@
{ lib, ... }:
let
# Try to access the extra builtin we loaded via nix-plugins.
# Throw an error if that doesn't exist.
sopsImportEncrypted =
assert lib.assertMsg (builtins ? extraBuiltins.sopsImportEncrypted)
"The extra builtin 'sopsImportEncrypted' is not available, so repo.secrets cannot be decrypted. Did you forget to add nix-plugins and point it to `./nix/extra-builtins.nix` ?";
builtins.extraBuiltins.sopsImportEncrypted;
in
{
imports = [
(sopsImportEncrypted ../secrets/repo/globals.nix.enc)
];
}

View file

@ -1,10 +1,7 @@
# taken from https://github.com/oddlama/nix-config/blob/main/nix/globals.nix
{ inputs, ... }:
{
flake =
{ config
, lib
, ...
}:
flake = { config, lib, ... }:
{
globals =
let
@ -17,6 +14,7 @@
};
modules = [
../modules/nixos/common/globals.nix
./globals-general.nix
(
{ lib, ... }:
{
@ -39,9 +37,7 @@
inherit (globalsSystem.config.globals)
domains
services
macs
myuser
root
user
;
};
};