2023-03-27 09:28:51 +02:00
|
|
|
{ inputs, config, options, lib, pkgs, ... }:
|
2023-03-21 10:37:27 +01:00
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
with lib.my;
|
|
|
|
|
let cfg = config.modules.desktop;
|
|
|
|
|
in {
|
|
|
|
|
config = mkIf config.services.xserver.enable {
|
|
|
|
|
|
|
|
|
|
fonts = {
|
2024-02-09 15:15:20 +01:00
|
|
|
packages = with pkgs.unstable; [
|
2023-03-21 10:37:27 +01:00
|
|
|
corefonts # Microsoft free fonts
|
2023-09-29 02:42:46 +02:00
|
|
|
(nerdfonts.override { fonts = [ "Meslo" "NerdFontsSymbolsOnly" ]; })
|
2023-03-21 10:37:27 +01:00
|
|
|
];
|
2023-03-21 23:02:30 +01:00
|
|
|
fontconfig.defaultFonts = { monospace = [ "MesloLGS Nerd Font Mono" ]; };
|
2023-03-21 10:37:27 +01:00
|
|
|
};
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
xsession = {
|
|
|
|
|
enable = true;
|
|
|
|
|
initExtra = ''
|
2023-03-27 09:28:51 +02:00
|
|
|
${pkgs.feh}/bin/feh --bg-fill ${./wallpaper.png}
|
2023-03-21 10:37:27 +01:00
|
|
|
keepassxc &
|
|
|
|
|
'';
|
|
|
|
|
numlock.enable = true;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
services = {
|
|
|
|
|
nextcloud-client.enable = true;
|
|
|
|
|
udiskie.enable = true;
|
|
|
|
|
gpg-agent = {
|
|
|
|
|
enable = true;
|
|
|
|
|
enableSshSupport = false;
|
|
|
|
|
pinentryFlavor = "gtk2";
|
|
|
|
|
};
|
|
|
|
|
unclutter.enable = true;
|
|
|
|
|
screen-locker = {
|
|
|
|
|
enable = false;
|
|
|
|
|
inactiveInterval = 5;
|
2023-03-21 14:42:39 +01:00
|
|
|
lockCmd =
|
2023-03-27 09:28:51 +02:00
|
|
|
"${pkgs.i3lock}/bin/i3lock -e -f -c 000000 -i ${./wallpaper.png}";
|
2023-03-21 10:37:27 +01:00
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
programs = {
|
|
|
|
|
gpg.enable = true;
|
|
|
|
|
git = {
|
|
|
|
|
enable = true;
|
|
|
|
|
userName = "Paul-Henri Froidmont";
|
|
|
|
|
userEmail = "git.contact-57n2p@froidmont.org";
|
|
|
|
|
signing = {
|
|
|
|
|
key = lib.mkDefault "3AC6F170F01133CE393BCD94BE948AFD7E7873BE";
|
|
|
|
|
signByDefault = true;
|
|
|
|
|
};
|
2023-03-21 14:42:39 +01:00
|
|
|
extraConfig = { init.defaultBranch = "master"; };
|
2023-03-21 10:37:27 +01:00
|
|
|
};
|
|
|
|
|
ssh = {
|
|
|
|
|
enable = true;
|
|
|
|
|
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;
|
|
|
|
|
};
|
2024-02-24 12:27:26 +01:00
|
|
|
joshuto = {
|
|
|
|
|
enable = true;
|
|
|
|
|
settings = {
|
|
|
|
|
xdg_open = true;
|
|
|
|
|
xdg_open_fork = true;
|
2024-02-25 17:52:10 +01:00
|
|
|
display = { show_icons = true; };
|
2024-02-24 12:27:26 +01:00
|
|
|
preview.preview_script = ./files/joshuo_preview_file.sh;
|
2023-03-27 09:28:51 +02:00
|
|
|
};
|
|
|
|
|
};
|
2023-03-21 10:37:27 +01:00
|
|
|
};
|
|
|
|
|
|
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" ''
|
|
|
|
|
${pkgs.xfce.xfce4-screenshooter}/bin/xfce4-screenshooter -r --save /dev/stdout | \
|
2023-06-05 01:41:57 +02:00
|
|
|
${pkgs.tesseract}/bin/tesseract -l eng+fre - - | \
|
2023-06-02 03:40:31 +02:00
|
|
|
${pkgs.xclip}/bin/xclip -sel clip
|
|
|
|
|
''}";
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
"text/html" = "firefox.desktop";
|
|
|
|
|
"x-scheme-handler/http" = "firefox.desktop";
|
|
|
|
|
"x-scheme-handler/https" = "firefox.desktop";
|
|
|
|
|
"x-scheme-handler/about" = "firefox.desktop";
|
|
|
|
|
|
2024-02-24 12:27:26 +01:00
|
|
|
"image/png" = "feh.desktop";
|
|
|
|
|
"image/webp" = "feh.desktop";
|
|
|
|
|
"image/jpeg" = "feh.desktop";
|
|
|
|
|
"image/gif" = "mpv.desktop";
|
2024-02-24 10:56:34 +01:00
|
|
|
"image/*" = "feh.desktop";
|
|
|
|
|
"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";
|
|
|
|
|
"application/vnd.openxmlformats-officedocument.presentationml.presentation" =
|
|
|
|
|
"onlyoffice-desktopeditors.desktop";
|
|
|
|
|
"application/vnd.openxmlformats-officedocument*" =
|
|
|
|
|
"onlyoffice-desktopeditors.desktop";
|
|
|
|
|
|
|
|
|
|
"text/*" = "nvim.desktop";
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
2023-03-21 10:37:27 +01:00
|
|
|
home = {
|
|
|
|
|
|
|
|
|
|
keyboard = {
|
|
|
|
|
layout = "fr";
|
|
|
|
|
options = [ "caps:escape" ];
|
|
|
|
|
};
|
|
|
|
|
|
2023-03-27 09:28:51 +02:00
|
|
|
file = { ".wallpaper.png".source = ./wallpaper.png; };
|
2023-03-21 10:37:27 +01:00
|
|
|
|
2023-03-30 01:30:54 +02:00
|
|
|
sessionVariables.EDITOR = "vim";
|
|
|
|
|
|
2023-03-21 10:37:27 +01:00
|
|
|
packages = with pkgs.unstable; [
|
|
|
|
|
xorg.xinit
|
|
|
|
|
xorg.xwininfo
|
|
|
|
|
xorg.xkill
|
|
|
|
|
|
2024-02-24 12:27:26 +01:00
|
|
|
# Joshuto preview utils
|
|
|
|
|
file
|
|
|
|
|
catdoc
|
|
|
|
|
pandoc
|
|
|
|
|
mu
|
|
|
|
|
djvulibre
|
|
|
|
|
exiftool
|
|
|
|
|
mediainfo
|
|
|
|
|
atool
|
|
|
|
|
gnutar
|
|
|
|
|
poppler_utils
|
|
|
|
|
libtransmission
|
2023-03-21 10:37:27 +01:00
|
|
|
w3m
|
|
|
|
|
|
|
|
|
|
brave
|
|
|
|
|
keepassxc
|
|
|
|
|
krita
|
|
|
|
|
element-desktop
|
|
|
|
|
mpv
|
|
|
|
|
jellyfin-mpv-shim
|
|
|
|
|
mumble
|
|
|
|
|
libreoffice-fresh
|
|
|
|
|
onlyoffice-bin
|
|
|
|
|
thunderbird
|
|
|
|
|
portfolio
|
2024-02-26 11:25:04 +01:00
|
|
|
gnucash
|
2023-03-21 10:37:27 +01:00
|
|
|
transmission-remote-gtk
|
|
|
|
|
monero-gui
|
|
|
|
|
|
2023-12-13 03:54:31 +01:00
|
|
|
scala-cli
|
2023-03-21 10:37:27 +01:00
|
|
|
jdk
|
|
|
|
|
jetbrains.idea-community
|
|
|
|
|
httpie
|
|
|
|
|
|
|
|
|
|
zsh-syntax-highlighting
|
|
|
|
|
R
|
|
|
|
|
tldr
|
|
|
|
|
thefuck
|
2024-02-24 10:56:34 +01:00
|
|
|
ark
|
2023-03-21 10:37:27 +01:00
|
|
|
linuxPackages.perf
|
|
|
|
|
];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
systemd.user.services.activitywatch = {
|
|
|
|
|
Unit.Description = "Start ActivityWatch";
|
|
|
|
|
Service.Type = "simple";
|
|
|
|
|
Service.ExecStart = "${pkgs.unstable.activitywatch-bin}/bin/aw-server";
|
|
|
|
|
Install.WantedBy = [ "default.target" ];
|
|
|
|
|
Service.Restart = "on-failure";
|
|
|
|
|
Service.RestartSec = 5;
|
|
|
|
|
};
|
|
|
|
|
systemd.user.services.activitywatch-afk = {
|
|
|
|
|
Unit.Description = "Start ActivityWatch AFK";
|
|
|
|
|
Service.Type = "simple";
|
2023-03-21 14:42:39 +01:00
|
|
|
Service.ExecStart =
|
|
|
|
|
"${pkgs.unstable.activitywatch-bin}/bin/aw-watcher-afk";
|
2023-03-21 10:37:27 +01:00
|
|
|
Install.WantedBy = [ "default.target" ];
|
|
|
|
|
Service.Restart = "on-failure";
|
|
|
|
|
Service.RestartSec = 5;
|
|
|
|
|
};
|
|
|
|
|
systemd.user.services.activitywatch-window = {
|
|
|
|
|
Unit.Description = "Start ActivityWatch Window";
|
|
|
|
|
Service.Type = "simple";
|
2023-03-21 14:42:39 +01:00
|
|
|
Service.ExecStart =
|
|
|
|
|
"${pkgs.unstable.activitywatch-bin}/bin/aw-watcher-window";
|
2023-03-21 10:37:27 +01:00
|
|
|
Install.WantedBy = [ "default.target" ];
|
|
|
|
|
Service.Restart = "on-failure";
|
|
|
|
|
Service.RestartSec = 5;
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
}
|