config/modules/profiles/desktop/default.nix

343 lines
7.4 KiB
Nix
Raw Normal View History

2023-09-14 21:52:10 +03:00
{
2024-02-04 16:18:47 +02:00
lib,
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
cfg = config.mj.desktop;
in {
options.mj.desktop = with lib.types; {
username = lib.mkOption {
type = str;
default = "motiejus";
};
configureDM = lib.mkOption {
type = bool;
default = true;
};
};
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;
package = pkgs.firefox-bin;
};
2023-11-27 18:17:27 +02:00
wireshark.enable = true;
};
2023-09-14 21:52:10 +03:00
2024-02-04 16:18:47 +02:00
mj.base.users.passwd.${cfg.username}.extraGroups = ["adbusers" "networkmanager" "wireshark"];
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;
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;
nssmdns = true;
openFirewall = true;
};
openssh.settings.X11Forwarding = true;
2023-09-18 14:58:40 +03:00
2023-11-27 12:07:19 +02:00
logind.powerKey = "suspend";
logind.powerKeyLongPress = "poweroff";
2023-09-18 14:58:40 +03:00
2023-09-14 21:52:10 +03:00
xserver = {
enable = true;
2023-09-15 15:53:07 +03:00
layout = "us,lt";
xkbOptions = "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;
2024-02-04 16:18:47 +02:00
displayManager = lib.mkIf cfg.configureDM {
2024-03-01 10:27:58 +02:00
lightdm.enable = true;
defaultSession = "none+awesome";
2023-09-18 14:45:41 +03:00
autoLogin = {
enable = true;
2024-02-04 16:18:47 +02:00
user = cfg.username;
2023-09-18 14:45:41 +03:00
};
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
};
gnome.gnome-keyring.enable = true;
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;
};
};
2023-09-14 21:58:06 +03:00
environment.systemPackages = with pkgs; [
2024-02-05 09:19:16 +02:00
# packages defined here
nicer
tmuxbash
iw
2023-09-15 13:01:20 +03:00
vlc
2023-12-19 14:59:49 +02:00
i7z
acpi
2023-09-15 13:01:20 +03:00
gimp
qgis
josm
2023-12-25 23:09:05 +02:00
qemu
2023-09-17 06:46:34 +03:00
xclip
2023-09-15 14:43:56 +03:00
pdftk
2024-03-01 10:27:09 +02:00
putty
2024-01-22 09:20:58 +02:00
x11vnc
2023-09-15 14:39:04 +03:00
yt-dlp
2023-11-29 18:39:37 +02:00
ffmpeg
2023-11-30 06:56:28 +02:00
tinycc
2023-11-28 14:25:46 +02:00
scrcpy
2023-09-15 22:04:03 +03:00
arandr
2023-09-15 13:01:20 +03:00
pandoc
evince
2024-02-04 17:24:45 +02:00
gparted
2024-01-07 14:02:37 +02:00
scribus
2023-11-28 14:23:32 +02:00
gnumake
2024-02-25 15:59:38 +02:00
libwebp
2023-09-17 06:46:34 +03:00
calibre
2023-11-28 14:25:46 +02:00
librsvg
2023-12-27 12:08:44 +02:00
neomutt
2024-01-25 13:22:15 +02:00
inkscape
2023-09-17 06:56:58 +03:00
chromium
2023-09-17 06:46:34 +03:00
hunspell
tigervnc
2023-09-15 14:39:04 +03:00
rtorrent
2023-09-17 06:46:34 +03:00
bsdgames
xss-lock
qpwgraph # for pipewire
2023-12-22 08:47:45 +02:00
audacity
2023-12-19 15:01:21 +02:00
powertop
2023-09-15 13:01:20 +03:00
gpicview
2023-12-16 00:20:17 +02:00
imapsync
2023-10-08 23:19:55 +03:00
trayscale
2023-11-14 23:20:07 +02:00
# TODO why doesn't 'programs.wireshark.enable = true' install the binary?
wireshark
2023-12-26 21:53:40 +02:00
man-pages
2023-09-15 15:06:55 +03:00
rox-filer
2023-09-21 06:23:18 +03:00
distrobox
2023-10-18 19:49:56 +03:00
miniupnpc
2023-12-18 00:45:18 +02:00
evolution
2023-12-22 08:47:45 +02:00
obs-studio
2023-11-28 17:18:45 +02:00
shellcheck
2023-09-18 10:22:33 +03:00
borgbackup
2023-09-18 14:42:34 +03:00
efibootmgr
2023-09-17 06:46:34 +03:00
winetricks
2023-12-15 06:36:26 +02:00
virtualenv
2023-09-17 06:46:34 +03:00
python3Full
libva-utils # intel video tests
2023-09-15 22:04:03 +03:00
pavucontrol
2023-11-30 06:54:21 +02:00
openshot-qt
2024-01-07 15:00:42 +02:00
squashfsTools
2023-09-17 06:56:58 +03:00
google-chrome
2023-09-17 06:46:34 +03:00
aspellDicts.en
aspellDicts.lt
libreoffice-qt
2023-09-15 15:04:11 +03:00
graphicsmagick
2023-09-15 14:59:00 +03:00
joplin-desktop
2023-09-15 13:01:20 +03:00
signal-desktop
element-desktop
2024-01-20 12:08:31 +02:00
netsurf-browser
2023-12-26 21:53:40 +02:00
man-pages-posix
2024-01-25 12:16:06 +02:00
geoipWithDatabase
2023-09-17 06:46:34 +03:00
wineWowPackages.full
hunspellDicts.en_US
2023-09-18 15:06:10 +03:00
python3Packages.ipython
2023-09-17 06:46:34 +03:00
samsung-unified-linux-driver
2023-09-15 13:01:20 +03:00
2023-09-30 05:44:16 +03:00
lld
llvm
llvm-manpages
clang-manpages
gcc_latest
2024-01-05 19:15:26 +02:00
gnome.cheese
2023-09-15 13:01:20 +03:00
gnome.nautilus
gnome.gnome-calculator
gnome.gnome-calendar
2023-09-18 15:06:10 +03:00
xorg.xev
2024-01-05 09:17:25 +02:00
xorg.xeyes
2024-02-13 22:39:17 +02:00
xorg.lndir
2023-09-18 15:06:10 +03:00
2024-02-04 21:57:43 +02:00
intel-gpu-tools
2024-02-04 18:12:14 +02:00
(nvtop.override {
2024-02-04 18:11:23 +02:00
amd = true;
intel = true;
2024-02-04 18:12:14 +02:00
msm = false;
nvidia = false;
})
2024-02-04 18:11:23 +02:00
2023-09-17 06:46:34 +03:00
(texlive.combine {
inherit
(texlive)
scheme-medium
dvisvgm
dvipng
wrapfig
amsmath
ulem
hyperref
capt-of
lithuanian
hyphen-lithuanian
;
})
2023-09-14 21:58:06 +03: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-02-04 16:18:47 +02:00
home-manager.users.${cfg.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
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;
};
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
};
}