finally share with ragdoll
Some checks failed
/ lint (push) Failing after 36s

This commit is contained in:
Jana Dönszelmann 2026-03-15 17:57:07 +01:00
parent 30f81b2b79
commit d9d4e43c35
No known key found for this signature in database
17 changed files with 310 additions and 276 deletions

View file

@ -33,19 +33,28 @@ rec {
requirements: lib.all (req: builtins.elem req capabilities) requirements; requirements: lib.all (req: builtins.elem req capabilities) requirements;
program = program =
{ {
inputs,
name,
requirements ? [ ], requirements ? [ ],
home-config, home-config,
system-config ? { }, system-config ? (_: { }),
}: }:
# if (matches-capabilities requirements) then if (matches-capabilities requirements) then
if (true) then [ (if builtins.isNull home-only then (system-config inputs) else (home-config inputs)) ]
{ ++
inherit home-config system-config;
} (
if builtins.isNull home-only then
[
(_: {
custom.program.${name}.defered-config = home-config;
})
]
else else
{ [ ]
# home-config = _: { }; )
}; else
[ ];
specialArgsForHomeSystem = specialArgsForHomeSystem =
{ {
system, system,

View file

@ -8,7 +8,6 @@
{ {
imports = [ imports = [
./machine-or-home-config.nix ./machine-or-home-config.nix
./xdg.nix
]; ];
system.stateVersion = machine.stateVersion; system.stateVersion = machine.stateVersion;

View file

@ -61,7 +61,7 @@ let
}; };
privateUsers = "no"; privateUsers = "no";
config = imports =
{ {
config, config,
pkgs, pkgs,

View file

@ -1,4 +1,4 @@
{ inputs@{
lib, lib,
options, options,
machine, machine,
@ -9,24 +9,16 @@ with lib;
options = { options = {
custom.program = mkOption { custom.program = mkOption {
type = types.attrsOf ( type = types.attrsOf (
types.submodule ( types.submodule (_: {
{ config, ... }:
{
options = { options = {
name = mkOption { name = mkOption {
type = types.string; type = types.string;
}; };
home-config = mkOption { defered-config = mkOption {
type = types.deferredModule; type = types.deferredModule;
}; };
system-config = mkOption {
type = types.deferredModule;
default = _: { };
}; };
}; })
config = if builtins.isNull machine.home-only then config.system-config else config.home-config;
}
)
); );
}; };
}; };

View file

@ -106,7 +106,7 @@ in
imports = ( imports = (
[ [
] ]
++ (map (program: program.home-config) programs) ++ (map (program: program.defered-config) programs)
); );
home = { home = {
inherit stateVersion; inherit stateVersion;

View file

@ -1,6 +1,9 @@
{ machine, ... }@inputs: { machine, lib, ... }@inputs:
{ {
imports = [
imports = lib.concatLists [
[
./xdg.nix
./nvim ./nvim
./fish ./fish
./kanata ./kanata
@ -11,9 +14,11 @@
./niri ./niri
./zed ./zed
./firefox ./firefox
]; ]
custom.program.graphcial-packages = machine.program { (machine.program {
name = "graphcial-packages";
inherit inputs;
requirements = [ "graphical" ]; requirements = [ "graphical" ];
home-config = home-config =
{ pkgs, ... }: { pkgs, ... }:
@ -31,9 +36,11 @@
hunspellDicts.en_US hunspellDicts.en_US
]; ];
}; };
}; })
custom.program.discord = machine.program { (machine.program {
name = "discord";
inherit inputs;
requirements = [ "graphical" ]; requirements = [ "graphical" ];
home-config = home-config =
{ {
@ -147,9 +154,11 @@
}) })
]; ];
}; };
}; })
custom.program.fun-packages = machine.program { (machine.program {
name = "fun-packages";
inherit inputs;
requirements = [ "fun" ]; requirements = [ "fun" ];
home-config = home-config =
{ pkgs, ... }: { pkgs, ... }:
@ -159,9 +168,11 @@
prismlauncher prismlauncher
]; ];
}; };
}; })
custom.program.cli-packages = machine.program { (machine.program {
name = "cli-packages";
inherit inputs;
requirements = [ "cli" ]; requirements = [ "cli" ];
home-config = home-config =
{ config, pkgs, ... }: { config, pkgs, ... }:
@ -225,6 +236,6 @@
''; '';
}; };
}; };
}; })
];
} }

View file

@ -1,6 +1,8 @@
{ machine, ... }: inputs@{ machine, ... }:
{ {
custom.program.firefox = machine.program { imports = machine.program {
name = "firefox";
inherit inputs;
requirements = [ "graphical" ]; requirements = [ "graphical" ];
home-config = home-config =
{ {

View file

@ -1,6 +1,8 @@
{ machine, ... }: inputs@{ machine, ... }:
{ {
custom.program.fish = machine.program { imports = machine.program {
name = "fish";
inherit inputs;
requirements = [ "cli" ]; requirements = [ "cli" ];
home-config = home-config =
{ {
@ -227,6 +229,7 @@
function fish_greeting function fish_greeting
${pkgs.blahaj}/bin/blahaj -s ${pkgs.blahaj}/bin/blahaj -s
echo "welcome to $(uname -n), $(whoami)!"
end end
''; '';
}; };

View file

@ -1,6 +1,8 @@
{ machine, ... }: inputs@{ machine, ... }:
{ {
custom.program.git = machine.program { imports = machine.program {
name = "git";
inherit inputs;
requirements = [ "cli" ]; requirements = [ "cli" ];
home-config = _: { home-config = _: {
programs.git = { programs.git = {

View file

@ -1,6 +1,8 @@
{ machine, ... }: inputs@{ machine, ... }:
{ {
custom.program.jujutsu = machine.program { imports = machine.program {
name = "jujutsu";
inherit inputs;
requirements = [ "cli" ]; requirements = [ "cli" ];
home-config = home-config =
{ config, pkgs, ... }: { config, pkgs, ... }:

View file

@ -1,4 +1,4 @@
{ machine, pkgs, ... }: inputs@{ machine, pkgs, ... }:
let let
kanata-config = '' kanata-config = ''
(defcfg (defcfg
@ -86,7 +86,9 @@ let
''; '';
in in
{ {
custom.program.kanata = machine.program { imports = machine.program {
name = "kanata";
inherit inputs;
requirements = [ "graphical" ]; requirements = [ "graphical" ];
home-config = home-config =
{ pkgs, ... }: { pkgs, ... }:

View file

@ -1,6 +1,8 @@
{ machine, ... }: inputs@{ machine, ... }:
{ {
custom.program.kitty = machine.program { imports = machine.program {
name = "kitty";
inherit inputs;
requirements = [ "graphical" ]; requirements = [ "graphical" ];
home-config = home-config =
{ pkgs, flakes, ... }: { pkgs, flakes, ... }:

View file

@ -1,14 +1,15 @@
{ machine, ... }: inputs@{ machine, ... }:
{ {
custom.program.niri = machine.program { imports = machine.program {
name = "niri";
inherit inputs;
requirements = [ "graphical" ]; requirements = [ "graphical" ];
home-config = home-config =
{ { config
config, , pkgs
pkgs, , flakes
flakes, , lib
lib, , ...
...
}: }:
let let
noctalia = noctalia =

View file

@ -1,6 +1,8 @@
{ machine, ... }: inputs@{ machine, ... }:
{ {
custom.program.nvim = machine.program { imports = machine.program {
name = "nvim";
inherit inputs;
requirements = [ "cli" ]; requirements = [ "cli" ];
home-config = home-config =
{ {

View file

@ -1,6 +1,8 @@
{ machine, ... }: inputs@{ machine, ... }:
{ {
custom.program.tmux = machine.program { imports = machine.program {
name = "tmux";
inherit inputs;
requirements = [ "cli" ]; requirements = [ "cli" ];
home-config = home-config =
{ pkgs, ... }: { pkgs, ... }:

View file

@ -1,4 +1,4 @@
{ ... }@inputs: { machine, ... }@inputs:
let let
browsers = [ browsers = [
"firefox.desktop" "firefox.desktop"
@ -117,7 +117,10 @@ let
}; };
in in
{ {
custom.program.homedirs = { imports = machine.program {
name = "xdg";
inherit inputs;
requirements = [ ];
home-config = home-config =
{ config, ... }: { config, ... }:
{ {
@ -142,8 +145,7 @@ in
}; };
}; };
}; };
}; system-config = _: {
xdg = { xdg = {
mime = { mime = {
enable = true; enable = true;
@ -152,5 +154,6 @@ in
inherit removedAssociations; inherit removedAssociations;
}; };
}; };
};
};
} }

View file

@ -1,6 +1,8 @@
{ machine, ... }: inputs@{ machine, ... }:
{ {
custom.program.zed = machine.program { imports = machine.program {
name = "zed";
inherit inputs;
requirements = [ requirements = [
"work" "work"
"graphical" "graphical"