config/modules/profiles/desktop/default.nix

447 lines
11 KiB
Nix
Raw Normal View History

2023-09-14 21:52:10 +03:00
{
pkgs,
2024-02-04 16:18:47 +02:00
config,
2023-09-14 21:52:10 +03:00
...
2024-02-04 16:18:47 +02:00
}: let
2024-03-04 14:53:50 +02:00
username = config.mj.username;
2024-03-06 09:05:22 +02:00
firefox =
if (pkgs.stdenv.hostPlatform.system == "x86_64-linux")
then pkgs.firefox-bin
else pkgs.firefox;
2024-02-04 16:18:47 +02:00
in {
2023-09-14 21:52:10 +03:00
config = {
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
};
2023-09-14 21:52:10 +03:00
2023-11-27 18:17:27 +02:00
programs = {
2024-01-27 16:34:01 +02:00
firefox = {
enable = true;
2024-03-06 09:05:22 +02:00
package = firefox;
2024-01-27 16:34:01 +02:00
};
2024-03-06 12:05:49 +02:00
wireshark = {
enable = true;
package = pkgs.wireshark-qt;
};
2023-11-27 18:17:27 +02:00
};
2023-09-14 21:52:10 +03:00
2024-05-21 08:40:40 +03:00
mj.base.users.user.extraGroups = ["adbusers" "networkmanager" "wireshark" "podman"];
2023-09-14 21:52:10 +03:00
services = {
fwupd.enable = true;
2023-11-27 12:07:19 +02:00
blueman.enable = true;
udev.packages = [pkgs.yubikey-personalization];
2023-09-21 05:58:09 +03:00
acpid.enable = true;
2023-09-15 13:27:12 +03:00
pcscd.enable = true;
2024-04-15 10:26:24 +03:00
gnome.gnome-keyring.enable = true;
openssh.settings.X11Forwarding = true;
logind = {
powerKey = "suspend";
powerKeyLongPress = "poweroff";
};
2023-10-04 21:13:31 +03:00
printing = {
enable = true;
2024-02-24 19:50:41 +02:00
drivers = [
pkgs.samsung-unified-linux-driver_4_01_17
(pkgs.writeTextDir "share/cups/model/HP_Color_Laser_15x_Series.ppd"
(builtins.readFile ../../../shared/HP_Color_Laser_15x_Series.ppd))
];
2023-10-04 21:13:31 +03:00
};
2024-02-24 21:13:31 +02:00
2024-02-24 21:14:03 +02:00
avahi = {
2024-02-24 21:13:31 +02:00
enable = true;
nssmdns4 = true;
2024-02-24 21:13:31 +02:00
openFirewall = true;
};
2023-09-14 21:52:10 +03:00
xserver = {
enable = true;
xkb = {
layout = "us,lt";
options = "grp:alt_shift_toggle";
};
2023-09-15 22:04:03 +03:00
2023-09-18 14:58:40 +03:00
desktopManager.xfce.enable = true;
windowManager.awesome.enable = true;
displayManager.lightdm.enable = true;
};
2023-09-18 14:58:40 +03:00
displayManager = {
defaultSession = "none+awesome";
autoLogin = {
enable = true;
user = username;
2023-09-15 22:04:03 +03:00
};
2023-09-14 21:58:06 +03:00
};
pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
2023-09-14 21:52:10 +03:00
};
2024-04-15 10:26:24 +03:00
tlp = {
enable = true;
settings = {
PLATFORM_PROFILE_ON_AC = "performance";
PLATFORM_PROFILE_ON_BAT = "balanced";
};
};
2023-09-17 06:46:34 +03:00
};
programs = {
2023-09-21 06:06:10 +03:00
adb.enable = true;
slock.enable = true;
2023-09-17 06:46:34 +03:00
nm-applet.enable = true;
2023-09-21 06:06:10 +03:00
command-not-found.enable = false;
2023-09-14 21:52:10 +03:00
};
2023-09-21 06:34:38 +03:00
virtualisation.podman = {
enable = true;
extraPackages = [pkgs.zfs];
};
2023-09-14 21:58:06 +03:00
security.rtkit.enable = true;
2023-09-14 21:52:10 +03:00
networking.networkmanager.enable = true;
2023-09-14 21:58:06 +03:00
2023-11-04 21:41:55 +02:00
# wip put clight-gui to nixpkgs
#services.geoclue2 = {
# enable = true;
# enableWifi = true;
#};
#location.provider = "geoclue2";
2023-12-26 21:53:40 +02:00
documentation = {
dev.enable = true;
2023-12-26 21:56:28 +02:00
doc.enable = true;
info.enable = true;
2023-12-26 21:53:40 +02:00
man = {
2023-12-26 21:56:28 +02:00
enable = true;
2023-12-26 21:53:40 +02:00
man-db.enable = false;
mandoc.enable = true;
};
};
2024-03-06 09:05:22 +02:00
environment.systemPackages = with pkgs;
lib.mkMerge [
[
# packages defined here
nicer
tmuxbash
2024-02-05 09:19:16 +02:00
2024-03-06 09:05:22 +02:00
iw
vlc
acpi
gimp
josm
xclip
pdftk
putty
2024-05-16 18:15:29 +03:00
tracy
2024-03-06 09:05:22 +02:00
x11vnc
yt-dlp
2024-05-10 15:35:27 +03:00
skopeo
2024-03-06 09:05:22 +02:00
ffmpeg
tinycc
scrcpy
arandr
pandoc
evince
2024-05-08 23:18:58 +03:00
okular
2024-03-06 09:05:22 +02:00
gparted
scribus
gnumake
libwebp
librsvg
neomutt
picocom
2024-03-13 14:07:16 +02:00
inferno
2024-03-06 09:05:22 +02:00
inkscape
chromium
hunspell
tigervnc
rtorrent
bsdgames
xss-lock
2024-03-25 09:23:46 +02:00
musl.dev
2024-03-06 09:05:22 +02:00
qpwgraph # for pipewire
audacity
2024-04-17 12:03:45 +03:00
graphviz
2024-03-06 09:05:22 +02:00
powertop
gpicview
imapsync
qgis-ltr # qgis gets recompiled, qgis-ltr is cached by hydra
2024-03-06 09:05:22 +02:00
trayscale
man-pages
rox-filer
distrobox
miniupnpc
evolution
shellcheck
borgbackup
efibootmgr
virtualenv
python3Full
libva-utils # intel video tests
pavucontrol
poppler_utils
rkdeveloptool
squashfsTools
2024-04-08 17:57:19 +03:00
nixpkgs-review
2024-03-06 09:05:22 +02:00
aspellDicts.en
aspellDicts.lt
libreoffice-qt
graphicsmagick
signal-desktop
element-desktop
netsurf-browser
man-pages-posix
hunspellDicts.en_US
python3Packages.ipython
samsung-unified-linux-driver
2023-09-15 13:01:20 +03:00
2024-03-06 09:05:22 +02:00
lld
llvm
llvm-manpages
clang-manpages
gcc_latest
2024-05-03 13:38:57 +03:00
clang-tools
2023-09-30 05:44:16 +03:00
2024-03-06 09:05:22 +02:00
gnome.cheese
gnome.nautilus
gnome.gnome-calculator
gnome.gnome-calendar
2023-09-15 13:01:20 +03:00
2024-03-06 09:05:22 +02:00
xorg.xev
xorg.xeyes
xorg.lndir
2024-04-17 16:11:48 +03:00
xorg.xinit
2023-09-18 15:06:10 +03:00
2024-03-06 09:05:22 +02:00
(texlive.combine {
inherit
(texlive)
scheme-medium
dvisvgm
dvipng
wrapfig
amsmath
ulem
hyperref
capt-of
lithuanian
hyphen-lithuanian
;
})
]
(lib.mkIf (pkgs.stdenv.hostPlatform.system == "x86_64-linux") [
i7z
nvtopPackages.amd
nvtopPackages.intel
2024-03-06 09:05:22 +02:00
joplin-desktop
intel-gpu-tools
2024-02-04 18:11:23 +02:00
2024-03-06 09:05:22 +02:00
winetricks
wineWowPackages.full
])
2024-05-31 09:31:54 +03:00
[pkgs.undocker]
2024-03-06 09:05:22 +02:00
];
2023-09-15 14:39:04 +03:00
2023-10-16 18:55:51 +03:00
# https://discourse.nixos.org/t/nixos-rebuild-switch-upgrade-networkmanager-wait-online-service-failure/30746
systemd.services.NetworkManager-wait-online.enable = false;
2024-03-04 14:53:50 +02:00
home-manager.users.${username} = {
2023-10-09 05:47:36 +03:00
pkgs,
config,
...
}: {
imports = [./plasma.nix];
2023-09-17 07:39:00 +03:00
xdg.configFile."awesome/rc.lua".source = ./rc.lua;
2023-09-22 10:35:25 +03:00
2024-04-29 17:37:40 +03:00
programs = {
mbsync.enable = true;
2024-04-29 23:49:24 +03:00
neomutt.enable = true;
2024-04-29 23:51:11 +03:00
notmuch.enable = true;
2024-04-29 17:37:40 +03:00
tmux.extraConfig = let
cmd = "${pkgs.extract_url}/bin/extract_url";
cfg = pkgs.writeText "urlviewrc" "COMMAND systemd-run --user --collect xdg-open %s";
in ''
bind-key u capture-pane -J \; \
save-buffer /tmp/tmux-buffer \; \
delete-buffer \; \
split-window -l 10 "${cmd} -c ${cfg} /tmp/tmux-buffer"
'';
};
2024-03-10 12:46:58 +02:00
home.file.".cache/evolution/.stignore".text = "*.db";
accounts.email = {
maildirBasePath = "Maildir";
accounts.mj = {
primary = true;
userName = "motiejus@jakstys.lt";
address = "motiejus@jakstys.lt";
realName = "Motiejus Jakštys";
2024-04-29 17:37:40 +03:00
passwordCommand = "cat /home/${username}/.email-creds";
2024-03-10 12:46:58 +02:00
imap.host = "imap.migadu.com";
smtp.host = "smtp.migadu.com";
mbsync = {
enable = true;
create = "maildir";
};
msmtp.enable = true;
2024-04-29 23:54:07 +03:00
notmuch = {
enable = true;
neomutt.enable = true;
};
2024-03-10 12:46:58 +02:00
neomutt = {
enable = true;
extraConfig = ''
set index_format="%4C %Z %{%F %H:%M} %-15.15L (%?l?%4l&%4c?) %s"
2024-04-30 00:04:34 +03:00
set mailcap_path = ${
2024-04-30 08:04:13 +03:00
pkgs.writeText "mailcaprc" ''
text/html; ${pkgs.elinks}/bin/elinks -dump ; copiousoutput;
application/*; ${pkgs.xdg-utils}/bin/xdg-open %s &> /dev/null &;
image/*; ${pkgs.xdg-utils}/bin/xdg-open %s &> /dev/null &;
''
2024-04-30 00:04:34 +03:00
}
2024-03-10 12:46:58 +02:00
auto_view text/html
unset record
set send_charset="utf-8"
macro attach 'V' "<pipe-entry>iconv -c --to-code=UTF8 > ~/.cache/mutt/mail.html<enter><shell-escape>firefox ~/.cache/mutt/mail.html<enter>"
macro index,pager \cb "<pipe-message> env BROWSER=firefox urlscan<Enter>" "call urlscan to extract URLs out of a message"
macro attach,compose \cb "<pipe-entry> env BROWSER=firefox urlscan<Enter>" "call urlscan to extract URLs out of a message"
set sort_browser=date
set sort=reverse-threads
set sort_aux=last-date-received
bind pager g top
bind pager G bottom
bind attach,index g first-entry
bind attach,index G last-entry
bind attach,index,pager \CD half-down
bind attach,index,pager \CU half-up
bind attach,index,pager \Ce next-line
bind attach,index,pager \Cy previous-line
bind index,pager B sidebar-toggle-visible
bind index,pager R group-reply
set sidebar_visible = yes
set sidebar_width = 15
bind index,pager \Cp sidebar-prev
bind index,pager \Cn sidebar-next
bind index,pager \Co sidebar-open
bind index,pager B sidebar-toggle-visible
set sidebar_short_path = yes
set sidebar_delim_chars = '/'
set sidebar_format = '%B%* %?N?%N?'
'';
};
};
};
2023-11-27 18:17:27 +02:00
services = {
cbatticon.enable = true;
blueman-applet.enable = true;
2023-10-09 05:47:36 +03:00
2023-11-27 18:17:27 +02:00
syncthing.tray = {
enable = true;
#extraOptions = ["--wait"];
};
2023-10-08 23:19:55 +03:00
2023-11-27 18:17:27 +02:00
pasystray = {
enable = true;
extraOptions = ["--key-grabbing" "--notify=all"];
};
2023-09-18 15:04:22 +03:00
2023-11-27 18:17:27 +02:00
gpg-agent = {
enable = true;
enableSshSupport = true;
2024-06-05 22:43:27 +03:00
pinentryPackage = pkgs.pinentry-gtk2;
2023-11-27 18:17:27 +02:00
};
2023-09-18 13:23:48 +03:00
2023-11-27 18:17:27 +02:00
screen-locker = {
enable = true;
2023-11-27 18:17:27 +02:00
xautolock.enable = false;
lockCmd = ''${pkgs.bash}/bin/bash -c "${pkgs.coreutils}/bin/sleep 0.2; ${pkgs.xorg.xset}/bin/xset dpms force off; /run/wrappers/bin/slock"'';
};
2023-09-18 13:23:48 +03:00
};
2023-10-09 05:47:36 +03:00
2023-10-09 05:52:49 +03:00
# https://github.com/nix-community/home-manager/issues/2064
systemd.user.targets.tray = {
Unit = {
Description = "Home Manager System Tray";
Requires = ["graphical-session-pre.target"];
};
};
2023-10-09 05:47:36 +03:00
# thanks K900
gtk = {
enable = true;
theme = {
package = pkgs.plasma5Packages.breeze-gtk;
name = "Breeze";
};
cursorTheme = {
package = pkgs.plasma5Packages.breeze-icons;
name = "Breeze_Snow";
};
iconTheme = {
package = pkgs.papirus-icon-theme;
name = "Papirus-Dark";
};
gtk2 = {
configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
extraConfig = ''
gtk-alternative-button-order = 1
'';
};
gtk3.extraConfig = {
gtk-application-prefer-dark-theme = true;
gtk-decoration-layout = "icon:minimize,maximize,close";
};
gtk4.extraConfig = {
gtk-application-prefer-dark-theme = true;
gtk-decoration-layout = "icon:minimize,maximize,close";
};
};
mj.plasma.kconfig = {
kdeglobals = {
General.ColorScheme = "ArcDark";
Icons.Theme = "Papirus-Dark";
KDE.widgetStyle = "Breeze";
};
plasmarc.Theme.name = "Arc-Dark";
kscreenlockerrc.Greeter = {
Theme = "com.github.varlesh.arc-dark";
};
ksplashrc.KSplash = {
Engine = "KSplashQML";
Theme = "com.github.varlesh.arc-dark";
};
kwinrc."org.kde.kdecoration2" = {
library = "org.kde.kwin.aurorae";
theme = "__aurorae__svg__Arc-Dark";
};
kcminputrc.Mouse.cursorTheme = "Breeze_Snow";
# don't mess with GTK settings
kded5rc."Module-gtkconfig".autoload = false;
};
2023-09-15 14:39:04 +03:00
};
2023-09-14 21:52:10 +03:00
};
}