better cleaner containers

This commit is contained in:
ari committed 2026-06-29 09:57:40 -04:00
1 parent 4bd849e534
commit f8874f6e15
4 files changed
+51 -15

No files matched your search

+11 -5
View File
@@ -16,7 +16,7 @@ let
allPkgs = eachSystem (
system:
import nixpkgs {
system = system;
inherit system;
config = {
allowUnfree = true;
};
@@ -27,6 +27,12 @@ let
];
}
);
# Build nixosUtils with access to pkgs and lib
nixosUtils = import ./nixos-utils.nix {
pkgs = allPkgs.x86_64-linux;
lib = nixpkgs.lib;
};
osModules = [
determinate.nixosModules.default
stylix.nixosModules.stylix
@@ -60,7 +66,7 @@ in
home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = specialArgs // {
inherit system skygUtils;
inherit system skygUtils nixosUtils;
user = userConfig;
unstablePkgs = nixpkgs-unstable.legacyPackages.${system};
};
@@ -82,7 +88,7 @@ in
, configuration ? [ ]
}: nixpkgs.lib.nixosSystem {
specialArgs = specialArgs // {
inherit system skygUtils user;
inherit system skygUtils nixosUtils user;
unstablePkgs = nixpkgs-unstable.legacyPackages.${system};
};
inherit system;
@@ -104,7 +110,7 @@ in
, configuration ? [ ]
}: nixpkgs.lib.nixosSystem {
specialArgs = specialArgs // {
inherit system skygUtils user;
inherit system skygUtils nixosUtils user;
unstablePkgs = nixpkgs-unstable.legacyPackages.${system};
};
inherit system;
@@ -132,7 +138,7 @@ in
nix-darwin.lib.darwinSystem {
inherit system;
specialArgs = specialArgs // {
inherit system skygUtils user;
inherit system skygUtils nixosUtils user;
unstablePkgs = nixpkgs-unstable.legacyPackages.${system};
};
modules = [
+15
View File
@@ -0,0 +1,15 @@
{ pkgs, lib }:
{
# YAML validation helper — validates YAML syntax at build time
validateYaml = name: content:
let
validated = pkgs.runCommand "${name}-validated" { } ''
${pkgs.yq}/bin/yq eval -e '.' > /dev/null <<'EOF'
${content}
EOF
echo "${content}" > $out
'';
in
validated;
}
@@ -76,7 +76,6 @@ rec {
before = [ "container-services-${groupName}.service" ];
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
ExecStart = scriptFile;
};
};