This commit is contained in:
mjallen18
2025-12-23 21:04:21 -06:00
parent 8f08f24761
commit d981fb20c2
68 changed files with 957 additions and 543 deletions

View File

@@ -30,7 +30,10 @@ mkModule {
age = {
generateKey = true;
keyFile = "${config.home.homeDirectory}/.config/sops/age/keys.txt";
sshKeyPaths = [ "${config.home.homeDirectory}/.ssh/id_ed25519" ] ++ config.${namespace}.sops.sshKeyPaths;
sshKeyPaths = [
"${config.home.homeDirectory}/.ssh/id_ed25519"
]
++ config.${namespace}.sops.sshKeyPaths;
};
};
};

View File

@@ -1,7 +1,7 @@
# Example usage of the reverse proxy utilities
{ lib, namespace, ... }:
let
inherit (lib.${namespace}-lib.reverseproxy)
inherit (lib.${namespace} - lib.reverseproxy)
mkReverseProxy
mkReverseProxies
templates

View File

@@ -1,4 +1,9 @@
{ config, lib, namespace, ... }:
{
config,
lib,
namespace,
...
}:
let
inherit (lib.${namespace}.module) mkModule mkOpt mkBoolOpt;
in

View File

@@ -1,6 +1,6 @@
{ inputs, namespace, ... }:
let
inherit (inputs.self.${namespace}-lib.system.common)
inherit (inputs.self.${namespace} - lib.system.common)
mkExtendedLib
mkNixpkgsConfig
mkHomeConfigs
@@ -13,10 +13,10 @@ in
nixosConfigurations =
let
# Get all systems
allSystems = inputs.self.${namespace}-lib.file.scanSystems ../systems;
allSystems = inputs.self.${namespace} - lib.file.scanSystems ../systems;
# Filter for NixOS systems
nixosSystems = inputs.self.${namespace}-lib.file.filterNixOSSystems allSystems;
nixosSystems = inputs.self.${namespace} - lib.file.filterNixOSSystems allSystems;
in
inputs.nixpkgs.lib.mapAttrs' (
_name:
@@ -83,7 +83,7 @@ in
homeConfigurations =
let
# Get all homes
allHomes = inputs.self.${namespace}-lib.file.scanHomes ../homes;
allHomes = inputs.self.${namespace} - lib.file.scanHomes ../homes;
in
inputs.nixpkgs.lib.mapAttrs' (
_name:

View File

@@ -1,4 +1,8 @@
{ inputs, lib, namespace }:
{
inputs,
lib,
namespace,
}:
let
inherit (inputs.nixpkgs.lib)
mapAttrs
@@ -31,7 +35,7 @@ rec {
moduleConfig ? { },
domain ? "services",
config,
serviceName ? name
serviceName ? name,
}:
let
cfg = config.${namespace}.${domain}.${name};
@@ -90,9 +94,10 @@ rec {
# # "d ${cfg.configDir}/server-files 0775 ${name} ${name} - -"
# # "d ${cfg.configDir}/user-files 0775 ${name} ${name} - -"
# ];
} // moduleConfig;
}
// moduleConfig;
in
{ config, lib, ... }:
{ lib, ... }:
{
options.${namespace}.${domain}.${name} = lib.mkOption {
type = lib.types.submodule {
@@ -127,9 +132,14 @@ rec {
port = mkOpt types.int 80 "Port for ${name} redis to be hosted on";
};
hashedPassword = mkOpt (types.nullOr types.str) "$y$j9T$EkPXmsmIMFFZ.WRrBYCxS1$P0kwo6e4.WM5DsqUcEqWC3MrZp5KfCjxffraMFZWu06" "Hashed password for code-server authentication";
hashedPassword =
mkOpt (types.nullOr types.str)
"$y$j9T$EkPXmsmIMFFZ.WRrBYCxS1$P0kwo6e4.WM5DsqUcEqWC3MrZp5KfCjxffraMFZWu06"
"Hashed password for code-server authentication";
extraEnvironment = mkOpt (types.attrsOf types.str) { } "Extra environment variables for code-server";
extraEnvironment =
mkOpt (types.attrsOf types.str) { }
"Extra environment variables for code-server";
reverseProxy = mkReverseProxyOpt;
}
@@ -141,7 +151,6 @@ rec {
config = lib.mkIf cfg.enable defaultConfig;
};
# container
mkContainer =
{

View File

@@ -7,7 +7,7 @@ in
flake: nixpkgs:
nixpkgs.lib.extend (
_final: _prev: {
mjallen = flake.${namespace}-lib;
mjallen = flake.${namespace} - lib;
}
);
@@ -30,7 +30,7 @@ in
hostname,
}:
let
inherit (flake.${namespace}-lib.file) scanHomes;
inherit (flake.${namespace} - lib.file) scanHomes;
homesPath = ../../homes;
allHomes = scanHomes homesPath;
in