2023-07-15 01:02:41 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
2023-11-18 22:20:38 +00:00
|
|
|
let
|
|
|
|
declPackageSet = pkgs: {
|
2024-01-20 11:11:12 +00:00
|
|
|
packageUnwrapped = null;
|
2023-11-18 22:20:38 +00:00
|
|
|
suggestedPrograms = pkgs;
|
|
|
|
};
|
|
|
|
in
|
2023-01-29 08:10:53 +00:00
|
|
|
{
|
|
|
|
imports = [
|
2023-01-30 01:42:12 +00:00
|
|
|
./gnome.nix
|
2023-09-01 23:59:21 +00:00
|
|
|
./greetd.nix
|
2023-07-02 09:37:07 +00:00
|
|
|
./gtk.nix
|
2023-07-12 09:42:23 +00:00
|
|
|
./sxmo
|
2023-09-05 16:13:23 +00:00
|
|
|
./theme
|
2023-01-29 08:10:53 +00:00
|
|
|
];
|
2023-07-15 01:02:41 +00:00
|
|
|
|
2023-11-18 22:20:38 +00:00
|
|
|
sane.programs.gameApps = declPackageSet [
|
|
|
|
"animatch"
|
|
|
|
"gnome-2048"
|
2023-11-26 09:22:40 +00:00
|
|
|
"gnome.hitori" # like sudoku
|
2023-11-18 22:20:38 +00:00
|
|
|
"superTux" # keyboard-only controls
|
|
|
|
"superTuxKart" # poor FPS on pinephone
|
|
|
|
];
|
2023-11-18 22:56:53 +00:00
|
|
|
sane.programs.pcGameApps = declPackageSet [
|
2023-11-18 22:20:38 +00:00
|
|
|
# "andyetitmoves" # TODO: fix build!
|
|
|
|
# "armagetronad" # tron/lightcycles; WAN and LAN multiplayer
|
|
|
|
# "cutemaze" # meh: trivial maze game; qt6 and keyboard-only
|
|
|
|
# "cuyo" # trivial puyo-puyo clone
|
|
|
|
"endless-sky" # space merchantilism/exploration
|
|
|
|
# "factorio"
|
|
|
|
"frozen-bubble" # WAN + LAN + 1P/2P bubble bobble
|
2023-11-18 22:56:53 +00:00
|
|
|
"hase" # WAN worms game
|
2023-11-18 22:20:38 +00:00
|
|
|
# "hedgewars" # WAN + LAN worms game (5~10 people online at any moment; <https://hedgewars.org>)
|
|
|
|
# "libremines" # meh: trivial minesweeper; qt6
|
|
|
|
# "mario0" # SMB + portal
|
|
|
|
# "mindustry"
|
|
|
|
# "minesweep-rs" # CLI minesweeper
|
|
|
|
# "nethack"
|
|
|
|
# "osu-lazer"
|
|
|
|
# "pinball" # 3d pinball; kb/mouse. old sourceforge project
|
|
|
|
# "powermanga" # STYLISH space invaders derivative (keyboard-only)
|
|
|
|
"shattered-pixel-dungeon" # doesn't cross compile
|
|
|
|
"space-cadet-pinball" # LMB/RMB controls (bindable though. volume buttons?)
|
|
|
|
"tumiki-fighters" # keyboard-only
|
|
|
|
"vvvvvv" # keyboard-only controls
|
2024-02-25 18:42:25 +00:00
|
|
|
# "wine"
|
2023-11-18 22:20:38 +00:00
|
|
|
];
|
2023-11-16 20:26:37 +00:00
|
|
|
|
2023-11-18 22:56:53 +00:00
|
|
|
sane.programs.guiApps = declPackageSet [
|
|
|
|
# package sets
|
|
|
|
"gameApps"
|
|
|
|
"guiBaseApps"
|
|
|
|
];
|
|
|
|
|
|
|
|
sane.programs.guiBaseApps = declPackageSet [
|
2024-01-23 16:30:06 +00:00
|
|
|
# "abaddon" # discord client
|
2023-11-18 22:56:53 +00:00
|
|
|
"alacritty" # terminal emulator
|
2024-02-20 12:09:52 +00:00
|
|
|
"dconf" # required by many packages, but not well-documented :(
|
2023-12-15 08:44:32 +00:00
|
|
|
"delfin" # Jellyfin client
|
2023-11-18 22:56:53 +00:00
|
|
|
"dialect" # language translation
|
|
|
|
"dino" # XMPP client
|
|
|
|
# "emote"
|
|
|
|
"evince" # works on phosh
|
2024-02-18 06:50:42 +00:00
|
|
|
# "flare-signal" # gtk4 signal client
|
2023-11-18 22:56:53 +00:00
|
|
|
# "foliate" # e-book reader
|
|
|
|
"fractal" # matrix client
|
|
|
|
"g4music" # local music player
|
|
|
|
# "gnome.cheese"
|
|
|
|
# "gnome-feeds" # RSS reader (with claimed mobile support)
|
|
|
|
# "gnome.file-roller"
|
|
|
|
"gnome.geary" # adaptive e-mail client; uses webkitgtk 4.1
|
|
|
|
"gnome.gnome-calculator"
|
|
|
|
"gnome.gnome-calendar"
|
|
|
|
"gnome.gnome-clocks"
|
|
|
|
"gnome.gnome-maps"
|
|
|
|
# "gnome-podcasts"
|
|
|
|
# "gnome.gnome-system-monitor"
|
|
|
|
# "gnome.gnome-terminal" # works on phosh
|
|
|
|
"gnome.gnome-weather"
|
2023-12-09 15:02:00 +00:00
|
|
|
"gnome.seahorse" # keyring/secret manager
|
2023-12-11 03:27:46 +00:00
|
|
|
"gnome-frog" # OCR/QR decoder
|
2023-12-06 15:36:41 +00:00
|
|
|
"gpodder"
|
2023-12-13 02:29:43 +00:00
|
|
|
# "gthumb"
|
2023-12-03 13:01:52 +00:00
|
|
|
"gtkcord4" # Discord client. 2023/11/21: disabled because v0.0.12 leaks memory
|
2024-02-16 05:34:24 +00:00
|
|
|
# "lemoa" # lemmy app
|
2023-12-10 16:14:18 +00:00
|
|
|
"libnotify" # for notify-send; debugging
|
2023-11-18 22:56:53 +00:00
|
|
|
# "lollypop"
|
2023-12-21 22:58:23 +00:00
|
|
|
"loupe" # image viewer
|
2023-11-18 22:56:53 +00:00
|
|
|
"mate.engrampa" # archive manager
|
|
|
|
"mepo" # maps viewer
|
|
|
|
"mpv"
|
|
|
|
"networkmanagerapplet" # for nm-connection-editor: it's better than not having any gui!
|
|
|
|
"ntfy-sh" # notification service
|
2023-12-13 03:59:04 +00:00
|
|
|
# "newsflash" # RSS viewer
|
2023-11-18 22:56:53 +00:00
|
|
|
"pavucontrol"
|
2023-12-13 20:43:16 +00:00
|
|
|
"pwvucontrol" # pipewire version of pavu
|
2023-11-18 22:56:53 +00:00
|
|
|
# "picard" # music tagging
|
|
|
|
# "libsForQt5.plasmatube" # Youtube player
|
|
|
|
"signal-desktop"
|
|
|
|
"spot" # Gnome Spotfy client
|
|
|
|
# "sublime-music"
|
|
|
|
# "tdesktop" # broken on phosh
|
|
|
|
# "tokodon"
|
|
|
|
"tuba" # mastodon/pleroma client (stores pw in keyring)
|
2023-12-03 11:15:01 +00:00
|
|
|
"vulkan-tools" # vulkaninfo
|
2023-11-18 22:56:53 +00:00
|
|
|
# "whalebird" # pleroma client (Electron). input is broken on phosh.
|
|
|
|
"xdg-terminal-exec"
|
|
|
|
"xterm" # broken on phosh
|
|
|
|
];
|
|
|
|
|
|
|
|
sane.programs.handheldGuiApps = declPackageSet [
|
2024-02-18 06:34:27 +00:00
|
|
|
# "calls" # gnome calls (dialer/handler)
|
2023-11-18 22:56:53 +00:00
|
|
|
# "celluloid" # mpv frontend
|
2023-12-30 05:34:02 +00:00
|
|
|
# "chatty" # matrix/xmpp/irc client (2023/12/29: disabled because broken cross build)
|
2023-11-18 22:56:53 +00:00
|
|
|
"cozy" # audiobook player
|
|
|
|
"epiphany" # gnome's web browser
|
2023-12-12 08:44:08 +00:00
|
|
|
# "iotas" # note taking app
|
2023-11-18 22:56:53 +00:00
|
|
|
"komikku"
|
|
|
|
"koreader"
|
|
|
|
"megapixels" # camera app
|
2023-12-12 07:31:00 +00:00
|
|
|
"notejot" # note taking, e.g. shopping list
|
2023-12-19 22:17:45 +00:00
|
|
|
"planify" # todo-tracker/planner
|
2023-11-18 22:56:53 +00:00
|
|
|
"portfolio-filemanager"
|
|
|
|
"tangram" # web browser
|
|
|
|
"wike" # Wikipedia Reader
|
|
|
|
"xarchiver"
|
|
|
|
];
|
2023-07-15 01:02:41 +00:00
|
|
|
|
2023-11-18 22:56:53 +00:00
|
|
|
sane.programs.pcGuiApps = declPackageSet (
|
2023-11-18 22:20:38 +00:00
|
|
|
[
|
2023-11-16 20:26:37 +00:00
|
|
|
# package sets
|
2023-11-18 22:56:53 +00:00
|
|
|
"pcGameApps"
|
|
|
|
"pcTuiApps"
|
2023-11-16 20:26:37 +00:00
|
|
|
] ++ [
|
2023-07-15 01:02:41 +00:00
|
|
|
"audacity"
|
|
|
|
"blanket" # ambient noise generator
|
|
|
|
"brave" # for the integrated wallet -- as a backup
|
2023-09-29 02:04:06 +00:00
|
|
|
# "cantata" # music player (mpd frontend)
|
2023-07-31 00:02:09 +00:00
|
|
|
# "chromium" # chromium takes hours to build. brave is chromium-based, distributed in binary form, so prefer it.
|
2023-11-18 22:56:53 +00:00
|
|
|
"discord" # x86-only
|
2023-07-15 01:02:41 +00:00
|
|
|
"electrum"
|
|
|
|
"element-desktop"
|
2023-11-18 22:56:53 +00:00
|
|
|
"firefox"
|
2023-09-16 12:44:31 +00:00
|
|
|
"font-manager"
|
2023-09-29 02:04:06 +00:00
|
|
|
# "gajim" # XMPP client. cross build tries to import host gobject-introspection types (2023/09/01)
|
2023-07-15 01:02:41 +00:00
|
|
|
"gimp" # broken on phosh
|
2023-09-29 02:04:06 +00:00
|
|
|
# "gnome.dconf-editor"
|
2023-08-07 03:43:37 +00:00
|
|
|
# "gnome.file-roller"
|
2023-07-15 01:02:41 +00:00
|
|
|
"gnome.gnome-disk-utility"
|
2023-07-30 01:44:49 +00:00
|
|
|
"gnome.nautilus" # file browser
|
2023-07-15 01:02:41 +00:00
|
|
|
# "gnome.totem" # video player, supposedly supports UPnP
|
|
|
|
"handbrake"
|
|
|
|
"inkscape"
|
2023-08-14 10:27:02 +00:00
|
|
|
# "jellyfin-media-player"
|
2023-07-15 01:02:41 +00:00
|
|
|
"kdenlive"
|
2024-02-16 03:39:45 +00:00
|
|
|
# "kid3" # audio tagging
|
2023-07-15 01:02:41 +00:00
|
|
|
"krita"
|
2023-07-31 02:03:19 +00:00
|
|
|
"libreoffice" # TODO: replace with an office suite that uses saner packaging?
|
2023-11-18 22:56:53 +00:00
|
|
|
"losslesscut-bin" # x86-only
|
2024-02-16 03:20:17 +00:00
|
|
|
# "makemkv" # x86-only
|
2023-11-18 22:56:53 +00:00
|
|
|
"monero-gui" # x86-only
|
2024-02-16 03:20:17 +00:00
|
|
|
# "mumble"
|
2023-11-18 21:02:50 +00:00
|
|
|
# "nheko" # Matrix chat client
|
2024-01-27 15:37:43 +00:00
|
|
|
# "nicotine-plus" # soulseek client. before re-enabling this, get it to run without firejail.
|
2023-09-29 02:04:06 +00:00
|
|
|
# "obsidian"
|
2024-02-16 03:20:17 +00:00
|
|
|
# "openscad" # 3d modeling
|
2023-09-29 02:04:06 +00:00
|
|
|
# "rhythmbox" # local music player
|
2023-12-12 01:34:22 +00:00
|
|
|
# "slic3r"
|
2023-11-18 22:56:53 +00:00
|
|
|
"soundconverter"
|
|
|
|
"spotify" # x86-only
|
2023-07-15 01:02:41 +00:00
|
|
|
"steam"
|
2024-02-13 11:16:44 +00:00
|
|
|
"tor-browser" # x86-only
|
2023-07-26 09:56:26 +00:00
|
|
|
"vlc"
|
2023-07-15 01:02:41 +00:00
|
|
|
"wireshark" # could maybe ship the cli as sysadmin pkg
|
2024-02-09 20:23:56 +00:00
|
|
|
# "zecwallet-lite" # x86-only
|
2023-11-18 22:20:38 +00:00
|
|
|
]
|
|
|
|
);
|
2023-07-15 01:02:41 +00:00
|
|
|
|
2023-11-08 15:32:50 +00:00
|
|
|
sane.persist.sys.byStore.plaintext = lib.mkIf config.sane.programs.guiApps.enabled [
|
2023-07-15 01:02:41 +00:00
|
|
|
"/var/lib/alsa" # preserve output levels, default devices
|
|
|
|
"/var/lib/colord" # preserve color calibrations (?)
|
|
|
|
"/var/lib/systemd/backlight" # backlight brightness
|
|
|
|
];
|
2023-09-07 10:24:20 +00:00
|
|
|
|
|
|
|
hardware.opengl = lib.mkIf config.sane.programs.guiApps.enabled ({
|
2023-09-07 10:47:17 +00:00
|
|
|
enable = true;
|
2023-09-07 10:24:20 +00:00
|
|
|
driSupport = lib.mkDefault true;
|
|
|
|
} // (lib.optionalAttrs pkgs.stdenv.isx86_64 {
|
|
|
|
# for 32 bit applications
|
|
|
|
# upstream nixpkgs forbids setting driSupport32Bit unless specifically x86_64 (so aarch64 isn't allowed)
|
|
|
|
driSupport32Bit = lib.mkDefault true;
|
|
|
|
}));
|
2024-03-05 18:46:43 +00:00
|
|
|
|
|
|
|
system.activationScripts.notifyActive = lib.mkIf config.sane.programs.guiApps.enabled {
|
|
|
|
text = ''
|
|
|
|
# notify all logged-in users that the system has been activated/upgraded.
|
|
|
|
if [ -d /run/user ]; then
|
|
|
|
for uid in $(ls /run/user); do
|
|
|
|
PATH="$PATH:${pkgs.sudo}/bin" \
|
|
|
|
sudo -u "#$uid" env DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/$uid/bus" \
|
|
|
|
PATH="$PATH:${pkgs.libnotify}/bin" \
|
|
|
|
notify-send 'nixos activated' "version: $(cat "$systemConfig/nixos-version")"
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
'';
|
|
|
|
};
|
2023-01-29 08:10:53 +00:00
|
|
|
}
|