aboutsummaryrefslogtreecommitdiff
path: root/snowfall/modules/nixos
diff options
context:
space:
mode:
authorCaroline Larimore <caroline@larimo.re>2025-04-14 19:01:38 -0700
committerCaroline Larimore <caroline@larimo.re>2025-04-14 19:01:38 -0700
commite8077fde966e051fc449fffcfa061c7f7edc47b0 (patch)
treea0b1ce60f2718f90c64e924ed8df8d5d4f0d2289 /snowfall/modules/nixos
parente486d896215e7ef04438809952bc7317512d5765 (diff)
migration: finalize
Diffstat (limited to 'snowfall/modules/nixos')
-rw-r--r--snowfall/modules/nixos/apps/i3/default.nix50
-rw-r--r--snowfall/modules/nixos/apps/playerctl/default.nix18
-rw-r--r--snowfall/modules/nixos/apps/steam/default.nix18
-rw-r--r--snowfall/modules/nixos/hardware/audio/default.nix25
-rw-r--r--snowfall/modules/nixos/hardware/keyboard/default.nix43
-rw-r--r--snowfall/modules/nixos/services/minecraft/default.nix25
-rw-r--r--snowfall/modules/nixos/services/minecraft/stargazers/default.nix83
-rw-r--r--snowfall/modules/nixos/services/minecraft/zenith/default.nix21
-rw-r--r--snowfall/modules/nixos/services/ssh/default.nix28
-rw-r--r--snowfall/modules/nixos/services/web/default.nix23
-rw-r--r--snowfall/modules/nixos/services/web/images/default.nix34
-rw-r--r--snowfall/modules/nixos/services/web/landing/default.nix34
-rw-r--r--snowfall/modules/nixos/services/web/personal/default.nix63
-rw-r--r--snowfall/modules/nixos/services/web/stargazers/default.nix34
-rw-r--r--snowfall/modules/nixos/suites/common/default.nix25
-rw-r--r--snowfall/modules/nixos/suites/desktop/default.nix27
-rw-r--r--snowfall/modules/nixos/suites/gaming/default.nix17
-rw-r--r--snowfall/modules/nixos/system/default.nix30
-rw-r--r--snowfall/modules/nixos/system/fonts/default.nix38
-rw-r--r--snowfall/modules/nixos/system/impermanence/default.nix49
-rw-r--r--snowfall/modules/nixos/tools/bash/default.nix29
-rw-r--r--snowfall/modules/nixos/tools/bash/prompt.sh84
-rw-r--r--snowfall/modules/nixos/tools/git/default.nix16
-rw-r--r--snowfall/modules/nixos/tools/misc/default.nix19
-rw-r--r--snowfall/modules/nixos/tools/rebuild/default.nix16
-rw-r--r--snowfall/modules/nixos/tools/vim/default.nix19
26 files changed, 0 insertions, 868 deletions
diff --git a/snowfall/modules/nixos/apps/i3/default.nix b/snowfall/modules/nixos/apps/i3/default.nix
deleted file mode 100644
index e01c6c2..0000000
--- a/snowfall/modules/nixos/apps/i3/default.nix
+++ /dev/null
@@ -1,50 +0,0 @@
-{ options, config, lib, namespace, ... }:
-
-with lib; with lib.${namespace}; let
- cfg = config.${namespace}.apps.i3;
-in {
- options.${namespace}.apps.i3 = with types; {
- enable = mkEnableOption "i3";
-
- videoDrivers = mkOption {
- type = types.listOf types.str;
- default = [ "modesetting" "fbdev" ];
- };
-
- setupCommands = mkOption {
- type = types.lines;
- default = "";
- description = ''
- Shell commands executed just after the X server has started.
- '';
- };
- };
-
- config = mkIf cfg.enable {
- services = {
- displayManager = {
- enable = true;
- defaultSession = "none+i3";
- };
-
- xserver = {
- enable = true;
- windowManager.i3.enable = true;
-
- displayManager = {
- lightdm.enable = true;
- setupCommands = cfg.setupCommands;
- };
-
- videoDrivers = cfg.videoDrivers;
- xkb.layout = "us";
- };
-
- libinput = {
- enable = true;
- mouse.accelProfile = "flat";
- touchpad.naturalScrolling = true;
- };
- };
- };
-}
diff --git a/snowfall/modules/nixos/apps/playerctl/default.nix b/snowfall/modules/nixos/apps/playerctl/default.nix
deleted file mode 100644
index 9bf95d7..0000000
--- a/snowfall/modules/nixos/apps/playerctl/default.nix
+++ /dev/null
@@ -1,18 +0,0 @@
-{ options, config, lib, pkgs, namespace, ... }:
-
-with lib; with lib.${namespace}; let
- cfg = config.${namespace}.apps.playerctl;
-in {
- options.${namespace}.apps.playerctl = with types; {
- enable = mkEnableOption "playerctl";
- };
-
- config = mkIf cfg.enable {
- environment.systemPackages = with pkgs; [
- playerctl
- ];
-
- #TODO: enable, eventually
- services.playerctld.enable = false;
- };
-}
diff --git a/snowfall/modules/nixos/apps/steam/default.nix b/snowfall/modules/nixos/apps/steam/default.nix
deleted file mode 100644
index b9baebf..0000000
--- a/snowfall/modules/nixos/apps/steam/default.nix
+++ /dev/null
@@ -1,18 +0,0 @@
-{ options, config, lib, pkgs, namespace, ... }:
-
-with lib; with lib.${namespace}; let
- cfg = config.${namespace}.apps.steam;
-in {
- options.${namespace}.apps.steam = with types; {
- enable = mkEnableOption "steam";
- };
-
- config = mkIf cfg.enable {
- nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
- "steam"
- "steam-unwrapped"
- ];
-
- programs.steam.enable = true;
- };
-}
diff --git a/snowfall/modules/nixos/hardware/audio/default.nix b/snowfall/modules/nixos/hardware/audio/default.nix
deleted file mode 100644
index d2bfa96..0000000
--- a/snowfall/modules/nixos/hardware/audio/default.nix
+++ /dev/null
@@ -1,25 +0,0 @@
-{ options, config, lib, pkgs, namespace, ... }:
-
-with lib; with lib.${namespace}; let
- cfg = config.${namespace}.hardware.audio;
-in {
- options.${namespace}.hardware.audio = with types; {
- enable = mkEnableOption "audio support";
- };
-
- config = mkIf cfg.enable {
- environment.systemPackages = with pkgs; [
- pulseaudio
- ];
-
- security.rtkit.enable = true;
- services.pipewire = {
- enable = true;
-
- pulse.enable = true;
- alsa.enable = true;
- alsa.support32Bit = true;
- #jack.enable = true;
- };
- };
-}
diff --git a/snowfall/modules/nixos/hardware/keyboard/default.nix b/snowfall/modules/nixos/hardware/keyboard/default.nix
deleted file mode 100644
index 0ea2aa6..0000000
--- a/snowfall/modules/nixos/hardware/keyboard/default.nix
+++ /dev/null
@@ -1,43 +0,0 @@
-{ options, config, lib, pkgs, namespace, ... }:
-
-with lib; with lib.${namespace}; let
- cfg = config.${namespace}.hardware.keyboard;
-in {
- options.${namespace}.hardware.keyboard = with types; {
- enable = mkEnableOption "keyboard hardware tweaks";
- jp.enable = mkEnableOption "japanese ime support";
- };
-
- config = mkIf cfg.enable {
- services.keyd = {
- enable = true;
-
- keyboards."*".settings = {
- main = {
- # Swap alt and meta keys.
- # I prefer (physical) alt as my WM modifier key because it
- # is easier to reach. This can collide with some programs
- # shortcuts if they inlcude alt. Swapping alt and meta fixes
- # this by making my WM mod key (software) meta, freeing up alt.
-
- leftalt = "leftmeta";
- leftmeta = "leftalt";
-
- rightalt = "rightmeta";
- rightmeta = "rightalt";
- };
- };
- };
-
- i18n.inputMethod = mkIf cfg.jp.enable {
- enable = true;
- type = "fcitx5";
- fcitx5.addons = with pkgs; [ fcitx5-mozc ];
- };
-
- environment.variables = mkIf cfg.jp.enable {
- # Required for fcitx5 support in kitty
- GLFW_IM_MODULE = "ibus";
- };
- };
-}
diff --git a/snowfall/modules/nixos/services/minecraft/default.nix b/snowfall/modules/nixos/services/minecraft/default.nix
deleted file mode 100644
index 7705c1c..0000000
--- a/snowfall/modules/nixos/services/minecraft/default.nix
+++ /dev/null
@@ -1,25 +0,0 @@
-{ options, config, lib, namespace, inputs, ... }:
-
-with lib; with lib.${namespace}; let
- cfg = config.${namespace}.services.minecraft;
- impermanence = config.${namespace}.system.impermanence;
-in {
- options.${namespace}.services.minecraft = with types; {
- enable = mkEnableOption "minecraft server support";
- };
-
- config = mkIf cfg.enable {
- nixpkgs = {
- overlays = [ inputs.nix-minecraft.overlay ];
- config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
- "minecraft-server"
- ];
- };
-
- services.minecraft-servers = {
- enable = true;
- eula = true;
- openFirewall = true;
- };
- };
-}
diff --git a/snowfall/modules/nixos/services/minecraft/stargazers/default.nix b/snowfall/modules/nixos/services/minecraft/stargazers/default.nix
deleted file mode 100644
index cb934f8..0000000
--- a/snowfall/modules/nixos/services/minecraft/stargazers/default.nix
+++ /dev/null
@@ -1,83 +0,0 @@
-{ options, config, lib, pkgs, namespace, ... }:
-
-with lib; with lib.${namespace}; let
- cfg = config.${namespace}.services.minecraft.stargazers;
- impermanence = config.${namespace}.system.impermanence;
-in {
- options.${namespace}.services.minecraft.stargazers = with types; {
- enable = mkEnableOption "stargazers minecraft server";
-
- port = mkOption {
- type = types.port;
- default = 25565;
- description = "server port";
- };
-
- start = mkOption {
- type = types.bool;
- default = true;
- description = "autostart";
- };
- };
-
- config = mkIf cfg.enable {
- cxl.services.minecraft.enable = true;
-
- #TODO: enable tmux
- #cxl.tools.tmux.enable = true;
-
- environment.persistence.${impermanence.location} = {
- directories = [
- "/srv/minecraft/stargazers"
- ];
- };
-
- services.minecraft-servers.servers.stargazers = {
- enable = true;
- openFirewall = true;
- autoStart = cfg.start;
-
- package = pkgs.fabricServers.fabric-1_21;
-
- operators = {
- "grippysockjail" = "9448c89d-34eb-4e2c-a231-8112eb1a9e4a";
- "antonymph" = "6b1f7a3c-a1c3-491a-8514-12b6b90d9152";
- };
-
- serverProperties = {
- white-list = true;
- enforce-whitelist = true;
-
- gamemode = "survival";
- difficulty = "hard";
- level-seed = "4167799982467607063";
- spawn-protection = 0;
-
- max-players = 69;
- motd = "\\u00a7r \\u00a75\\u00a7lstrge gazrer\\u00a7r\\n join or i will rip your bones out and eat them";
-
- server-port = cfg.port;
- query-port = cfg.port;
- };
-
- symlinks.mods = pkgs.linkFarmFromDrvs "mods" (builtins.attrValues {
- fabric = pkgs.fetchurl {
- url = "https://cdn.modrinth.com/data/P7dR8mSH/versions/vMQdA5QJ/fabric-api-0.100.7%2B1.21.jar";
- sha256 = "sha256-grNmYgSekBaTztR1SLbqZCOC6+QNUDLe4hp105qfibA=";
- };
- lithium = pkgs.fetchurl {
- url = "https://cdn.modrinth.com/data/gvQqBUqZ/versions/my7uONjU/lithium-fabric-mc1.21-0.12.7.jar";
- sha256 = "sha256-Qku6c545jVgrdxDSNe3BULVQlMtgGuXebNqirRcmsh0=";
- };
- noChatReports = pkgs.fetchurl {
- url = "https://cdn.modrinth.com/data/qQyHxfxd/versions/riMhCAII/NoChatReports-FABRIC-1.21-v2.8.0.jar";
- sha256 = "sha256-jskscOeK3ri2dt3mvWLPVmzddwPqBHJ8Ps+VfZ6l9os=";
- };
- appleskin = pkgs.fetchurl {
- url = "https://cdn.modrinth.com/data/EsAfCjCV/versions/YxFxnyd4/appleskin-fabric-mc1.21-3.0.2.jar";
- sha256 = "sha256-8XaZREWzA5Mi2/LTs/a6ACvDKmHWYIy8JcOfQaq4yiE=";
- };
- });
- };
- };
-}
diff --git a/snowfall/modules/nixos/services/minecraft/zenith/default.nix b/snowfall/modules/nixos/services/minecraft/zenith/default.nix
deleted file mode 100644
index 0bc19f7..0000000
--- a/snowfall/modules/nixos/services/minecraft/zenith/default.nix
+++ /dev/null
@@ -1,21 +0,0 @@
-{ options, config, lib, pkgs, namespace, ... }:
-
-#TODO: nix-ify zenithproxy
-with lib; with lib.${namespace}; let
- cfg = config.${namespace}.services.minecraft.zenith;
- impermanence = config.${namespace}.system.impermanence;
-in {
- options.${namespace}.services.minecraft.zenith = with types; {
- enable = mkEnableOption "zenithproxy server";
-
- port = mkOption {
- type = types.port;
- default = 25565;
- description = "server port";
- };
- };
-
- config = mkIf cfg.enable {
- networking.firewall.allowedTCPPorts = mkIf cfg.openFirewall [ cfg.port ];
- };
-}
diff --git a/snowfall/modules/nixos/services/ssh/default.nix b/snowfall/modules/nixos/services/ssh/default.nix
deleted file mode 100644
index 6856897..0000000
--- a/snowfall/modules/nixos/services/ssh/default.nix
+++ /dev/null
@@ -1,28 +0,0 @@
-{ options, config, lib, namespace, ... }:
-
-with lib; with lib.${namespace}; let
- cfg = config.${namespace}.services.ssh;
- impermanence = config.${namespace}.system.impermanence;
-in {
- options.${namespace}.services.ssh = with types; {
- enable = mkEnableOption "ssh server";
-
- port = mkOption {
- type = types.port;
- default = 22;
- description = "ssh server port";
- };
- };
-
- config = mkIf cfg.enable {
- openssh = {
- enable = true;
- ports = [ cfg.port ];
-
- settings = {
- PermitRootLogin = "no";
- PasswordAuthentication = false;
- };
- };
- };
-}
diff --git a/snowfall/modules/nixos/services/web/default.nix b/snowfall/modules/nixos/services/web/default.nix
deleted file mode 100644
index 1e1e854..0000000
--- a/snowfall/modules/nixos/services/web/default.nix
+++ /dev/null
@@ -1,23 +0,0 @@
-{ options, config, lib, namespace, ... }:
-
-with lib; with lib.${namespace}; let
- cfg = config.${namespace}.services.web;
- impermanence = config.${namespace}.system.impermanence;
-in {
- options.${namespace}.services.web = with types; {
- enable = mkEnableOption "web";
- };
-
- config = mkIf cfg.enable {
- environment.persistence.${impermanence.location} = {
- directories = [
- "/var/lib/acme"
- ];
- };
-
- security.acme = {
- acceptTerms = true;
- defaults.email = "caroline@larimo.re";
- };
- };
-}
diff --git a/snowfall/modules/nixos/services/web/images/default.nix b/snowfall/modules/nixos/services/web/images/default.nix
deleted file mode 100644
index b1c44e6..0000000
--- a/snowfall/modules/nixos/services/web/images/default.nix
+++ /dev/null
@@ -1,34 +0,0 @@
-{ options, config, lib, namespace, ... }:
-
-with lib; with lib.${namespace}; let
- cfg = config.${namespace}.services.web.images;
- impermanence = config.${namespace}.system.impermanence;
-in {
- options.${namespace}.services.web.images = with types; {
- enable = mkEnableOption "image webserver";
- };
-
- config = mkIf cfg.enable {
- cxl.services.web.enable = true;
-
- environment.persistence.${impermanence.location} = {
- directories = [
- "/srv/web/images"
- ];
- };
-
- networking.firewall.allowedTCPPorts = [ 80 443 ];
-
- services.nginx = {
- enable = true;
- virtualHosts = {
- "i.cxl.sh" = {
- addSSL = true;
- enableACME = true;
-
- root = "/srv/web/images";
- };
- };
- };
- };
-}
diff --git a/snowfall/modules/nixos/services/web/landing/default.nix b/snowfall/modules/nixos/services/web/landing/default.nix
deleted file mode 100644
index fe9e92b..0000000
--- a/snowfall/modules/nixos/services/web/landing/default.nix
+++ /dev/null
@@ -1,34 +0,0 @@
-{ options, config, lib, namespace, ... }:
-
-with lib; with lib.${namespace}; let
- cfg = config.${namespace}.services.web.landing;
- impermanence = config.${namespace}.system.impermanence;
-in {
- options.${namespace}.services.web.landing = with types; {
- enable = mkEnableOption "cxl.sh landing page webserver";
- };
-
- config = mkIf cfg.enable {
- cxl.services.web.enable = true;
-
- environment.persistence.${impermanence.location} = {
- directories = [
- "/srv/web/landing"
- ];
- };
-
- networking.firewall.allowedTCPPorts = [ 80 443 ];
-
- services.nginx = {
- enable = true;
- virtualHosts = {
- "cxl.sh" = {
- addSSL = true;
- enableACME = true;
-
- root = "/srv/web/landing";
- };
- };
- };
- };
-}
diff --git a/snowfall/modules/nixos/services/web/personal/default.nix b/snowfall/modules/nixos/services/web/personal/default.nix
deleted file mode 100644
index daf94c1..0000000
--- a/snowfall/modules/nixos/services/web/personal/default.nix
+++ /dev/null
@@ -1,63 +0,0 @@
-{ options, config, lib, pkgs, namespace, ... }:
-
-with lib; with lib.${namespace}; let
- cfg = config.${namespace}.services.web.personal;
- impermanence = config.${namespace}.system.impermanence;
-
- package = (pkgs.buildGoModule rec {
- pname = "site";
- version = "6612d84c63a7bbc2a5b70607f2ec32ea070c4659";
-
- src = pkgs.fetchFromGitHub {
- owner = "CartConnoisseur";
- repo = "site";
- rev = "${version}";
- hash = "sha256-n54+LdtMyjoLfaFqd7tcDQqBiYCdUW/Rs67Vc4QwEJ0=";
- };
-
- # kinda a hack, but whatever
- postBuild = ''
- mkdir -p $out/share/site
- cp -r $src/* $out/share/site/
- '';
-
- vendorHash = "sha256-2/4Wv7nsaT0wnUzkRgHKpSswigDj9nOvlmYXK29rvLU=";
- });
-in {
- options.${namespace}.services.personal.images = with types; {
- enable = mkEnableOption "personal site webserver";
- };
-
- config = mkIf cfg.enable {
- cxl.services.web.enable = true;
-
- networking.firewall.allowedTCPPorts = [ 80 443 ];
-
- services.nginx = {
- enable = true;
- virtualHosts = {
- "caroline.larimo.re" = {
- # serverAliases = [ "cxl.sh" ];
-
- addSSL = true;
- enableACME = true;
-
- locations."/" = {
- recommendedProxySettings = true;
- proxyPass = "http://127.0.0.1:8080/";
- };
- };
- };
- };
-
- systemd.services."cxl.web.personal" = {
- enable = true;
- wantedBy = [ "multi-user.target" ];
-
- serviceConfig = {
- WorkingDirectory = "${package}/share/site";
- ExecStart = "${package}/bin/site";
- };
- };
- };
-}
diff --git a/snowfall/modules/nixos/services/web/stargazers/default.nix b/snowfall/modules/nixos/services/web/stargazers/default.nix
deleted file mode 100644
index 3e9b46e..0000000
--- a/snowfall/modules/nixos/services/web/stargazers/default.nix
+++ /dev/null
@@ -1,34 +0,0 @@
-{ options, config, lib, namespace, ... }:
-
-with lib; with lib.${namespace}; let
- cfg = config.${namespace}.services.web.stargazers;
- impermanence = config.${namespace}.system.impermanence;
-in {
- options.${namespace}.services.web.stargazers = with types; {
- enable = mkEnableOption "stargazers webserver";
- };
-
- config = mkIf cfg.enable {
- cxl.services.web.enable = true;
-
- environment.persistence.${impermanence.location} = {
- directories = [
- "/srv/web/stargazers"
- ];
- };
-
- networking.firewall.allowedTCPPorts = [ 80 443 ];
-
- services.nginx = {
- enable = true;
- virtualHosts = {
- "stargazers.xn--6frz82g" = {
- addSSL = true;
- enableACME = true;
-
- root = "/srv/web/stargazers";
- };
- };
- };
- };
-}
diff --git a/snowfall/modules/nixos/suites/common/default.nix b/snowfall/modules/nixos/suites/common/default.nix
deleted file mode 100644
index 1e7a053..0000000
--- a/snowfall/modules/nixos/suites/common/default.nix
+++ /dev/null
@@ -1,25 +0,0 @@
-{ options, config, lib, namespace, ... }:
-
-with lib; with lib.${namespace}; let
- cfg = config.${namespace}.suites.common;
-in {
- options.${namespace}.suites.common = with types; {
- enable = mkEnableOption "common";
- };
-
- config = mkIf cfg.enable {
- cxl = {
- hardware = {
- keyboard.enable = true;
- };
-
- tools = {
- bash.enable = true;
- vim.enable = true;
- git.enable = true;
- misc.enable = true;
- rebuild.enable = true;
- };
- };
- };
-}
diff --git a/snowfall/modules/nixos/suites/desktop/default.nix b/snowfall/modules/nixos/suites/desktop/default.nix
deleted file mode 100644
index 246f38c..0000000
--- a/snowfall/modules/nixos/suites/desktop/default.nix
+++ /dev/null
@@ -1,27 +0,0 @@
-{ options, config, lib, namespace, ... }:
-
-with lib; with lib.${namespace}; let
- cfg = config.${namespace}.suites.desktop;
-in {
- options.${namespace}.suites.desktop = with types; {
- enable = mkEnableOption "desktop";
- };
-
- config = mkIf cfg.enable {
- cxl = {
- hardware = {
- audio.enable = true;
- keyboard.jp.enable = true;
- };
-
- apps = {
- i3.enable = true;
- playerctl.enable = true;
- };
-
- system.fonts.enable = true;
- };
-
- programs.dconf.enable = true;
- };
-}
diff --git a/snowfall/modules/nixos/suites/gaming/default.nix b/snowfall/modules/nixos/suites/gaming/default.nix
deleted file mode 100644
index e95e1cd..0000000
--- a/snowfall/modules/nixos/suites/gaming/default.nix
+++ /dev/null
@@ -1,17 +0,0 @@
-{ options, config, lib, namespace, ... }:
-
-with lib; with lib.${namespace}; let
- cfg = config.${namespace}.suites.gaming;
-in {
- options.${namespace}.suites.gaming = with types; {
- enable = mkEnableOption "gaming";
- };
-
- config = mkIf cfg.enable {
- cxl = {
- apps = {
- steam.enable = true;
- };
- };
- };
-}
diff --git a/snowfall/modules/nixos/system/default.nix b/snowfall/modules/nixos/system/default.nix
deleted file mode 100644
index 96c5654..0000000
--- a/snowfall/modules/nixos/system/default.nix
+++ /dev/null
@@ -1,30 +0,0 @@
-{ options, config, lib, namespace, ... }:
-
-with lib; with lib.${namespace}; let
- cfg = config.${namespace}.system;
-in {
- options.${namespace}.system = with types; {
- hostname = mkOption {
- type = strMatching "^$|^[[:alnum:]]([[:alnum:]_-]{0,61}[[:alnum:]])?$";
- };
-
- id = mkOption {
- default = null;
- type = nullOr str;
- };
-
- timezone = mkOption {
- default = "America/Los_Angeles";
- type = nullOr str;
- };
- };
-
- config = {
- nix.settings.experimental-features = [ "nix-command" "flakes" ];
-
- networking.hostName = cfg.hostname;
- networking.hostId = cfg.id;
-
- time.timeZone = cfg.timezone;
- };
-}
diff --git a/snowfall/modules/nixos/system/fonts/default.nix b/snowfall/modules/nixos/system/fonts/default.nix
deleted file mode 100644
index c510679..0000000
--- a/snowfall/modules/nixos/system/fonts/default.nix
+++ /dev/null
@@ -1,38 +0,0 @@
-{ options, config, lib, pkgs, namespace, ... }:
-
-with lib; with lib.${namespace}; let
- cfg = config.${namespace}.system.fonts;
-in {
- options.${namespace}.system.fonts = with types; {
- enable = mkEnableOption "fonts";
- nerdfonts = mkEnableOption "nerdfonts";
- extra = mkOption {
- type = listOf package;
- default = [];
- description = ''
- additional fonts to install
- '';
- };
- };
-
- config = mkIf cfg.enable {
- fonts = {
- packages = with pkgs; [
- noto-fonts
- noto-fonts-cjk-sans
- noto-fonts-cjk-serif
- noto-fonts-emoji
- ] ++ (
- optionals cfg.nerdfonts (
- builtins.filter lib.attrsets.isDerivation (builtins.attrValues pkgs.nerd-fonts)
- )
- ) ++ cfg.extra;
-
- fontconfig.defaultFonts = {
- monospace = [ "CaskaydiaMono Nerd Font" ];
- sansSerif = [ "DejaVu Sans" "Noto Sans CJK JP" "Noto Sans" ];
- serif = [ "DejaVu Serif" "Noto Serif CJK JP" "Noto Serif" ];
- };
- };
- };
-}
diff --git a/snowfall/modules/nixos/system/impermanence/default.nix b/snowfall/modules/nixos/system/impermanence/default.nix
deleted file mode 100644
index b82579b..0000000
--- a/snowfall/modules/nixos/system/impermanence/default.nix
+++ /dev/null
@@ -1,49 +0,0 @@
-{ options, config, lib, namespace, ... }:
-
-with lib; with lib.${namespace}; let
- cfg = config.${namespace}.system.impermanence;
-in {
- options.${namespace}.system.impermanence = with types; {
- enable = mkEnableOption "root impermanence";
-
- location = mkOption {
- type = str;
- default = "/persist/system";
- };
-
- #TODO: multi-user support
- home = {
- enable = mkEnableOption "home impermanence";
-
- location = mkOption {
- type = str;
- default = "/persist/home";
- };
-
- secure.location = mkOption {
- type = str;
- default = "/persist/secure/home";
- };
- };
- };
-
- config = mkIf cfg.enable {
- programs.fuse.userAllowOther = true;
-
- environment.persistence.${cfg.location} = {
- hideMounts = true;
-
- directories = [
- "/etc/nixos"
- "/var/log"
- "/var/lib/nixos"
- "/var/lib/systemd/coredump"
- # "/var/lib/bluetooth"
- ];
-
- files = [
- "/etc/machine-id"
- ];
- };
- };
-}
diff --git a/snowfall/modules/nixos/tools/bash/default.nix b/snowfall/modules/nixos/tools/bash/default.nix
deleted file mode 100644
index 180db1f..0000000
--- a/snowfall/modules/nixos/tools/bash/default.nix
+++ /dev/null
@@ -1,29 +0,0 @@
-{ options, config, lib, namespace, ... }:
-
-with lib; with lib.${namespace}; let
- cfg = config.${namespace}.tools.bash;
-in {
- options.${namespace}.tools.bash = with types; {
- enable = mkEnableOption "tools";
- };
-
- config = mkIf cfg.enable {
- environment.localBinInPath = true;
-
- programs.bash = {
- shellAliases = {
- lsa = "ls -lAsh";
- p = "nix-shell -p";
- };
-
- interactiveShellInit = ''
- source "${./prompt.sh}"
-
- mkcd() {
- mkdir -p "$1"
- cd "$1"
- }
- '';
- };
- };
-}
diff --git a/snowfall/modules/nixos/tools/bash/prompt.sh b/snowfall/modules/nixos/tools/bash/prompt.sh
deleted file mode 100644
index d4d7c69..0000000
--- a/snowfall/modules/nixos/tools/bash/prompt.sh
+++ /dev/null
@@ -1,84 +0,0 @@
-PROMPT_CHAR='❯'
-
-if [[ "$TERM" == "xterm-kitty" ]]; then
- function prompt.bubble {
- printf '\[\e[49m\e[38;5;237m\]◖\[\e[48;5;237m\e[39m\]%s\[\e[0m\e[49m\e[38;5;237m\]◗\[\e[0m\]' "$@";
- }
-elif [[ "$TERM" == "xterm-256color" ]]; then
- function prompt.bubble {
- printf '\[\e[38;5;237m\](\[\e[0m\]%s\[\e[0m\e[38;5;237m\])\[\e[0m\]' "$@";
- }
-else
- PROMPT_CHAR='>'
- function prompt.bubble {
- printf '\[\e[2;39m\](\[\e[0m\]%s\[\e[0m\e[2;39m\])\[\e[0m\]' "$@";
- }
-fi
-
-function prompt.git {
- GIT_PS1_STATESEPARATOR=';'
- GIT_PS1_SHOWDIRTYSTATE=1
- GIT_PS1_SHOWUNTRACKEDFILES=
- GIT_PS1_SHOWUPSTREAM=
-
- GIT_PS1_HIDE_IF_PWD_IGNORED=1
-
- local git_ps1="$(__git_ps1)"
- git_ps1="${git_ps1##' ('}"
- git_ps1="${git_ps1%')'}"
-
- IFS=';' read -r branch state _ <<< "$git_ps1"
-
- if [[ -n "$branch" ]]; then
- printf ' '
-
- if [[ "$state" == '*' ]]; then
- prompt.bubble "$(printf '\[\e[4;32m\]%s' "$branch")"
- else
- prompt.bubble "$(printf '\[\e[32m\]%s' "$branch")"
- fi
- fi
-}
-
-function prompt.prepare {
- local err=$?
- PS1="\\[\e[0m\\]\n"
-
- local subshell=''
- local base_shlvl=1
- local shlvl=$((SHLVL-base_shlvl))
-
- if [[ -n "$IN_NIX_SHELL" ]]; then
- subshell="\\[\e[33m\\]nix"
- fi
- if [[ $shlvl != 0 && ! ($shlvl == 1 && -n "$IN_NIX_SHELL") ]]; then
- if [[ -n "$subshell" ]]; then subshell+="\\[\e[39m\\] "; fi
- subshell+="\\[\e[2;37m\\]$shlvl"
- fi
- if [[ -n "$subshell" ]]; then
- PS1+="$(prompt.bubble "$subshell") "
- fi
-
- if [[ $EUID == 0 ]]; then
- PS1+="$(prompt.bubble "\\[\e[4m\\]\u@\H")"
- else
- PS1+="$(prompt.bubble "\u@\H")"
- fi
-
- PS1+=" $(prompt.bubble "\\[\e[34m\\]\w")"
- PS1+="$(prompt.git)"
- if [[ $err != 0 ]]; then
- PS1+=" $(prompt.bubble "\\[\e[31m\\]$err")"
- fi
- PS1+=" $(prompt.bubble "$PROMPT_CHAR") "
-
- if [[ $err != 0 ]]; then
- (exit "$err")
- fi
-}
-
-PROMPT_COMMAND='prompt.prepare'
-
-function baller {
- printf '🮲🮳⚽︎ \n'
-}
diff --git a/snowfall/modules/nixos/tools/git/default.nix b/snowfall/modules/nixos/tools/git/default.nix
deleted file mode 100644
index f58ed62..0000000
--- a/snowfall/modules/nixos/tools/git/default.nix
+++ /dev/null
@@ -1,16 +0,0 @@
-{ options, config, lib, namespace, ... }:
-
-with lib; with lib.${namespace}; let
- cfg = config.${namespace}.tools.git;
-in {
- options.${namespace}.tools.git = with types; {
- enable = mkEnableOption "git";
- };
-
- config = mkIf cfg.enable {
- programs.git = {
- enable = true;
- prompt.enable = true;
- };
- };
-}
diff --git a/snowfall/modules/nixos/tools/misc/default.nix b/snowfall/modules/nixos/tools/misc/default.nix
deleted file mode 100644
index a06a141..0000000
--- a/snowfall/modules/nixos/tools/misc/default.nix
+++ /dev/null
@@ -1,19 +0,0 @@
-{ options, config, lib, pkgs, namespace, ... }:
-
-with lib; with lib.${namespace}; let
- cfg = config.${namespace}.tools.misc;
-in {
- options.${namespace}.tools.misc = with types; {
- enable = mkEnableOption "misc tools";
- };
-
- config = mkIf cfg.enable {
- environment.systemPackages = with pkgs; [
- jq
- killall
- moreutils
- unzip
- wget
- ];
- };
-}
diff --git a/snowfall/modules/nixos/tools/rebuild/default.nix b/snowfall/modules/nixos/tools/rebuild/default.nix
deleted file mode 100644
index 368f29f..0000000
--- a/snowfall/modules/nixos/tools/rebuild/default.nix
+++ /dev/null
@@ -1,16 +0,0 @@
-{ options, config, lib, pkgs, namespace, ... }:
-
-with lib; with lib.${namespace}; let
- cfg = config.${namespace}.tools.rebuild;
-in {
- options.${namespace}.tools.rebuild = with types; {
- enable = mkEnableOption "rebuild scripts";
- };
-
- config = mkIf cfg.enable {
- environment.systemPackages = with pkgs; [
- (writeShellScriptBin "rb" "sudo nixos-rebuild switch --flake /etc/nixos")
- (writeShellScriptBin "rbf" "sudo nixos-rebuild switch --flake path:/etc/nixos")
- ];
- };
-}
diff --git a/snowfall/modules/nixos/tools/vim/default.nix b/snowfall/modules/nixos/tools/vim/default.nix
deleted file mode 100644
index 9aa0a2c..0000000
--- a/snowfall/modules/nixos/tools/vim/default.nix
+++ /dev/null
@@ -1,19 +0,0 @@
-{ options, config, lib, pkgs, namespace, ... }:
-
-with lib; with lib.${namespace}; let
- cfg = config.${namespace}.tools.vim;
-in {
- options.${namespace}.tools.vim = with types; {
- enable = mkEnableOption "vim";
- };
-
- config = mkIf cfg.enable {
- environment.systemPackages = with pkgs; [
- vim
- ];
-
- environment.variables = {
- EDITOR = "${pkgs.vim}/bin/vim";
- };
- };
-}