eradicate with lib;

This commit is contained in:
Sakooooo 2024-08-01 16:24:09 +04:00
parent 1369bd38a1
commit 9b21f7a0d4
Signed by: sako
GPG key ID: 3FD715D87D7725E0
90 changed files with 224 additions and 281 deletions

View file

@ -1,14 +1,13 @@
{ outputs, options, config, lib, pkgs, ...}:
with lib;
let
cfg = config.modules.desktop.apps.calibre;
in
{
options.modules.desktop.apps.calibre = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
users.users.sako.packages = with pkgs; [
calibre
];

View file

@ -1,14 +1,13 @@
{ outputs, options, config, lib, pkgs, ...}:
with lib;
let
cfg = config.modules.desktop.apps.kindle-comic-converter;
in
{
options.modules.desktop.apps.kindle-comic-converter = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
users.users.sako.packages = with pkgs; [
kcc
];

View file

@ -1,14 +1,13 @@
{ outputs, options, config, lib, pkgs, ...}:
with lib;
let
cfg = config.modules.desktop.apps.kdeconnect;
in
{
options.modules.desktop.apps.kdeconnect = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
#users.users.sako.packages = with pkgs; [
# kdeconnect
#];

View file

@ -1,14 +1,13 @@
{ outputs, options, config, lib, pkgs, ...}:
with lib;
let
cfg = config.modules.desktop.apps.keepassxc;
in
{
options.modules.desktop.apps.keepassxc = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
users.users.sako.packages = with pkgs; [
keepassxc
];

View file

@ -1,14 +1,13 @@
{ outputs, options, config, lib, pkgs, ...}:
with lib;
let
cfg = config.modules.desktop.apps.mangal;
in
{
options.modules.desktop.apps.mangal = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
users.users.sako.packages = with pkgs; [
mangal
];

View file

@ -1,14 +1,13 @@
{ outputs, options, config, lib, pkgs, ...}:
with lib;
let
cfg = config.modules.desktop.apps.nemo;
in
{
options.modules.desktop.apps.nemo = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
users.users.sako.packages = with pkgs; [
cinnamon.nemo
];

View file

@ -6,14 +6,14 @@
pkgs,
...
}:
with lib; let
let
cfg = config.modules.desktop.apps.nextcloud;
in {
options.modules.desktop.apps.nextcloud = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
users.users.sako.packages = with pkgs; [
nextcloud-client
];

View file

@ -1,18 +1,13 @@
# ITS A FILE SHARING THING
# NOT A GOD DAMN ADDICTION
# IM NOT ADDICTED TO MUSIC
# I SWEAR
{ outputs, options, config, lib, pkgs, ...}:
with lib;
let
cfg = config.modules.desktop.apps.nicotineplus;
in
{
options.modules.desktop.apps.nicotineplus = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
users.users.sako.packages = with pkgs; [
nicotine-plus
];

View file

@ -6,14 +6,14 @@
pkgs,
...
}:
with lib; let
let
cfg = config.modules.desktop.apps.obs;
in {
options.modules.desktop.apps.obs = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
users.users.sako.packages = with pkgs; [
obs-studio
];

View file

@ -6,14 +6,14 @@
pkgs,
...
}:
with lib; let
let
cfg = config.modules.desktop.apps.pass;
in {
options.modules.desktop.apps.pass = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
users.users.sako.packages = with pkgs; [
(pass.withExtensions (pkgs: with pkgs; [pass-otp pass-import pass-genphrase pass-checkup]))
rofi-pass

View file

@ -1,14 +1,13 @@
{ outputs, options, config, lib, pkgs, ...}:
with lib;
let
cfg = config.modules.desktop.apps.rssguard;
in
{
options.modules.desktop.apps.rssguard = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
users.users.sako.packages = with pkgs; [
rssguard
];

View file

@ -1,14 +1,13 @@
{ outputs, options, config, lib, pkgs, ...}:
with lib;
let
cfg = config.modules.desktop.apps.transmission;
in
{
options.modules.desktop.apps.transmission = {
daemon = mkEnableOption false;
daemon = lib.mkEnableOption false;
};
config = mkIf cfg.daemon {
config = lib.mkIf cfg.daemon {
#TODO(sako):: figure out service
users.users.sako.packages = with pkgs; [
transmission

View file

@ -1,5 +1,4 @@
{ outputs, options, config, lib, pkgs, ...}:
with lib;
let
cfg = config.modules.desktop.apps.transmission;
in
@ -9,10 +8,10 @@ in
./daemon.nix
];
options.modules.desktop.apps.transmission = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
#TODO(sako):: figure out service
users.users.sako.packages = with pkgs; [
transmission-gtk

View file

@ -1,14 +1,13 @@
{ outputs, options, config, lib, pkgs, ...}:
with lib;
let
cfg = config.modules.desktop.apps.transmission.tui;
in
{
options.modules.desktop.apps.transmission= {
tui = mkEnableOption false;
tui = lib.mkEnableOption false;
};
config = mkIf cfg {
config = lib.mkIf cfg {
users.users.sako.packages = with pkgs; [
stig
];

View file

@ -6,14 +6,14 @@
pkgs,
...
}:
with lib; let
let
cfg = config.modules.desktop.awesome;
in {
options.modules.desktop.awesome = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
# this needs to be enabled for gtk apps
programs.dconf.enable = true;

View file

@ -1,14 +1,13 @@
{ outputs, options, config, lib, pkgs, ...}:
with lib;
let
cfg = config.modules.desktop.browsers.chromium;
in
{
options.modules.desktop.browsers.chromium = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
users.users.sako.packages = with pkgs; [
chromium
];

View file

@ -5,17 +5,17 @@
pkgs,
...
}:
with lib; let
let
cfg = config.modules.desktop.browsers.firefox;
in {
options.modules.desktop.browsers.firefox = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
# TODO add this
# https://github.com/Dook97/firefox-qutebrowser-userchrome
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
programs.firefox = {
enable = true;
preferences = {

View file

@ -1,14 +1,13 @@
{ options, config, lib, pkgs, ...}:
with lib;
let
cfg = config.modules.desktop.browsers.qutebrowser;
in
{
options.modules.desktop.browsers.qutebrowser = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
users.users.sako.packages = with pkgs; [
qutebrowser-qt6
python310Packages.pynacl

View file

@ -6,7 +6,7 @@
pkgs,
...
}:
with lib; let
let
cfg = config.modules.desktop.bspwm;
in {
imports = [
@ -14,10 +14,10 @@ in {
./lemonbar
];
options.modules.desktop.bspwm = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
# this is needed for gtk configuration to work
programs.dconf.enable = true;

View file

@ -1,14 +1,13 @@
{ outputs, options, config, lib, pkgs, ...}:
with lib;
let
cfg = config.modules.desktop.bspwm.lemonbar;
in
{
options.modules.desktop.bspwm.lemonbar = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
users.users.sako.packages = with pkgs; [
lemonbar-xft
];

View file

@ -1,14 +1,13 @@
{ outputs, options, config, lib, pkgs, ...}:
with lib;
let
cfg = config.modules.desktop.bspwm.polybar;
in
{
options.modules.desktop.bspwm.polybar = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
users.users.sako.packages = with pkgs; [
polybar
];

View file

@ -6,14 +6,14 @@
pkgs,
...
}:
with lib; let
let
cfg = config.modules.desktop.chat.discord;
in {
options.modules.desktop.chat.discord = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
users.users.sako.packages = [
(pkgs.discord.override {
withOpenASAR = true;

View file

@ -6,14 +6,14 @@
pkgs,
...
}:
with lib; let
let
cfg = config.modules.desktop.chat.signal;
in {
options.modules.desktop.chat.signal = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
users.users.sako.packages = with pkgs; [
signal-desktop
];

View file

@ -1,14 +1,13 @@
{ outputs, options, config, lib, pkgs, ...}:
with lib;
let
cfg = config.modules.desktop.chat.teams;
in
{
options.modules.desktop.chat.teams = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
users.users.sako.packages = with pkgs; [
teams-for-linux
];

View file

@ -6,14 +6,14 @@
pkgs,
...
}:
with lib; let
let
cfg = config.modules.desktop.chat.telegram;
in {
options.modules.desktop.chat.telegram = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
users.users.sako.packages = with pkgs; [
telegram-desktop
];

View file

@ -6,14 +6,14 @@
pkgs,
...
}:
with lib; let
let
cfg = config.modules.desktop.chat.weechat;
in {
options.modules.desktop.chat.weechat = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
users.users.sako.packages = with pkgs; [
weechat
];

View file

@ -1,14 +1,13 @@
{ outputs, options, config, lib, pkgs, ...}:
with lib;
let
cfg = config.modules.desktop.chat.whatsapp;
in
{
options.modules.desktop.chat.whatsapp = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
users.users.sako.packages = with pkgs; [
whatsapp-for-linux
];

View file

@ -1,14 +1,13 @@
{ outputs, options, config, lib, pkgs, ...}:
with lib;
let
cfg = config.modules.desktop.chat.zoom;
in
{
options.modules.desktop.chat.zoom = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
users.users.sako.packages = with pkgs; [
zoom-us
];

View file

@ -1,14 +1,13 @@
{ outputs, options, config, lib, pkgs, ...}:
with lib;
let
cfg = config.modules.desktop.dunst;
in
{
options.modules.desktop.dunst = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [
dunst
libnotify

View file

@ -6,14 +6,14 @@
pkgs,
...
}:
with lib; let
let
cfg = config.modules.desktop.dwm;
in {
options.modules.desktop.dwm = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
# this needs to be enabled for gtk apps
programs.dconf.enable = true;
# enable dwm

View file

@ -6,17 +6,17 @@
pkgs,
...
}:
with lib; let
let
cfg = config.modules.desktop.exwm;
imports = [
../../dev/editors/emacs
];
in {
options.modules.desktop.exwm = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
modules.dev.editors.emacs.daemon = lib.mkForce false;
modules.dev.editors.emacs.enable = lib.mkForce true;
# this needs to be enabled for gtk apps

View file

@ -1,14 +1,13 @@
{ outputs, options, config, lib, pkgs, ...}:
with lib;
let
cfg = config.modules.desktop.game.grapejuice;
in
{
options.modules.desktop.game.grapejuice = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
users.users.sako.packages = with pkgs; [
grapejuice
];

View file

@ -1,14 +1,13 @@
{ outputs, options, config, lib, pkgs, ...}:
with lib;
let
cfg = config.modules.desktop.game.lutris;
in
{
options.modules.desktop.game.lutris = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
users.users.sako.packages = with pkgs; [
lutris
];

View file

@ -1,14 +1,13 @@
{ outputs, options, config, lib, pkgs, ...}:
with lib;
let
cfg = config.modules.desktop.game.steam;
in
{
options.modules.desktop.game.steam = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
users.users.sako.packages = with pkgs; [
steam
];

View file

@ -6,14 +6,14 @@
pkgs,
...
}:
with lib; let
let
cfg = config.modules.desktop.game.tetrio;
in {
options.modules.desktop.game.tetrio = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
users.users.sako.packages = with pkgs; [
(tetrio-desktop.override {
withTetrioPlus = true;

View file

@ -1,14 +1,13 @@
{ outputs, options, config, lib, pkgs, ...}:
with lib;
let
cfg = config.modules.desktop.game.wine;
in
{
options.modules.desktop.game.wine = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
users.users.sako.packages = with pkgs; [
winetricks
wineWowPackages.staging

View file

@ -1,14 +1,13 @@
{ outputs, options, config, lib, pkgs, ...}:
with lib;
let
cfg = config.modules.desktop.gnome;
in
{
options.modules.desktop.gnome = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
services.xserver = {
enable = true;
displayManager = {

View file

@ -1,14 +1,13 @@
{ outputs, options, config, lib, pkgs, ...}:
with lib;
let
cfg = config.modules.desktop.hyprland;
in
{
options.modules.desktop.hyprland = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
services.xserver = {
enable = true;
displayManager = {

View file

@ -6,14 +6,14 @@
pkgs,
...
}:
with lib; let
let
cfg = config.modules.desktop.i3;
in {
options.modules.desktop.i3 = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
# this is needed for gtk configuration to work
programs.dconf.enable = true;

View file

@ -1,14 +1,13 @@
{ outputs, options, config, lib, pkgs, ...}:
with lib;
let
cfg = config.modules.desktop.kde;
in
{
options.modules.desktop.kde = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
services.xserver = {
enable = true;
libinput.enable = true;

View file

@ -5,14 +5,14 @@
pkgs,
...
}:
with lib; let
let
cfg = config.modules.desktop.kitty;
in {
options.modules.desktop.kitty = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
users.users.sako.packages = with pkgs; [
kitty
];

View file

@ -1,14 +1,13 @@
{ outputs, options, config, lib, pkgs, ...}:
with lib;
let
cfg = config.modules.desktop.media.blender;
in
{
options.modules.desktop.media.blender = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
users.users.sako.packages = with pkgs; [
blender
];

View file

@ -1,14 +1,13 @@
{ outputs, options, config, lib, pkgs, ...}:
with lib;
let
cfg = config.modules.desktop.media.feishin;
in
{
options.modules.desktop.media.feishin = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
users.users.sako.packages = with pkgs; [
feishin
];

View file

@ -1,14 +1,13 @@
{ outputs, options, config, lib, pkgs, ...}:
with lib;
let
cfg = config.modules.desktop.media.gimp;
in
{
options.modules.desktop.media.gimp = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
users.users.sako.packages = with pkgs; [
gimp
];

View file

@ -6,14 +6,14 @@
pkgs,
...
}:
with lib; let
let
cfg = config.modules.desktop.media.jellyfin;
in {
options.modules.desktop.media.jellyfin = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
users.users.sako.packages = with pkgs; [
jellyfin-media-player
];

View file

@ -1,14 +1,13 @@
{ outputs, options, config, lib, pkgs, ...}:
with lib;
let
cfg = config.modules.desktop.media.kdenlive;
in
{
options.modules.desktop.media.kdenlive = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
users.users.sako.packages = with pkgs; [
kdenlive
mediainfo

View file

@ -1,14 +1,13 @@
{ outputs, options, config, lib, pkgs, ...}:
with lib;
let
cfg = config.modules.desktop.media.krita;
in
{
options.modules.desktop.media.krita = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
users.users.sako.packages = with pkgs; [
krita
];

View file

@ -1,14 +1,13 @@
{ outputs, options, config, lib, pkgs, ...}:
with lib;
let
cfg = config.modules.desktop.media.lmms;
in
{
options.modules.desktop.media.lmms = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
users.users.sako.packages = with pkgs; [
lmms
];

View file

@ -1,14 +1,13 @@
{ outputs, options, config, lib, pkgs, ...}:
with lib;
let
cfg = config.modules.desktop.media.mpv;
in
{
options.modules.desktop.media.mpv = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
users.users.sako.packages = with pkgs; [
mpv
];

View file

@ -1,15 +1,13 @@
{ outputs, options, config, lib, pkgs, ...}:
with lib;
# lmao this is broken
let
cfg = config.modules.desktop.media.resolve;
in
{
options.modules.desktop.media.resolve = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
users.users.sako.packages = with pkgs; [
sako.davinci-resolve
];

View file

@ -6,14 +6,14 @@
pkgs,
...
}:
with lib; let
let
cfg = config.modules.desktop.picom;
in {
options.modules.desktop.picom = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
users.users.sako.packages = with pkgs; [
picom
];

View file

@ -6,14 +6,14 @@
pkgs,
...
}:
with lib; let
let
cfg = config.modules.desktop.plymouth;
in {
options.modules.desktop.plymouth = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
boot.plymouth = {
enable = true;
};

View file

@ -5,14 +5,14 @@
pkgs,
...
}:
with lib; let
let
cfg = config.modules.desktop.printing;
in {
options.modules.desktop.printing = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
# enable printing itself
services.printing = {
enable = true;

View file

@ -6,16 +6,16 @@
pkgs,
...
}:
with lib; let
let
cfg = config.modules.desktop.qtile;
in {
options.modules.desktop.qtile = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
#TODO Do this
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
services.xserver = {
enable = true;
windowManager.qtile = {

View file

@ -5,14 +5,14 @@
pkgs,
...
}:
with lib; let
let
cfg = config.modules.desktop.wezterm;
in {
options.modules.desktop.wezterm = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
users.users.sako.packages = with pkgs; [
wezterm
];

View file

@ -6,14 +6,14 @@
pkgs,
...
}:
with lib; let
let
cfg = config.modules.desktop.wireguard;
in {
options.modules.desktop.wireguard = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
# todo declaritivly setting it up
networking.wireguard.enable = true;
};

View file

@ -5,14 +5,14 @@
pkgs,
...
}:
with lib; let
let
cfg = config.modules.desktop.xmonad;
in {
options.modules.desktop.xmonad = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
# this needs to be enabled for gtk apps
programs.dconf.enable = true;

View file

@ -1,14 +1,13 @@
{ outputs, options, config, lib, pkgs, ...}:
with lib;
let
cfg = config.modules.dev.cc;
in
{
options.modules.dev.cc = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
users.users.sako.packages = with pkgs; [
gcc
gnumake

View file

@ -1,14 +1,13 @@
{ outputs, options, config, lib, pkgs, ...}:
with lib;
let
cfg = config.modules.dev.csharp;
in
{
options.modules.dev.csharp = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
users.users.sako.packages = with pkgs; [
omnisharp-roslyn
];

View file

@ -7,7 +7,7 @@
inputs,
...
}:
with lib; let
let
cfg = config.modules.dev.editors.emacs;
@ -72,16 +72,16 @@ with lib; let
};
in {
options.modules.dev.editors.emacs = {
enable = mkEnableOption false;
daemon = mkEnableOption true;
package = mkOption {
type = with types; package;
enable = lib.mkEnableOption false;
daemon = lib.mkEnableOption true;
package = lib.mkOption {
type = with lib.types; package;
default = pkgs.emacs-unstable;
description = "pkgs. followed by the name of the emacs overlay package";
};
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
nixpkgs.overlays = [
inputs.emacs-overlay.overlay
];

View file

@ -6,14 +6,14 @@
pkgs,
...
}:
with lib; let
let
cfg = config.modules.dev.editors.nvim;
in {
options.modules.dev.editors.nvim = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
# because yes
users.users.sako.packages = with pkgs; [
neovim

View file

@ -6,17 +6,17 @@
pkgs,
...
}:
with lib; let
let
cfg = config.modules.dev.editors.vscode;
in {
imports = [
./fhs.nix
];
options.modules.dev.editors.vscode = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
users.users.sako.packages = with pkgs; [
(vscode-with-extensions.override {
vscodeExtensions = with vscode-extensions;

View file

@ -6,14 +6,14 @@
pkgs,
...
}:
with lib; let
let
cfg = config.modules.dev.editors.vscode.fhs;
in {
options.modules.dev.editors.vscode.fhs = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
users.users.sako.packages = with pkgs; [
vscode.fhs
];

View file

@ -1,14 +1,13 @@
{ outputs, options, config, lib, pkgs, ...}:
with lib;
let
cfg = config.modules.dev.javascript;
in
{
options.modules.dev.javascript = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
users.users.sako.packages = with pkgs; [
nodejs
yarn

View file

@ -6,14 +6,14 @@
pkgs,
...
}:
with lib; let
let
cfg = config.modules.dev.lua;
in {
options.modules.dev.lua = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
users.users.sako.packages = with pkgs; [
lua-language-server
lua

View file

@ -1,14 +1,13 @@
{ outputs, options, config, lib, pkgs, ...}:
with lib;
let
cfg = config.modules.dev.nil;
in
{
options.modules.dev.nil = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [
nil
alejandra

View file

@ -8,16 +8,16 @@
pkgs,
...
}:
with lib; let
let
cfg = config.modules.dev.nixd;
in {
options.modules.dev.nixd = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
# TODO(sako):: figure out how .nixd.json works
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [
unstable.nixd
alejandra

View file

@ -6,14 +6,14 @@
pkgs,
...
}:
with lib; let
let
cfg = config.modules.dev.python;
in {
options.modules.dev.python = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
users.users.sako.packages = with pkgs; [
python3
black

View file

@ -1,14 +1,13 @@
{ outputs, options, config, lib, pkgs, ...}:
with lib;
let
cfg = config.modules.dev.rust;
in
{
options.modules.dev.rust= {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
users.users.sako.packages = with pkgs; [
rustup
cargo

View file

@ -1,14 +1,13 @@
{ options, config, lib, pkgs, ...}:
with lib;
let
cfg = config.modules.hardware.bluetooth;
in
{
options.modules.hardware.bluetooth = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
hardware.bluetooth = {
enable = true;
settings = {

View file

@ -1,14 +1,13 @@
{ outputs, options, config, lib, pkgs, ...}:
with lib;
let
cfg = config.modules.hardware.intelgputools;
in
{
options.modules.hardware.intelgputools = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
users.users.sako.packages = with pkgs; [
intel-gpu-tools
];

View file

@ -6,17 +6,17 @@
pkgs,
...
}:
with lib; let
let
cfg = config.modules.hardware.nvidia;
in {
imports = [
./prime.nix
];
options.modules.hardware.nvidia = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
hardware.opengl = {
enable = true;
driSupport = true;

View file

@ -6,26 +6,26 @@
pkgs,
...
}:
with lib; let
let
cfg = config.modules.hardware.nvidia.prime;
busIDType = lib.types.strMatching "([[:print:]]+[\:\@][0-9]{1,3}\:[0-9]{1,2}\:[0-9])?";
in {
options.modules.hardware.nvidia.prime = {
enable = mkOption {
type = types.bool;
enable = lib.mkOption {
type = lib.types.bool;
default = false;
};
intelBusId = mkOption {
intelBusId = lib.mkOption {
type = busIDType;
default = "";
};
nvidiaBusId = mkOption {
nvidiaBusId = lib.mkOption {
type = busIDType;
default = "";
};
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
hardware.nvidia = {
prime = {
offload = {

View file

@ -1,14 +1,13 @@
{ outputs, options, config, lib, pkgs, ...}:
with lib;
let
cfg = config.modules.hardware.pipewire;
in
{
options.modules.hardware.pipewire = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
# resolve racial conflict between
# pulseaudio and pipewire
sound.enable = lib.mkDefault false;

View file

@ -5,14 +5,14 @@
lib,
...
}:
with lib; let
let
cfg = config.modules.media.mopidy;
in {
options.modules.media.mopidy = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
services.mopidy = {
enable = true;
extensionPackages = with pkgs; [

View file

@ -1,14 +1,13 @@
{ outputs, options, config, lib, pkgs, ...}:
with lib;
let
cfg = config.modules.media.mpd;
in
{
options.modules.media.mpd = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
services.mpd = {
enable = true;
user = "sako";

View file

@ -1,14 +1,13 @@
{ outputs, options, config, lib, pkgs, ...}:
with lib;
let
cfg = config.modules.media.ncmpcpp;
in
{
options.modules.media.ncmpcpp = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
users.users.sako.packages = with pkgs; [
ncmpcpp
];

View file

@ -1,14 +1,13 @@
{ outputs, options, config, lib, pkgs, ...}:
with lib;
let
cfg = config.modules.security.age;
in
{
options.modules.security.age = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [
age
];

View file

@ -6,14 +6,14 @@
pkgs,
...
}:
with lib; let
let
cfg = config.modules.security.certs;
in {
options.modules.security.certs = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
security.pki.certificateFiles = [./trust/homelab.pem];
};
}

View file

@ -6,14 +6,14 @@
pkgs,
...
}:
with lib; let
let
cfg = config.modules.security.age;
in {
options.modules.security.sops = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [
sops
];

View file

@ -1,14 +1,13 @@
{ outputs, options, config, lib, pkgs, ...}:
with lib;
let
cfg = config.modules.shell.aria;
in
{
options.modules.shell.aria= {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
users.users.sako.packages = with pkgs; [
aria
];

View file

@ -1,14 +1,13 @@
{ outputs, options, config, lib, pkgs, ...}:
with lib;
let
cfg = config.modules.shell.newsboat;
in
{
options.modules.shell.newsboat= {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
users.users.sako.packages = with pkgs; [
newsboat
];

View file

@ -2,15 +2,14 @@
# this automatically optimizes stuff like nix-store
# and cleans out garbage weekly
# also limits generations
with lib;
let cfg = config.modules.shell.nix.optimize;
in
{
options.modules.shell.nix.optimize = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
nix = {
# garbage collection
gc = {

View file

@ -2,15 +2,14 @@
# this makes
# nix search nixpkgs <package>
# ALOT faster
with lib;
let cfg = config.modules.shell.nix.search;
in
{
options.modules.shell.nix.search = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
nix = {
registry = {
nixpkgs.flake = inputs.nixpkgs;

View file

@ -6,14 +6,14 @@
pkgs,
...
}:
with lib; let
let
cfg = config.modules.shell.ranger;
in {
options.modules.shell.ranger = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
users.users.sako.packages = with pkgs; [
ranger
# pdf viewer

View file

@ -1,14 +1,13 @@
{ outputs, options, config, lib, pkgs, ...}:
with lib;
let
cfg = config.modules.shell.tmux;
in
{
options.modules.shell.tmux = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [
tmux
];

View file

@ -6,14 +6,14 @@
pkgs,
...
}:
with lib; let
let
cfg = config.modules.shell.zsh;
in {
options.modules.shell.zsh = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
users.users.sako.shell = pkgs.zsh;
programs.zsh = {

View file

@ -1,14 +1,13 @@
{ outputs, options, config, lib, pkgs, ...}:
with lib;
let
cfg = config.modules.virtualization.libvirtd;
in
{
options.modules.virtualization.libvirtd = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
virtualization.libvirtd.enable = true;
programs.dconf.enable = true;
environtment.systemPackages = with pkgs; [

View file

@ -6,14 +6,14 @@
pkgs,
...
}:
with lib; let
let
cfg = config.modules.work.libreoffice;
in {
options.modules.work.libreoffice = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
users.users.sako.packages = with pkgs; [
libreoffice
];

View file

@ -1,16 +1,15 @@
# i wonder what the difference is
{ outputs, options, config, lib, pkgs, ...}:
with lib;
let
cfg = config.modules.work.onlyoffice;
in
{
options.modules.work.onlyoffice = {
enable = mkEnableOption false;
enable = lib.mkEnableOption false;
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
users.users.sako.packages = with pkgs; [
onlyoffice-bin
];