Migrated from import based to config based

This commit is contained in:
2024-12-23 17:03:36 +01:00
parent c1b12746f5
commit 5edd8b1e01
36 changed files with 503 additions and 308 deletions

View File

@@ -0,0 +1,34 @@
{ pkgs, config, lib, ... }:
with lib;
let
cfg = config.settings.applications.common;
in {
options = {
settings.applications.common.enable = lib.mkOption {
type = lib.types.bool;
description = ''
Enable common applications
'';
};
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
usbutils
tree
fastfetch
btop
git
yazi
just
];
environment.pathsToLink = [ "/share/zsh" ];
programs.zsh.enable = true;
users.defaultUserShell = pkgs.zsh;
};
}

View File

@@ -0,0 +1,31 @@
{ config, lib, ... }:
with lib;
let
cfg = config.settings.applications.steam;
in {
options = {
settings.applications.steam.enable = lib.mkOption {
type = with lib.types; bool;
description = ''
Enable steam
'';
};
};
config = mkIf cfg.enable {
nixpkgs.config.allowUnfree = true;
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"steam"
"steam-original"
"steam-run"
];
programs.steam = {
enable = true;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true;
};
};
}

View File

@@ -0,0 +1,30 @@
{ pkgs, config, lib, ... }:
with lib;
let
cfg = config.settings.applications.thunar;
in {
options = {
settings.applications.thunar.enable = lib.mkOption {
type = lib.types.bool;
description = ''
Enable thunar file manager
'';
};
};
config = mkIf cfg.enable {
programs.thunar = {
enable = true;
plugins = with pkgs.xfce; [
thunar-archive-plugin
thunar-volman
];
};
services.gvfs.enable = true;
services.tumbler.enable = true;
programs.file-roller.enable = true;
};
}