split home-manager into their own submodules
This commit is contained in:
68
modules/apps/internet/home.nix
Normal file
68
modules/apps/internet/home.nix
Normal file
@@ -0,0 +1,68 @@
|
||||
{
|
||||
config,
|
||||
inputs,
|
||||
lib,
|
||||
osConfig ? null,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
hm = inputs.self.lib.hmModule {
|
||||
inherit
|
||||
config
|
||||
inputs
|
||||
osConfig
|
||||
;
|
||||
optionPath = [
|
||||
"apps"
|
||||
"internet"
|
||||
];
|
||||
};
|
||||
cfg = config.my.apps.internet;
|
||||
krisp-settings = {
|
||||
libraries = builtins.attrValues {
|
||||
inherit (pkgs.python3Packages)
|
||||
capstone
|
||||
pyelftools
|
||||
;
|
||||
};
|
||||
flakeIgnore = [
|
||||
"E501"
|
||||
"F403"
|
||||
"F405"
|
||||
];
|
||||
};
|
||||
krisp-patch = builtins.readFile (
|
||||
pkgs.fetchurl {
|
||||
url = "https://pastebin.com/raw/8tQDsMVd";
|
||||
sha256 = "sha256-IdXv0MfRG1/1pAAwHLS2+1NESFEz2uXrbSdvU9OvdJ8=";
|
||||
}
|
||||
);
|
||||
krisp-patcher = pkgs.writers.writePython3Bin "krisp-patcher" krisp-settings krisp-patch;
|
||||
in
|
||||
{
|
||||
options.my.apps.internet.enable = lib.mkEnableOption "internet browsers and communication apps";
|
||||
config = lib.mkMerge [
|
||||
{
|
||||
my.apps.internet.enable = lib.mkDefault hm.enabledByDefault;
|
||||
}
|
||||
(lib.mkIf cfg.enable {
|
||||
programs.librewolf = import ../librewolf.nix;
|
||||
home.packages = builtins.attrValues {
|
||||
inherit krisp-patcher;
|
||||
inherit (pkgs)
|
||||
warp
|
||||
nextcloud-client
|
||||
fragments
|
||||
tor-browser
|
||||
telegram-desktop
|
||||
nicotine-plus
|
||||
discord
|
||||
vdhcoapp
|
||||
nextcloud-talk-desktop
|
||||
fractal
|
||||
;
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
||||
19
modules/apps/internet/nixos.nix
Normal file
19
modules/apps/internet/nixos.nix
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
config,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
options.my.apps.internet = {
|
||||
enable = lib.mkEnableOption "internet browsers and communication apps";
|
||||
users = lib.mkOption {
|
||||
type = inputs.self.lib.usersOptionType lib;
|
||||
default = config.my.toggleUsers.apps;
|
||||
description = "Users to install internet packages for";
|
||||
};
|
||||
};
|
||||
config = lib.mkIf config.my.apps.internet.enable {
|
||||
programs.geary.enable = true;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user