packages: minor refactoring

This commit is contained in:
2022-08-03 02:03:17 -07:00
parent 95e7d86cc7
commit e5ff11d14b
2 changed files with 13 additions and 8 deletions

View File

@@ -21,17 +21,21 @@ in
default = false; default = false;
type = types.bool; type = types.bool;
}; };
# packages to deploy to the user's home
sane.home-manager.extraPackages = mkOption { sane.home-manager.extraPackages = mkOption {
default = [ ]; default = [ ];
# each entry can be either a package, or attrs: # each entry can be either a package, or attrs:
# { pkg = package; dir = optional string; # { pkg = package; dir = optional string;
type = types.listOf (types.either types.package types.attrs); type = types.listOf (types.either types.package types.attrs);
}; };
# attributes to copy directly to home-manager's `wayland.windowManager` option # attributes to copy directly to home-manager's `wayland.windowManager` option
sane.home-manager.windowManager = mkOption { sane.home-manager.windowManager = mkOption {
default = {}; default = {};
type = types.attrs; type = types.attrs;
}; };
# extra attributes to include in home-manager's `programs` option # extra attributes to include in home-manager's `programs` option
sane.home-manager.programs = mkOption { sane.home-manager.programs = mkOption {
default = {}; default = {};

View File

@@ -2,7 +2,7 @@
with pkgs; with pkgs;
let let
pkgspec = [ universalPkgs = [
backblaze-b2 backblaze-b2
duplicity duplicity
gnupg gnupg
@@ -32,9 +32,9 @@ let
w3m w3m
wireguard-tools wireguard-tools
youtube-dl youtube-dl
] ];
++ (if config.sane.gui.enable then
[ guiPkgs = [
# GUI only # GUI only
aerc # email client aerc # email client
audacity audacity
@@ -72,8 +72,8 @@ let
vlc # works on phosh vlc # works on phosh
whalebird # pleroma client. input is broken on phosh whalebird # pleroma client. input is broken on phosh
xterm # broken on phosh xterm # broken on phosh
] else []) ]
++ (if config.sane.gui.enable && pkgs.system == "x86_64-linux" then ++ (if pkgs.system == "x86_64-linux" then
[ [
# x86_64 only # x86_64 only
@@ -117,5 +117,6 @@ in
# mix2nix # mix2nix
# rustup # rustup
# swig # swig
sane.home-manager.extraPackages = pkgspec; sane.home-manager.extraPackages = universalPkgs
++ (if config.sane.gui.enable then guiPkgs else []);
} }