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;
program =
{
inputs,
name,
requirements ? [ ],
home-config,
system-config ? { },
system-config ? (_: { }),
}:
# if (matches-capabilities requirements) then
if (true) then
{
inherit home-config system-config;
}
if (matches-capabilities requirements) then
[ (if builtins.isNull home-only then (system-config inputs) else (home-config inputs)) ]
++
(
if builtins.isNull home-only then
[
(_: {
custom.program.${name}.defered-config = home-config;
})
]
else
{
# home-config = _: { };
};
[ ]
)
else
[ ];
specialArgsForHomeSystem =
{
system,

View file

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

View file

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

View file

@ -1,4 +1,4 @@
{
inputs@{
lib,
options,
machine,
@ -9,24 +9,16 @@ with lib;
options = {
custom.program = mkOption {
type = types.attrsOf (
types.submodule (
{ config, ... }:
{
types.submodule (_: {
options = {
name = mkOption {
type = types.string;
};
home-config = mkOption {
defered-config = mkOption {
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 = (
[
]
++ (map (program: program.home-config) programs)
++ (map (program: program.defered-config) programs)
);
home = {
inherit stateVersion;

View file

@ -1,6 +1,9 @@
{ machine, ... }@inputs:
{ machine, lib, ... }@inputs:
{
imports = [
imports = lib.concatLists [
[
./xdg.nix
./nvim
./fish
./kanata
@ -11,9 +14,11 @@
./niri
./zed
./firefox
];
]
custom.program.graphcial-packages = machine.program {
(machine.program {
name = "graphcial-packages";
inherit inputs;
requirements = [ "graphical" ];
home-config =
{ pkgs, ... }:
@ -31,9 +36,11 @@
hunspellDicts.en_US
];
};
};
})
custom.program.discord = machine.program {
(machine.program {
name = "discord";
inherit inputs;
requirements = [ "graphical" ];
home-config =
{
@ -147,9 +154,11 @@
})
];
};
};
})
custom.program.fun-packages = machine.program {
(machine.program {
name = "fun-packages";
inherit inputs;
requirements = [ "fun" ];
home-config =
{ pkgs, ... }:
@ -159,9 +168,11 @@
prismlauncher
];
};
};
})
custom.program.cli-packages = machine.program {
(machine.program {
name = "cli-packages";
inherit inputs;
requirements = [ "cli" ];
home-config =
{ 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" ];
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" ];
home-config =
{
@ -227,6 +229,7 @@
function fish_greeting
${pkgs.blahaj}/bin/blahaj -s
echo "welcome to $(uname -n), $(whoami)!"
end
'';
};

View file

@ -1,6 +1,8 @@
{ machine, ... }:
inputs@{ machine, ... }:
{
custom.program.git = machine.program {
imports = machine.program {
name = "git";
inherit inputs;
requirements = [ "cli" ];
home-config = _: {
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" ];
home-config =
{ config, pkgs, ... }:

View file

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

View file

@ -1,6 +1,8 @@
{ machine, ... }:
inputs@{ machine, ... }:
{
custom.program.kitty = machine.program {
imports = machine.program {
name = "kitty";
inherit inputs;
requirements = [ "graphical" ];
home-config =
{ 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" ];
home-config =
{
config,
pkgs,
flakes,
lib,
...
{ config
, pkgs
, flakes
, lib
, ...
}:
let
noctalia =

View file

@ -1,6 +1,8 @@
{ machine, ... }:
inputs@{ machine, ... }:
{
custom.program.nvim = machine.program {
imports = machine.program {
name = "nvim";
inherit inputs;
requirements = [ "cli" ];
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" ];
home-config =
{ pkgs, ... }:

View file

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

View file

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