feat: moving stuff from configuration to split modules \o/

This commit is contained in:
Yoru
2024-12-05 15:56:58 +01:00
parent d9c861d4b9
commit fb687d67f7
10 changed files with 320 additions and 119 deletions

View File

@@ -0,0 +1,22 @@
{ pkgs, lib, config, ... }:
with lib;
let
cfg = config.services.cli-environment;
in
{
imports = [];
options.services.cli-environment = {
enable = mkEnableOption "enable cli-environment";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
wget
unzip
helix
git
];
programs.fish.enable = true;
};
}

View File

@@ -0,0 +1,20 @@
{ 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
];
programs.firefox.enable = true;
};
}

View File

@@ -0,0 +1,22 @@
{ pkgs, lib, config, ... }:
with lib;
let
cfg = config.services.dev-environment;
in
{
imports = [];
options.services.dev-environment = {
enable = mkEnableOption "enable dev-environment";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
docker
docker-compose
git
cargo
rustup
];
};
}

27
modules/nixos/fonts.nix Normal file
View File

@@ -0,0 +1,27 @@
{ pkgs, lib, config, ... }:
with lib;
let
cfg = config.services.fonts;
in
{
imports = [];
options.services.fonts = {
enable = mkEnableOption "enable fonts";
};
config = mkIf cfg.enable {
fonts.packages = with pkgs; [
noto-fonts
noto-fonts-cjk-sans
noto-fonts-emoji
fira-code
nerd-fonts.fira-code
nerd-fonts.hack
nerd-fonts.droid-sans-mono
nerd-fonts.jetbrains-mono
nerd-fonts.fantasque-sans-mono
];
};
}

21
modules/nixos/gaming.nix Normal file
View File

@@ -0,0 +1,21 @@
{ pkgs, lib, config, ... }:
with lib;
let
cfg = config.services.gaming;
in
{
imports = [];
options.services.gaming = {
enable = mkEnableOption "enable gaming";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
steam
discord
];
programs.steam.enable = true;
programs.gamemode.enable = true;
};
}

View File

@@ -0,0 +1,24 @@
{ pkgs, lib, config, ... }:
with lib;
let
cfg = config.services.window-manager;
in
{
imports = [];
options.services.window-manager = {
enable = mkEnableOption "enable window-manager";
};
config = mkIf cfg.enable {
programs.hyprland.enable = true;
programs.hyprlock.enable = true;
security.pam.services.hyprlock = {};
environment.systemPackages = with pkgs; [
wofi
dolphin
waybar
pavucontrol
];
};
}