Simplify use of lib
This commit is contained in:
parent
3d4bca0ada
commit
0f90bcfd70
25 changed files with 124 additions and 74 deletions
nix/modules/nixos/features
|
@ -1,9 +1,11 @@
|
|||
{ lib, config, ... }:
|
||||
|
||||
{
|
||||
options.features.cli.docker.enable = lib.mkEnableOption "Enable Docker";
|
||||
with lib;
|
||||
|
||||
config = lib.mkIf config.features.cli.docker.enable {
|
||||
{
|
||||
options.features.cli.docker.enable = mkEnableOption "Enable Docker";
|
||||
|
||||
config = mkIf config.features.cli.docker.enable {
|
||||
virtualisation.docker = {
|
||||
enable = true;
|
||||
|
||||
|
|
|
@ -5,10 +5,12 @@
|
|||
...
|
||||
}:
|
||||
|
||||
{
|
||||
options.features.desktop.peek.enable = lib.mkEnableOption "Enable peek";
|
||||
with lib;
|
||||
|
||||
config = lib.mkIf config.features.desktop.peek.enable {
|
||||
{
|
||||
options.features.desktop.peek.enable = mkEnableOption "Enable peek";
|
||||
|
||||
config = mkIf config.features.desktop.peek.enable {
|
||||
environment.systemPackages = with pkgs; [ peek ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -6,10 +6,12 @@
|
|||
...
|
||||
}:
|
||||
|
||||
{
|
||||
options.features.desktop.screenkey.enable = lib.mkEnableOption "Enable screenkey";
|
||||
with lib;
|
||||
|
||||
config = lib.mkIf config.features.desktop.screenkey.enable {
|
||||
{
|
||||
options.features.desktop.screenkey.enable = mkEnableOption "Enable screenkey";
|
||||
|
||||
config = mkIf config.features.desktop.screenkey.enable {
|
||||
environment.systemPackages = with pkgs; [ screenkey ];
|
||||
|
||||
home-manager.users.${username}.xdg.configFile."screenkey.json".text = builtins.toJSON {
|
||||
|
|
|
@ -5,10 +5,12 @@
|
|||
...
|
||||
}:
|
||||
|
||||
{
|
||||
options.features.desktop.gaming.enable = lib.mkEnableOption "Enable games";
|
||||
with lib;
|
||||
|
||||
config = lib.mkIf config.features.desktop.gaming.enable {
|
||||
{
|
||||
options.features.desktop.gaming.enable = mkEnableOption "Enable games";
|
||||
|
||||
config = mkIf config.features.desktop.gaming.enable {
|
||||
programs.steam.enable = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [ zeroad ];
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
options.features.homelab.gitea.enable = lib.mkEnableOption "Enable gitea";
|
||||
with lib;
|
||||
|
||||
config = lib.mkIf config.features.homelab.gitea.enable {
|
||||
{
|
||||
options.features.homelab.gitea.enable = mkEnableOption "Enable gitea";
|
||||
|
||||
config = mkIf config.features.homelab.gitea.enable {
|
||||
services.gitea = {
|
||||
enable = true;
|
||||
|
||||
|
|
|
@ -5,10 +5,12 @@
|
|||
...
|
||||
}:
|
||||
|
||||
{
|
||||
options.features.homelab.immich.enable = lib.mkEnableOption "Enable immich";
|
||||
with lib;
|
||||
|
||||
config = lib.mkIf config.features.homelab.immich.enable {
|
||||
{
|
||||
options.features.homelab.immich.enable = mkEnableOption "Enable immich";
|
||||
|
||||
config = mkIf config.features.homelab.immich.enable {
|
||||
services.immich.enable = true;
|
||||
|
||||
environment.systemPackages = [ pkgs.immich-cli ];
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
options.features.homelab.jellyfin.enable = lib.mkEnableOption "Enable jellyfin";
|
||||
with lib;
|
||||
|
||||
config = lib.mkIf config.features.homelab.jellyfin.enable {
|
||||
{
|
||||
options.features.homelab.jellyfin.enable = mkEnableOption "Enable jellyfin";
|
||||
|
||||
config = mkIf config.features.homelab.jellyfin.enable {
|
||||
services.jellyfin = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue