Compare commits

...

19 commits

Author SHA1 Message Date
b24d6e0e9d REMOVE THIS ONE
Some checks failed
ci/woodpecker/push/check Pipeline failed
2025-09-04 11:41:49 +00:00
c082cea569 home: terminal: termite: add MIME associations 2025-09-04 11:41:49 +00:00
a3e3644c55 home: terminal: alacritty: add MIME associations 2025-09-04 11:41:49 +00:00
8f837d95a3 home: zathura: add MIME associations 2025-09-04 11:41:49 +00:00
981503a5f6 home: trgui: add MIME associations 2025-09-04 11:41:49 +00:00
f7c9d0a78b home: nvim: add MIME associations 2025-09-04 11:41:49 +00:00
5a2a60c791 home: mpv: add MIME associations 2025-09-04 11:41:49 +00:00
90bd56b59f home: himalaya: add MIME associations 2025-09-04 11:41:49 +00:00
1df29d4c47 home: firefox: add MIME associations 2025-09-04 11:41:49 +00:00
dc60a8219a home: feh: add MIME association 2025-09-04 11:41:48 +00:00
ba9e8abcb6 WIP: home: xdg: add 'mime-apps' 2025-09-04 11:41:48 +00:00
e6c95245b2 home: ssh: disable default config
All checks were successful
ci/woodpecker/push/check Pipeline was successful
It's been deprecated.

This also makes my `addKeysToAgent` configuration more explicit.
2025-09-04 11:37:17 +00:00
b9bc37d365 flake: bump inputs 2025-09-04 11:37:17 +00:00
3dd4f07609 hosts: nixos: aramis: home: drop 'jellyfin-media-player'
It's about to be made broken due to using QtWebEngine 5, which is EOL
and marked insecure in new nixpkgs.
2025-09-04 11:37:17 +00:00
3fa1664b5c home: delta: use stand-alone configuration file
Ideally, I'd like for `delta` to just read a configuration file at
`$XDG_CONFIG_HOME/delta/config` by default, but upstream seems somewhat
reticent to the idea :-/.

So instead, let's keep relying on `git` being enabled, but rather than
inlining the configuration, let's store it where I think it should
belong and include it into `gitconfig`.
2025-09-04 11:20:57 +00:00
1800cb9daa hosts: nixos: aramis: use 'trgui' module 2025-09-04 11:20:57 +00:00
31147abd91 home: add trgui 2025-09-04 11:20:57 +00:00
a889dfbb1a home: nix: fix renamed option 2025-09-04 11:20:57 +00:00
1a109b6b1f flake: bump inputs
And fix a renamed package.
2025-09-04 11:20:57 +00:00
18 changed files with 405 additions and 44 deletions

24
flake.lock generated
View file

@ -73,11 +73,11 @@
]
},
"locked": {
"lastModified": 1754487366,
"narHash": "sha256-pHYj8gUBapuUzKV/kN/tR3Zvqc7o6gdFB9XKXIp1SQ8=",
"lastModified": 1756770412,
"narHash": "sha256-+uWLQZccFHwqpGqr2Yt5VsW/PbeJVTn9Dk6SHWhNRPw=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "af66ad14b28a127c5c0f3bbb298218fc63528a18",
"rev": "4524271976b625a4a605beefd893f270620fd751",
"type": "github"
},
"original": {
@ -117,11 +117,11 @@
]
},
"locked": {
"lastModified": 1755446520,
"narHash": "sha256-I0Ok1OGDwc1jPd8cs2VvAYZsHriUVFGIUqW+7uSsOUM=",
"lastModified": 1755960406,
"narHash": "sha256-RF7j6C1TmSTK9tYWO6CdEMtg6XZaUKcvZwOCD2SICZs=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "4b04db83821b819bbbe32ed0a025b31e7971f22e",
"rev": "e891a93b193fcaf2fc8012d890dc7f0befe86ec2",
"type": "github"
},
"original": {
@ -159,11 +159,11 @@
]
},
"locked": {
"lastModified": 1755491080,
"narHash": "sha256-ib1Xi13NEalrFqQAHceRsb+6aIPANFuQq80SS/bY10M=",
"lastModified": 1756954499,
"narHash": "sha256-Pg4xBHzvzNY8l9x/rLWoJMnIR8ebG+xeU+IyqThIkqU=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "f8af2cbe386f9b96dd9efa57ab15a09377f38f4d",
"rev": "ed1a98c375450dfccf427adacd2bfd1a7b22eb25",
"type": "github"
},
"original": {
@ -175,11 +175,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1755186698,
"narHash": "sha256-wNO3+Ks2jZJ4nTHMuks+cxAiVBGNuEBXsT29Bz6HASo=",
"lastModified": 1756936398,
"narHash": "sha256-/o1TTpMIICpjrMHBilL9lYm/r69uhdK1L8j1pfY6tWU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "fbcf476f790d8a217c3eab4e12033dc4a0f6d23c",
"rev": "47f28ad9378956563df9a884fd1b209b64336ba3",
"type": "github"
},
"original": {

View file

@ -18,9 +18,7 @@
# Machine specific packages
packages.additionalPackages = with pkgs; [
element-desktop # Matrix client
jellyfin-media-player # Wraps the webui and mpv together
pavucontrol # Audio mixer GUI
trgui-ng # Transmission remote
];
# Minimal video player
mpv.enable = true;
@ -28,6 +26,8 @@
nm-applet.enable = true;
# Terminal
terminal.program = "alacritty";
# Transmission remote
trgui.enable = true;
# Zathura document viewer
zathura.enable = true;
};

View file

@ -38,6 +38,7 @@
./ssh
./terminal
./tmux
./trgui
./udiskie
./vim
./wget

View file

@ -1,6 +1,9 @@
{ config, pkgs, lib, ... }:
let
cfg = config.my.home.delta;
configFormat = pkgs.formats.gitIni { };
configPath = "${config.xdg.configHome}/delta/config";
in
{
options.my.home.delta = with lib; {
@ -34,35 +37,43 @@ in
home.packages = [ cfg.package ];
xdg.configFile."delta/config".source = configFormat.generate "delta-config" {
delta = {
features = "diff-highlight decorations";
# Less jarring style for `diff-highlight` emulation
diff-highlight = {
minus-style = "red";
minus-non-emph-style = "red";
minus-emph-style = "bold red 52";
plus-style = "green";
plus-non-emph-style = "green";
plus-emph-style = "bold green 22";
whitespace-error-style = "reverse red";
};
# Personal preference for easier reading
decorations = {
commit-style = "raw"; # Do not recolor meta information
keep-plus-minus-markers = true;
paging = "always";
};
};
};
programs.git = lib.mkIf cfg.git.enable {
delta = {
enable = true;
inherit (cfg) package;
options = {
features = "diff-highlight decorations";
# Less jarring style for `diff-highlight` emulation
diff-highlight = {
minus-style = "red";
minus-non-emph-style = "red";
minus-emph-style = "bold red 52";
plus-style = "green";
plus-non-emph-style = "green";
plus-emph-style = "bold green 22";
whitespace-error-style = "reverse red";
};
# Personal preference for easier reading
decorations = {
commit-style = "raw"; # Do not recolor meta information
keep-plus-minus-markers = true;
paging = "always";
};
};
};
includes = [
{
path = configPath;
}
];
};
};
}

View file

@ -10,4 +10,11 @@ in
config.programs.feh = lib.mkIf cfg.enable {
enable = true;
};
config.my.home.xdg.mime-apps = lib.mkIf cfg.enable {
applications.media.image = {
bitmap = [ "feh.desktop" ];
vector = [ "feh.desktop" ];
};
};
}

View file

@ -79,4 +79,8 @@ in
};
};
};
config.my.home.xdg.mime-apps = lib.mkIf cfg.enable {
applications.editor = [ "firefox.desktop" ];
};
}

View file

@ -20,4 +20,8 @@ in
'';
};
};
config.my.home.xdg.mime-apps = lib.mkIf cfg.enable {
applications.editor = [ "himalaya.desktop" ];
};
}

View file

@ -17,5 +17,12 @@ in
pkgs.mpvScripts.uosc # Nicer UI
];
};
my.home.xdg.mime-apps = {
applications.media = {
audio = [ "mpv.desktop" ];
video = [ "mpv.desktop" ];
};
};
};
}

View file

@ -69,7 +69,7 @@ in
automatic = true;
# Every week, with some wiggle room
frequency = "weekly";
dates = "weekly";
randomizedDelaySec = "10min";
# Use a persistent timer for e.g: laptops

View file

@ -17,6 +17,7 @@ in
{
programs.ssh = {
enable = true;
enableDefaultConfig = false;
includes = [
# Local configuration, not-versioned
@ -53,11 +54,12 @@ in
identityFile = "~/.ssh/shared_rsa";
user = "ambroisie";
};
};
extraConfig = ''
AddKeysToAgent yes
'';
# `*` is automatically made the last match block by the module
"*" = {
addKeysToAgent = "yes";
};
};
};
}

View file

@ -48,5 +48,9 @@ in
};
};
};
my.home.xdg.mime-apps = {
applications.terminal = [ "Alacritty.desktop" ];
};
};
}

View file

@ -49,5 +49,9 @@ in
color15 = ${whiteBold}
'';
};
my.home.xdg.mime-apps = {
applications.terminal = [ "termite.desktop" ];
};
};
}

View file

@ -0,0 +1,21 @@
{ config, lib, pkgs, ... }:
let
cfg = config.my.home.trgui;
in
{
options.my.home.trgui = with lib; {
enable = mkEnableOption "Transmission GUI onfiguration";
package = mkPackageOption pkgs "TrguiNG" { default = "trgui-ng"; };
};
config = lib.mkIf cfg.enable {
home.packages = with pkgs; [
cfg.package
];
my.home.xdg.mime-apps = {
applications.media.torrent = "TrguiNG.desktop";
};
};
}

View file

@ -104,4 +104,8 @@ in
};
config.xdg.configFile = lib.mkIf cfg.enable configFiles;
config.my.home.xdg.mime-apps = lib.mkIf cfg.enable {
applications.editor = [ "nvim.desktop" ];
};
}

View file

@ -3,6 +3,10 @@ let
cfg = config.my.home.xdg;
in
{
imports = [
./mime-apps.nix
];
options.my.home.xdg = with lib; {
enable = my.mkDisableOption "XDG configuration";
};

View file

@ -0,0 +1,280 @@
{ config, lib, ... }:
let
cfg = config.my.home.xdg.mime-apps;
app = cfg.applications;
strOrStrList = with lib.types; coercedTo str lib.singleton (listOf str);
mkMimeAppOption = kind: lib.mkOption {
description = "Application to associate as ${kind}";
default = null;
type = lib.types.nullOr strOrStrList;
};
in
{
options.my.home.xdg.mime-apps = with lib; {
enable = my.mkDisableOption "XDG MIME Applications configuration";
applications = lib.mapAttrsRecursive (_: mkMimeAppOption) {
archive = "archive manager";
browser = "internet browser";
calendar = "calendar";
editor = "text editor";
fileManager = "file manager";
mail = "mail client";
media = {
audio = "audio player";
document = {
comic = "comic book reader";
ebook = "ebook reader";
pdf = "PDF reader";
};
image = {
bitmap = "bitmap image viewer";
vector = "vector image viewer";
editor = "image editor";
};
video = "video player";
};
office = {
database = "database management program";
formula = "formula editor";
graphics = "graphics editor";
presentation = "presentation editor";
spreadsheet = "spreadsheet editor";
text = "word processor";
};
terminal = "terminal";
torrent = "bittorrent client";
};
};
config = lib.mkIf cfg.enable {
xdg = {
mimeApps = {
enable = true;
defaultApplications = lib.filterAttrs (_: apps: apps != null) {
"application/epub+zip" = app.media.document.ebook;
"application/gzip" = app.archive;
"application/json" = app.editor;
"application/ld+json" = app.editor;
"application/mxf " = app.media.video;
"application/ogg" = app.media.audio;
"application/pdf" = app.media.document.pdf;
"application/rss+xml" = app.editor;
"application/smil+xml " = app.media.video;
"application/vnd.amazon.ebook" = app.media.document.ebook;
"application/vnd.apple.mpegurl " = app.media.video;
"application/vnd.comicbook+zip" = app.media.document.comic;
"application/vnd.comicbook-rar" = app.media.document.comic;
"application/vnd.mozilla.xul+xml" = app.browser;
"application/vnd.ms-excel" = app.office.spreadsheet;
"application/vnd.ms-powerpoint" = app.office.presentation;
"application/vnd.ms-word" = app.office.text;
"application/vnd.oasis.opendocument.database" = app.office.database;
"application/vnd.oasis.opendocument.formula" = app.office.formula;
"application/vnd.oasis.opendocument.graphics" = app.office.graphics;
"application/vnd.oasis.opendocument.graphics-template" = app.office.graphics;
"application/vnd.oasis.opendocument.presentation" = app.office.presentation;
"application/vnd.oasis.opendocument.presentation-template" = app.office.presentation;
"application/vnd.oasis.opendocument.spreadsheet" = app.office.spreadsheet;
"application/vnd.oasis.opendocument.spreadsheet-template" = app.office.spreadsheet;
"application/vnd.oasis.opendocument.text" = app.office.text;
"application/vnd.oasis.opendocument.text-master" = app.office.text;
"application/vnd.oasis.opendocument.text-template" = app.office.text;
"application/vnd.oasis.opendocument.text-web" = app.office.text;
"application/vnd.openxmlformats-officedocument.presentationml.presentation" = app.office.presentation;
"application/vnd.openxmlformats-officedocument.presentationml.template" = app.office.presentation;
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" = app.office.spreadsheet;
"application/vnd.openxmlformats-officedocument.spreadsheetml.template" = app.office.spreadsheet;
"application/vnd.openxmlformats-officedocument.wordprocessingml.document" = app.office.text;
"application/vnd.openxmlformats-officedocument.wordprocessingml.template" = app.office.text;
"application/vnd.rar" = app.archive;
"application/vnd.stardivision.calc" = app.office.spreadsheet;
"application/vnd.stardivision.draw" = app.office.graphics;
"application/vnd.stardivision.impress" = app.office.presentation;
"application/vnd.stardivision.math" = app.office.formula;
"application/vnd.stardivision.writer" = app.office.text;
"application/vnd.sun.xml.base" = app.office.database;
"application/vnd.sun.xml.calc" = app.office.spreadsheet;
"application/vnd.sun.xml.calc.template" = app.office.spreadsheet;
"application/vnd.sun.xml.draw" = app.office.graphics;
"application/vnd.sun.xml.draw.template" = app.office.graphics;
"application/vnd.sun.xml.impress" = app.office.presentation;
"application/vnd.sun.xml.impress.template" = app.office.presentation;
"application/vnd.sun.xml.math" = app.office.formula;
"application/vnd.sun.xml.writer" = app.office.text;
"application/vnd.sun.xml.writer.global" = app.office.text;
"application/vnd.sun.xml.writer.template" = app.office.text;
"application/vnd.wordperfect" = app.office.text;
"application/x-7z-compressed" = app.archive;
"application/x-arj" = app.archive;
"application/x-bittorrent" = app.torrent;
"application/x-bzip" = app.archive;
"application/x-bzip-compressed-tar" = app.archive;
"application/x-bzip2" = app.archive;
"application/x-cb7" = app.media.document.comic;
"application/x-cbr" = app.media.document.comic;
"application/x-cbt" = app.media.document.comic;
"application/x-cbz" = app.media.document.comic;
"application/x-compress" = app.archive;
"application/x-compressed-tar" = app.archive;
"application/x-csh" = app.editor;
"application/x-cue" = app.media.audio;
"application/x-directory" = app.fileManager;
"application/x-extension-htm" = app.browser;
"application/x-extension-html" = app.browser;
"application/x-extension-ics" = app.calendar;
"application/x-extension-m4a" = app.media.audio;
"application/x-extension-mp4" = app.media.video;
"application/x-extension-shtml" = app.browser;
"application/x-extension-xht" = app.browser;
"application/x-extension-xhtml" = app.browser;
"application/x-fictionbook" = app.media.document.ebook;
"application/x-fictionbook+xml" = app.media.document.ebook;
"application/x-flac" = app.media.audio;
"application/x-gzip" = app.archive;
"application/x-lha" = app.archive;
"application/x-lhz" = app.archive;
"application/x-lzop" = app.archive;
"application/x-matroska" = app.media.video;
"application/x-netshow-channel" = app.media.video;
"application/x-quicktime-media-link" = app.media.video;
"application/x-quicktimeplayer" = app.media.video;
"application/x-rar" = app.archive;
"application/x-sh" = app.editor;
"application/x-shellscript" = app.editor;
"application/x-shorten " = app.media.audio;
"application/x-smil" = app.media.video;
"application/x-tar" = app.archive;
"application/x-tarz" = app.archive;
"application/x-wine-extension-ini" = app.editor;
"application/x-zip-compressed" = app.archive;
"application/x-zoo" = app.archive;
"application/xhtml+xml" = app.browser;
"application/xml" = app.editor;
"application/zip" = app.archive;
"audio/*" = app.media.video;
"image/*" = app.media.image.bitmap;
"image/svg+xml" = app.media.image.vector;
"image/x-compressed-xcf" = app.media.image.editor;
"image/x-fits" = app.media.image.editor;
"image/x-psd" = app.media.image.editor;
"image/x-xcf" = app.media.image.editor;
"inode/directory" = app.fileManager;
"message/rfc822" = app.mail;
"text/*" = app.editor;
"text/calendar" = app.calendar;
"text/html" = app.browser;
"text/plain" = app.editor;
"video/*" = app.media.video;
"x-scheme-handler/about" = app.browser;
"x-scheme-handler/chrome" = app.browser;
"x-scheme-handler/file" = app.fileManager;
"x-scheme-handler/ftp" = app.browser;
"x-scheme-handler/http" = app.browser;
"x-scheme-handler/https" = app.browser;
"x-scheme-handler/mailto" = app.mail;
"x-scheme-handler/mid" = app.mail;
"x-scheme-handler/terminal" = app.terminal;
"x-scheme-handler/unknown" = app.browser;
"x-scheme-handler/webcal" = app.calendar;
"x-scheme-handler/webcals" = app.calendar;
"x-www-browser" = app.browser;
# FIXME: relevant? https://bbs.archlinux.org/viewtopic.php?id=243125
# FIXME: shouldn't be necessary then
# "audio/AMR" = app.media.audio;
# "audio/aac" = app.media.audio;
# "audio/ac3" = app.media.audio;
# "audio/flac" = app.media.audio;
# "audio/mp2" = app.media.audio;
# "audio/mp4" = app.media.audio;
# "audio/mpeg" = app.media.audio;
# "audio/ogg" = app.media.audio;
# "audio/vnd.dts" = app.media.audio;
# "audio/vnd.dts.hd" = app.media.audio;
# "audio/vnd.rn-realaudio" = app.media.audio;
# "audio/webm" = app.media.audio;
# "audio/x-adpcm" = app.media.audio;
# "audio/x-aiff" = app.media.audio;
# "audio/x-ape" = app.media.audio;
# "audio/x-matroska" = app.media.audio;
# "audio/x-mpegurl" = app.media.audio;
# "audio/x-ms-asx" = app.media.audio;
# "audio/x-ms-wma" = app.media.audio;
# "audio/x-musepack" = app.media.audio;
# "audio/x-scpls" = app.media.audio;
# "audio/x-tta" = app.media.audio;
# "audio/x-vorbis+ogg" = app.media.audio;
# "audio/x-wav" = app.media.audio;
# "audio/x-wavpack" = app.media.audio;
# "image/bmp" = app.media.image.bitmap;
# "image/gif" = app.media.image.bitmap;
# "image/heif" = app.media.image.bitmap;
# "image/jpeg" = app.media.image.bitmap;
# "image/jpg" = app.media.image.bitmap;
# "image/pjpeg" = app.media.image.bitmap;
# "image/png" = app.media.image.bitmap;
# "image/tiff" = app.media.image.bitmap;
# "image/vnd.zbrush.pcx" = app.media.image.bitmap;
# "image/webp" = app.media.image.bitmap;
# "image/x-icb" = app.media.image.bitmap;
# "image/x-ico" = app.media.image.bitmap;
# "image/x-pcx" = app.media.image.bitmap;
# "image/x-portable-anymap" = app.media.image.bitmap;
# "image/x-portable-bitmap" = app.media.image.bitmap;
# "image/x-portable-graymap" = app.media.image.bitmap;
# "image/x-portable-pixmap" = app.media.image.bitmap;
# "image/x-tga" = app.media.image.bitmap;
# "image/x-xbitmap" = app.media.image.bitmap;
# "image/x-xpixmap" = app.media.image.bitmap;
# "image/x-xwindowdump" = app.media.image.bitmap;
# "text/tcl" = app.editor;
# "text/x-c++hdr" = app.editor;
# "text/x-c++src" = app.editor;
# "text/x-chdr" = app.editor;
# "text/x-csrc" = app.editor;
# "text/x-java" = app.editor;
# "text/x-makefile" = app.editor;
# "text/x-moc" = app.editor;
# "text/x-pascal" = app.editor;
# "text/x-tex" = app.editor;
# "video/3gpp" = app.media.video;
# "video/3gpp2" = app.media.video;
# "video/dv" = app.media.video;
# "video/mp2t" = app.media.video;
# "video/mp4" = app.media.video;
# "video/mpeg" = app.media.video;
# "video/ogg" = app.media.video;
# "video/quicktime" = app.media.video;
# "video/vnd.mpegurl" = app.media.video;
# "video/vnd.rn-realvideo" = app.media.video;
# "video/webm" = app.media.video;
# "video/x-flic" = app.media.video;
# "video/x-flv" = app.media.video;
# "video/x-matroska" = app.media.video;
# "video/x-ms-wmv" = app.media.video;
# "video/x-msvideo" = app.media.video;
# "video/x-ogm+ogg" = app.media.video;
# "video/x-theora+ogg" = app.media.video;
# FIXME: kind of weird formats, not quite adapted to attribute name
# "application/eps" = app.media.document.pdf
# "application/oxps" = app.media.document.pdf
# "application/postscript" = app.media.document.pdf
# "application/x-eps" = app.media.document.pdf
# "image/eps" = app.media.document.pdf
# "image/vnd.djvu" = app.media.document.pdf
# "image/vnd.djvu+multipage" = app.media.document.pdf
# "image/x-eps" = app.media.document.pdf
# FIXME: additionally interesting, but not necessary
# "x-scheme-handler/discord" = [ "discord.desktop" ];
# "x-scheme-handler/msteams" = [ "teams.desktop" ];
# "x-scheme-handler/slack" = [ "slack.desktop" ];
};
};
};
};
}

View file

@ -17,4 +17,12 @@ in
"statusbar-home-tilde" = true;
};
};
config.my.home.xdg.mime-apps = lib.mkIf cfg.enable {
applications.media.document = {
comic = [ "org.pwmt.zathura.desktop" ];
ebook = [ "org.pwmt.zathura.desktop" ];
pdf = [ "org.pwmt.zathura.desktop" ];
};
};
}

View file

@ -13,7 +13,7 @@ in
# Nice wallpaper
services.xserver.displayManager.lightdm.background =
let
wallpapers = "${pkgs.plasma5Packages.plasma-workspace-wallpapers}/share/wallpapers";
wallpapers = "${pkgs.kdePackages.plasma-workspace-wallpapers}/share/wallpapers";
in
"${wallpapers}/summer_1am/contents/images/2560x1600.jpg";