[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, ... }:
makeEnable config "modules.base" true {
makeEnable config "myModules.base" true {
nixpkgs.config.permittedInsecurePackages = [
"openssl-1.0.2u"
"electron-12.2.3"

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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