initial commit for module-refactor

This commit is contained in:
pagedmov
2024-11-01 21:01:52 -04:00
parent 7bee6ebce5
commit ff2535e7a7
62 changed files with 2819 additions and 2670 deletions

View File

@@ -18,5 +18,6 @@ in {
++ [(import ./programs.nix)]
++ [(import ./services.nix)]
++ [(import ./nixvim)]
++ [(import ./module-test.nix)]
++ desktop_modules;
}

View File

@@ -1,5 +1,10 @@
{pkgs, ...}: {
environment.systemPackages = with pkgs; [
snes9x-gtk
];
{lib, config, pkgs, ...}: {
options = {
gamingPkgs.enable = lib.mkEnableOption "enables gaming packages";
};
config = lib.mkIf config.gamingPkgs.enable {
environment.systemPackages = with pkgs; [
snes9x-gtk
];
};
}

View File

@@ -1,6 +1,11 @@
{...}: {
programs.steam = {
enable = true;
remotePlay.openFirewall = true;
{lib, config, ...}: {
options = {
steamOpts.enable = lib.mkEnableOption "enables steam configuration";
};
config = lib.mkIf config.steamOpts.enable {
programs.steam = {
enable = true;
remotePlay.openFirewall = true;
};
};
}

View File

@@ -0,0 +1,11 @@
{ pkgs, lib, config, ... }:
{
options = {
testmodule.enable = lib.mkEnableOption "enables test module";
};
config = lib.mkIf config.testmodule.enable {
environment.systemPackages = with pkgs; [
hello
];
};
}

View File

@@ -1,79 +1,79 @@
{
pkgs,
inputs,
...
}: {
environment.systemPackages = with pkgs; [
alejandra
alsa-lib
alsa-utils
bc
cava
cabal-install
clang
clang-tools
cliphist
cmake
fail2ban
feh
ffmpeg-full
fuse
git
gnumake
gst_all_1.gstreamer
htop
hyprland
hyprland-workspaces
hyprpicker
imagemagick
inetutils
kitty
libclang
libcxx
lolcat
lsof
lua-language-server
luarocks
mesa
mpd
mullvad
mesa
neofetch
nh
nix-index
nix-output-monitor
nix-prefetch-scripts
nixos-option
nix-search-cli
nvd
openssl
p7zip
jq
pamixer
parted
pavucontrol
pkg-config
playerctl
protonmail-bridge
protontricks
pyright
socat
sox
stress
tor
tree
unrar
unzip
usbutils
vim
vscode-langservers-extracted
vulkan-loader
wget
wine
wl-clipboard
xpad
libnotify
file
libvirt-glib
];
{lib, config, pkgs, inputs, ... }: {
options = {
sysPkgs.enable = lib.mkEnableOption "enables default system packages";
};
config = lib.mkIf config.sysPkgs.enable {
environment.systemPackages = with pkgs; [
alejandra
alsa-lib
alsa-utils
bc
cava
cabal-install
clang
clang-tools
cliphist
cmake
fail2ban
feh
ffmpeg-full
fuse
git
gnumake
gst_all_1.gstreamer
htop
hyprland-workspaces
hyprpicker
imagemagick
inetutils
kitty
libclang
libcxx
lolcat
lsof
lua-language-server
luarocks
mesa
mpd
mullvad
mesa
neofetch
nh
nix-index
nix-output-monitor
nix-prefetch-scripts
nixos-option
nix-search-cli
nvd
openssl
p7zip
jq
pamixer
parted
pavucontrol
pkg-config
playerctl
protonmail-bridge
protontricks
pyright
socat
sox
stress
tor
tree
unrar
unzip
usbutils
vim
vscode-langservers-extracted
vulkan-loader
wget
wine
wl-clipboard
xpad
libnotify
file
libvirt-glib
];
};
}

View File

@@ -1,17 +1,22 @@
{pkgs, ...}: {
programs = {
hyprland.enable = true;
zsh.enable = true;
nix-ld = {
enable = true;
libraries = with pkgs; [
stdenv.cc.cc
ffmpeg-full
];
};
gnupg.agent = {
enable = true;
enableSSHSupport = true;
{lib, config, pkgs, ...}: {
options = {
sysProgs.enable = lib.mkEnableOption "enables default system programs";
};
config = lib.mkIf config.sysProgs.enable {
programs = {
hyprland.enable = true;
zsh.enable = true;
nix-ld = {
enable = true;
libraries = with pkgs; [
stdenv.cc.cc
ffmpeg-full
];
};
gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
};
};
}

View File

@@ -1,19 +1,24 @@
{...}: {
services = {
pipewire = {
enable = true;
pulse.enable = true;
wireplumber.enable = true;
alsa.enable = true;
alsa.support32Bit = true;
};
udev.enable = true;
dbus.enable = true;
mullvad-vpn.enable = true;
blueman.enable = true;
openssh = {
enable = true;
allowSFTP = true;
{lib, config, ...}: {
options = {
sysServices.enable = lib.mkEnableOption "enables default system services";
};
config = lib.mkIf config.sysServices.enable {
services = {
pipewire = {
enable = true;
pulse.enable = true;
wireplumber.enable = true;
alsa.enable = true;
alsa.support32Bit = true;
};
udev.enable = true;
dbus.enable = true;
mullvad-vpn.enable = true;
blueman.enable = true;
openssh = {
enable = true;
allowSFTP = true;
};
};
};
}

View File

@@ -1,4 +1,9 @@
{username, ...}: {
virtualisation.libvirtd.enable = true;
programs.virt-manager.enable = true;
{lib, config, username, ...}: {
options = {
virtOpts.enable = lib.mkEnableOption "enables virtualization";
};
config = lib.mkIf config.virtOpts.enable {
virtualisation.libvirtd.enable = true;
programs.virt-manager.enable = true;
};
}