wooooooot, we're compiling again

This commit is contained in:
Chris Kruining 2026-03-26 14:00:25 +01:00
parent 97b63074f0
commit ba7c3392b9
No known key found for this signature in database
GPG key ID: EB894A3560CCCAD2
94 changed files with 654 additions and 677 deletions

124
flake.lock generated
View file

@ -71,15 +71,23 @@
"clan-core": { "clan-core": {
"inputs": { "inputs": {
"data-mesher": "data-mesher", "data-mesher": "data-mesher",
"disko": "disko", "disko": [
"disko"
],
"flake-parts": [ "flake-parts": [
"flake-parts" "flake-parts"
], ],
"nix-darwin": "nix-darwin", "nix-darwin": "nix-darwin",
"nix-select": "nix-select", "nix-select": "nix-select",
"nixpkgs": "nixpkgs", "nixpkgs": [
"sops-nix": "sops-nix", "nixpkgs"
"systems": "systems", ],
"sops-nix": [
"sops-nix"
],
"systems": [
"systems"
],
"treefmt-nix": "treefmt-nix" "treefmt-nix": "treefmt-nix"
}, },
"locked": { "locked": {
@ -139,7 +147,6 @@
"disko": { "disko": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"clan-core",
"nixpkgs" "nixpkgs"
] ]
}, },
@ -160,7 +167,7 @@
"erosanix": { "erosanix": {
"inputs": { "inputs": {
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs"
}, },
"locked": { "locked": {
"lastModified": 1773767380, "lastModified": 1773767380,
@ -264,7 +271,6 @@
"flake-parts": { "flake-parts": {
"inputs": { "inputs": {
"nixpkgs-lib": [ "nixpkgs-lib": [
"clan-core",
"nixpkgs" "nixpkgs"
] ]
}, },
@ -369,7 +375,7 @@
"flux": { "flux": {
"inputs": { "inputs": {
"mcman": "mcman", "mcman": "mcman",
"nixpkgs": "nixpkgs_4" "nixpkgs": "nixpkgs_3"
}, },
"locked": { "locked": {
"lastModified": 1767316901, "lastModified": 1767316901,
@ -422,7 +428,7 @@
}, },
"grub2-themes": { "grub2-themes": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_5" "nixpkgs": "nixpkgs_4"
}, },
"locked": { "locked": {
"lastModified": 1757136219, "lastModified": 1757136219,
@ -538,7 +544,7 @@
"mcman": { "mcman": {
"inputs": { "inputs": {
"crane": "crane", "crane": "crane",
"nixpkgs": "nixpkgs_3" "nixpkgs": "nixpkgs_2"
}, },
"locked": { "locked": {
"lastModified": 1766962671, "lastModified": 1766962671,
@ -572,7 +578,7 @@
"mydia": { "mydia": {
"inputs": { "inputs": {
"flake-parts": "flake-parts_2", "flake-parts": "flake-parts_2",
"nixpkgs": "nixpkgs_6" "nixpkgs": "nixpkgs_5"
}, },
"locked": { "locked": {
"lastModified": 1764866402, "lastModified": 1764866402,
@ -656,8 +662,8 @@
"nix-minecraft": { "nix-minecraft": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_2", "flake-compat": "flake-compat_2",
"nixpkgs": "nixpkgs_7", "nixpkgs": "nixpkgs_6",
"systems": "systems_2" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1774407052, "lastModified": 1774407052,
@ -719,22 +725,6 @@
} }
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": {
"lastModified": 1772380631,
"narHash": "sha256-FhW0uxeXjefINP0vUD4yRBB52Us7fXZPk9RiPAopfiY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "6d3b61b190a899042ce82a5355111976ba76d698",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "master",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1757347588, "lastModified": 1757347588,
"narHash": "sha256-tLdkkC6XnsY9EOZW9TlpesTclELy8W7lL2ClL+nma8o=", "narHash": "sha256-tLdkkC6XnsY9EOZW9TlpesTclELy8W7lL2ClL+nma8o=",
@ -749,7 +739,7 @@
"type": "indirect" "type": "indirect"
} }
}, },
"nixpkgs_4": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1766902085, "lastModified": 1766902085,
"narHash": "sha256-coBu0ONtFzlwwVBzmjacUQwj3G+lybcZ1oeNSQkgC0M=", "narHash": "sha256-coBu0ONtFzlwwVBzmjacUQwj3G+lybcZ1oeNSQkgC0M=",
@ -765,7 +755,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_5": { "nixpkgs_4": {
"locked": { "locked": {
"lastModified": 1774449288, "lastModified": 1774449288,
"narHash": "sha256-ukB6NS45Oi62fQM4RpZfx3dpqxIu66ADCCFl6h72Fjo=", "narHash": "sha256-ukB6NS45Oi62fQM4RpZfx3dpqxIu66ADCCFl6h72Fjo=",
@ -781,7 +771,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_6": { "nixpkgs_5": {
"locked": { "locked": {
"lastModified": 1764242076, "lastModified": 1764242076,
"narHash": "sha256-sKoIWfnijJ0+9e4wRvIgm/HgE27bzwQxcEmo2J/gNpI=", "narHash": "sha256-sKoIWfnijJ0+9e4wRvIgm/HgE27bzwQxcEmo2J/gNpI=",
@ -797,7 +787,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_7": { "nixpkgs_6": {
"locked": { "locked": {
"lastModified": 1769461804, "lastModified": 1769461804,
"narHash": "sha256-msG8SU5WsBUfVVa/9RPLaymvi5bI8edTavbIq3vRlhI=", "narHash": "sha256-msG8SU5WsBUfVVa/9RPLaymvi5bI8edTavbIq3vRlhI=",
@ -813,6 +803,22 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_7": {
"locked": {
"lastModified": 1774386573,
"narHash": "sha256-4hAV26quOxdC6iyG7kYaZcM3VOskcPUrdCQd/nx8obc=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "46db2e09e1d3f113a13c0d7b81e2f221c63b8ce9",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_8": { "nixpkgs_8": {
"locked": { "locked": {
"lastModified": 1771008912, "lastModified": 1771008912,
@ -877,7 +883,7 @@
"mnw": "mnw", "mnw": "mnw",
"ndg": "ndg", "ndg": "ndg",
"nixpkgs": "nixpkgs_8", "nixpkgs": "nixpkgs_8",
"systems": "systems_3" "systems": "systems_2"
}, },
"locked": { "locked": {
"lastModified": 1774375131, "lastModified": 1774375131,
@ -919,6 +925,7 @@
"root": { "root": {
"inputs": { "inputs": {
"clan-core": "clan-core", "clan-core": "clan-core",
"disko": "disko",
"erosanix": "erosanix", "erosanix": "erosanix",
"fenix": "fenix", "fenix": "fenix",
"flake-parts": "flake-parts", "flake-parts": "flake-parts",
@ -930,15 +937,12 @@
"jovian": "jovian", "jovian": "jovian",
"mydia": "mydia", "mydia": "mydia",
"nix-minecraft": "nix-minecraft", "nix-minecraft": "nix-minecraft",
"nixpkgs": [ "nixpkgs": "nixpkgs_7",
"clan-core",
"nixpkgs"
],
"nvf": "nvf", "nvf": "nvf",
"plasma-manager": "plasma-manager", "plasma-manager": "plasma-manager",
"sops-nix": "sops-nix_2", "sops-nix": "sops-nix",
"stylix": "stylix", "stylix": "stylix",
"systems": "systems_5", "systems": "systems_4",
"terranix": "terranix", "terranix": "terranix",
"zen-browser": "zen-browser" "zen-browser": "zen-browser"
} }
@ -961,27 +965,6 @@
} }
}, },
"sops-nix": { "sops-nix": {
"inputs": {
"nixpkgs": [
"clan-core",
"nixpkgs"
]
},
"locked": {
"lastModified": 1774154798,
"narHash": "sha256-zsTuloDSdKf+PrI1MsWx5z/cyGEJ8P3eERtAfdP8Bmg=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "3e0d543e6ba6c0c48117a81614e90c6d8c425170",
"type": "github"
},
"original": {
"owner": "Mic92",
"repo": "sops-nix",
"type": "github"
}
},
"sops-nix_2": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_9" "nixpkgs": "nixpkgs_9"
}, },
@ -1010,7 +993,7 @@
"gnome-shell": "gnome-shell", "gnome-shell": "gnome-shell",
"nixpkgs": "nixpkgs_10", "nixpkgs": "nixpkgs_10",
"nur": "nur", "nur": "nur",
"systems": "systems_4", "systems": "systems_3",
"tinted-foot": "tinted-foot", "tinted-foot": "tinted-foot",
"tinted-kitty": "tinted-kitty", "tinted-kitty": "tinted-kitty",
"tinted-schemes": "tinted-schemes", "tinted-schemes": "tinted-schemes",
@ -1106,28 +1089,13 @@
"type": "github" "type": "github"
} }
}, },
"systems_6": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"terranix": { "terranix": {
"inputs": { "inputs": {
"flake-parts": "flake-parts_5", "flake-parts": "flake-parts_5",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ],
"systems": "systems_6" "systems": "systems_5"
}, },
"locked": { "locked": {
"lastModified": 1773700838, "lastModified": 1773700838,

View file

@ -7,25 +7,37 @@
}; };
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-parts = { flake-parts = {
url = "github:hercules-ci/flake-parts"; url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "clan-core/nixpkgs"; inputs.nixpkgs-lib.follows = "nixpkgs";
}; };
import-tree.url = "github:vic/import-tree"; import-tree.url = "github:vic/import-tree";
clan-core = {
url = "https://git.clan.lol/clan/clan-core/archive/main.tar.gz";
inputs.flake-parts.follows = "flake-parts";
};
nixpkgs.follows = "clan-core/nixpkgs";
systems.url = "github:nix-systems/default"; systems.url = "github:nix-systems/default";
sops-nix.url = "github:Mic92/sops-nix";
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = { home-manager = {
url = "github:nix-community/home-manager"; url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
clan-core = {
url = "https://git.clan.lol/clan/clan-core/archive/main.tar.gz";
inputs = {
flake-parts.follows = "flake-parts";
nixpkgs.follows = "nixpkgs";
sops-nix.follows = "sops-nix";
disko.follows = "disko";
systems.follows = "systems";
};
};
plasma-manager = { plasma-manager = {
url = "github:nix-community/plasma-manager"; url = "github:nix-community/plasma-manager";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
@ -52,8 +64,6 @@
flux.url = "github:IogaMaster/flux"; flux.url = "github:IogaMaster/flux";
sops-nix.url = "github:Mic92/sops-nix";
# Azure AD for linux # Azure AD for linux
himmelblau = { himmelblau = {
url = "github:himmelblau-idm/himmelblau"; url = "github:himmelblau-idm/himmelblau";
@ -98,6 +108,8 @@
flake-parts.flakeModules.modules flake-parts.flakeModules.modules
clan-core.flakeModules.default clan-core.flakeModules.default
home-manager.flakeModules.default home-manager.flakeModules.default
terranix.flakeModule
./packages/flake-module.nix
]; ];
perSystem = {system, ...}: { perSystem = {system, ...}: {
@ -113,9 +125,13 @@
config = { config = {
allowUnfree = true; allowUnfree = true;
permittedInsecurePackages = [ permittedInsecurePackages = [
# I think this is because of zen # I think this is because of zen
"qtwebengine-5.15.19" "qtwebengine-5.15.19"
# For mautrix-signal, the matrix to signal bridge
"olm-3.2.16"
]; ];
}; };
}; };

View file

@ -5,47 +5,12 @@
... ...
}: let }: let
inherit (lib) mkOption types; inherit (lib) mkOption types;
namespace = "sneeuwvlok";
sharedContext = {
inherit inputs namespace;
erosanixLib = inputs.erosanix.lib;
repoRoot = ../.;
sneeuwvlokLib = config.localLib;
terranixLib = inputs.terranix.lib;
};
baseNixosModules =
[
inputs.grub2-themes.nixosModules.default
inputs.home-manager.nixosModules.home-manager
inputs.himmelblau.nixosModules.himmelblau
inputs.jovian.nixosModules.default
inputs.mydia.nixosModules.default
inputs.nix-minecraft.nixosModules.minecraft-servers
inputs.nvf.nixosModules.default
inputs.sops-nix.nixosModules.sops
{
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = sharedContext;
sharedModules = config.localUsers.homeSharedModules;
};
}
]
++ [../modules/nixos];
in { in {
imports = [ imports = [
./options ./options
./strings ./strings
]; ];
options.localLib = mkOption {
type = types.lazyAttrsOf types.raw;
default = {};
};
config = { config = {
_module.args = { _module.args = {
inherit inherit
@ -55,7 +20,6 @@ in {
sharedContext sharedContext
systemOverlays systemOverlays
; ;
sneeuwvlokLib = config.localLib;
}; };
flake.lib = config.localLib; flake.lib = config.localLib;

View file

@ -2,14 +2,13 @@
inherit (builtins) isString typeOf match toString head; inherit (builtins) isString typeOf match toString head;
inherit (lib) throwIfNot concatStringsSep splitStringBy toLower map concatMapAttrsStringSep; inherit (lib) throwIfNot concatStringsSep splitStringBy toLower map concatMapAttrsStringSep;
in { in {
localLib.strings = { strings = {
#======================================================================================== #========================================================================================
# Converts a string to snake case # Converts a string to snake case
# #
# simply replaces any uppercase letter to its lowercase variant preceeded by an underscore # simply replaces any uppercase letter to its lowercase variant preceeded by an underscore
#======================================================================================== #========================================================================================
toSnakeCase = toSnakeCase = str:
str:
throwIfNot (isString str) "toSnakeCase only accepts string values, but got ${typeOf str}" ( throwIfNot (isString str) "toSnakeCase only accepts string values, but got ${typeOf str}" (
str str
|> splitStringBy (prev: curr: builtins.match "[a-z]" prev != null && builtins.match "[A-Z]" curr != null) true |> splitStringBy (prev: curr: builtins.match "[a-z]" prev != null && builtins.match "[A-Z]" curr != null) true
@ -20,18 +19,37 @@ in {
#======================================================================================== #========================================================================================
# Converts a set of url parts to a string # Converts a set of url parts to a string
#======================================================================================== #========================================================================================
toUrl = toUrl = {
{ protocol ? null, host, port ? null, path ? null, query ? null, hash ? null }: protocol ? null,
let host,
port ? null,
path ? null,
query ? null,
hash ? null,
}: let
trim_slashes = str: str |> match "^\/*(.+?)\/*$" |> head; trim_slashes = str: str |> match "^\/*(.+?)\/*$" |> head;
encode_to_str = set: concatMapAttrsStringSep "&" (n: v: "${n}=${v}") set; encode_to_str = set: concatMapAttrsStringSep "&" (n: v: "${n}=${v}") set;
_protocol = if protocol != null then "${protocol}://" else ""; _protocol =
_port = if port != null then ":${toString port}" else ""; if protocol != null
_path = if path != null then "/${path |> trim_slashes}" else ""; then "${protocol}://"
_query = if query != null then "?${query |> encode_to_str}" else ""; else "";
_hash = if hash != null then "#${hash |> encode_to_str}" else ""; _port =
in if port != null
"${_protocol}${host}${_port}${_path}${_query}${_hash}"; then ":${toString port}"
else "";
_path =
if path != null
then "/${path |> trim_slashes}"
else "";
_query =
if query != null
then "?${query |> encode_to_str}"
else "";
_hash =
if hash != null
then "#${hash |> encode_to_str}"
else "";
in "${_protocol}${host}${_port}${_path}${_query}${_hash}";
}; };
} }

View file

@ -1,301 +1,286 @@
{ {
pkgs, pkgs,
inputs, lib,
self,
... ...
}: { }: {
_module.args = {
pkgs = lib.mkForce (import self.inputs.nixpkgs {
system = "x86_64-linux";
overlays = with self.inputs; [
fenix.overlays.default
nix-minecraft.overlay
flux.overlays.default
];
config = {
allowUnfree = true;
permittedInsecurePackages = [
# I think this is because of zen
"qtwebengine-5.15.19"
# For mautrix-signal, the matrix to signal bridge
"olm-3.2.16"
];
};
});
};
imports = [ imports = [
./disks.nix ./disks.nix
./hardware.nix ./hardware.nix
../../modules/nixos ../../modules/nixos
self.inputs.home-manager.nixosModules.home-manager
self.inputs.himmelblau.nixosModules.himmelblau
self.inputs.jovian.nixosModules.default
self.inputs.mydia.nixosModules.default
self.inputs.nix-minecraft.nixosModules.minecraft-servers
self.inputs.nvf.nixosModules.default
self.inputs.sops-nix.nixosModules.sops
]; ];
sneeuwvlok.application.steam.enable = true;
nixpkgs.hostPlatform = "x86_64-linux";
system.stateVersion = "23.11"; system.stateVersion = "23.11";
boot = { networking = {
kernelPackages = pkgs.linuxPackages_latest; interfaces.enp2s0 = {
ipv6.addresses = [
loader = { {
systemd-boot.enable = false; address = "2a0d:6e00:1dc9:0::dead:beef";
efi.canTouchEfiVariables = true; prefixLength = 64;
grub = { }
enable = true; ];
efiSupport = true;
efiInstallAsRemovable = false; useDHCP = true;
device = "nodev"; # INFO: https://discourse.nixos.org/t/question-about-grub-and-nodev };
};
}; defaultGateway = {
address = "192.168.1.1";
supportedFilesystems = ["nfs"]; interface = "enp2s0";
}; };
# sneeuwvlok.application.steam.enable = true; defaultGateway6 = {
address = "fe80::1";
# networking = { interface = "enp2s0";
# interfaces.enp2s0 = { };
# ipv6.addresses = [ };
# {
# address = "2a0d:6e00:1dc9:0::dead:beef"; sneeuwvlok = {
# prefixLength = 64; services = {
# } backup.borg.enable = true;
# ];
authentication.zitadel = {
# useDHCP = true; enable = true;
# };
organization = {
# defaultGateway = { nix = {
# address = "192.168.1.1"; user = {
# interface = "enp2s0"; chris = {
# }; email = "chris@kruining.eu";
firstName = "Chris";
# defaultGateway6 = { lastName = "Kruining";
# address = "fe80::1";
# interface = "enp2s0"; roles = ["ORG_OWNER"];
# }; instanceRoles = ["IAM_OWNER"];
# }; };
# # virtualisation = { kaas = {
# # containers.enable = true; email = "chris+kaas@kruining.eu";
# # podman = { firstName = "Kaas";
# # enable = true; lastName = "Kruining";
# # dockerCompat = true; };
# # }; };
# # oci-containers = { project = {
# # backend = "podman"; ulmo = {
# # containers = { projectRoleCheck = true;
# # homey = { projectRoleAssertion = true;
# # image = "ghcr.io/athombv/homey-shs:latest"; hasProjectCheck = true;
# # autoStart = true;
# # privileged = true; role = {
# # volumes = [ jellyfin = {
# # "/home/chris/.homey-shs:/homey/user" group = "jellyfin";
# # ]; };
# # ports = [ jellyfin_admin = {
# # "4859:4859" group = "jellyfin";
# # ]; };
# # }; };
# # };
# # }; assign = {
# # }; chris = ["jellyfin" "jellyfin_admin"];
kaas = ["jellyfin"];
# # sneeuwvlok = { };
# # services = {
# # backup.borg.enable = true; application = {
jellyfin = {
# # authentication.zitadel = { redirectUris = ["https://jellyfin.kruining.eu/sso/OID/redirect/zitadel"];
# # enable = true; grantTypes = ["authorizationCode"];
responseTypes = ["code"];
# # organization = { };
# # nix = {
# # user = { forgejo = {
# # chris = { redirectUris = ["https://git.amarth.cloud/user/oauth2/zitadel/callback"];
# # email = "chris@kruining.eu"; grantTypes = ["authorizationCode"];
# # firstName = "Chris"; responseTypes = ["code"];
# # lastName = "Kruining"; };
# # roles = ["ORG_OWNER"]; vaultwarden = {
# # instanceRoles = ["IAM_OWNER"]; redirectUris = ["https://vault.kruining.eu/identity/connect/oidc-signin"];
# # }; grantTypes = ["authorizationCode"];
responseTypes = ["code"];
# # kaas = { exportMap = {
# # email = "chris+kaas@kruining.eu"; client_id = "SSO_CLIENT_ID";
# # firstName = "Kaas"; client_secret = "SSO_CLIENT_SECRET";
# # lastName = "Kruining"; };
# # }; };
# # };
matrix = {
# # project = { redirectUris = ["https://matrix.kruining.eu/_synapse/client/oidc/callback"];
# # ulmo = { grantTypes = ["authorizationCode"];
# # projectRoleCheck = true; responseTypes = ["code"];
# # projectRoleAssertion = true; };
# # hasProjectCheck = true;
mydia = {
# # role = { redirectUris = ["http://localhost:2010/auth/oidc/callback"];
# # jellyfin = { grantTypes = ["authorizationCode"];
# # group = "jellyfin"; responseTypes = ["code"];
# # }; };
# # jellyfin_admin = {
# # group = "jellyfin"; grafana = {
# # }; redirectUris = ["http://localhost:9001/login/generic_oauth"];
# # }; grantTypes = ["authorizationCode"];
responseTypes = ["code"];
# # assign = { };
# # chris = ["jellyfin" "jellyfin_admin"]; };
# # kaas = ["jellyfin"]; };
# # };
convex = {
# # application = { projectRoleCheck = true;
# # jellyfin = { projectRoleAssertion = true;
# # redirectUris = ["https://jellyfin.kruining.eu/sso/OID/redirect/zitadel"]; hasProjectCheck = true;
# # grantTypes = ["authorizationCode"];
# # responseTypes = ["code"]; application = {
# # }; scry = {
redirectUris = ["https://nautical-salamander-320.eu-west-1.convex.cloud/api/auth/callback/zitadel"];
# # forgejo = { grantTypes = ["authorizationCode"];
# # redirectUris = ["https://git.amarth.cloud/user/oauth2/zitadel/callback"]; responseTypes = ["code"];
# # grantTypes = ["authorizationCode"]; };
# # responseTypes = ["code"]; };
# # }; };
};
# # vaultwarden = {
# # redirectUris = ["https://vault.kruining.eu/identity/connect/oidc-signin"]; action = {
# # grantTypes = ["authorizationCode"]; flattenRoles = {
# # responseTypes = ["code"]; script = ''
# # exportMap = { (ctx, api) => {
# # client_id = "SSO_CLIENT_ID"; if (ctx.v1.user.grants == undefined || ctx.v1.user.grants.count == 0) {
# # client_secret = "SSO_CLIENT_SECRET"; return;
# # }; }
# # };
const roles = ctx.v1.user.grants.grants.flatMap(({ roles, projectId }) => roles.map(role => projectId + ':' + role));
# # matrix = {
# # redirectUris = ["https://matrix.kruining.eu/_synapse/client/oidc/callback"]; api.v1.claims.setClaim('nix:zitadel:custom', JSON.stringify({ roles }));
# # grantTypes = ["authorizationCode"]; };
# # responseTypes = ["code"]; '';
# # }; };
};
# # mydia = {
# # redirectUris = ["http://localhost:2010/auth/oidc/callback"]; triggers = [
# # grantTypes = ["authorizationCode"]; {
# # responseTypes = ["code"]; flowType = "customiseToken";
# # }; triggerType = "preUserinfoCreation";
actions = ["flattenRoles"];
# # grafana = { }
# # redirectUris = ["http://localhost:9001/login/generic_oauth"]; {
# # grantTypes = ["authorizationCode"]; flowType = "customiseToken";
# # responseTypes = ["code"]; triggerType = "preAccessTokenCreation";
# # }; actions = ["flattenRoles"];
# # }; }
# # }; ];
};
# # convex = { };
# # projectRoleCheck = true; };
# # projectRoleAssertion = true;
# # hasProjectCheck = true; communication.matrix.enable = true;
# # application = { development.forgejo.enable = true;
# # scry = {
# # redirectUris = ["https://nautical-salamander-320.eu-west-1.convex.cloud/api/auth/callback/zitadel"]; networking.ssh.enable = true;
# # grantTypes = ["authorizationCode"]; networking.caddy.hosts = {
# # responseTypes = ["code"]; # Expose amarht cloud stuff like this until I have a proper solution
# # }; "auth.amarth.cloud" = ''
# # }; reverse_proxy http://192.168.1.223:9092
# # }; '';
# # };
"amarth.cloud" = ''
# # action = { reverse_proxy http://192.168.1.223:8080
# # flattenRoles = { '';
# # script = '' };
# # (ctx, api) => {
# # if (ctx.v1.user.grants == undefined || ctx.v1.user.grants.count == 0) { media.enable = true;
# # return; media.glance.enable = true;
# # } media.mydia.enable = true;
media.nfs.enable = true;
# # const roles = ctx.v1.user.grants.grants.flatMap(({ roles, projectId }) => roles.map(role => projectId + ':' + role)); media.jellyfin.enable = true;
media.servarr = {
# # api.v1.claims.setClaim('nix:zitadel:custom', JSON.stringify({ roles })); radarr = {
# # }; enable = true;
# # ''; port = 2001;
# # }; rootFolders = [
# # }; "/var/media/movies"
];
# # triggers = [ };
# # {
# # flowType = "customiseToken"; sonarr = {
# # triggerType = "preUserinfoCreation"; enable = true;
# # actions = ["flattenRoles"]; # debug = true;
# # } port = 2002;
# # { rootFolders = [
# # flowType = "customiseToken"; "/var/media/series"
# # triggerType = "preAccessTokenCreation"; ];
# # actions = ["flattenRoles"]; };
# # }
# # ]; lidarr = {
# # }; enable = true;
# # }; debug = true;
# # }; port = 2003;
rootFolders = [
# # communication.matrix.enable = true; "/var/media/music"
];
# # development.forgejo.enable = true; };
# # networking.ssh.enable = true; prowlarr = {
# # networking.caddy.hosts = { enable = true;
# # # Expose amarht cloud stuff like this until I have a proper solution # debug = true;
# # "auth.amarth.cloud" = '' port = 2004;
# # reverse_proxy http://192.168.1.223:9092 };
# # ''; };
# # "amarth.cloud" = '' observability = {
# # reverse_proxy http://192.168.1.223:8080 grafana.enable = true;
# # ''; prometheus.enable = true;
# # }; loki.enable = true;
promtail.enable = true;
# # media.enable = true; # uptime-kuma.enable = true;
# # media.glance.enable = true; };
# # media.mydia.enable = true;
# # media.nfs.enable = true; security.vaultwarden = {
# # media.jellyfin.enable = true; enable = true;
# # media.servarr = { database = {
# # radarr = { # type = "sqlite";
# # enable = true; # file = "/var/lib/vaultwarden/state.db";
# # port = 2001;
# # rootFolders = [ type = "postgresql";
# # "/var/media/movies" host = "localhost";
# # ]; port = 5432;
# # }; sslMode = "disabled";
};
# # sonarr = { };
# # enable = true; };
# # # debug = true;
# # port = 2002; editor = {
# # rootFolders = [ nano.enable = true;
# # "/var/media/series" };
# # ]; };
# # };
# # lidarr = {
# # enable = true;
# # debug = true;
# # port = 2003;
# # rootFolders = [
# # "/var/media/music"
# # ];
# # };
# # prowlarr = {
# # enable = true;
# # # debug = true;
# # port = 2004;
# # };
# # };
# # observability = {
# # grafana.enable = true;
# # prometheus.enable = true;
# # loki.enable = true;
# # promtail.enable = true;
# # # uptime-kuma.enable = true;
# # };
# # security.vaultwarden = {
# # enable = true;
# # database = {
# # # type = "sqlite";
# # # file = "/var/lib/vaultwarden/state.db";
# # type = "postgresql";
# # host = "localhost";
# # port = 5432;
# # sslMode = "disabled";
# # };
# # };
# # };
# # editor = {
# # nano.enable = true;
# # };
# # };
} }

View file

@ -1,10 +1,12 @@
{ config, lib, pkgs, modulesPath, ... }:
let
inherit (lib.modules) mkDefault;
in
{ {
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; config,
pkgs,
lib,
modulesPath,
...
}: let
inherit (lib.modules) mkDefault;
in {
boot = { boot = {
initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod"]; initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod"];
initrd.kernelModules = []; initrd.kernelModules = [];
@ -13,6 +15,6 @@ in
extraModulePackages = []; extraModulePackages = [];
}; };
nixpkgs.hostPlatform = mkDefault pkgs.stdenv.hostPlatform.system; nixpkgs.hostPlatform = "x86_64-linux";
hardware.cpu.intel.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.intel.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware;
} }

View file

@ -1,10 +1,14 @@
{ inputs, config, lib, pkgs, namespace, ... }: {
let inputs,
config,
lib,
pkgs,
...
}: let
inherit (lib) mkIf mkEnableOption; inherit (lib) mkIf mkEnableOption;
cfg = config.sneeuwvlok.application.bitwarden; cfg = config.sneeuwvlok.application.bitwarden;
in in {
{
options.sneeuwvlok.application.bitwarden = { options.sneeuwvlok.application.bitwarden = {
enable = mkEnableOption "enable bitwarden"; enable = mkEnableOption "enable bitwarden";
}; };

View file

@ -3,7 +3,6 @@
config, config,
lib, lib,
pkgs, pkgs,
namespace,
... ...
}: let }: let
inherit (lib) mkIf mkEnableOption; inherit (lib) mkIf mkEnableOption;

View file

@ -3,7 +3,6 @@
config, config,
lib, lib,
pkgs, pkgs,
namespace,
... ...
}: let }: let
inherit (lib) mkIf mkEnableOption; inherit (lib) mkIf mkEnableOption;

View file

@ -1,10 +1,14 @@
{ inputs, config, lib, pkgs, namespace, ... }: {
let inputs,
config,
lib,
pkgs,
...
}: let
inherit (lib) mkIf mkEnableOption; inherit (lib) mkIf mkEnableOption;
cfg = config.sneeuwvlok.application.ladybird; cfg = config.sneeuwvlok.application.ladybird;
in in {
{
options.sneeuwvlok.application.ladybird = { options.sneeuwvlok.application.ladybird = {
enable = mkEnableOption "enable ladybird"; enable = mkEnableOption "enable ladybird";
}; };

View file

@ -1,10 +1,14 @@
{ config, lib, pkgs, namespace, osConfig ? {}, ... }: {
let config,
lib,
pkgs,
osConfig ? {},
...
}: let
inherit (lib) mkIf mkEnableOption; inherit (lib) mkIf mkEnableOption;
cfg = config.sneeuwvlok.application.matrix; cfg = config.sneeuwvlok.application.matrix;
in in {
{
options.sneeuwvlok.application.matrix = { options.sneeuwvlok.application.matrix = {
enable = mkEnableOption "enable Matrix client (Fractal)"; enable = mkEnableOption "enable Matrix client (Fractal)";
}; };

View file

@ -2,7 +2,6 @@
config, config,
lib, lib,
pkgs, pkgs,
namespace,
osConfig ? {}, osConfig ? {},
... ...
}: let }: let

View file

@ -3,7 +3,6 @@
config, config,
lib, lib,
pkgs, pkgs,
namespace,
... ...
}: let }: let
inherit (lib) mkIf mkEnableOption; inherit (lib) mkIf mkEnableOption;

View file

@ -1,10 +1,14 @@
{ inputs, config, lib, pkgs, namespace, ... }: {
let inputs,
config,
lib,
pkgs,
...
}: let
inherit (lib) mkIf mkEnableOption; inherit (lib) mkIf mkEnableOption;
cfg = config.sneeuwvlok.application.signal; cfg = config.sneeuwvlok.application.signal;
in in {
{
options.sneeuwvlok.application.signal = { options.sneeuwvlok.application.signal = {
enable = mkEnableOption "enable signal"; enable = mkEnableOption "enable signal";
}; };

View file

@ -3,7 +3,6 @@
config, config,
lib, lib,
pkgs, pkgs,
namespace,
... ...
}: let }: let
inherit (lib) mkIf mkEnableOption; inherit (lib) mkIf mkEnableOption;

View file

@ -1,18 +1,18 @@
{ config, lib, pkgs, namespace, repoRoot, erosanixLib, ... }: {
let config,
lib,
self,
...
}: let
inherit (lib) mkIf mkEnableOption; inherit (lib) mkIf mkEnableOption;
cfg = config.sneeuwvlok.application.studio; cfg = config.sneeuwvlok.application.studio;
studioPackage = pkgs.callPackage (repoRoot + "/packages/studio/package.nix") { in {
inherit erosanixLib;
};
in
{
options.sneeuwvlok.application.studio = { options.sneeuwvlok.application.studio = {
enable = mkEnableOption "enable Bricklink Studio"; enable = mkEnableOption "enable Bricklink Studio";
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
home.packages = [ studioPackage ]; home.packages = [self.packages.studio];
}; };
} }

View file

@ -1,10 +1,14 @@
{ inputs, config, lib, pkgs, namespace, ... }: {
let inputs,
config,
lib,
pkgs,
...
}: let
inherit (lib) mkIf mkEnableOption; inherit (lib) mkIf mkEnableOption;
cfg = config.sneeuwvlok.application.teamspeak; cfg = config.sneeuwvlok.application.teamspeak;
in in {
{
options.sneeuwvlok.application.teamspeak = { options.sneeuwvlok.application.teamspeak = {
enable = mkEnableOption "enable teamspeak"; enable = mkEnableOption "enable teamspeak";
}; };

View file

@ -1,10 +1,14 @@
{ inputs, config, lib, pkgs, namespace, ... }: {
let inputs,
config,
lib,
pkgs,
...
}: let
inherit (lib) mkIf mkEnableOption; inherit (lib) mkIf mkEnableOption;
cfg = config.sneeuwvlok.application.thunderbird; cfg = config.sneeuwvlok.application.thunderbird;
in in {
{
options.sneeuwvlok.application.thunderbird = { options.sneeuwvlok.application.thunderbird = {
enable = mkEnableOption "enable thunderbird"; enable = mkEnableOption "enable thunderbird";
}; };

View file

@ -2,7 +2,6 @@
config, config,
lib, lib,
pkgs, pkgs,
namespace,
... ...
}: let }: let
inherit (lib) mkIf mkEnableOption; inherit (lib) mkIf mkEnableOption;

View file

@ -2,7 +2,6 @@
pkgs, pkgs,
config, config,
lib, lib,
namespace,
... ...
}: let }: let
inherit (lib) mkOption; inherit (lib) mkOption;

View file

@ -1,13 +1,15 @@
{ config, lib, namespace, osConfig ? {}, ... }: {
let config,
lib,
osConfig ? {},
...
}: let
inherit (lib) mkIf; inherit (lib) mkIf;
cfg = config.sneeuwvlok.desktop.plasma; cfg = config.sneeuwvlok.desktop.plasma;
osCfg = osConfig.sneeuwvlok.desktop.plasma or {enable = false;}; osCfg = osConfig.sneeuwvlok.desktop.plasma or {enable = false;};
in in {
{
options.sneeuwvlok.desktop.plasma = { options.sneeuwvlok.desktop.plasma = {
}; };
config = mkIf osCfg.enable { config = mkIf osCfg.enable {

View file

@ -1,10 +1,13 @@
{ config, lib, pkgs, namespace, ... }: {
let config,
lib,
pkgs,
...
}: let
inherit (lib) mkEnableOption mkIf; inherit (lib) mkEnableOption mkIf;
cfg = config.sneeuwvlok.development.dotnet; cfg = config.sneeuwvlok.development.dotnet;
in in {
{
options.sneeuwvlok.development.dotnet = { options.sneeuwvlok.development.dotnet = {
enable = mkEnableOption "Enable dotnet development tools"; enable = mkEnableOption "Enable dotnet development tools";
}; };

View file

@ -1,10 +1,13 @@
{ config, lib, pkgs, namespace, ... }: {
let config,
lib,
pkgs,
...
}: let
inherit (lib) mkEnableOption mkIf; inherit (lib) mkEnableOption mkIf;
cfg = config.sneeuwvlok.development.javascript; cfg = config.sneeuwvlok.development.javascript;
in in {
{
options.sneeuwvlok.development.javascript = { options.sneeuwvlok.development.javascript = {
enable = mkEnableOption "Enable javascript development tools"; enable = mkEnableOption "Enable javascript development tools";
}; };

View file

@ -2,7 +2,6 @@
config, config,
lib, lib,
pkgs, pkgs,
namespace,
... ...
}: let }: let
inherit (lib) mkEnableOption mkIf; inherit (lib) mkEnableOption mkIf;

View file

@ -3,7 +3,6 @@
options, options,
lib, lib,
pkgs, pkgs,
namespace,
... ...
}: let }: let
inherit (lib) mkEnableOption mkIf; inherit (lib) mkEnableOption mkIf;

View file

@ -3,7 +3,6 @@
config, config,
lib, lib,
pkgs, pkgs,
namespace,
... ...
}: let }: let
inherit (lib) mkIf mkEnableOption; inherit (lib) mkIf mkEnableOption;

View file

@ -1,4 +1,9 @@
{ config, lib, pkgs, namespace, ... }: let {
config,
lib,
pkgs,
...
}: let
inherit (lib) mkIf mkEnableOption; inherit (lib) mkIf mkEnableOption;
cfg = config.sneeuwvlok.editor.zed; cfg = config.sneeuwvlok.editor.zed;
@ -9,7 +14,10 @@ in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
home.packages = with pkgs; [ home.packages = with pkgs; [
zed-editor nixd nil alejandra zed-editor
nixd
nil
alejandra
]; ];
programs.zed-editor = { programs.zed-editor = {

View file

@ -3,7 +3,6 @@
config, config,
lib, lib,
pkgs, pkgs,
namespace,
... ...
}: let }: let
inherit (lib) mkIf mkEnableOption; inherit (lib) mkIf mkEnableOption;

View file

@ -1,10 +1,13 @@
{ config, lib, pkgs, namespace, ... }: {
let config,
lib,
pkgs,
...
}: let
inherit (lib) mkIf mkMerge mkEnableOption mkDefault; inherit (lib) mkIf mkMerge mkEnableOption mkDefault;
cfg = config.sneeuwvlok.shell; cfg = config.sneeuwvlok.shell;
in in {
{
imports = [ imports = [
./toolset ./toolset
./zsh ./zsh
@ -30,7 +33,7 @@ in
}; };
}) })
({ {
home.packages = with pkgs; [any-nix-shell pwgen yt-dlp ripdrag fd (ripgrep.override {withPCRE2 = true;})]; home.packages = with pkgs; [any-nix-shell pwgen yt-dlp ripdrag fd (ripgrep.override {withPCRE2 = true;})];
programs = { programs = {
@ -45,6 +48,6 @@ in
config.whitelist.prefix = ["/home"]; config.whitelist.prefix = ["/home"];
}; };
}; };
}) }
]; ];
} }

View file

@ -2,7 +2,6 @@
config, config,
lib, lib,
pkgs, pkgs,
namespace,
... ...
}: let }: let
inherit (lib) mkIf mkEnableOption; inherit (lib) mkIf mkEnableOption;

View file

@ -2,7 +2,6 @@
config, config,
lib, lib,
pkgs, pkgs,
namespace,
... ...
}: let }: let
inherit (lib) mkIf mkEnableOption; inherit (lib) mkIf mkEnableOption;

View file

@ -2,7 +2,6 @@
config, config,
lib, lib,
pkgs, pkgs,
namespace,
... ...
}: let }: let
inherit (lib) mkIf mkEnableOption; inherit (lib) mkIf mkEnableOption;

View file

@ -2,7 +2,6 @@
config, config,
lib, lib,
pkgs, pkgs,
namespace,
... ...
}: let }: let
inherit (lib) mkIf mkEnableOption; inherit (lib) mkIf mkEnableOption;

View file

@ -2,7 +2,6 @@
config, config,
lib, lib,
pkgs, pkgs,
namespace,
... ...
}: let }: let
inherit (lib) mkEnableOption mkIf; inherit (lib) mkEnableOption mkIf;

View file

@ -2,7 +2,6 @@
config, config,
lib, lib,
pkgs, pkgs,
namespace,
... ...
}: let }: let
inherit (lib) mkIf mkEnableOption; inherit (lib) mkIf mkEnableOption;

View file

@ -2,7 +2,6 @@
config, config,
lib, lib,
pkgs, pkgs,
namespace,
... ...
}: let }: let
inherit (lib) mkEnableOption mkIf; inherit (lib) mkEnableOption mkIf;

View file

@ -1,10 +1,13 @@
{ config, lib, pkgs, namespace, ... }: {
let config,
lib,
pkgs,
...
}: let
inherit (lib) mkIf mkEnableOption; inherit (lib) mkIf mkEnableOption;
cfg = config.sneeuwvlok.shell.toolset.starship; cfg = config.sneeuwvlok.shell.toolset.starship;
in in {
{
options.sneeuwvlok.shell.toolset.starship = { options.sneeuwvlok.shell.toolset.starship = {
enable = mkEnableOption "fancy pansy shell prompt"; enable = mkEnableOption "fancy pansy shell prompt";
}; };

View file

@ -1,10 +1,13 @@
{ config, lib, pkgs, namespace, ... }: {
let config,
lib,
pkgs,
...
}: let
inherit (lib) mkIf mkEnableOption; inherit (lib) mkIf mkEnableOption;
cfg = config.sneeuwvlok.shell.toolset.tmux; cfg = config.sneeuwvlok.shell.toolset.tmux;
in in {
{
options.sneeuwvlok.shell.toolset.tmux = { options.sneeuwvlok.shell.toolset.tmux = {
enable = mkEnableOption "terminal multiplexer"; enable = mkEnableOption "terminal multiplexer";
}; };

View file

@ -2,7 +2,6 @@
config, config,
lib, lib,
pkgs, pkgs,
namespace,
... ...
}: let }: let
inherit (lib) mkIf mkEnableOption; inherit (lib) mkIf mkEnableOption;

View file

@ -1,10 +1,13 @@
{ config, lib, pkgs, namespace, ... }: {
let config,
lib,
pkgs,
...
}: let
inherit (lib) mkIf mkEnableOption; inherit (lib) mkIf mkEnableOption;
cfg = config.sneeuwvlok.shell.toolset.zellij; cfg = config.sneeuwvlok.shell.toolset.zellij;
in in {
{
options.sneeuwvlok.shell.toolset.zellij = { options.sneeuwvlok.shell.toolset.zellij = {
enable = mkEnableOption "terminal multiplexer"; enable = mkEnableOption "terminal multiplexer";
}; };

View file

@ -2,7 +2,6 @@
config, config,
lib, lib,
pkgs, pkgs,
namespace,
... ...
}: let }: let
inherit (lib) mkIf mkEnableOption; inherit (lib) mkIf mkEnableOption;

View file

@ -1,10 +1,13 @@
{ config, lib, pkgs, namespace, ... }: {
let config,
lib,
pkgs,
...
}: let
inherit (lib) mkIf mkEnableOption; inherit (lib) mkIf mkEnableOption;
cfg = config.sneeuwvlok.shell.zsh; cfg = config.sneeuwvlok.shell.zsh;
in in {
{
options.sneeuwvlok.shell.zsh = { options.sneeuwvlok.shell.zsh = {
enable = mkEnableOption "enable ZSH"; enable = mkEnableOption "enable ZSH";
}; };

View file

@ -1,7 +1,6 @@
{ {
config, config,
lib, lib,
namespace,
... ...
}: let }: let
inherit (lib) mkIf mkEnableOption; inherit (lib) mkIf mkEnableOption;

View file

@ -1,7 +1,6 @@
{ {
config, config,
lib, lib,
namespace,
... ...
}: let }: let
inherit (lib) mkIf mkEnableOption; inherit (lib) mkIf mkEnableOption;

View file

@ -2,7 +2,6 @@
config, config,
lib, lib,
pkgs, pkgs,
namespace,
osConfig ? {}, osConfig ? {},
... ...
}: let }: let

View file

@ -12,7 +12,7 @@ in {
enable = mkEnableOption "enable steam"; enable = mkEnableOption "enable steam";
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [steam]; # environment.systemPackages = with pkgs; [steam];
programs = { programs = {
steam = { steam = {

View file

@ -1,7 +1,6 @@
{ {
inputs, inputs,
lib, lib,
namespace,
config, config,
pkgs, pkgs,
... ...

View file

@ -1,7 +1,6 @@
{ {
lib, lib,
config, config,
namespace,
inputs, inputs,
... ...
}: let }: let

View file

@ -1,7 +1,6 @@
{ {
lib, lib,
config, config,
namespace,
... ...
}: let }: let
inherit (lib) mkIf mkOption mkEnableOption mkMerge; inherit (lib) mkIf mkOption mkEnableOption mkMerge;

View file

@ -1,7 +1,6 @@
{ {
lib, lib,
config, config,
namespace,
... ...
}: let }: let
inherit (lib) mkIf mkEnableOption mkForce; inherit (lib) mkIf mkEnableOption mkForce;

View file

@ -1,7 +1,6 @@
{ {
lib, lib,
config, config,
namespace,
... ...
}: let }: let
inherit (lib) mkIf mkEnableOption; inherit (lib) mkIf mkEnableOption;

View file

@ -2,7 +2,6 @@
pkgs, pkgs,
lib, lib,
config, config,
namespace,
... ...
}: let }: let
inherit (lib) mkIf mkEnableOption; inherit (lib) mkIf mkEnableOption;

View file

@ -1,10 +1,14 @@
{ config, options, lib, pkgs, namespace, ... }: {
let config,
options,
lib,
pkgs,
...
}: let
inherit (lib) mkEnableOption mkIf; inherit (lib) mkEnableOption mkIf;
cfg = config.sneeuwvlok.editor.nano; cfg = config.sneeuwvlok.editor.nano;
in in {
{
options.sneeuwvlok.editor.nano = { options.sneeuwvlok.editor.nano = {
enable = mkEnableOption "nano"; enable = mkEnableOption "nano";
}; };

View file

@ -1,14 +1,18 @@
{ config, lib, pkgs, namespace, ... }: {
let config,
lib,
pkgs,
...
}: let
inherit (lib) mkIf mkEnableOption; inherit (lib) mkIf mkEnableOption;
cfg = config.sneeuwvlok.editor.nvim; cfg = config.sneeuwvlok.editor.nvim;
in in {
{
options.sneeuwvlok.editor.nvim = { options.sneeuwvlok.editor.nvim = {
enable = mkEnableOption "enable nvim via nvf on system level"; enable = mkEnableOption "enable nvim via nvf on system level";
}; };
config = mkIf cfg.enable { config =
mkIf cfg.enable {
}; };
} }

View file

@ -1,10 +1,13 @@
{ pkgs, lib, namespace, config, ... }: {
let pkgs,
lib,
config,
...
}: let
inherit (lib) mkIf mkEnableOption; inherit (lib) mkIf mkEnableOption;
cfg = config.sneeuwvlok.hardware.has.audio; cfg = config.sneeuwvlok.hardware.has.audio;
in in {
{
options.sneeuwvlok.hardware.has.audio = mkEnableOption "Enable bluetooth"; options.sneeuwvlok.hardware.has.audio = mkEnableOption "Enable bluetooth";
config = mkIf cfg { config = mkIf cfg {

View file

@ -1,10 +1,12 @@
{ lib, namespace, config, ... }: {
let lib,
config,
...
}: let
inherit (lib) mkIf mkEnableOption; inherit (lib) mkIf mkEnableOption;
cfg = config.sneeuwvlok.hardware.has.bluetooth; cfg = config.sneeuwvlok.hardware.has.bluetooth;
in in {
{
options.sneeuwvlok.hardware.has.bluetooth = mkEnableOption "Enable bluetooth"; options.sneeuwvlok.hardware.has.bluetooth = mkEnableOption "Enable bluetooth";
config = mkIf cfg { config = mkIf cfg {

View file

@ -1,7 +1,6 @@
{ {
pkgs, pkgs,
lib, lib,
namespace,
config, config,
... ...
}: let }: let

View file

@ -1,10 +1,13 @@
{ pkgs, lib, namespace, config, ... }: {
let pkgs,
lib,
config,
...
}: let
inherit (lib) mkIf mkEnableOption; inherit (lib) mkIf mkEnableOption;
cfg = config.sneeuwvlok.hardware.has.gpu.nvidia; cfg = config.sneeuwvlok.hardware.has.gpu.nvidia;
in in {
{
options.sneeuwvlok.hardware.has.gpu.nvidia = mkEnableOption "Enable NVidia gpu configuration"; options.sneeuwvlok.hardware.has.gpu.nvidia = mkEnableOption "Enable NVidia gpu configuration";
config = mkIf cfg { config = mkIf cfg {

View file

@ -1,7 +1,6 @@
{ {
pkgs, pkgs,
lib, lib,
namespace,
config, config,
... ...
}: let }: let

View file

@ -2,7 +2,6 @@
lib, lib,
config, config,
pkgs, pkgs,
namespace,
... ...
}: let }: let
inherit (lib) mkIf mkEnableOption; inherit (lib) mkIf mkEnableOption;

View file

@ -1,7 +1,6 @@
{ {
pkgs, pkgs,
lib, lib,
namespace,
config, config,
... ...
}: let }: let

View file

@ -2,7 +2,6 @@
config, config,
lib, lib,
pkgs, pkgs,
namespace,
... ...
}: let }: let
inherit (lib) mkIf mkEnableOption; inherit (lib) mkIf mkEnableOption;

View file

@ -1,7 +1,6 @@
{ {
lib, lib,
config, config,
namespace,
... ...
}: let }: let
inherit (lib) mkEnableOption mkIf; inherit (lib) mkEnableOption mkIf;

View file

@ -1,7 +1,7 @@
{ config, lib, pkgs, namespace, terranixLib, sneeuwvlokLib, ... }: { config, lib, pkgs, self, ... }:
let let
inherit (lib) mkIf mkEnableOption mkOption types toUpper toSentenceCase nameValuePair mapAttrs mapAttrs' concatMapAttrs concatMapStringsSep filterAttrsRecursive listToAttrs imap0 head drop length literalExpression attrNames; inherit (lib) mkIf mkEnableOption mkOption types toUpper toSentenceCase nameValuePair mapAttrs mapAttrs' concatMapAttrs concatMapStringsSep filterAttrsRecursive listToAttrs imap0 head drop length literalExpression attrNames;
inherit (sneeuwvlokLib.strings) toSnakeCase; inherit ((import ../../../../../lib/strings { inherit lib;}).strings) toSnakeCase;
cfg = config.sneeuwvlok.services.authentication.zitadel; cfg = config.sneeuwvlok.services.authentication.zitadel;
@ -339,7 +339,7 @@ in
config' = config; config' = config;
# this is a nix package, the generated json file to be exact # this is a nix package, the generated json file to be exact
terraformConfiguration = terranixLib.terranixConfiguration { terraformConfiguration = self.inputs.terranix.lib.terranixConfiguration {
system = pkgs.stdenv.hostPlatform.system; system = pkgs.stdenv.hostPlatform.system;
modules = [ modules = [

View file

@ -1,10 +1,13 @@
{ config, lib, pkgs, namespace, ... }: {
let config,
lib,
pkgs,
...
}: let
inherit (lib) mkIf mkEnableOption; inherit (lib) mkIf mkEnableOption;
cfg = config.sneeuwvlok.services.backup.borg; cfg = config.sneeuwvlok.services.backup.borg;
in in {
{
options.sneeuwvlok.services.backup.borg = { options.sneeuwvlok.services.backup.borg = {
enable = mkEnableOption "Borg Backup"; enable = mkEnableOption "Borg Backup";
}; };

View file

@ -2,7 +2,6 @@
config, config,
lib, lib,
pkgs, pkgs,
namespace,
... ...
}: let }: let
inherit (builtins) toString toJSON; inherit (builtins) toString toJSON;

View file

@ -2,7 +2,6 @@
config, config,
lib, lib,
pkgs, pkgs,
namespace,
... ...
}: let }: let
inherit (builtins) toString; inherit (builtins) toString;

View file

@ -2,7 +2,6 @@
config, config,
lib, lib,
pkgs, pkgs,
namespace,
... ...
}: let }: let
inherit (lib) mkIf mkEnableOption mkOption; inherit (lib) mkIf mkEnableOption mkOption;

View file

@ -2,7 +2,6 @@
config, config,
lib, lib,
pkgs, pkgs,
namespace,
... ...
}: let }: let
inherit (lib) mkIf mkEnableOption; inherit (lib) mkIf mkEnableOption;

View file

@ -1,7 +1,6 @@
{ {
config, config,
lib, lib,
namespace,
... ...
}: let }: let
inherit (lib) mkIf mkEnableOption; inherit (lib) mkIf mkEnableOption;

View file

@ -1,7 +1,6 @@
{ {
pkgs, pkgs,
lib, lib,
namespace,
config, config,
... ...
}: let }: let

View file

@ -1,7 +1,6 @@
{ {
config, config,
lib, lib,
namespace,
... ...
}: let }: let
inherit (lib) mkIf mkEnableOption; inherit (lib) mkIf mkEnableOption;

View file

@ -2,7 +2,6 @@
pkgs, pkgs,
config, config,
lib, lib,
namespace,
inputs, inputs,
... ...
}: let }: let

View file

@ -1,7 +1,6 @@
{ {
config, config,
lib, lib,
namespace,
... ...
}: let }: let
inherit (lib) mkIf mkEnableOption; inherit (lib) mkIf mkEnableOption;

View file

@ -2,7 +2,6 @@
config, config,
lib, lib,
pkgs, pkgs,
namespace,
... ...
}: let }: let
inherit (lib) mkIf mkEnableOption mkOption; inherit (lib) mkIf mkEnableOption mkOption;

View file

@ -1,10 +1,12 @@
{ config, lib, namespace, ... }: {
let config,
lib,
...
}: let
inherit (lib) mkIf mkEnableOption; inherit (lib) mkIf mkEnableOption;
cfg = config.sneeuwvlok.services.media.nfs; cfg = config.sneeuwvlok.services.media.nfs;
in in {
{
options.sneeuwvlok.services.media.nfs = { options.sneeuwvlok.services.media.nfs = {
enable = mkEnableOption "Enable NFS"; enable = mkEnableOption "Enable NFS";
}; };

View file

@ -2,8 +2,7 @@
pkgs, pkgs,
config, config,
lib, lib,
namespace, self,
terranixLib,
... ...
}: let }: let
inherit (builtins) toString; inherit (builtins) toString;
@ -154,7 +153,7 @@ in {
config' = config; config' = config;
lib' = lib; lib' = lib;
terraformConfiguration = terranixLib.terranixConfiguration { terraformConfiguration = self.inputs.terranix.lib.terranixConfiguration {
system = pkgs.stdenv.hostPlatform.system; system = pkgs.stdenv.hostPlatform.system;
modules = [ modules = [

View file

@ -2,7 +2,6 @@
config, config,
pkgs, pkgs,
lib, lib,
namespace,
... ...
}: let }: let
inherit (builtins) length; inherit (builtins) length;
@ -12,7 +11,7 @@
hasHosts = (cfg.hosts |> attrNames |> length) > 0; hasHosts = (cfg.hosts |> attrNames |> length) > 0;
caddyPackage = pkgs.caddy.withPlugins { caddyPackage = pkgs.caddy.withPlugins {
plugins = ["github.com/corazawaf/coraza-caddy/v2@v2.1.0"]; plugins = ["github.com/corazawaf/coraza-caddy/v2@v2.1.0"];
hash = "sha256-rsDnTunR8C7hVOX5aKcba+iFYHbpWek65DZgbMxOdTs="; hash = "sha256-pSXjLaZoRtKV3eFl2ySRSjl3yxi514G1Cb7pfrpxxtE=";
}; };
in { in {
options.sneeuwvlok.services.networking.caddy = { options.sneeuwvlok.services.networking.caddy = {

View file

@ -1,7 +1,6 @@
{ {
config, config,
lib, lib,
namespace,
... ...
}: let }: let
inherit (lib.modules) mkIf; inherit (lib.modules) mkIf;

View file

@ -2,7 +2,6 @@
config, config,
pkgs, pkgs,
lib, lib,
namespace,
... ...
}: let }: let
inherit (builtins) length; inherit (builtins) length;
@ -29,6 +28,7 @@ in {
}; };
}; };
}); });
default = {};
}; };
}; };

View file

@ -2,7 +2,6 @@
pkgs, pkgs,
config, config,
lib, lib,
namespace,
... ...
}: let }: let
inherit (lib.modules) mkIf; inherit (lib.modules) mkIf;

View file

@ -2,7 +2,6 @@
pkgs, pkgs,
config, config,
lib, lib,
namespace,
... ...
}: let }: let
inherit (lib.modules) mkIf; inherit (lib.modules) mkIf;

View file

@ -1,11 +1,14 @@
{ pkgs, config, lib, namespace, ... }: {
let pkgs,
config,
lib,
...
}: let
inherit (builtins) toString; inherit (builtins) toString;
inherit (lib) mkIf mkEnableOption; inherit (lib) mkIf mkEnableOption;
cfg = config.sneeuwvlok.services.observability.prometheus; cfg = config.sneeuwvlok.services.observability.prometheus;
in in {
{
options.sneeuwvlok.services.observability.prometheus = { options.sneeuwvlok.services.observability.prometheus = {
enable = mkEnableOption "enable Prometheus"; enable = mkEnableOption "enable Prometheus";
}; };

View file

@ -2,7 +2,6 @@
pkgs, pkgs,
config, config,
lib, lib,
namespace,
... ...
}: let }: let
inherit (lib.modules) mkIf; inherit (lib.modules) mkIf;

View file

@ -2,7 +2,6 @@
pkgs, pkgs,
config, config,
lib, lib,
namespace,
... ...
}: let }: let
inherit (builtins) toString; inherit (builtins) toString;

View file

@ -2,7 +2,6 @@
config, config,
lib, lib,
pkgs, pkgs,
namespace,
... ...
}: let }: let
inherit (lib) mkIf mkEnableOption; inherit (lib) mkIf mkEnableOption;

View file

@ -2,13 +2,12 @@
pkgs, pkgs,
config, config,
lib, lib,
namespace, self,
repoRoot,
sneeuwvlokLib,
... ...
}: let }: let
inherit (builtins) toString; inherit (builtins) toString;
inherit (lib) mkIf mkEnableOption mkOption types getAttrs toUpper concatMapAttrsStringSep; inherit (lib) mkIf mkEnableOption mkOption types getAttrs toUpper concatMapAttrsStringSep;
inherit (import ../../../../../lib/strings {inherit lib;}) strings;
cfg = config.sneeuwvlok.services.security.vaultwarden; cfg = config.sneeuwvlok.services.security.vaultwarden;
@ -27,15 +26,22 @@
}; };
}); });
databaseProviderPostgresql = types.submodule ({...}: let databaseProviderPostgresql = types.submodule ({...}: {
urlOptions = sneeuwvlokLib.options.mkUrlOptions { options = {
host = { type = mkOption {
type = types.enum ["postgresql"];
};
host = mkOption {
type = types.str;
example = "host.tld";
description = '' description = ''
Hostname of the postgresql server Hostname of the postgresql server
''; '';
}; };
port = { port = mkOption {
type = types.port;
default = 5432; default = 5432;
example = "5432"; example = "5432";
description = '' description = ''
@ -44,15 +50,12 @@
}; };
protocol = mkOption { protocol = mkOption {
type = types.str;
default = "postgres"; default = "postgres";
example = "postgres"; example = "postgres";
}; description = ''
}; Which protocol to use when creating a url string
in { '';
options =
{
type = mkOption {
type = types.enum ["postgresql"];
}; };
sslMode = mkOption { sslMode = mkOption {
@ -74,8 +77,7 @@
[Source](https://www.postgresql.org/docs/current/libpq-ssl.html#LIBPQ-SSL-SSLMODE-STATEMENTS) [Source](https://www.postgresql.org/docs/current/libpq-ssl.html#LIBPQ-SSL-SSLMODE-STATEMENTS)
''; '';
}; };
} };
// (urlOptions |> getAttrs ["protocol" "host" "port"]);
}); });
in { in {
options.sneeuwvlok.services.security.vaultwarden = { options.sneeuwvlok.services.security.vaultwarden = {
@ -120,7 +122,7 @@ in {
enable = true; enable = true;
dbBackend = "postgresql"; dbBackend = "postgresql";
package = pkgs.callPackage (repoRoot + "/packages/vaultwarden/package.nix") {}; package = pkgs.vaultwarden-postgresql;
config = { config = {
SIGNUPS_ALLOWED = false; SIGNUPS_ALLOWED = false;
@ -198,7 +200,7 @@ in {
else if type == "postgresql" else if type == "postgresql"
then { then {
inherit (db) type; inherit (db) type;
url = sneeuwvlokLib.strings.toUrl { url = strings.toUrl {
inherit (db) protocol host port; inherit (db) protocol host port;
path = "vaultwarden"; path = "vaultwarden";
query = { query = {

View file

@ -3,7 +3,6 @@
options, options,
lib, lib,
pkgs, pkgs,
namespace,
... ...
}: let }: let
inherit (lib) mkIf mkEnableOption; inherit (lib) mkIf mkEnableOption;

View file

@ -3,7 +3,6 @@
config, config,
lib, lib,
pkgs, pkgs,
namespace,
... ...
}: let }: let
inherit (lib) mkIf mkEnableOption; inherit (lib) mkIf mkEnableOption;

View file

@ -1,10 +1,13 @@
{ config, lib, pkgs, namespace, ... }: {
let config,
lib,
pkgs,
...
}: let
inherit (lib) mkDefault; inherit (lib) mkDefault;
cfg = config.sneeuwvlok.system.networking; cfg = config.sneeuwvlok.system.networking;
in in {
{
options.sneeuwvlok.system.networking = {}; options.sneeuwvlok.system.networking = {};
config = { config = {

View file

@ -1,6 +1,5 @@
{ {
config, config,
namespace,
inputs, inputs,
... ...
}: let }: let

View file

@ -1,7 +1,6 @@
{...}: { {...}: {
flake.modules.nixos.sneeuwvlok.system.security = { flake.modules.nixos.sneeuwvlok.system.security = {
config, config,
namespace,
inputs, inputs,
... ...
}: let }: let

View file

@ -1,8 +1,7 @@
{ {
pkgs, pkgs,
config, config,
namespace, self,
repoRoot,
... ...
}: let }: let
cfg = config.sneeuwvlok.system.security.sops; cfg = config.sneeuwvlok.system.security.sops;
@ -14,7 +13,7 @@ in {
sops = { sops = {
defaultSopsFormat = "yaml"; defaultSopsFormat = "yaml";
defaultSopsFile = repoRoot + "/systems/${pkgs.stdenv.hostPlatform.system}/${config.networking.hostName}/secrets.yml"; defaultSopsFile = self + "/systems/${pkgs.stdenv.hostPlatform.system}/${config.networking.hostName}/secrets.yml";
age = { age = {
# keyFile = "~/.config/sops/age/keys.txt"; # keyFile = "~/.config/sops/age/keys.txt";

View file

@ -1,8 +1,6 @@
{ config, namespace, ... }: {config, ...}: let
let
cfg = config.sneeuwvlok.system.security.sudo; cfg = config.sneeuwvlok.system.security.sudo;
in in {
{
options.sneeuwvlok.system.security.sudo = {}; options.sneeuwvlok.system.security.sudo = {};
config = { config = {