[NixOS] modules -> myModules

This commit is contained in:
Ivan Malison 2024-09-26 14:15:27 -06:00
parent 9b9da29b7a
commit c4a9a60112
37 changed files with 134 additions and 134 deletions

View File

@ -1,5 +1,5 @@
{ config, pkgs, forEachUser, makeEnable, realUsers, ... }: { config, pkgs, forEachUser, makeEnable, realUsers, ... }:
makeEnable config "modules.base" true { makeEnable config "myModules.base" true {
nixpkgs.config.permittedInsecurePackages = [ nixpkgs.config.permittedInsecurePackages = [
"openssl-1.0.2u" "openssl-1.0.2u"
"electron-12.2.3" "electron-12.2.3"

View File

@ -1,5 +1,5 @@
{ pkgs, inputs, config, makeEnable, ... }: { pkgs, inputs, config, makeEnable, ... }:
makeEnable config "modules.ben" true { makeEnable config "myModules.ben" true {
home-manager.backupFileExtension = "backup"; # Add this line home-manager.backupFileExtension = "backup"; # Add this line
home-manager.users.ben = { home-manager.users.ben = {
programs.zsh = { programs.zsh = {

View File

@ -1,10 +1,10 @@
{ config, lib, ... }: { config, lib, ... }:
with lib; with lib;
let cfg = config.modules.cache-server; let cfg = config.myModules.cache-server;
in in
{ {
options = { options = {
modules.cache-server = { myModules.cache-server = {
enable = mkEnableOption "nix cache server"; enable = mkEnableOption "nix cache server";
port = mkOption { port = mkOption {
type = types.int; type = types.int;

View File

@ -1,5 +1,5 @@
{ pkgs, config, makeEnable, ... }: { pkgs, config, makeEnable, ... }:
makeEnable config "modules.code" true { makeEnable config "myModules.code" true {
programs.direnv = { programs.direnv = {
enable = true; enable = true;
nix-direnv.enable = true; nix-direnv.enable = true;

View File

@ -42,17 +42,17 @@
}; };
config = lib.mkIf config.features.full.enable { config = lib.mkIf config.features.full.enable {
modules.base.enable = true; myModules.base.enable = true;
modules.desktop.enable = true; myModules.desktop.enable = true;
modules.plasma.enable = true; myModules.plasma.enable = true;
modules.gnome.enable = false; myModules.gnome.enable = false;
modules.xmonad.enable = true; myModules.xmonad.enable = true;
modules.extra.enable = true; myModules.extra.enable = true;
modules.electron.enable = true; myModules.electron.enable = true;
modules.code.enable = true; myModules.code.enable = true;
modules.games.enable = true; myModules.games.enable = true;
modules.syncthing.enable = true; myModules.syncthing.enable = true;
modules.fonts.enable = true; myModules.fonts.enable = true;
modules.nixified-ai.enable = false; myModules.nixified-ai.enable = false;
}; };
} }

View File

@ -1,5 +1,5 @@
{ config, pkgs, makeEnable, ... }: { config, pkgs, makeEnable, ... }:
makeEnable config "modules.desktop" true { makeEnable config "myModules.desktop" true {
imports = [ imports = [
./fonts.nix ./fonts.nix
]; ];

View File

@ -1,5 +1,5 @@
{ pkgs, config, makeEnable, forEachUser, ... }: { pkgs, config, makeEnable, forEachUser, ... }:
makeEnable config "modules.electron" false { makeEnable config "myModules.electron" false {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
element-desktop element-desktop
# bitwarden # bitwarden

View File

@ -1,5 +1,5 @@
{ config, pkgs, makeEnable, ... }: { config, pkgs, makeEnable, ... }:
makeEnable config "modules.extra" false { makeEnable config "myModules.extra" false {
services.expressvpn.enable = true; services.expressvpn.enable = true;
programs.hyprland.enable = true; programs.hyprland.enable = true;

View File

@ -1,5 +1,5 @@
{ pkgs, makeEnable, config, ... }: { pkgs, makeEnable, config, ... }:
makeEnable config "modules.fonts" true { makeEnable config "myModules.fonts" true {
# Enable the gtk icon cache # Enable the gtk icon cache
gtk.iconCache.enable = true; gtk.iconCache.enable = true;

View File

@ -1,5 +1,5 @@
{ config, pkgs, makeEnable, ... }: { config, pkgs, makeEnable, ... }:
makeEnable config "modules.games" false { makeEnable config "myModules.games" false {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
steam steam
# heroic # heroic

View File

@ -1,5 +1,5 @@
{ pkgs, config, makeEnable, ... }: { pkgs, config, makeEnable, ... }:
makeEnable config "modules.gitea-runner" false { makeEnable config "myModules.gitea-runner" false {
age.secrets.gitea-runner-token = { age.secrets.gitea-runner-token = {
file = ./secrets/gitea-runner-token.${config.networking.hostName}.age; file = ./secrets/gitea-runner-token.${config.networking.hostName}.age;
group = "docker"; group = "docker";

View File

@ -1,5 +1,5 @@
{ config, makeEnable, ... }: { config, makeEnable, ... }:
makeEnable config "modules.gitea" false { makeEnable config "myModules.gitea" false {
services.gitea = { services.gitea = {
enable = true; enable = true;

View File

@ -1,5 +1,5 @@
{ config, makeEnable, ... }: { config, makeEnable, ... }:
makeEnable config "modules.gnome" false { makeEnable config "myModules.gnome" false {
services.xserver = { services.xserver = {
desktopManager.gnome.enable = true; desktopManager.gnome.enable = true;
displayManager.gdm.enable = true; displayManager.gdm.enable = true;

View File

@ -1,5 +1,5 @@
{ pkgs, inputs, config, makeEnable, ... }: { pkgs, inputs, config, makeEnable, ... }:
makeEnable config "modules.kat" false { makeEnable config "myModules.kat" false {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
bitwarden bitwarden
obsidian obsidian

View File

@ -6,16 +6,16 @@
inputs.nixos-hardware.nixosModules.dell-xps-17-9700-nvidia inputs.nixos-hardware.nixosModules.dell-xps-17-9700-nvidia
]; ];
modules.base.enable = true; myModules.base.enable = true;
modules.desktop.enable = true; myModules.desktop.enable = true;
modules.xmonad.enable = true; myModules.xmonad.enable = true;
modules.extra.enable = false; myModules.extra.enable = false;
modules.code.enable = true; myModules.code.enable = true;
modules.games.enable = false; myModules.games.enable = false;
modules.syncthing.enable = true; myModules.syncthing.enable = true;
modules.fonts.enable = true; myModules.fonts.enable = true;
modules.nixified-ai.enable = false; myModules.nixified-ai.enable = false;
modules.gitea-runner.enable = false; myModules.gitea-runner.enable = false;
hardware.enableRedistributableFirmware = true; hardware.enableRedistributableFirmware = true;

View File

@ -8,10 +8,10 @@
sublime sublime
vlc vlc
]; ];
modules.desktop.enable = false; myModules.desktop.enable = false;
modules.plasma.enable = false; myModules.plasma.enable = false;
imalison.nixOverlay.enable = false; imalison.nixOverlay.enable = false;
modules.wsl.enable = true; myModules.wsl.enable = true;
networking.hostName = "bencbox"; networking.hostName = "bencbox";

View File

@ -13,25 +13,25 @@ in
extraGroups = ["syncthing"]; extraGroups = ["syncthing"];
}; };
modules.raspberry-pi.enable = true; myModules.raspberry-pi.enable = true;
modules.base.enable = true; myModules.base.enable = true;
modules.desktop.enable = true; myModules.desktop.enable = true;
modules.xmonad.enable = false; myModules.xmonad.enable = false;
modules.extra.enable = false; myModules.extra.enable = false;
modules.code.enable = true; myModules.code.enable = true;
modules.games.enable = false; myModules.games.enable = false;
modules.syncthing.enable = true; myModules.syncthing.enable = true;
modules.fonts.enable = true; myModules.fonts.enable = true;
modules.nixified-ai.enable = false; myModules.nixified-ai.enable = false;
modules.cache-server = { myModules.cache-server = {
enable = false; enable = false;
host-string = biskcomp-nginx-hostnames; host-string = biskcomp-nginx-hostnames;
port = 80; port = 80;
path = "/nix-cache"; path = "/nix-cache";
}; };
modules.gitea.enable = true; myModules.gitea.enable = true;
modules.gitea-runner.enable = false; myModules.gitea-runner.enable = false;
services.vaultwarden = { services.vaultwarden = {
enable = true; enable = true;

View File

@ -5,15 +5,15 @@
../configuration.nix ../configuration.nix
]; ];
modules.base.enable = true; myModules.base.enable = true;
modules.desktop.enable = true; myModules.desktop.enable = true;
modules.xmonad.enable = false; myModules.xmonad.enable = false;
modules.extra.enable = false; myModules.extra.enable = false;
modules.code.enable = true; myModules.code.enable = true;
modules.games.enable = false; myModules.games.enable = false;
modules.syncthing.enable = true; myModules.syncthing.enable = true;
modules.fonts.enable = true; myModules.fonts.enable = true;
modules.nixified-ai.enable = false; myModules.nixified-ai.enable = false;
hardware.enableRedistributableFirmware = true; hardware.enableRedistributableFirmware = true;

View File

@ -5,10 +5,10 @@
]; ];
services.xserver.enable = true; services.xserver.enable = true;
environment.systemPackages = with pkgs; [sublime]; environment.systemPackages = with pkgs; [sublime];
modules.desktop.enable = false; myModules.desktop.enable = false;
modules.plasma.enable = false; myModules.plasma.enable = false;
imalison.nixOverlay.enable = false; imalison.nixOverlay.enable = false;
modules.wsl.enable = true; myModules.wsl.enable = true;
networking.hostName = "dean-zephyrus"; networking.hostName = "dean-zephyrus";

View File

@ -5,7 +5,7 @@
]; ];
imalison.nixOverlay.enable = false; imalison.nixOverlay.enable = false;
modules.wsl.enable = true; myModules.wsl.enable = true;
networking.hostName = "jay-lenovo-wsl"; networking.hostName = "jay-lenovo-wsl";

View File

@ -27,7 +27,7 @@
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
modules.postgres.enable = true; myModules.postgres.enable = true;
networking.networkmanager.enable = true; networking.networkmanager.enable = true;

View File

@ -5,17 +5,17 @@
../configuration.nix ../configuration.nix
]; ];
modules.base.enable = true; myModules.base.enable = true;
modules.desktop.enable = true; myModules.desktop.enable = true;
modules.xmonad.enable = true; myModules.xmonad.enable = true;
modules.extra.enable = false; myModules.extra.enable = false;
modules.code.enable = true; myModules.code.enable = true;
modules.games.enable = false; myModules.games.enable = false;
modules.syncthing.enable = true; myModules.syncthing.enable = true;
modules.fonts.enable = true; myModules.fonts.enable = true;
modules.nixified-ai.enable = false; myModules.nixified-ai.enable = false;
modules.gitea-runner.enable = true; myModules.gitea-runner.enable = true;
modules.postgres.enable = true; myModules.postgres.enable = true;
hardware.enableRedistributableFirmware = true; hardware.enableRedistributableFirmware = true;

View File

@ -5,13 +5,13 @@
]; ];
features.full.enable = true; features.full.enable = true;
modules.cache-server = { myModules.cache-server = {
enable = true; enable = true;
port = 3090; port = 3090;
}; };
modules.gitea-runner.enable = true; myModules.gitea-runner.enable = true;
modules.vscode.enable = true; myModules.vscode.enable = true;
modules.kat.enable = true; myModules.kat.enable = true;
networking.hostName = "nixquick"; networking.hostName = "nixquick";

View File

@ -55,15 +55,15 @@
}; };
features.full.enable = false; features.full.enable = false;
modules.base.enable = true; myModules.base.enable = true;
modules.desktop.enable = true; myModules.desktop.enable = true;
modules.xmonad.enable = false; myModules.xmonad.enable = false;
modules.gnome.enable = true; myModules.gnome.enable = true;
modules.code.enable = true; myModules.code.enable = true;
modules.syncthing.enable = true; myModules.syncthing.enable = true;
modules.fonts.enable = true; myModules.fonts.enable = true;
modules.plasma.enable = false; myModules.plasma.enable = false;
modules.gitea-runner.enable = true; myModules.gitea-runner.enable = true;
fileSystems."/" = fileSystems."/" =
{ device = "/dev/disk/by-uuid/a317d456-6f84-41ee-a149-8e466e414aae"; { device = "/dev/disk/by-uuid/a317d456-6f84-41ee-a149-8e466e414aae";

View File

@ -7,13 +7,13 @@
features.full.enable = true; features.full.enable = true;
# Needed for now because monitors have different refresh rates # Needed for now because monitors have different refresh rates
modules.xmonad.picom.vSync.enable = false; myModules.xmonad.picom.vSync.enable = false;
modules.cache-server = { myModules.cache-server = {
enable = true; enable = true;
port = 3090; port = 3090;
}; };
modules.gitea-runner.enable = true; myModules.gitea-runner.enable = true;
modules.postgres.enable = true; myModules.postgres.enable = true;
boot.loader.systemd-boot.configurationLimit = 5; boot.loader.systemd-boot.configurationLimit = 5;

View File

@ -4,7 +4,7 @@
../configuration.nix ../configuration.nix
]; ];
modules.wsl.enable = true; myModules.wsl.enable = true;
networking.hostName = "strixi-minaj-wsl"; networking.hostName = "strixi-minaj-wsl";

View File

@ -6,16 +6,16 @@
inputs.nixos-hardware.nixosModules.asus-rog-strix-g834jzr inputs.nixos-hardware.nixosModules.asus-rog-strix-g834jzr
]; ];
modules.base.enable = true; myModules.base.enable = true;
modules.desktop.enable = true; myModules.desktop.enable = true;
modules.xmonad.enable = true; myModules.xmonad.enable = true;
modules.extra.enable = false; myModules.extra.enable = false;
modules.code.enable = true; myModules.code.enable = true;
modules.games.enable = false; myModules.games.enable = false;
modules.syncthing.enable = true; myModules.syncthing.enable = true;
modules.fonts.enable = true; myModules.fonts.enable = true;
modules.nixified-ai.enable = false; myModules.nixified-ai.enable = false;
modules.gitea-runner.enable = false; myModules.gitea-runner.enable = false;
hardware.enableRedistributableFirmware = true; hardware.enableRedistributableFirmware = true;

View File

@ -1,5 +1,5 @@
{ inputs, config, specialArgs, ... }: { inputs, config, specialArgs, ... }:
specialArgs.makeEnable config "modules.nixified-ai" false { specialArgs.makeEnable config "myModules.nixified-ai" false {
imports = [ imports = [
inputs.nixified-ai.nixosModules.invokeai inputs.nixified-ai.nixosModules.invokeai
]; ];

View File

@ -1,6 +1,6 @@
{ lib, ... }: { { lib, ... }: {
options = { options = {
modules.xmonad.picom.vSync.enable = lib.mkOption { myModules.xmonad.picom.vSync.enable = lib.mkOption {
default = true; default = true;
type = lib.types.bool; type = lib.types.bool;
}; };

View File

@ -1,5 +1,5 @@
{ config, makeEnable, ... }: { config, makeEnable, ... }:
makeEnable config "modules.plasma" true { makeEnable config "myModules.plasma" true {
services.displayManager.sddm.enable = true; services.displayManager.sddm.enable = true;
services.xserver = { services.xserver = {
desktopManager.plasma5.enable = true; desktopManager.plasma5.enable = true;

View File

@ -1,5 +1,5 @@
{ pkgs, config, makeEnable, realUsers, ... }: { pkgs, config, makeEnable, realUsers, ... }:
makeEnable config "modules.postgres" true { makeEnable config "myModules.postgres" true {
services.postgresql = { services.postgresql = {
enable = true; enable = true;
package = pkgs.postgresql_15; package = pkgs.postgresql_15;

View File

@ -1,5 +1,5 @@
{ pkgs, config, makeEnable, realUsers, ... }: { pkgs, config, makeEnable, realUsers, ... }:
makeEnable config "modules.rabbitmq" true { makeEnable config "myModules.rabbitmq" true {
services.rabbitmq = { services.rabbitmq = {
enable = true; enable = true;
}; };

View File

@ -1,6 +1,6 @@
{ config, pkgs, inputs, makeEnable, ... }: { config, pkgs, inputs, makeEnable, ... }:
makeEnable config "modules.raspberry-pi" false { makeEnable config "myModules.raspberry-pi" false {
imports = [ imports = [
inputs.nixos-hardware.nixosModules.raspberry-pi-4 inputs.nixos-hardware.nixosModules.raspberry-pi-4
]; ];

View File

@ -21,7 +21,7 @@ let
}; };
allDevices = builtins.attrNames devices; allDevices = builtins.attrNames devices;
in in
makeEnable config "modules.syncthing" true { makeEnable config "myModules.syncthing" true {
system.activationScripts.syncthingPermissions = { system.activationScripts.syncthingPermissions = {
text = '' text = ''
chown -R syncthing:syncthing /var/lib/syncthing chown -R syncthing:syncthing /var/lib/syncthing

View File

@ -1,5 +1,5 @@
{ inputs, config, makeEnable, forEachUser, ... }: { inputs, config, makeEnable, forEachUser, ... }:
makeEnable config "modules.vscode" true { makeEnable config "myModules.vscode" true {
home-manager.users = forEachUser { home-manager.users = forEachUser {
imports = [inputs.vscode-server.homeModules.default]; imports = [inputs.vscode-server.homeModules.default];
services.vscode-server.enable = true; services.vscode-server.enable = true;

View File

@ -1,13 +1,13 @@
{ config, inputs, pkgs, makeEnable, ... }: { config, inputs, pkgs, makeEnable, ... }:
makeEnable config "modules.wsl" false { makeEnable config "myModules.wsl" false {
imports = [ imports = [
inputs.nixos-wsl.nixosModules.wsl inputs.nixos-wsl.nixosModules.wsl
]; ];
modules.base.enable = false; myModules.base.enable = false;
modules.desktop.enable = false; myModules.desktop.enable = false;
modules.xmonad.enable = false; myModules.xmonad.enable = false;
modules.plasma.enable = false; myModules.plasma.enable = false;
# Update timezone automatically # Update timezone automatically
services.tzupdate.enable = true; services.tzupdate.enable = true;

View File

@ -1,5 +1,5 @@
{ config, pkgs, inputs, forEachUser, makeEnable, ... }: { config, pkgs, inputs, forEachUser, makeEnable, ... }:
makeEnable config "modules.xmonad" true { makeEnable config "myModules.xmonad" true {
nixpkgs.overlays = with inputs; [ nixpkgs.overlays = with inputs; [
xmonad.overlay xmonad.overlay
xmonad-contrib.overlay xmonad-contrib.overlay
@ -25,7 +25,7 @@ makeEnable config "modules.xmonad" true {
# Haskell Desktop # Haskell Desktop
haskellPackages.xmonad haskellPackages.xmonad
haskellPackages.imalison-xmonad haskellPackages.imalison-xmonad
haskellPackages.notifications-tray-icon # haskellPackages.notifications-tray-icon
haskellPackages.gtk-sni-tray haskellPackages.gtk-sni-tray
haskellPackages.status-notifier-item haskellPackages.status-notifier-item
haskellPackages.dbus-hslogger haskellPackages.dbus-hslogger
@ -80,7 +80,7 @@ makeEnable config "modules.xmonad" true {
services.picom = { services.picom = {
enable = true; enable = true;
vSync = config.modules.xmonad.picom.vSync.enable; vSync = config.myModules.xmonad.picom.vSync.enable;
backend = "glx"; backend = "glx";
extraArgs = ["--experimental-backends"]; extraArgs = ["--experimental-backends"];
@ -137,21 +137,21 @@ makeEnable config "modules.xmonad" true {
}; };
}; };
systemd.user.services.notifications-tray-icon = { # systemd.user.services.notifications-tray-icon = {
Unit = { # Unit = {
Description = "Notifications tray icon"; # Description = "Notifications tray icon";
After = [ "graphical-session-pre.target" "tray.target" ]; # After = [ "graphical-session-pre.target" "tray.target" ];
PartOf = [ "graphical-session.target" ]; # PartOf = [ "graphical-session.target" ];
}; # };
Install = { WantedBy = [ "graphical-session.target" ]; }; # Install = { WantedBy = [ "graphical-session.target" ]; };
Service = { # Service = {
ExecStart = "${pkgs.haskellPackages.notifications-tray-icon}/bin/notifications-tray-icon --github-token-pass dfinity-github-api-token"; # ExecStart = "${pkgs.haskellPackages.notifications-tray-icon}/bin/notifications-tray-icon --github-token-pass dfinity-github-api-token";
Restart = "always"; # Restart = "always";
RestartSec = 3; # RestartSec = 3;
}; # };
}; # };
systemd.user.services.shutter = { systemd.user.services.shutter = {
Unit = { Unit = {