home: move a bunch of settings to defaultDesktopPack and baseline

also rename `apps` namespace to `programs`
This commit is contained in:
Fabian Montero 2025-09-15 02:51:04 -06:00
parent 9f38ea87a6
commit d94b776ed9
19 changed files with 86 additions and 142 deletions

View file

@ -2,6 +2,7 @@
config,
lib,
pkgs,
flakes,
...
}:
with lib; let
@ -11,6 +12,18 @@ in {
enable = mkEnableOption "Basic home settings";
};
config = mkIf cfg.enable {
programs.home-manager.enable = true;
nix.registry = {
"system".to = {
type = "path";
path = "/home/fabian/nix";
};
"nixpkgs".flake = flakes.nixpkgs;
"unstable".flake = flakes.unstable;
};
xdg = {
enable = true;
};
@ -18,6 +31,9 @@ in {
home = {
stateVersion = "24.05"; # DO NOT CHANGE
username = "fabian";
homeDirectory = "/home/fabian";
packages = with pkgs; [
calc
dysk
@ -29,6 +45,7 @@ in {
killall
man-pages
man-pages-posix
nmap
pv
ripgrep
tree
@ -53,5 +70,14 @@ in {
userEmail = "fabian@posixlycorrect.com";
userName = "Fabian Montero";
};
local = {
services = {
zsh.enable = true;
};
programs = {
neovim.enable = true;
};
};
};
}

View file

@ -1,17 +0,0 @@
{
config,
lib,
pkgs,
...
}:
with lib; let
cfg = config.local.services.deepState;
in {
options.local.services.deepState.enable = mkEnableOption "trivionomicon settings";
config = mkIf cfg.enable {
home.sessionVariables = {
FSOCIETY_TELEGRAM_BACKUP_N = "0";
FSOCIETY_TELEGRAM_BACKUP_LOCATION = "/extern/var/fsociety_backup";
};
};
}

View file

@ -17,7 +17,6 @@
./defaultDesktopPack.nix
./accounts.nix
./syncthing.nix
./deepState.nix
./mapping.nix
./zed.nix
./pass.nix

View file

@ -5,16 +5,23 @@
...
}:
with lib; let
cfg = config.local.apps.defaultDesktopPack;
cfg = config.local.defaultDesktopPack;
in {
options.local.apps.defaultDesktopPack = {
enable = mkEnableOption "common desktop apps";
options.local.defaultDesktopPack = {
enable = mkEnableOption "common desktop programs and services";
};
config = mkIf cfg.enable {
home.packages = with pkgs; [
calibre
chromium
discord
(gajim.override {
enableSecrets = true;
enableUPnP = true;
enableAppIndicator = true;
enableE2E = true;
enableRST = true;
})
libreoffice-fresh
mpv
obs-studio
@ -22,13 +29,30 @@ in {
pdfarranger
qimgv
qpdfview
qbittorrent
runelite
spotify
tdesktop
thunderbird
usbutils
vpsfree-client
vscodium-fhs
zola
];
local = {
services = {
gpg.enable = true;
accounts.enable = true;
pass.enable = true;
syncthing.enable = true;
};
programs = {
firefox.enable = true;
zed.enable = true;
halloy.enable = true;
terminal.enable = true;
};
};
};
}

View file

@ -5,10 +5,10 @@
...
}:
with lib; let
cfg = config.local.apps.firefox;
cfg = config.local.programs.firefox;
in {
options.local.apps.firefox = {
enable = mkEnableOption "firefox settings";
options.local.programs.firefox = {
enable = mkEnableOption "firefox";
};
config = mkIf cfg.enable {

View file

@ -5,9 +5,9 @@
...
}:
with lib; let
cfg = config.local.apps.gaming;
cfg = config.local.programs.gaming;
in {
options.local.apps.gaming = {
options.local.programs.gaming = {
enable = mkEnableOption "gaming apps";
};
config = mkIf cfg.enable {

View file

@ -5,9 +5,9 @@
...
}:
with lib; let
cfg = config.local.apps.halloy;
cfg = config.local.programs.halloy;
in {
options.local.apps.halloy = {
options.local.programs.halloy = {
enable = mkEnableOption "halloy irc client";
};
config = mkIf cfg.enable {

View file

@ -5,9 +5,9 @@
...
}:
with lib; let
cfg = config.local.apps.mapping;
cfg = config.local.programs.mapping;
in {
options.local.apps.mapping = {
options.local.programs.mapping = {
enable = mkEnableOption "mapping apps";
};
config = mkIf cfg.enable {

View file

@ -5,9 +5,9 @@
...
}:
with lib; let
cfg = config.local.apps.neovim;
cfg = config.local.programs.neovim;
in {
options.local.apps.neovim = {
options.local.programs.neovim = {
enable = mkEnableOption "Neovim settings";
};
config = mkIf cfg.enable {

View file

@ -5,9 +5,11 @@
...
}:
with lib; let
cfg = config.local.apps.terminal;
cfg = config.local.programs.terminal;
in {
options.local.apps.terminal.enable = mkEnableOption "terminal emulator settings";
options.local.programs.terminal = {
enable = mkEnableOption "terminal emulator settings";
};
config = mkIf cfg.enable {
programs = {
foot = {

View file

@ -5,9 +5,9 @@
...
}:
with lib; let
cfg = config.local.apps.yubikey;
cfg = config.local.services.yubikey;
in {
options.local.apps.yubikey = {
options.local.services.yubikey = {
enable = mkEnableOption "Yubikey home settings";
};
config = mkIf cfg.enable {

View file

@ -5,9 +5,11 @@
...
}:
with lib; let
cfg = config.local.apps.zed;
cfg = config.local.programs.zed;
in {
options.local.apps.zed.enable = mkEnableOption "zed editor settings";
options.local.programs.zed = {
enable = mkEnableOption "zed editor settings";
};
config = mkIf cfg.enable {
programs.zed-editor = {
enable = true;

View file

@ -13,6 +13,7 @@ in {
type = types.str;
description = "prompt for your terminal";
example = literalExpression "%B[%~] \${vcs_info_msg_0_}%b";
default = "%B[%~] \${vcs_info_msg_0_}%b";
};
};
config = mkIf cfg.enable {

View file

@ -127,6 +127,6 @@
export VISUAL=nvim
export PATH="$PATH:$HOME/.local/bin:$HOME/.cargo/bin"
export NIXPKGS_ALLOW_UNFREE=1
eval "$(fzf --zsh)"
''

View file

@ -10,45 +10,18 @@
./isolation.nix
];
nix.registry = {
"system".to = {
type = "path";
path = "/home/fabian/nix";
};
"nixpkgs".flake = flakes.nixpkgs;
"unstable".flake = flakes.unstable;
};
local = {
baseline.enable = true;
defaultDesktopPack.enable = true;
services = {
zsh = {
enable = true;
prompt = "%B[%~] \${vcs_info_msg_0_}%b";
};
accounts.enable = true;
deepState.enable = true;
gpg = {
enable = true;
defaultKey = "A8981D346F8F4130CA16A7775517E687FCCE0BB9";
};
syncthing.enable = true;
pass.enable = true;
gpg.defaultKey = "A8981D346F8F4130CA16A7775517E687FCCE0BB9";
yubikey.enable = true;
};
apps = {
#todo move some of this to defaultDesktop pack?
terminal.enable = true;
neovim.enable = true;
programs = {
gaming.enable = true;
yubikey.enable = true;
defaultDesktopPack.enable = true;
firefox.enable = true;
mapping.enable = true;
zed.enable = true;
halloy.enable = true;
};
gui = {
@ -72,24 +45,9 @@
home = {
packages = with pkgs; [
darktable
(gajim.override {
enableSecrets = true;
enableUPnP = true;
enableAppIndicator = true;
enableE2E = true;
enableRST = true;
})
gnucash
kdePackages.kdenlive
nmap
qbittorrent
thunderbird
virt-manager
];
username = "fabian";
homeDirectory = "/home/fabian";
};
programs.home-manager.enable = true;
}

View file

@ -10,43 +10,18 @@
./isolation.nix
];
nix.registry = {
"system".to = {
type = "path";
path = "/home/fabian/nix";
};
"nixpkgs".flake = flakes.nixpkgs;
"unstable".flake = flakes.unstable;
};
local = {
baseline.enable = true;
defaultDesktopPack.enable = true;
services = {
zsh = {
enable = true;
prompt = "%B[%~] \${vcs_info_msg_0_}%b";
};
accounts.enable = true;
deepState.enable = true;
gpg = {
enable = true;
defaultKey = "7206D8EE2474F3DF18EA876F0EC1691FF8C1A81F";
};
pass.enable = true;
gpg.defaultKey = "7206D8EE2474F3DF18EA876F0EC1691FF8C1A81F";
yubikey.enable = true;
};
apps = {
terminal.enable = true;
neovim.enable = true;
programs = {
gaming.enable = true;
yubikey.enable = true;
defaultDesktopPack.enable = true;
firefox.enable = true;
mapping.enable = true;
zed.enable = true;
halloy.enable = true;
};
gui = {
@ -64,10 +39,5 @@
home = {
packages = with pkgs; [
];
username = "fabian";
homeDirectory = "/home/fabian";
};
programs.home-manager.enable = true;
}

View file

@ -9,36 +9,16 @@ with lib; {
imports = [
];
nix.registry = {
"system".to = {
type = "path";
path = "/home/fabian/nix";
};
"nixpkgs".flake = flakes.nixpkgs;
"unstable".flake = flakes.unstable;
};
local = {
baseline.enable = true;
services = {
zsh = {
enable = true;
prompt = "%B<%~> \${vcs_info_msg_0_}%b";
};
};
apps = {
neovim.enable = true;
zsh.prompt = "%B<%~> \${vcs_info_msg_0_}%b";
};
};
home = {
packages = with pkgs; [
];
username = "fabian";
homeDirectory = "/home/fabian";
};
}