refactor how i decide which programs go on which machine (leverage "roles" like pc and handheld)
This commit is contained in:
parent
3c7ebb5385
commit
0893c90c51
|
@ -12,9 +12,9 @@
|
|||
sops.secrets.colin-passwd.neededForUsers = true;
|
||||
|
||||
sane.roles.build-machine.enable = true;
|
||||
sane.roles.ac = true;
|
||||
sane.roles.client = true;
|
||||
sane.roles.dev-machine = true;
|
||||
sane.roles.pc = true;
|
||||
sane.services.wg-home.enable = true;
|
||||
sane.services.wg-home.ip = config.sane.hosts.by-name."desko".wg-home.ip;
|
||||
sane.services.duplicity.enable = true;
|
||||
|
@ -24,8 +24,6 @@
|
|||
sane.programs.iphoneUtils.enableFor.user.colin = true;
|
||||
sane.programs.steam.enableFor.user.colin = true;
|
||||
|
||||
sane.programs.guiApps.suggestedPrograms = [ "desktopGuiApps" ];
|
||||
sane.programs.consoleUtils.suggestedPrograms = [ "consoleMediaUtils" "desktopConsoleUtils" ];
|
||||
# sane.programs.devPkgs.enableFor.user.colin = true;
|
||||
|
||||
sane.programs.signal-desktop.config.autostart = true;
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
sane.roles.client = true;
|
||||
sane.roles.dev-machine = true;
|
||||
sane.roles.pc = true;
|
||||
sane.services.wg-home.enable = true;
|
||||
sane.services.wg-home.ip = config.sane.hosts.by-name."lappy".wg-home.ip;
|
||||
|
||||
|
@ -15,11 +16,7 @@
|
|||
boot.loader.efi.canTouchEfiVariables = false;
|
||||
sane.image.extraBootFiles = [ pkgs.bootpart-uefi-x86_64 ];
|
||||
|
||||
sane.programs.guiApps.suggestedPrograms = [
|
||||
"desktopGuiApps"
|
||||
"stepmania"
|
||||
];
|
||||
sane.programs.consoleUtils.suggestedPrograms = [ "consoleMediaUtils" "desktopConsoleUtils" ];
|
||||
sane.programs.stepmania.enableFor.user.colin = true;
|
||||
|
||||
sops.secrets.colin-passwd.neededForUsers = true;
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
];
|
||||
|
||||
sane.roles.client = true;
|
||||
sane.roles.handheld = true;
|
||||
sane.zsh.showDeadlines = false; # unlikely to act on them when in shell
|
||||
sane.services.wg-home.enable = true;
|
||||
sane.services.wg-home.ip = config.sane.hosts.by-name."moby".wg-home.ip;
|
||||
|
@ -32,17 +33,12 @@
|
|||
sops.secrets.colin-passwd.neededForUsers = true;
|
||||
|
||||
sane.gui.sxmo.enable = true;
|
||||
sane.programs.guiApps.suggestedPrograms = [ "handheldGuiApps" ];
|
||||
# sane.programs.consoleUtils.enableFor.user.colin = false;
|
||||
# sane.programs.guiApps.enableFor.user.colin = false;
|
||||
sane.programs.blueberry.enableFor.user.colin = false; # bluetooth manager: doesn't cross compile!
|
||||
sane.programs.dialect.enableFor.user.colin = false; # drags in 700MB of x86 dependencies (e.g. gtk4)
|
||||
sane.programs.mercurial.enableFor.user.colin = false; # does not cross compile
|
||||
sane.programs.nvme-cli.enableFor.system = false; # does not cross compile (libhugetlbfs)
|
||||
sane.programs.sequoia.enableFor.user.colin = false;
|
||||
sane.programs.tuiApps.enableFor.user.colin = false; # visidata, others, don't compile well
|
||||
# disabled for faster deploys
|
||||
sane.programs.soundconverter.enableFor.user.colin = false;
|
||||
|
||||
# enabled for easier debugging
|
||||
sane.programs.eg25-control.enableFor.user.colin = true;
|
||||
|
|
|
@ -14,12 +14,11 @@
|
|||
signaldctl.enableFor.user.colin = true;
|
||||
};
|
||||
|
||||
sane.roles.ac = true;
|
||||
sane.roles.build-machine.enable = true;
|
||||
sane.roles.build-machine.emulation = false;
|
||||
sane.zsh.showDeadlines = false; # ~/knowledge doesn't always exist
|
||||
sane.programs.consoleUtils.suggestedPrograms = [
|
||||
"desktopConsoleUtils"
|
||||
"pcConsoleUtils"
|
||||
"sane-scripts.stop-all-servo"
|
||||
];
|
||||
sane.services.dyn-dns.enable = true;
|
||||
|
|
|
@ -173,7 +173,7 @@ in
|
|||
"zsh"
|
||||
];
|
||||
|
||||
desktopConsoleUtils = declPackageSet [
|
||||
pcConsoleUtils = declPackageSet [
|
||||
"gh" # MS GitHub cli
|
||||
"nix-index"
|
||||
"nixpkgs-review"
|
||||
|
@ -188,11 +188,11 @@ in
|
|||
"yt-dlp"
|
||||
];
|
||||
|
||||
tuiApps = declPackageSet [
|
||||
pcTuiApps = declPackageSet [
|
||||
"aerc" # email client
|
||||
"msmtp" # sendmail
|
||||
"offlineimap" # email mailbox sync
|
||||
"sfeed" # RSS fetcher
|
||||
# "sfeed" # RSS fetcher
|
||||
"visidata" # TUI spreadsheet viewer/editor
|
||||
"w3m" # web browser
|
||||
];
|
||||
|
|
|
@ -22,7 +22,7 @@ in
|
|||
"superTux" # keyboard-only controls
|
||||
"superTuxKart" # poor FPS on pinephone
|
||||
];
|
||||
sane.programs.desktopGameApps = declPackageSet [
|
||||
sane.programs.pcGameApps = declPackageSet [
|
||||
# "andyetitmoves" # TODO: fix build!
|
||||
# "armagetronad" # tron/lightcycles; WAN and LAN multiplayer
|
||||
# "cutemaze" # meh: trivial maze game; qt6 and keyboard-only
|
||||
|
@ -30,6 +30,7 @@ in
|
|||
"endless-sky" # space merchantilism/exploration
|
||||
# "factorio"
|
||||
"frozen-bubble" # WAN + LAN + 1P/2P bubble bobble
|
||||
"hase" # WAN worms game
|
||||
# "hedgewars" # WAN + LAN worms game (5~10 people online at any moment; <https://hedgewars.org>)
|
||||
# "libremines" # meh: trivial minesweeper; qt6
|
||||
# "mario0" # SMB + portal
|
||||
|
@ -45,84 +46,89 @@ in
|
|||
"vvvvvv" # keyboard-only controls
|
||||
];
|
||||
|
||||
sane.programs.guiApps = declPackageSet (
|
||||
lib.optionals (pkgs.system == "x86_64-linux") [
|
||||
"x86GuiApps"
|
||||
] ++ [
|
||||
# package sets
|
||||
"tuiApps"
|
||||
"gameApps"
|
||||
] ++ [
|
||||
"alacritty" # terminal emulator
|
||||
"calls" # gnome calls (dialer/handler)
|
||||
# "celluloid" # mpv frontend
|
||||
"chatty" # matrix/xmpp/irc client
|
||||
"cozy" # audiobook player
|
||||
"dialect" # language translation
|
||||
"dino" # XMPP client
|
||||
# "emote"
|
||||
"epiphany" # gnome's web browser
|
||||
"evince" # works on phosh
|
||||
"firefox"
|
||||
# "flare-signal" # gtk4 signal client
|
||||
# "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
|
||||
"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"
|
||||
"gpodder"
|
||||
"gthumb"
|
||||
"gtkcord4" # Discord client
|
||||
"komikku"
|
||||
"koreader"
|
||||
"lemoa" # lemmy app
|
||||
# "lollypop"
|
||||
"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
|
||||
# "newsflash"
|
||||
"pavucontrol"
|
||||
# "picard" # music tagging
|
||||
# "libsForQt5.plasmatube" # Youtube player
|
||||
"signal-desktop"
|
||||
"soundconverter"
|
||||
"spot" # Gnome Spotfy client
|
||||
# "sublime-music"
|
||||
"tangram" # web browser
|
||||
# "tdesktop" # broken on phosh
|
||||
# "tokodon"
|
||||
"tuba" # mastodon/pleroma client (stores pw in keyring)
|
||||
# "whalebird" # pleroma client (Electron). input is broken on phosh.
|
||||
"wike" # Wikipedia Reader
|
||||
"xdg-terminal-exec"
|
||||
"xterm" # broken on phosh
|
||||
]
|
||||
);
|
||||
sane.programs.guiApps = declPackageSet [
|
||||
# package sets
|
||||
"gameApps"
|
||||
"guiBaseApps"
|
||||
];
|
||||
|
||||
sane.programs.desktopGuiApps = declPackageSet (
|
||||
sane.programs.guiBaseApps = declPackageSet [
|
||||
"alacritty" # terminal emulator
|
||||
"dialect" # language translation
|
||||
"dino" # XMPP client
|
||||
# "emote"
|
||||
"evince" # works on phosh
|
||||
# "flare-signal" # gtk4 signal client
|
||||
# "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"
|
||||
"gthumb"
|
||||
"gtkcord4" # Discord client
|
||||
"lemoa" # lemmy app
|
||||
# "lollypop"
|
||||
"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
|
||||
# "newsflash"
|
||||
"pavucontrol"
|
||||
# "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)
|
||||
# "whalebird" # pleroma client (Electron). input is broken on phosh.
|
||||
"xdg-terminal-exec"
|
||||
"xterm" # broken on phosh
|
||||
];
|
||||
|
||||
sane.programs.handheldGuiApps = declPackageSet [
|
||||
"calls" # gnome calls (dialer/handler)
|
||||
# "celluloid" # mpv frontend
|
||||
"chatty" # matrix/xmpp/irc client
|
||||
"cozy" # audiobook player
|
||||
"epiphany" # gnome's web browser
|
||||
"gpodder"
|
||||
"komikku"
|
||||
"koreader"
|
||||
"megapixels" # camera app
|
||||
"portfolio-filemanager"
|
||||
"tangram" # web browser
|
||||
"wike" # Wikipedia Reader
|
||||
"xarchiver"
|
||||
];
|
||||
|
||||
sane.programs.pcGuiApps = declPackageSet (
|
||||
[
|
||||
# package sets
|
||||
"desktopGameApps"
|
||||
"pcGameApps"
|
||||
"pcTuiApps"
|
||||
] ++ [
|
||||
"audacity"
|
||||
"blanket" # ambient noise generator
|
||||
"brave" # for the integrated wallet -- as a backup
|
||||
# "cantata" # music player (mpd frontend)
|
||||
# "chromium" # chromium takes hours to build. brave is chromium-based, distributed in binary form, so prefer it.
|
||||
"discord" # x86-only
|
||||
"electrum"
|
||||
"element-desktop"
|
||||
"firefox"
|
||||
"font-manager"
|
||||
# "gajim" # XMPP client. cross build tries to import host gobject-introspection types (2023/09/01)
|
||||
"gimp" # broken on phosh
|
||||
|
@ -132,46 +138,30 @@ in
|
|||
"gnome.nautilus" # file browser
|
||||
# "gnome.totem" # video player, supposedly supports UPnP
|
||||
"handbrake"
|
||||
"hase"
|
||||
"inkscape"
|
||||
# "jellyfin-media-player"
|
||||
"kdenlive"
|
||||
"kid3" # audio tagging
|
||||
"krita"
|
||||
"libreoffice" # TODO: replace with an office suite that uses saner packaging?
|
||||
"losslesscut-bin" # x86-only
|
||||
"makemkv" # x86-only
|
||||
"monero-gui" # x86-only
|
||||
"mumble"
|
||||
# "nheko" # Matrix chat client
|
||||
# "obsidian"
|
||||
# "rhythmbox" # local music player
|
||||
"slic3r"
|
||||
"soundconverter"
|
||||
"spotify" # x86-only
|
||||
"steam"
|
||||
"tor-browser-bundle-bin" # x86-only
|
||||
"vlc"
|
||||
"wireshark" # could maybe ship the cli as sysadmin pkg
|
||||
"zecwallet-lite" # x86-only
|
||||
]
|
||||
);
|
||||
|
||||
sane.programs.handheldGuiApps = declPackageSet [
|
||||
"megapixels" # camera app
|
||||
"portfolio-filemanager"
|
||||
"xarchiver"
|
||||
];
|
||||
|
||||
sane.programs.x86GuiApps = declPackageSet [
|
||||
"discord"
|
||||
# "gnome.zenity" # for kaiteki (it will use qarma, kdialog, or zenity)
|
||||
# "gpt2tc" # XXX: unreliable mirror
|
||||
# "kaiteki" # Pleroma client
|
||||
# "logseq" # Personal Knowledge Management
|
||||
"losslesscut-bin"
|
||||
"makemkv"
|
||||
"monero-gui"
|
||||
# "signal-desktop"
|
||||
"spotify"
|
||||
"tor-browser-bundle-bin"
|
||||
"zecwallet-lite"
|
||||
];
|
||||
|
||||
|
||||
sane.persist.sys.byStore.plaintext = lib.mkIf config.sane.programs.guiApps.enabled [
|
||||
"/var/lib/alsa" # preserve output levels, default devices
|
||||
"/var/lib/colord" # preserve color calibrations (?)
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
options.sane.roles.ac = with lib; mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
services which you probably only want to use with AC power.
|
||||
specifically because they drain resources like power or bandwidth.
|
||||
'';
|
||||
};
|
||||
|
||||
config = lib.mkIf config.sane.roles.ac {
|
||||
# sane.yggdrasil.enable = true;
|
||||
# services.i2p.enable = true;
|
||||
};
|
||||
}
|
|
@ -1,10 +1,11 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
imports = [
|
||||
./ac.nix
|
||||
./build-machine.nix
|
||||
./client
|
||||
./dev-machine.nix
|
||||
./handheld.nix
|
||||
./pc.nix
|
||||
];
|
||||
|
||||
fileSystems."/tmp" = lib.mkIf (config.sane.roles.build-machine.enable || config.sane.roles.dev-machine) {
|
||||
|
|
17
hosts/modules/roles/handheld.nix
Normal file
17
hosts/modules/roles/handheld.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
options.sane.roles.handheld = with lib; mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
services/programs which you probably only want on a handheld device.
|
||||
'';
|
||||
};
|
||||
|
||||
config = lib.mkIf config.sane.roles.handheld {
|
||||
sane.programs.guiApps.suggestedPrograms = [
|
||||
"handheldGuiApps"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
23
hosts/modules/roles/pc.nix
Normal file
23
hosts/modules/roles/pc.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
options.sane.roles.pc = with lib; mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
programs/services which only make sense for a PC form factor (e.g. keyboard + mouse).
|
||||
'';
|
||||
};
|
||||
|
||||
config = lib.mkIf config.sane.roles.pc {
|
||||
sane.programs.guiApps.suggestedPrograms = [
|
||||
"pcGuiApps"
|
||||
];
|
||||
sane.programs.gameApps.suggestedPrograms = [
|
||||
"pcGameApps"
|
||||
];
|
||||
sane.programs.consoleUtils.suggestedPrograms = [
|
||||
"consoleMediaUtils"
|
||||
"pcConsoleUtils"
|
||||
];
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user