make home manager modules composable

Signed-off-by: unexplrd <unexplrd@linerds.us>
This commit is contained in:
2025-03-30 16:07:10 +03:00
parent 0f09e27daf
commit 9f9479b576
7 changed files with 51 additions and 242 deletions

View File

@ -0,0 +1,14 @@
{
inputs,
osConfig,
...
}: {
imports = with inputs; [
nix-index-database.hmModules.nix-index
self.homeModules.desktop
self.homeModules.programs
];
inherit (osConfig) desktop;
home.stateVersion = osConfig.system.stateVersion;
home.sessionPath = ["$HOME/.local/bin"];
}

View File

@ -1,17 +1,7 @@
{
lib,
inputs,
osConfig,
...
}: {
imports = with inputs; [
nix-index-database.hmModules.nix-index
self.homeModules.desktop
self.homeModules.programs
./programs.nix
imports = [
./common.nix
./flatpak.nix
./programs.nix
];
inherit (osConfig) desktop;
home.stateVersion = osConfig.system.stateVersion;
home.sessionPath = ["$HOME/.local/bin"];
}

View File

@ -1,19 +1,7 @@
{
inputs,
osConfig,
...
}: {
imports = with inputs; [
nix-index-database.hmModules.nix-index
self.homeModules.desktop
self.homeModules.programs
./programs.nix
imports = [
../../../dunamis/users/user/common.nix
../../../dunamis/users/user/programs.nix
./flatpak.nix
];
home = {
inherit (osConfig.system) stateVersion;
sessionPath = ["$HOME/.local/bin"];
};
desktop.niri.enable = true;
}

View File

@ -1,87 +0,0 @@
{pkgs, ...}: {
shell = {
fish.enable = true;
oh-my-posh.enable = true;
};
console.yazi.enable = true;
stylix.targets.fzf.enable = false;
services.ssh-agent.enable = true;
services.pueue.enable = true;
syncthing.enable = true;
programs = {
bat.enable = true;
btop = {
enable = true;
settings.update_ms = 200;
};
eza.enable = true;
fd.enable = true;
fzf = {
enable = true;
defaultOptions = ["--color=16"];
};
pay-respects.enable = true;
nix-index.enable = true;
nix-index-database.comma.enable = true;
gitui.enable = true;
git = {
enable = true;
delta.enable = true;
signing.format = "ssh";
aliases = {
cl = "clone";
co = "checkout";
pom = "push origin main";
};
};
jujutsu.enable = true;
ripgrep.enable = true;
};
terminal = {
ghostty.enable = true;
kitty.enable = true;
};
editor = {
helix.enable = true;
};
home.packages = with pkgs; [
alejandra # nix formatter in rust
devenv # programming deps in rust
dust # du in rust
fend # calc in rust
flatpak # flatpak cli
jj-fzf # fuzzy finder jujutsu tui
just # make in rust
ouch # archive manager in runt
overskride # bluetooth gui in rust
pika-backup # borg gui in rust
pinentry-qt # pinentry for rbw
procs # ps in rust
rbw # bitwarden cli in rust
trashy # trash cli in rust
vial # qmk keyboard configuring app
virt-manager # libvirt gui
waycheck # check wayland protocols
];
xdg.desktopEntries = {
uni = {
actions."Copy".exec = "fish -c \"~/.local/bin/uni --copy\"";
categories = ["Utility" "X-Launch" "Network"];
comment = "Select and open or copy URLs from a list.";
exec = "fish -c \"~/.local/bin/uni\"";
icon = "web-browser";
name = "Uni URL Handler";
startupNotify = true;
terminal = false;
type = "Application";
};
};
}

View File

@ -18,34 +18,33 @@
packages = [
# misc
"app.zen_browser.zen"
"io.github.ungoogled_software.ungoogled_chromium"
"net.mullvad.MullvadBrowser"
"com.obsproject.Studio"
"com.bitwarden.desktop"
"com.github.tchx84.Flatseal"
"com.logseq.Logseq"
"com.obsproject.Studio"
"com.usebottles.bottles"
"de.haeckerfelix.Fragments"
"org.qbittorrent.qBittorrent"
# "com.transmissionbt.Transmission"
"com.usebottles.bottles"
"com.logseq.Logseq"
"io.github.martchus.syncthingtray"
# chatting
"org.signal.Signal"
"im.riot.Riot"
"org.telegram.desktop"
"io.github.spacingbat3.webcord"
"org.mozilla.Thunderbird"
"org.signal.Signal"
"org.telegram.desktop"
# media
"org.atheme.audacious"
"io.bassi.Amberol"
"io.freetubeapp.FreeTube"
#"io.github.celluloid_player.Celluloid"
# "io.mpv.Mpv"
#"io.github.celluloid_player.Celluloid"
# gaming
#"com.github._0negal.Viper"
"net.lutris.Lutris"
"com.heroicgameslauncher.hgl"
"net.lutris.Lutris"
{
appId = "org.unmojang.FjordLauncher";
origin = "hero-persson";
@ -59,38 +58,32 @@
Context = {
sockets = ["wayland" "!x11" "!fallback-x11"];
filesystems = [
"xdg-run/pipewire-0"
"!home"
"!host"
"!~/.ssh"
"/nix/store:ro"
"xdg-config/gtk-3.0:ro"
"xdg-config/gtk-4.0:ro"
# "~/.local/share/fonts:ro"
"xdg-run/pipewire-0"
"~/.local/share/icons:ro"
# "~/.nix-profile/share/icons:ro"
# "~/.nix-profile/share/fonts:ro"
"/nix/store:ro"
];
};
Environment = {
XCURSOR_PATH = "/run/host/user-share/icons:/run/host/share/icons";
ELECTRON_OZONE_PLATFORM_HINT = "wayland";
#GTK_THEME = "adw-gtk3";
};
};
"io.github.martchus.syncthingtray".Context.filesystems = ["/storage/games/heroic/Factorio/game/saves"];
"org.octave.Octave".Context.sockets = ["x11"];
"org.octave.Octave".Environment = {QT_QPA_PLATFORM = "xcb";};
"com.valvesoftware.Steam" = {
Context = {
sockets = ["x11" "wayland"];
filesystems = ["/storage/games/steam"];
};
Environment = {
STEAM_FORCE_DESKTOPUI_SCALING = "1.3";
};
};
"org.signal.Signal" = {
Environment = {
SIGNAL_PASSWORD_STORE = "gnome-libsecret";
Environment.SIGNAL_PASSWORD_STORE = "gnome-libsecret";
};
"com.obsproject.Studio" = {
Context.filesystems = ["~/vids"];
};
"com.logseq.Logseq" = {
Context.filesystems = [
"~/docs/logseq"
"~/docs/nure/2025/logseq"
"~/syncthing/logseq"
];
};
"net.lutris.Lutris".Context = {
sockets = ["x11" "wayland"];
@ -101,10 +94,7 @@
filesystems = ["/storage/games/heroic" "~/games/heroic"];
};
"com.usebottles.Bottles" = {
Context = {
sockets = ["x11" "wayland"];
filesystems = ["/home/user/docs/nure/tex-template/assets/BridgeKSG"];
};
Context.sockets = ["x11" "wayland"];
};
};
};

View File

@ -1,16 +1,7 @@
{inputs, ...}: {
imports = with inputs; [
nix-index-database.hmModules.nix-index
self.homeModules.desktop
self.homeModules.programs
./programs.nix
{
imports = [
../../../dunamis/users/user/common.nix
../../../dunamis/users/user/programs.nix
./flatpak.nix
];
desktop.niri.enable = true;
home = {
stateVersion = "25.05";
sessionPath = [
"$HOME/.local/bin"
];
};
}

View File

@ -1,77 +0,0 @@
{pkgs, ...}: {
shell = {
fish.enable = true;
#nushell.enable = true;
oh-my-posh.enable = true;
};
console.yazi.enable = true;
stylix.targets.fzf.enable = false;
services.ssh-agent.enable = true;
services.pueue.enable = true;
syncthing.enable = true;
programs = {
bat.enable = true;
btop = {
enable = true;
settings.update_ms = 200;
};
eza.enable = true;
fd.enable = true;
fzf = {
enable = true;
defaultOptions = ["--color=16"];
};
pay-respects.enable = true;
nix-index.enable = true;
nix-index-database.comma.enable = true;
gitui.enable = true;
git = {
enable = true;
delta.enable = true;
signing.format = "ssh";
aliases = {
cl = "clone";
co = "checkout";
pom = "push origin main";
};
};
jujutsu.enable = true;
ripgrep.enable = true;
};
terminal = {
ghostty.enable = true;
kitty.enable = true;
};
editor = {
helix.enable = true;
# neve.enable = true;
zed.enable = true;
};
home.packages = with pkgs; [
alejandra # nix formatter in rust
flatpak # flatpak cli
trashy # trash cli in rust
devenv # programming deps in rust
procs # ps in rust
ouch # archive manager in runt
dust # du in rust
fend # calc in rust
moar # better pager (in go)
just # make in rust
rbw # bitwarden cli in rust
pinentry-qt # pinentry for rbw
vial # qmk keyboard configuring app
jj-fzf # fuzzy finder jujutsu tui
waycheck # check wayland protocols
pika-backup # borg gui in rust
virt-manager # libvirt gui
];
systemd.user.settings.Manager.DefaultEnvironment.PAGER = "moar";
}