home: split programs/services into their own modules

This commit is contained in:
Oystein Kristoffer Tveit 2024-11-19 10:42:23 +01:00
parent b8bd8612bb
commit 4e1eb31336
Signed by: oysteikt
GPG Key ID: 9F2F7D8250F35146
16 changed files with 97 additions and 47 deletions

View File

@ -10,25 +10,34 @@ in {
./programs/aria2.nix ./programs/aria2.nix
./programs/atuin.nix ./programs/atuin.nix
./programs/bash.nix
./programs/bat.nix
./programs/beets.nix ./programs/beets.nix
./programs/bottom.nix
./programs/comma.nix ./programs/comma.nix
./programs/direnv ./programs/direnv
./programs/eza.nix
./programs/fzf.nix
./programs/gdb.nix ./programs/gdb.nix
./programs/gh.nix
./programs/gh-dash.nix ./programs/gh-dash.nix
./programs/gh.nix
./programs/git ./programs/git
./programs/gpg ./programs/gpg
./programs/home-manager.nix
./programs/jq.nix ./programs/jq.nix
./programs/less.nix ./programs/less.nix
./programs/man.nix
./programs/neovim ./programs/neovim
./programs/nix-index ./programs/nix-index
./programs/pandoc.nix ./programs/pandoc.nix
./programs/ripgrep.nix ./programs/ripgrep.nix
./programs/ssh ./programs/ssh
./programs/tealdeer ./programs/tealdeer
./programs/texlive.nix
./programs/thunderbird.nix ./programs/thunderbird.nix
./programs/tmux ./programs/tmux
./programs/yt-dlp.nix ./programs/yt-dlp.nix
./programs/zoxide.nix
./programs/zsh ./programs/zsh
./services/nix-channel-update.nix ./services/nix-channel-update.nix
@ -42,9 +51,12 @@ in {
./programs/alacritty.nix ./programs/alacritty.nix
./programs/emacs ./programs/emacs
./programs/feh.nix
./programs/firefox.nix ./programs/firefox.nix
./programs/mpv.nix
./programs/ncmpcpp.nix ./programs/ncmpcpp.nix
./programs/newsboat ./programs/newsboat
./programs/obs-studio.nix
./programs/qutebrowser.nix ./programs/qutebrowser.nix
./programs/rofi.nix ./programs/rofi.nix
./programs/taskwarrior.nix ./programs/taskwarrior.nix
@ -57,8 +69,10 @@ in {
./services/copyq.nix ./services/copyq.nix
./services/dunst.nix ./services/dunst.nix
./services/fcitx5.nix ./services/fcitx5.nix
./services/gnome-keyring.nix
./services/keybase.nix ./services/keybase.nix
./services/mpd.nix ./services/mpd.nix
./services/network-manager.nix
./services/picom.nix ./services/picom.nix
./services/polybar.nix ./services/polybar.nix
./services/screen-locker.nix ./services/screen-locker.nix
@ -137,51 +151,6 @@ in {
fonts.fontconfig.enable = mkForce true; fonts.fontconfig.enable = mkForce true;
programs = {
home-manager.enable = true;
bash = {
enable = true;
historyFile = "${config.xdg.dataHome}/bash_history";
historySize = 100000;
bashrcExtra = ''
source "${config.xdg.configHome}/mutable_env.sh"
'';
};
bat.enable = true;
bottom = {
enable = true;
settings.flags.enable_gpu = true;
};
eza.enable = true;
feh.enable = mkIf graphics true;
fzf = {
enable = true;
defaultCommand = "fd --type f";
};
man = {
enable = true;
generateCaches = true;
};
mpv.enable = mkIf graphics true;
obs-studio.enable = mkIf graphics true;
ssh = {
enable = true;
includes = [ "mutable_config" ];
};
texlive = {
enable = true;
# packageSet = pkgs.texlive.combined.scheme-medium;
};
zoxide.enable = true;
};
services = {
gnome-keyring.enable = mkIf graphics true;
network-manager-applet.enable = mkIf graphics true;
};
manual = { manual = {
html.enable = true; html.enable = true;
manpages.enable = true; manpages.enable = true;

11
home/programs/bash.nix Normal file
View File

@ -0,0 +1,11 @@
{ config, ... }:
{
programs.bash = {
enable = true;
historyFile = "${config.xdg.dataHome}/bash_history";
historySize = 100000;
bashrcExtra = ''
source "${config.xdg.configHome}/mutable_env.sh"
'';
};
}

4
home/programs/bat.nix Normal file
View File

@ -0,0 +1,4 @@
{ ... }:
{
programs.bat.enable = true;
}

7
home/programs/bottom.nix Normal file
View File

@ -0,0 +1,7 @@
{ ... }:
{
programs.bottom = {
enable = true;
settings.flags.enable_gpu = true;
};
}

4
home/programs/eza.nix Normal file
View File

@ -0,0 +1,4 @@
{ ... }:
{
programs.eza.enable = true;
}

4
home/programs/feh.nix Normal file
View File

@ -0,0 +1,4 @@
{ machineVars, ... }:
{
programs.feh.enable = !machineVars.headless;
}

7
home/programs/fzf.nix Normal file
View File

@ -0,0 +1,7 @@
{ ... }:
{
programs.fzf = {
enable = true;
defaultCommand = "fd --type f";
};
}

View File

@ -0,0 +1,4 @@
{ ... }:
{
programs.home-manager.enable = true;
}

7
home/programs/man.nix Normal file
View File

@ -0,0 +1,7 @@
{ ... }:
{
programs.man = {
enable = true;
generateCaches = true;
};
}

4
home/programs/mpv.nix Normal file
View File

@ -0,0 +1,4 @@
{ machineVars, ... }:
{
programs.mpv.enable = !machineVars.headless;
}

View File

@ -0,0 +1,4 @@
{ machineVars, ... }:
{
programs.obs-studio.enable = !machineVars.headless;
}

View File

@ -10,5 +10,11 @@
mode = "0444"; mode = "0444";
}; };
programs.ssh.includes = [ config.sops.secrets."ssh/secret-config".path ]; programs.ssh = {
enable = true;
includes = [
config.sops.secrets."ssh/secret-config".path
"mutable_config"
];
};
} }

View File

@ -0,0 +1,7 @@
{ ... }:
{
programs.texlive = {
enable = true;
# packageSet = pkgs.texlive.combined.scheme-medium;
};
}

4
home/programs/zoxide.nix Normal file
View File

@ -0,0 +1,4 @@
{ ... }:
{
programs.zoxide.enable = true;
}

View File

@ -0,0 +1,4 @@
{ machineVars, ... }:
{
services.gnome-keyring.enable = !machineVars.headless;
}

View File

@ -0,0 +1,4 @@
{ machineVars, ... }:
{
services.network-manager-applet.enable = !machineVars.headless;
}