dotfiles/hm/desktop/default.nix

163 lines
4.7 KiB
Nix
Raw Normal View History

{ pkgs, config, lib, ... }:
2023-10-28 22:09:36 +02:00
{
2023-12-08 22:44:21 +01:00
imports = [
2024-01-12 23:52:53 +01:00
./audio
2024-01-15 14:50:02 +01:00
./autorandr
2024-01-15 19:26:44 +01:00
./background
./browser
2023-12-08 22:44:21 +01:00
./frobar
2024-01-07 23:29:16 +01:00
./i3.nix
2024-01-12 23:52:53 +01:00
./lock
./mpd
2024-01-15 18:54:19 +01:00
./presentation
2024-01-15 19:26:44 +01:00
./redness
2024-01-12 23:52:53 +01:00
./screenshots
2024-01-15 21:36:20 +01:00
./terminal
2023-12-08 22:44:21 +01:00
];
2023-11-22 14:05:48 +01:00
config = lib.mkIf config.frogeye.desktop.xorg {
xsession = {
enable = true;
2023-12-08 22:44:21 +01:00
# Not using config.xdg.configHome because it needs to be $HOME-relative paths and path manipulation is hard
scriptPath = ".config/xsession";
profilePath = ".config/xprofile";
2023-11-22 14:05:48 +01:00
windowManager = {
2024-01-07 23:29:16 +01:00
i3.enable = true;
2023-11-03 18:18:38 +01:00
};
2023-12-04 22:47:02 +01:00
numlock.enable = config.frogeye.desktop.numlock;
2023-11-05 21:32:31 +01:00
};
2023-10-29 00:49:22 +02:00
2023-11-22 14:05:48 +01:00
programs = {
# Terminal
2024-01-11 23:54:03 +01:00
bash.shellAliases = {
x = "startx ${config.home.homeDirectory}/${config.xsession.scriptPath}; logout";
lmms = "lmms --config ${config.xdg.configHome}/lmmsrc.xml";
};
2023-11-22 14:05:48 +01:00
rofi = {
# TODO This theme template, that was used for Arch, looks much better:
# https://gitlab.com/jordiorlando/base16-rofi/-/blob/master/templates/default.mustache
2023-11-22 14:05:48 +01:00
enable = true;
pass.enable = true;
extraConfig = {
lazy-grab = false;
matching = "regex";
};
2023-11-19 21:48:35 +01:00
};
2023-11-22 14:05:48 +01:00
mpv = {
enable = true;
config = {
audio-display = false;
save-position-on-quit = true;
2023-12-18 19:32:16 +01:00
osc = false; # Required by thumbnail script
2024-02-19 00:55:45 +01:00
# Hardware acceleration (from https://nixos.wiki/wiki/Accelerated_Video_Playback#MPV, vo=gpu already default)
2023-12-18 19:32:16 +01:00
hwdec = "auto-safe";
profile = "gpu-hq";
2023-11-22 14:05:48 +01:00
};
scripts = with pkgs.mpvScripts; [ thumbnail ];
scriptOpts = {
mpv_thumbnail_script = {
autogenerate = false; # TODO It creates too many processes at once, crashing the system
2023-11-22 14:05:48 +01:00
cache_directory = "/tmp/mpv_thumbs_${config.home.username}";
2023-12-18 19:32:16 +01:00
mpv_hwdec = "auto-safe";
2023-11-22 14:05:48 +01:00
};
2023-11-19 21:48:35 +01:00
};
};
};
2023-11-05 14:32:01 +01:00
2023-11-22 14:05:48 +01:00
xdg = {
userDirs = {
enable = true; # TODO Which ones do we want?
createDirectories = true;
# French, because then it there's a different initial for each, making navigation easier
desktop = null;
download = "${config.home.homeDirectory}/Téléchargements";
pictures = "${config.home.homeDirectory}/Images";
publicShare = null;
templates = null;
videos = "${config.home.homeDirectory}/Vidéos";
2023-11-19 22:41:09 +01:00
};
};
2023-11-22 14:05:48 +01:00
services = {
2023-12-16 17:07:44 +01:00
blueman-applet.enable = true;
2023-11-22 14:05:48 +01:00
unclutter.enable = true;
dunst =
{
enable = true;
settings =
# TODO Change dmenu for rofi, so we can use context
with config.lib.stylix.colors.withHashtag; {
global = {
separator_color = lib.mkForce base05;
idle_threshold = 120;
markup = "full";
max_icon_size = 48;
# TODO Those shortcuts don't seem to work, maybe try:
# > define shortcuts inside your window manager and bind them to dunstctl(1) commands
close_all = "ctrl+mod4+n";
close = "mod4+n";
context = "mod1+mod4+n";
history = "shift+mod4+n";
};
2023-11-05 15:52:09 +01:00
2023-11-22 14:05:48 +01:00
urgency_low = {
background = lib.mkForce base01;
foreground = lib.mkForce base03;
frame_color = lib.mkForce base05;
};
urgency_normal = {
background = lib.mkForce base02;
foreground = lib.mkForce base05;
frame_color = lib.mkForce base05;
};
urgency_critical = {
background = lib.mkForce base08;
foreground = lib.mkForce base06;
frame_color = lib.mkForce base05;
};
2023-11-05 15:52:09 +01:00
};
2023-11-22 14:05:48 +01:00
};
2023-11-19 21:28:42 +01:00
};
2023-10-28 22:09:36 +02:00
2023-11-22 14:05:48 +01:00
home = {
2023-12-25 11:04:01 +01:00
file = {
2024-01-05 18:41:10 +01:00
".face" = {
# TODO Only works on pindakaas? See https://wiki.archlinux.org/title/LightDM#Changing_your_avatar
2023-12-25 11:04:01 +01:00
source = pkgs.runCommand "face.png" { } "${pkgs.inkscape}/bin/inkscape ${./face.svg} -w 1024 -o $out";
};
};
2023-11-22 14:05:48 +01:00
packages = with pkgs; [
# remote
tigervnc
2023-10-28 22:09:36 +02:00
2023-11-22 14:05:48 +01:00
# multimedia common
gimp
inkscape
libreoffice
2023-10-28 22:09:36 +02:00
2023-11-22 14:05:48 +01:00
# data management
freefilesync
2023-10-28 22:09:36 +02:00
# misc
2023-11-22 14:05:48 +01:00
gnome.gedit
2024-01-20 19:04:06 +01:00
xfce.thunar
nomacs
2023-11-22 14:05:48 +01:00
feh
zbar
evince
2023-11-22 14:05:48 +01:00
zathura
meld
python3Packages.magic
2023-10-28 22:09:36 +02:00
2023-11-22 14:05:48 +01:00
# x11-exclusive
simplescreenrecorder
trayer
xclip
keynav
xorg.xinit
];
sessionVariables = {
2024-01-11 23:54:03 +01:00
# XAUTHORITY = "${config.xdg.configHome}/Xauthority"; # Disabled as this causes lock-ups with DMs
2023-11-22 14:05:48 +01:00
};
2023-11-19 21:28:42 +01:00
};
2023-11-05 21:32:31 +01:00
};
2023-10-28 22:09:36 +02:00
}