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;
type = types.bool;
};
# packages to deploy to the user's home
sane.home-manager.extraPackages = mkOption {
default = [ ];
# 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);
};
# attributes to copy directly to home-manager's `wayland.windowManager` option
sane.home-manager.windowManager = mkOption {
default = {};
type = types.attrs;
};
# extra attributes to include in home-manager's `programs` option
sane.home-manager.programs = mkOption {
default = {};

View File

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