feat: clean up configuration

This commit is contained in:
Xavier Morel
2025-07-24 12:17:21 +02:00
parent 697e300521
commit 522794e5ed
15 changed files with 96 additions and 92 deletions

View File

@@ -8,13 +8,19 @@
options.myHome.bundle.desktop-apps.enable = lib.mkEnableOption "enable desktop-apps bundle";
config = lib.mkIf config.myHome.bundle.desktop-apps.enable {
myHome.programs.kitty.enable = true;
myHome.programs.scanner.enable = true;
myHome.programs.photos.enable = true;
home.packages = map lib.lowPrio [
pkgs.bottles
pkgs.brightnessctl
pkgs.flameshot
pkgs.lutris
pkgs.ungoogled-chromium
pkgs.xfce.thunar
pkgs.xfce.thunar-archive-plugin
pkgs.xfce.thunar-volman
pkgs.vial
pkgs.vlc
];
};
}

View File

@@ -0,0 +1,26 @@
{
pkgs,
config,
lib,
...
}:
{
options.myHome.programs.creativity.enable = lib.mkEnableOption "enable creativity software";
config = lib.mkIf config.myHome.programs.creativity.enable {
home.packages = with pkgs; [
blender
tiled
aseprite
inkscape
prusa-slicer
openscad
godot_4
gdtoolkit_4
audacity
sfxr
];
};
}

View File

@@ -3,8 +3,12 @@
}:
{
imports = [
./creativity.nix
./fish.nix
./helix.nix
./kitty.nix
./nvim.nix
./photos.nix
./scanner.nix
];
}

View File

@@ -0,0 +1 @@
{ ... }: { }

View File

@@ -0,0 +1,15 @@
{
pkgs,
config,
lib,
...
}:
{
options.myHome.programs.photos.enable = lib.mkEnableOption "enable photo software";
config = lib.mkIf config.myHome.programs.photos.enable {
home.packages = with pkgs; [
# gimp
rawtherapee
];
};
}

View File

@@ -0,0 +1,15 @@
{
pkgs,
config,
lib,
...
}:
{
options.myHome.programs.scanner.enable = lib.mkEnableOption "enable scanner software";
config = lib.mkIf config.myHome.programs.scanner.enable {
home.packages = with pkgs; [
xsane
sane-frontends
];
};
}

View File

@@ -8,7 +8,7 @@
{
options.myNixOS.archetype.general.enable = lib.mkEnableOption "enable general archetype";
config = lib.mkIf config.myNixOS.archetype.general.enable {
myNixOS.features.stylix.enable = true;
myNixOS.feature.stylix.enable = true;
environment.systemPackages = [
pkgs.openssl

View File

@@ -11,10 +11,6 @@
./archetypes
./features
./home-manager.nix
# ./desktop-apps.nix
# ./fonts.nix
# ./gaming.nix
];
config = {

View File

@@ -1,59 +0,0 @@
{
pkgs,
lib,
config,
...
}:
with lib;
let
cfg = config.services.desktop-apps;
in
{
imports = [ ];
options.services.desktop-apps = {
enable = mkEnableOption "enable desktop-apps";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
kitty
skypeforlinux
flameshot
xsane
sane-frontends
blender
tiled
aseprite
gimp
eog
mpv
brightnessctl
spotify
obs-studio
prusa-slicer
openscad
ungoogled-chromium
inkscape
rawtherapee
godot_4
gdtoolkit_4
sfxr
lmms
audacity
handbrake
vlc
];
programs = {
firefox.enable = true;
thunar = {
enable = true;
plugins = with pkgs.xfce; [
thunar-archive-plugin
thunar-volman
];
};
};
};
}

View File

@@ -5,5 +5,8 @@
{
imports = [
./stylix.nix
./fonts.nix
./gaming.nix
./virtualisation.nix
];
}

View File

@@ -4,18 +4,10 @@
config,
...
}:
with lib;
let
cfg = config.services.fonts;
in
{
imports = [ ];
options.myNixOS.feature.fonts.enable = lib.mkEnableOption "enable fonts";
options.services.fonts = {
enable = mkEnableOption "enable fonts";
};
config = mkIf cfg.enable {
config = lib.mkIf config.myNixOS.feature.fonts.enable {
fonts.packages = with pkgs; [
noto-fonts
noto-fonts-cjk-sans

View File

@@ -4,23 +4,14 @@
config,
...
}:
with lib;
let
cfg = config.services.gaming;
in
{
imports = [ ];
options.myNixOS.feature.gaming.enable = lib.mkEnableOption "enable gaming";
options.services.gaming = {
enable = mkEnableOption "enable gaming";
};
config = mkIf cfg.enable {
config = lib.mkIf config.myNixOS.feature.gaming.enable {
environment.systemPackages = with pkgs; [
bottles
steam
discord
openttd
];
programs.steam.enable = true;
programs.gamemode.enable = true;

View File

@@ -5,8 +5,8 @@
...
}:
{
options.myNixOS.features.stylix.enable = lib.mkEnableOption "enable Stylix";
config = lib.mkIf config.myNixOS.features.stylix.enable {
options.myNixOS.feature.stylix.enable = lib.mkEnableOption "enable Stylix";
config = lib.mkIf config.myNixOS.feature.stylix.enable {
stylix = {
enable = true;
image = ../../../wall.jpg;

View File

@@ -0,0 +1,17 @@
{
pkgs,
lib,
config,
...
}:
{
options.myNixOS.feature.virtualisation.enable = lib.mkEnableOption "enable virtualisation";
config = lib.mkIf config.myNixOS.feature.virtualisation.enable {
virtualisation.podman = {
enable = true;
autoPrune.enable = true;
dockerCompat = true;
};
};
}