chore: refactor user modules

This commit is contained in:
2025-07-27 22:50:25 +02:00
parent af1a606c1a
commit d200079cdb
94 changed files with 832 additions and 665 deletions

View File

@@ -1,8 +0,0 @@
{
imports = [./light-home.nix];
home.phundrak.sshKey = {
content = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHTv1lb6d99O84jeh6GdjPm8Gnt/HncSRhGhmoTq7BMK lucien@phundrak.com";
file = "/home/phundrak/.ssh/id_ed25519.pub";
};
modules.nh.flake = "/home/phundrak/.dotfiles";
}

View File

@@ -7,7 +7,7 @@
Sent from GNU/Emacs
*** Sauvez un arbre, mangez un castor ***
*** Save a tree, eat a beaver ***
*** Save a tree, eat a beaver ***
'';
in {
home.file.".signature" = {

View File

@@ -1,7 +0,0 @@
{
imports = [./home.nix];
home.phundrak.sshKey = {
content = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBPhP4p9KGk6jSOxJzBu+RzJPHI6baT0o+xrgPeNRwfq lucien@phundrak.com";
file = "/home/phundrak/.ssh/id_ed25519.pub";
};
}

View File

@@ -1,7 +1,6 @@
{
pkgs,
config,
inputs,
...
}: {
imports = [
@@ -18,10 +17,9 @@
epkgs.pdf-tools
]
));
askpass = import ../scripts/askpass.nix {inherit pkgs;};
launchWithEmacsclient = import ../scripts/launch-with-emacsclient.nix {
inherit pkgs;
emacsPackage = emacsPkg;
askpass = import ../modules/cli/scripts/askpass.nix {inherit pkgs;};
launchWithEmacsclient = import ../modules/cli/scripts/launch-with-emacsclient.nix {
inherit pkgs config;
};
in {
sops.secrets = {
@@ -30,83 +28,21 @@
"mopidy/spotify" = {};
};
home.sessionVariables = {
EDITOR = "${emacsPkg}/bin/emacsclient -c -a ${emacsPkg}/bin/emacs";
LAUNCH_EDITOR = "${launchWithEmacsclient}/bin/launch-with-emacsclient";
SUDO_ASKPASS = "${askpass}/bin/askpass";
LSP_USE_PLISTS = "true";
};
home = {
sessionVariables = {
EDITOR = "${emacsPkg}/bin/emacsclient -c -a ${emacsPkg}/bin/emacs";
LAUNCH_EDITOR = "${launchWithEmacsclient}/bin/launch-with-emacsclient";
SUDO_ASKPASS = "${askpass}/bin/askpass";
LSP_USE_PLISTS = "true";
};
modules = {
shell = {
eatIntegration = true;
starship.jjIntegration = true;
};
bat.extras = true;
packages.emacsPackage = emacsPkg;
mopidy.enable = true;
ollama.enable = true;
emacs = {
desktop.waybar.style = ./config/waybar/style.css;
dev.ollama = {
enable = true;
service = true;
package = emacsPkg;
mu4eMime = true;
org-protocol = true;
gpu = "amd";
};
hyprland = {
inherit emacsPkg;
enable = true;
swaync = true;
waybar = {
enable = true;
battery = true;
style = ./config/waybar/style.css;
};
};
mbsync = {
enable = true;
passwordFile = config.sops.secrets.emailPassword.path;
};
ssh = {
enable = true;
hosts = config.sops.secrets."ssh/hosts".path;
};
vcs.git = {
browser = "${inputs.zen-browser.packages.${pkgs.system}.default}/bin/zen";
emacs = {
integration = true;
pkg = emacsPkg;
};
cliff = true;
sendmail = {
enable = true;
passwordFile = config.sops.secrets.emailPassword.path;
};
};
};
programs = {
zsh.enableVteIntegration = true;
mu.enable = true;
obs-studio = {
enable = true;
plugins = with pkgs; [
obs-studio-plugins.input-overlay
obs-studio-plugins.obs-backgroundremoval
obs-studio-plugins.obs-mute-filter
obs-studio-plugins.obs-pipewire-audio-capture
obs-studio-plugins.obs-source-clone
obs-studio-plugins.obs-source-record
obs-studio-plugins.obs-tuna
];
};
};
services = {
blanket.enable = true;
mpris-proxy.enable = true;
playerctld.enable = true;
fullDesktop = true;
shell.fish.enable = true;
};
manual.html.enable = true;

View File

@@ -0,0 +1,10 @@
{config, ...}: {
imports = [../light-home.nix];
home = {
cli.nh.flake = "${config.home.homeDirectory}/nixos";
phundrak.sshKey = {
content = builtins.readFile ../../../keys/id_alys.pub;
# file = "${config.home.homeDirectory}/.ssh/id_ed25519.pub";
};
};
}

View File

@@ -0,0 +1,11 @@
{config, ...}: {
imports = [../home.nix];
home = {
cli.nh.flake = "${config.home.homeDirectory}/nixos";
desktop.hyprland.host = "gampo";
phundrak.sshKey = {
content = builtins.readFile ../../../keys/id_gampo.pub;
# file = "${config.home.homeDirectory}/.ssh/id_ed25519.pub";
};
};
}

View File

@@ -0,0 +1,11 @@
{config, ...}: {
imports = [../home.nix];
home = {
cli.nh.flake = "${config.home.homeDirectory}/nixos";
desktop.hyprland.host = "marpa";
phundrak.sshKey = {
content = builtins.readFile ../../../keys/id_marpa.pub;
# file = "${config.home.homeDirectory}/.ssh/id_ed25519.pub";
};
};
}

View File

@@ -0,0 +1,10 @@
{config, ...}: {
imports = [../light-home.nix];
home = {
cli.nh.flake = "${config.home.homeDirectory}/nixos";
phundrak.sshKey = {
content = builtins.readFile ../../../keys/id_tilo.pub;
# file = "${config.home.homeDirectory}/.ssh/id_ed25519.pub";
};
};
}

View File

@@ -33,11 +33,10 @@ in {
age = {
# automatically import user SSH keys as age keys
sshKeyPaths = [
"/home/phundrak/.ssh/id_ed25519"
"${config.home.homeDirectory}/.ssh/id_ed25519"
];
# this will use an age key that is expected to already be in the filesystem
# keyFile = "/home/phundrak/.config/sops/age/keys.txt";
keyFile = "/home/phundrak/.local/sops-nix/key.txt";
keyFile = "${config.home.homeDirectory}/.local/sops-nix/key.txt";
# generate a new key if the key specified above does not exist
generateKey = true;
};
@@ -47,23 +46,35 @@ in {
username = "phundrak";
homeDirectory = "/home/phundrak";
packages = [pkgs.tree pkgs.ncdu];
stateVersion = "24.11"; # Please read the comment before changing.
};
modules = {
shell = {
starship.enable = true;
tmux.enable = true;
};
vcs = {
git.enable = true;
phundrak.sshKey.file = "${config.home.homeDirectory}/.ssh/id_ed25519.pub";
dev.vcs = {
jj.enable = true;
git.enable = true;
publicKey = cfg.sshKey;
};
ssh = {
security.ssh = {
enable = true;
hosts = config.sops.secrets."ssh/hosts".path;
};
shell = {
bash.enable = true;
zsh.enable = true;
starship = {
enable = true;
jjIntegration = true;
};
tmux.enable = true;
zoxide = {
enable = true;
replaceCd = true;
};
};
stateVersion = "24.11"; # Do not modify!
};
manual.manpages.enable = true;

View File

@@ -1,7 +0,0 @@
{
imports = [./home.nix];
home.phundrak.sshKey = {
content = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBPhP4p9KGk6jSOxJzBu+RzJPHI6baT0o+xrgPeNRwfq lucien@phundrak.com";
file = "/home/phundrak/.ssh/id_ed25519.pub";
};
}

View File

@@ -2,109 +2,90 @@
pkgs,
inputs,
lib,
config,
...
}:
with lib; let
cfg = config.modules.packages;
in {
options.modules.packages.emacsPackage = mkOption {
type = types.package;
default = pkgs.emacs;
};
config.home.packages = with pkgs; let
scripts = import ../scripts {
inherit pkgs;
config.emacsPkg = cfg.emacsPackage;
};
in
[
flatpak
with lib; {
home.packages = with pkgs; [
# Terminal stuff
duf
ffmpeg
ripgrep-all
unzip
# LSP servers
bash-language-server
docker-language-server
kdePackages.qtdeclarative # For QML LSP
nil # Nix
python3 # for Emacs and LSP
yaml-language-server # Yaml (Docker, GitHub Actions, ...)
# Fonts
#nerdfonts
noto-fonts-cjk-sans
noto-fonts-cjk-serif
tibetan-machine
# Terminal stuff
duf
ffmpeg
ripgrep-all
unzip
# Browsers
amfora
# Fonts
#nerdfonts
noto-fonts-cjk-sans
noto-fonts-cjk-serif
tibetan-machine
# Media
ani-cli
audacity
plexamp
plex-desktop
spicetify-cli
spotify
pavucontrol # Volume control
# Browsers
amfora
# Social
vesktop # Discord alternative that works well with wayland
element-desktop
signal-desktop-bin
# Media
ani-cli
audacity
plexamp
plex-desktop
spicetify-cli
spotify
pavucontrol # Volume control
# Misc
bitwarden
gplates
libnotify
nextcloud-client
onlyoffice-bin
scrcpy
syncthing
watchmate
inputs.zen-browser.packages.${system}.default
inputs.pumo-system-info.packages.${system}.default
inputs.quickshell.packages.${system}.default
# Social
vesktop # Discord alternative that works well with wayland
element-desktop
signal-desktop-bin
# Games
atlauncher
heroic
modrinth-app
openmw
openttd-jgrpp
moonlight-qt
# Misc
bitwarden
gplates
libnotify
nextcloud-client
onlyoffice-bin
scrcpy
syncthing
watchmate
inputs.zen-browser.packages.${system}.default
inputs.pumo-system-info.packages.${system}.default
inputs.quickshell.packages.${system}.default
# Gnome stuff
gnome-tweaks
gnomeExtensions.docker
gnomeExtensions.syncthing-indicator
gnomeExtensions.tray-icons-reloaded
gthumb
# Games
atlauncher
heroic
modrinth-app
openmw
openttd-jgrpp
moonlight-qt
# Graphics
inkscape
gimp
gimpPlugins.fourier
gimpPlugins.farbfeld
# Emacs stuff
emacs-all-the-icons-fonts
# Dev
devenv
dive # A tool for exploring each layer in a docker image
grype # Vulnerability scanner for container images and filesystems
kicad # Working on my custom keyboard
podman-desktop
podman-compose
tectonic # better LaTeX engine
virt-manager
zeal
# Gnome stuff
gnome-tweaks
gnomeExtensions.docker
gnomeExtensions.syncthing-indicator
gnomeExtensions.tray-icons-reloaded
gthumb
# Graphics
inkscape
gimp
gimpPlugins.fourier
gimpPlugins.farbfeld
# Dev
devenv
dive # A tool for exploring each layer in a docker image
grype # Vulnerability scanner for container images and filesystems
kicad # Working on my custom keyboard
podman-desktop
podman-compose
tectonic # better LaTeX engine
virt-manager
zeal
]
++ scripts;
## LSP servers
bash-language-server
docker-language-server
kdePackages.qtdeclarative # For QML LSP
nil # Nix
python3 # for Emacs and LSP
yaml-language-server # Yaml (Docker, GitHub Actions, ...)
];
}

View File

@@ -1,12 +0,0 @@
{
modules = {
emacs.enable = true;
kdeconnect.enable = true;
kitty.enable = true;
mbsync.enable = true;
mpd.enable = true;
mpv.enable = true;
wofi.enable = true;
yt-dlp.enable = true;
};
}

View File

@@ -1,8 +0,0 @@
{
imports = [./light-home.nix];
home.phundrak.sshKey = {
content = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILw9oiK8tZ5Vpz82RaRLpITU8qeJrT2hjvudGEDQu2QW lucien@phundrak.com";
file = "/home/phundrak/.ssh/id_ed25519.pub";
};
modules.nh.flake = "/tank/phundrak/nixos";
}