2024-08-20 22:58:24 +02:00
|
|
|
{
|
|
|
|
|
config,
|
|
|
|
|
lib,
|
|
|
|
|
pkgs,
|
|
|
|
|
...
|
|
|
|
|
}:
|
2023-03-21 10:37:27 +01:00
|
|
|
|
2024-03-01 17:11:19 +01:00
|
|
|
let
|
|
|
|
|
wallpaper = pkgs.fetchurl {
|
2025-09-09 13:41:05 +02:00
|
|
|
url = "https://raw.githubusercontent.com/AngelJumbo/gruvbox-wallpapers/main/wallpapers/photography/houseonthesideofalake.jpg";
|
2024-03-01 17:11:19 +01:00
|
|
|
sha256 = "sha256-obKI4qZvucogqRCl51lwV9X8SRaMqcbBwWMfc9TupIo=";
|
|
|
|
|
};
|
2024-07-12 00:11:55 +02:00
|
|
|
in
|
|
|
|
|
{
|
2024-06-23 02:36:51 +02:00
|
|
|
|
|
|
|
|
options.modules.desktop = {
|
2024-07-12 04:12:20 +02:00
|
|
|
wallpaper = lib.mkOption {
|
|
|
|
|
type = lib.types.path;
|
2024-06-23 02:36:51 +02:00
|
|
|
default = wallpaper;
|
|
|
|
|
};
|
2025-11-03 13:39:50 +01:00
|
|
|
|
|
|
|
|
defaultBrowser = lib.mkOption {
|
|
|
|
|
type = lib.types.str;
|
|
|
|
|
default = "firefox";
|
|
|
|
|
};
|
2024-06-23 02:36:51 +02:00
|
|
|
};
|
|
|
|
|
|
2024-07-12 04:12:20 +02:00
|
|
|
config = lib.mkIf config.modules.desktop.wm.enable {
|
2023-03-21 10:37:27 +01:00
|
|
|
|
|
|
|
|
fonts = {
|
2025-12-04 18:14:38 +01:00
|
|
|
enableDefaultPackages = true;
|
2024-10-13 22:52:21 +02:00
|
|
|
packages = with pkgs; [
|
2025-11-13 22:27:05 +01:00
|
|
|
noto-fonts-color-emoji
|
2024-07-03 05:42:05 +02:00
|
|
|
meslo-lg
|
2024-12-16 21:00:23 +01:00
|
|
|
pkgs.nerd-fonts.meslo-lg
|
|
|
|
|
pkgs.nerd-fonts.symbols-only
|
2023-03-21 10:37:27 +01:00
|
|
|
];
|
2024-08-20 22:58:24 +02:00
|
|
|
fontconfig.defaultFonts = {
|
|
|
|
|
monospace = [ "MesloLGS Nerd Font Mono" ];
|
|
|
|
|
};
|
2023-03-21 10:37:27 +01:00
|
|
|
};
|
|
|
|
|
|
2024-12-16 21:00:23 +01:00
|
|
|
security.pam.loginLimits = [
|
|
|
|
|
{
|
|
|
|
|
domain = "*";
|
|
|
|
|
item = "nofile";
|
|
|
|
|
type = "-";
|
|
|
|
|
value = "65536";
|
|
|
|
|
}
|
|
|
|
|
];
|
|
|
|
|
|
2023-03-21 14:42:39 +01:00
|
|
|
programs.adb.enable = true;
|
2023-03-21 10:37:27 +01:00
|
|
|
|
2023-03-21 14:42:39 +01:00
|
|
|
programs.ssh.startAgent = true;
|
|
|
|
|
|
|
|
|
|
services.udisks2.enable = true;
|
|
|
|
|
|
|
|
|
|
home-manager.users.${config.user.name} = {
|
2023-03-21 10:37:27 +01:00
|
|
|
|
|
|
|
|
services = {
|
|
|
|
|
nextcloud-client.enable = true;
|
|
|
|
|
udiskie.enable = true;
|
|
|
|
|
gpg-agent = {
|
|
|
|
|
enable = true;
|
|
|
|
|
enableSshSupport = false;
|
2025-05-29 02:21:12 +02:00
|
|
|
pinentry.package = pkgs.pinentry-gtk2;
|
2023-03-21 10:37:27 +01:00
|
|
|
};
|
|
|
|
|
unclutter.enable = true;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
programs = {
|
|
|
|
|
gpg.enable = true;
|
|
|
|
|
git = {
|
|
|
|
|
enable = true;
|
|
|
|
|
signing = {
|
|
|
|
|
key = lib.mkDefault "3AC6F170F01133CE393BCD94BE948AFD7E7873BE";
|
|
|
|
|
signByDefault = true;
|
|
|
|
|
};
|
2025-11-13 22:27:05 +01:00
|
|
|
settings = {
|
|
|
|
|
user.name = "Paul-Henri Froidmont";
|
|
|
|
|
user.email = "git.contact-57n2p@froidmont.org";
|
2024-08-20 22:58:24 +02:00
|
|
|
init.defaultBranch = "master";
|
|
|
|
|
};
|
2023-03-21 10:37:27 +01:00
|
|
|
};
|
|
|
|
|
ssh = {
|
|
|
|
|
enable = true;
|
2025-10-03 17:03:13 +02:00
|
|
|
enableDefaultConfig = false;
|
|
|
|
|
matchBlocks."*" = {
|
|
|
|
|
forwardAgent = false;
|
|
|
|
|
addKeysToAgent = "no";
|
|
|
|
|
compression = false;
|
|
|
|
|
serverAliveInterval = 0;
|
|
|
|
|
serverAliveCountMax = 3;
|
|
|
|
|
hashKnownHosts = false;
|
|
|
|
|
userKnownHostsFile = "~/.ssh/known_hosts";
|
|
|
|
|
controlMaster = "no";
|
|
|
|
|
controlPath = "~/.ssh/master-%r@%n:%p";
|
|
|
|
|
controlPersist = "no";
|
|
|
|
|
};
|
2023-03-21 10:37:27 +01:00
|
|
|
extraConfig = ''
|
|
|
|
|
# Force IPv4 otherwise git will try to use IPv6 which doesn't play well through a VPN
|
|
|
|
|
AddressFamily inet
|
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
bat.enable = true;
|
|
|
|
|
jq.enable = true;
|
|
|
|
|
fzf.enable = true;
|
|
|
|
|
lesspipe.enable = true;
|
|
|
|
|
zathura.enable = true;
|
|
|
|
|
pazi.enable = true;
|
|
|
|
|
|
|
|
|
|
broot = {
|
|
|
|
|
enable = true;
|
|
|
|
|
enableZshIntegration = true;
|
|
|
|
|
};
|
|
|
|
|
command-not-found.enable = true;
|
|
|
|
|
direnv = {
|
|
|
|
|
enable = true;
|
|
|
|
|
enableZshIntegration = true;
|
|
|
|
|
nix-direnv.enable = true;
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
2023-06-02 03:40:31 +02:00
|
|
|
xdg.desktopEntries = {
|
|
|
|
|
ocr = {
|
2023-06-05 01:41:57 +02:00
|
|
|
name = "OCR image";
|
2023-06-02 03:40:31 +02:00
|
|
|
exec = "${pkgs.writeScript "ocr" ''
|
2024-06-23 02:36:51 +02:00
|
|
|
${pkgs.grim}/bin/grim -g "$(${pkgs.slurp}/bin/slurp)" - | \
|
|
|
|
|
${pkgs.tesseract}/bin/tesseract stdin stdout -l eng+fre | \
|
|
|
|
|
${pkgs.wl-clipboard}/bin/wl-copy
|
2023-06-02 03:40:31 +02:00
|
|
|
''}";
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
2024-02-24 10:56:34 +01:00
|
|
|
xdg.mimeApps = {
|
|
|
|
|
enable = true;
|
|
|
|
|
defaultApplications = {
|
2024-02-24 12:27:26 +01:00
|
|
|
"inode/directory" = "joshuto.desktop";
|
2024-02-24 10:56:34 +01:00
|
|
|
|
2025-11-03 13:39:50 +01:00
|
|
|
"text/html" = "${config.modules.desktop.defaultBrowser}.desktop";
|
|
|
|
|
"x-scheme-handler/http" = "${config.modules.desktop.defaultBrowser}.desktop";
|
|
|
|
|
"x-scheme-handler/https" = "${config.modules.desktop.defaultBrowser}.desktop";
|
|
|
|
|
"x-scheme-handler/about" = "${config.modules.desktop.defaultBrowser}.desktop";
|
2024-02-24 10:56:34 +01:00
|
|
|
|
2024-07-03 23:44:06 +02:00
|
|
|
"image/png" = "swayimg.desktop";
|
|
|
|
|
"image/webp" = "swayimg.desktop";
|
|
|
|
|
"image/jpeg" = "swayimg.desktop";
|
2024-02-24 12:27:26 +01:00
|
|
|
"image/gif" = "mpv.desktop";
|
2024-07-03 23:44:06 +02:00
|
|
|
"image/*" = "swayimg.desktop";
|
2024-02-24 10:56:34 +01:00
|
|
|
"audio/*" = "mpv.desktop";
|
|
|
|
|
"video/*" = "mpv.desktop";
|
|
|
|
|
|
|
|
|
|
"application/zip" = "ark.desktop";
|
|
|
|
|
"application/rar" = "ark.desktop";
|
|
|
|
|
"application/7z" = "ark.desktop";
|
|
|
|
|
"application/*tar" = "ark.desktop";
|
2024-02-24 12:27:26 +01:00
|
|
|
"application/pdf" = "org.pwmt.zathura-pdf-mupdf.desktop";
|
2024-02-24 10:56:34 +01:00
|
|
|
|
|
|
|
|
"application/msword" = "onlyoffice-desktopeditors.desktop";
|
2025-03-18 05:07:51 +01:00
|
|
|
"application/vnd.openxmlformats-officedocument.presentationml.presentation" =
|
|
|
|
|
"onlyoffice-desktopeditors.desktop";
|
2024-08-20 22:58:24 +02:00
|
|
|
"application/vnd.openxmlformats-officedocument*" = "onlyoffice-desktopeditors.desktop";
|
2024-02-24 10:56:34 +01:00
|
|
|
|
|
|
|
|
"text/*" = "nvim.desktop";
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
2023-03-21 10:37:27 +01:00
|
|
|
home = {
|
|
|
|
|
|
|
|
|
|
keyboard = {
|
|
|
|
|
layout = "fr";
|
|
|
|
|
options = [ "caps:escape" ];
|
|
|
|
|
};
|
|
|
|
|
|
2025-08-07 15:30:59 +02:00
|
|
|
sessionVariables = {
|
|
|
|
|
EDITOR = "vim";
|
|
|
|
|
NIXOS_OZONE_WL = 1;
|
|
|
|
|
};
|
2023-03-30 01:30:54 +02:00
|
|
|
|
2024-08-20 22:58:24 +02:00
|
|
|
packages =
|
2024-10-13 22:52:21 +02:00
|
|
|
(with pkgs; [
|
2024-08-20 22:58:24 +02:00
|
|
|
brave
|
|
|
|
|
ungoogled-chromium
|
|
|
|
|
mullvad-browser
|
|
|
|
|
keepassxc
|
|
|
|
|
krita
|
|
|
|
|
swayimg
|
|
|
|
|
mpv
|
|
|
|
|
mumble
|
|
|
|
|
libreoffice-fresh
|
2025-10-08 17:20:54 +02:00
|
|
|
signal-desktop
|
2025-11-13 22:27:05 +01:00
|
|
|
onlyoffice-desktopeditors
|
2024-08-20 22:58:24 +02:00
|
|
|
thunderbird
|
|
|
|
|
portfolio
|
|
|
|
|
gnucash
|
|
|
|
|
transmission-remote-gtk
|
|
|
|
|
|
|
|
|
|
scala-cli
|
2025-08-26 18:50:48 +02:00
|
|
|
beamMinimal27Packages.elixir
|
2024-08-20 22:58:24 +02:00
|
|
|
jdk
|
|
|
|
|
jetbrains.idea-community
|
2025-10-30 18:44:59 +01:00
|
|
|
jetbrains.idea-ultimate
|
2024-08-20 22:58:24 +02:00
|
|
|
httpie
|
|
|
|
|
|
|
|
|
|
zsh-syntax-highlighting
|
|
|
|
|
R
|
|
|
|
|
tldr
|
2025-03-18 05:07:51 +01:00
|
|
|
kdePackages.ark
|
2025-10-02 20:06:02 +02:00
|
|
|
perf
|
2025-07-15 12:05:04 +02:00
|
|
|
keymapp
|
2025-11-13 11:44:24 +01:00
|
|
|
presenterm
|
2025-10-02 17:58:42 +02:00
|
|
|
|
|
|
|
|
ledger-live-desktop
|
2025-11-13 11:44:24 +01:00
|
|
|
monero-gui
|
2024-08-20 22:58:24 +02:00
|
|
|
])
|
|
|
|
|
++ [ pkgs.jellyfin-mpv-shim ];
|
2023-03-21 10:37:27 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
};
|
2025-07-15 12:05:04 +02:00
|
|
|
hardware.keyboard.zsa.enable = true;
|
2025-10-02 17:58:42 +02:00
|
|
|
hardware.ledger.enable = true;
|
2023-03-21 10:37:27 +01:00
|
|
|
};
|
|
|
|
|
}
|