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 else
{ [ ];
# home-config = _: { };
};
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 = {
{ name = mkOption {
options = { type = types.string;
name = mkOption {
type = types.string;
};
home-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; defered-config = mkOption {
} type = types.deferredModule;
) };
};
})
); );
}; };
}; };

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,230 +1,241 @@
{ machine, ... }@inputs: { machine, lib, ... }@inputs:
{ {
imports = [
./nvim
./fish
./kanata
./kitty
./tmux
./git
./jj
./niri
./zed
./firefox
];
custom.program.graphcial-packages = machine.program { imports = lib.concatLists [
requirements = [ "graphical" ]; [
home-config = ./xdg.nix
{ pkgs, ... }: ./nvim
{ ./fish
home.packages = with pkgs; [ ./kanata
spotify ./kitty
obsidian ./tmux
element-desktop ./git
# chromium ./jj
bind.dnsutils ./niri
mpv ./zed
vlc ./firefox
libreoffice-qt ]
hunspell
hunspellDicts.en_US
];
};
};
custom.program.discord = machine.program { (machine.program {
requirements = [ "graphical" ]; name = "graphcial-packages";
home-config = inherit inputs;
{ requirements = [ "graphical" ];
config, home-config =
pkgs, { pkgs, ... }:
lib, {
... home.packages = with pkgs; [
}: spotify
let obsidian
disableFeatures = [ element-desktop
"WebRtcAllowInputVolumeAdjustment" # chromium
"ChromeWideEchoCancellation" bind.dnsutils
]; mpv
enableFeatures = [ ]; vlc
commandLineArgs = libreoffice-qt
lib.optionals (enableFeatures != [ ]) [ hunspell
"--enable-features=${lib.concatStringsSep "," enableFeatures}" hunspellDicts.en_US
]
++ lib.optionals (disableFeatures != [ ]) [
"--disable-features=${lib.concatStringsSep "," disableFeatures}"
]; ];
joinedArgs = lib.concatStringsSep " " commandLineArgs; };
in })
{
home.file."${config.xdg.configHome}/discord/settings.json".source = pkgs.writeText "settings.json" (
lib.strings.toJSON (
let
endpoint = "https://inject.shelter.uwu.network/shelter+yt_ad_block+yt_embed_fix";
in
{
SKIP_HOST_UPDATE = true;
MINIMIZE_TO_TRAY = false;
OPEN_ON_STARTUP = false;
DANGEROUS_ENABLE_DEVTOOLS_ONLY_ENABLE_IF_YOU_KNOW_WHAT_YOURE_DOING = true;
enableHardwareAcceleration = true;
UPDATE_ENDPOINT = endpoint;
NEW_UPDATE_ENDPOINT = "${endpoint}/";
BACKGROUND_COLOR = "#2c2d32";
openasar = { (machine.program {
setup = true; name = "discord";
# using the performance preset breaks vaapi inherit inputs;
cmdPreset = "balanced"; requirements = [ "graphical" ];
# quickstart is buggy and breaks discord sometimes. home-config =
quickstart = false; {
# this css is made for discord compact mode. if you're not using that, stuff won't align!! config,
css = pkgs,
# css lib,
'' ...
/* Hide nitro begging */ }:
@import url("https://raw.codeberg.page/AllPurposeMat/Disblock-Origin/DisblockOrigin.theme.css"); let
disableFeatures = [
"WebRtcAllowInputVolumeAdjustment"
"ChromeWideEchoCancellation"
];
enableFeatures = [ ];
commandLineArgs =
lib.optionals (enableFeatures != [ ]) [
"--enable-features=${lib.concatStringsSep "," enableFeatures}"
]
++ lib.optionals (disableFeatures != [ ]) [
"--disable-features=${lib.concatStringsSep "," disableFeatures}"
];
joinedArgs = lib.concatStringsSep " " commandLineArgs;
in
{
home.file."${config.xdg.configHome}/discord/settings.json".source = pkgs.writeText "settings.json" (
lib.strings.toJSON (
let
endpoint = "https://inject.shelter.uwu.network/shelter+yt_ad_block+yt_embed_fix";
in
{
SKIP_HOST_UPDATE = true;
MINIMIZE_TO_TRAY = false;
OPEN_ON_STARTUP = false;
DANGEROUS_ENABLE_DEVTOOLS_ONLY_ENABLE_IF_YOU_KNOW_WHAT_YOURE_DOING = true;
enableHardwareAcceleration = true;
UPDATE_ENDPOINT = endpoint;
NEW_UPDATE_ENDPOINT = "${endpoint}/";
BACKGROUND_COLOR = "#2c2d32";
/* Hide the Visual Refresh title bar */ openasar = {
.visual-refresh { setup = true;
/* Hide the bar itself */ # using the performance preset breaks vaapi
--custom-app-top-bar-height: 0px !important; cmdPreset = "balanced";
# quickstart is buggy and breaks discord sometimes.
quickstart = false;
# this css is made for discord compact mode. if you're not using that, stuff won't align!!
css =
# css
''
/* Hide nitro begging */
@import url("https://raw.codeberg.page/AllPurposeMat/Disblock-Origin/DisblockOrigin.theme.css");
/* Title bar buttons are still visible so hide them too */ /* Hide the Visual Refresh title bar */
div.base__5e434 > div.bar_c38106 { .visual-refresh {
display: none; /* Hide the bar itself */
--custom-app-top-bar-height: 0px !important;
/* Title bar buttons are still visible so hide them too */
div.base__5e434 > div.bar_c38106 {
display: none;
}
/* Bring the server list down a few pixels */
ul[data-list-id="guildsnav"] > div.itemsContainer_ef3116 {
margin-top: 8px;
}
} }
/* Bring the server list down a few pixels */ :root {
ul[data-list-id="guildsnav"] > div.itemsContainer_ef3116 { /* Disblock settings */
margin-top: 8px; --display-clan-tags: none;
--display-active-now: none;
--display-hover-reaction-emoji: none;
--bool-show-name-gradients: false;
} }
}
:root { /* Make "Read All" vencord button text smaller */
/* Disblock settings */ button.vc-ranb-button {
--display-clan-tags: none; font-size: 9.5pt;
--display-active-now: none; font-weight: normal;
--display-hover-reaction-emoji: none; }
--bool-show-name-gradients: false;
}
/* Make "Read All" vencord button text smaller */ /* Hide Discover button */
button.vc-ranb-button { div[data-list-item-id="guildsnav___guild-discover-button"] {
font-size: 9.5pt; display: none !important;
font-weight: normal; }
}
/* Hide Discover button */ /* Hide voice settings menus in user panel */
div[data-list-item-id="guildsnav___guild-discover-button"] { div[class^="micButtonParent__"] button[role="switch"] {
display: none !important; border-radius: var(--radius-sm);
} & ~ button { display: none; }
}
/* Also reduce the gap between the buttons */
div.container__37e49 > div.buttons__37e49 {
gap: 1px;
}
'';
};
}
)
);
/* Hide voice settings menus in user panel */ home.packages = with pkgs; [
div[class^="micButtonParent__"] button[role="switch"] { (discord.override {
border-radius: var(--radius-sm); # we disable updates in settings.json
& ~ button { display: none; } disableUpdates = false;
} commandLineArgs = joinedArgs;
/* Also reduce the gap between the buttons */ withTTS = false;
div.container__37e49 > div.buttons__37e49 { enableAutoscroll = true;
gap: 1px; withOpenASAR = true;
} })
''; ];
}; };
} })
)
);
home.packages = with pkgs; [ (machine.program {
(discord.override { name = "fun-packages";
# we disable updates in settings.json inherit inputs;
disableUpdates = false; requirements = [ "fun" ];
commandLineArgs = joinedArgs; home-config =
withTTS = false; { pkgs, ... }:
enableAutoscroll = true; {
withOpenASAR = true; home.packages = with pkgs; [
}) custom.p1n3appl3.tab
]; prismlauncher
}; ];
}; };
})
custom.program.fun-packages = machine.program { (machine.program {
requirements = [ "fun" ]; name = "cli-packages";
home-config = inherit inputs;
{ pkgs, ... }: requirements = [ "cli" ];
{ home-config =
home.packages = with pkgs; [ { config, pkgs, ... }:
custom.p1n3appl3.tab {
prismlauncher home.packages = with pkgs; [
]; # general cli tools
}; sops
}; fzf
htop
ncdu
psmisc
ripgrep
rsync
zoxide
tmux
direnv
atuin
rcon
lix
nix-output-monitor
wget
comma
unzip
pciutils
difftastic
custom.program.cli-packages = machine.program { # dev tools
requirements = [ "cli" ]; gdb
home-config = clang-tools
{ config, pkgs, ... }: rustup
{ git
home.packages = with pkgs; [ python3
# general cli tools unixtools.xxd
sops net-tools
fzf sqlite-interactive
htop tokei
ncdu just
psmisc uv
ripgrep llvmPackages.bintools
rsync
zoxide
tmux
direnv
atuin
rcon
lix
nix-output-monitor
wget
comma
unzip
pciutils
difftastic
# dev tools (writeShellScriptBin "nas" ''
gdb mkdir -p ~/Documents/nas
clang-tools ${sshfs}/bin/sshfs fili:/storage/storage/data/ ~/Documents/nas
rustup cd ~/Documents/nas
git '')
python3 ];
unixtools.xxd
net-tools
sqlite-interactive
tokei
just
uv
llvmPackages.bintools
(writeShellScriptBin "nas" '' # Set up direnv
mkdir -p ~/Documents/nas programs.direnv = {
${sshfs}/bin/sshfs fili:/storage/storage/data/ ~/Documents/nas package = pkgs.direnv;
cd ~/Documents/nas silent = false;
'') nix-direnv = {
]; enable = true;
package = pkgs.nix-direnv;
};
};
# Set up direnv home.file = {
programs.direnv = { "${config.xdg.configHome}/sqlite3/sqliterc".source = pkgs.writeText ".sqliterc" ''
package = pkgs.direnv; .mode box
silent = false; '';
nix-direnv = {
enable = true;
package = pkgs.nix-direnv;
}; };
}; };
})
home.file = { ];
"${config.xdg.configHome}/sqlite3/sqliterc".source = pkgs.writeText ".sqliterc" ''
.mode box
'';
};
};
};
} }

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 =
@ -241,7 +242,7 @@
} }
{ {
matches = [ { app-id = "firefox"; } ]; matches = [{ app-id = "firefox"; }];
open-on-workspace = "browser"; open-on-workspace = "browser";
} }
@ -599,7 +600,7 @@
id = "Volume"; id = "Volume";
} }
] ]
++ [ { id = "Battery"; } ] ++ [{ id = "Battery"; }]
++ [ ++ [
{ {
id = "KeyboardLayout"; id = "KeyboardLayout";

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,15 +145,15 @@ in
}; };
}; };
}; };
}; system-config = _: {
xdg = {
xdg = { mime = {
mime = { enable = true;
enable = true; defaultApplications = associations;
defaultApplications = associations; addedAssociations = associations;
addedAssociations = associations; 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"