Group modules into feature directories

This commit is contained in:
Oliver Davies 2024-11-26 08:40:00 +00:00
parent 0baed7e6f6
commit 9782272a76
49 changed files with 244 additions and 83 deletions

View file

@ -61,11 +61,8 @@ in
[
brave
build-glove80
discord
gimp
gscan2pdf
handbrake
kdenlive
meslo-lg
obs-studio
okular
@ -74,11 +71,8 @@ in
pavucontrol
pinentry
via
pocket-casts
xcape
xsel
pkgs.nixpkgs-2405.zoom-us
]
);

View file

@ -9,10 +9,20 @@
desktop = {
copyq.enable = true;
discord.enable = true;
espanso.enable = true;
flameshot.enable = true;
gtk.enable = true;
slack.enable = true;
media = {
gimp.enable = true;
kdenlive.enable = true;
pocket-casts.enable = true;
mpv.enable = true;
};
zoom.enable = true;
};
};
}

View file

@ -195,14 +195,10 @@
rclone
rclone-browser
shotwell
slack
vscode
xfce.thunar
xfce.thunar-volman
xfce.tumbler
# Games.
zeroad
];
# Some programs need SUID wrappers, can be configured further or are

View file

@ -1,3 +1,15 @@
{
features = {
desktop = {
gaming.enable = true;
homelab = {
gitea.enable = true;
immich.enable = true;
jellyfin.enable = true;
};
};
};
imports = [ ./configuration.nix ];
}

View file

@ -1,42 +1,8 @@
{
config,
inputs,
lib,
pkgs,
...
}:
{ ... }:
{
imports = [
(import ./neovim.nix {
inherit
config
inputs
lib
pkgs
;
})
./alacritty.nix
./bat.nix
./bin.nix
./bluetuith.nix
./copyq.nix
./direnv.nix
./espanso.nix
./flameshot.nix
./fzf.nix
./git.nix
./gtk.nix
./htop.nix
./lsd.nix
./mpv.nix
./pet.nix
./phpactor.nix
./ripgrep.nix
./starship.nix
./syncthing.nix
./tmux.nix
./zsh.nix
./features/cli
./features/desktop
];
}

View file

@ -0,0 +1,37 @@
{
config,
inputs,
lib,
pkgs,
...
}:
{
imports = [
# (import ./neovim.nix {
# inherit
# config
# inputs
# lib
# pkgs
# ;
# })
./bat.nix
./bin.nix
./bluetuith.nix
./direnv.nix
./fzf.nix
./git.nix
./htop.nix
./lsd.nix
./neovim.nix
./pet.nix
./phpactor.nix
./ripgrep.nix
./starship.nix
./syncthing.nix
./tmux.nix
./zsh.nix
];
}

View file

@ -0,0 +1,13 @@
{
imports = [
./alacritty.nix
./copyq.nix
./discord.nix
./espanso.nix
./flameshot.nix
./gtk.nix
./media
./slack.nix
./zoom.nix
];
}

View file

@ -0,0 +1,14 @@
{
config,
lib,
pkgs,
...
}:
{
options.features.desktop.discord.enable = lib.mkEnableOption "Enable Discord";
config = lib.mkIf config.features.desktop.discord.enable {
home.packages = with pkgs; [ discord ];
};
}

View file

@ -0,0 +1,8 @@
{
imports = [
./gimp.nix
./kdenlive.nix
./mpv.nix
./pocket-casts.nix
];
}

View file

@ -0,0 +1,14 @@
{
config,
lib,
pkgs,
...
}:
{
options.features.desktop.media.gimp.enable = lib.mkEnableOption "Enable gimp";
config = lib.mkIf config.features.desktop.media.gimp.enable {
home.packages = with pkgs; [ gimp ];
};
}

View file

@ -0,0 +1,14 @@
{
config,
lib,
pkgs,
...
}:
{
options.features.desktop.media.kdenlive.enable = lib.mkEnableOption "Enable kdenlive";
config = lib.mkIf config.features.desktop.media.kdenlive.enable {
home.packages = with pkgs; [ kdenlive ];
};
}

View file

@ -1,9 +1,9 @@
{ config, lib, ... }:
{
options.features.desktop.mpv.enable = lib.mkEnableOption "Enable mpv media player";
options.features.desktop.media.mpv.enable = lib.mkEnableOption "Enable mpv media player";
config = lib.mkIf config.features.desktop.mpv.enable {
config = lib.mkIf config.features.desktop.media.mpv.enable {
programs.mpv = {
enable = true;

View file

@ -0,0 +1,14 @@
{
config,
lib,
pkgs,
...
}:
{
options.features.desktop.media.pocket-casts.enable = lib.mkEnableOption "Enable Pocket Casts";
config = lib.mkIf config.features.desktop.media.pocket-casts.enable {
home.packages = with pkgs; [ pocket-casts ];
};
}

View file

@ -0,0 +1,14 @@
{
config,
lib,
pkgs,
...
}:
{
options.features.desktop.slack.enable = lib.mkEnableOption "Enable Slack";
config = lib.mkIf config.features.desktop.slack.enable {
home.packages = with pkgs; [ slack ];
};
}

View file

@ -0,0 +1,14 @@
{
config,
lib,
pkgs,
...
}:
{
options.features.desktop.zoom.enable = lib.mkEnableOption "Enable zoom";
config = lib.mkIf config.features.desktop.zoom.enable {
home.packages = with pkgs; [ nixpkgs-2405.zoom-us ];
};
}

View file

@ -2,11 +2,10 @@
imports = [
./autorandr.nix
./docker.nix
./features/gaming.nix
./features/homelab
./fonts.nix
./gitea.nix
./i3.nix
./immich.nix
./jellyfin.nix
./kanata.nix
./rofi.nix
./rsnapshot.nix

View file

@ -0,0 +1,16 @@
{
config,
lib,
pkgs,
...
}:
{
options.features.desktop.gaming.enable = lib.mkEnableOption "Enable games";
config = lib.mkIf config.features.desktop.gaming.enable {
programs.steam.enable = true;
environment.systemPackages = with pkgs; [ zeroad ];
};
}

View file

@ -0,0 +1,7 @@
{
imports = [
./gitea.nix
./immich.nix
./jellyfin.nix
];
}

View file

@ -0,0 +1,21 @@
{ config, lib, ... }:
{
options.features.desktop.homelab.gitea.enable = lib.mkEnableOption "Enable gitea";
config = lib.mkIf config.features.desktop.homelab.gitea.enable {
services.gitea = {
enable = true;
settings = {
server = {
HTTP_PORT = 2222;
};
service = {
DISABLE_REGISTRATION = true;
};
};
};
};
}

View file

@ -0,0 +1,16 @@
{
config,
lib,
pkgs,
...
}:
{
options.features.desktop.homelab.immich.enable = lib.mkEnableOption "Enable immich";
config = lib.mkIf config.features.desktop.homelab.immich.enable {
services.immich.enable = true;
environment.systemPackages = [ pkgs.immich-cli ];
};
}

View file

@ -0,0 +1,12 @@
{ config, lib, ... }:
{
options.features.desktop.homelab.jellyfin.enable = lib.mkEnableOption "Enable jellyfin";
config = lib.mkIf config.features.desktop.homelab.jellyfin.enable {
services.jellyfin = {
enable = true;
openFirewall = true;
};
};
}

View file

@ -1,17 +0,0 @@
{ pkgs, ... }:
{
services.gitea = {
enable = true;
settings = {
server = {
HTTP_PORT = 2222;
};
service = {
DISABLE_REGISTRATION = true;
};
};
};
}

View file

@ -1,7 +0,0 @@
{ pkgs, ... }:
{
services.immich.enable = true;
environment.systemPackages = [ pkgs.immich-cli ];
}

View file

@ -1,6 +0,0 @@
{
services.jellyfin = {
enable = true;
openFirewall = true;
};
}