diff options
Diffstat (limited to 'parts')
112 files changed, 0 insertions, 3692 deletions
diff --git a/parts/default.nix b/parts/default.nix deleted file mode 100644 index ac7bc08..0000000 --- a/parts/default.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ - imports = [ - ./lib - ./modules - ./overlays - ./systems - ./users - ./dev.nix - ]; - - systems = [ - "x86_64-linux" - "aarch64-linux" - "x86_64-darwin" - "aarch64-darwin" - ]; -} diff --git a/parts/dev.nix b/parts/dev.nix deleted file mode 100644 index 0ca95aa..0000000 --- a/parts/dev.nix +++ /dev/null @@ -1,45 +0,0 @@ -{ - lib, - inputs, - ... -}: { - imports = [ - inputs.pre-commit.flakeModule - ]; - - perSystem = { - pkgs, - config, - inputs', - ... - }: { - pre-commit = { - settings.hooks = { - actionlint.enable = true; - alejandra.enable = true; - deadnix.enable = true; - nil.enable = true; - statix.enable = true; - stylua.enable = true; - }; - }; - - devShells = { - default = pkgs.mkShell { - shellHook = config.pre-commit.installationScript; - packages = with pkgs; - [ - actionlint - alejandra - deadnix - just - statix - stylua - ] - ++ lib.optional stdenv.isLinux inputs'.agenix.packages.agenix; - }; - }; - - formatter = pkgs.alejandra; - }; -} diff --git a/parts/lib/configs.nix b/parts/lib/configs.nix deleted file mode 100644 index 5392d9b..0000000 --- a/parts/lib/configs.nix +++ /dev/null @@ -1,44 +0,0 @@ -{inputs, ...}: let - inherit (builtins) mapAttrs; - inherit (inputs) nixpkgs hm; - - mkSystemCfg = name: { - profile, - modules ? profile.modules, - system ? profile.system, - specialArgs ? profile.specialArgs, - }: - profile.builder { - inherit specialArgs system; - modules = - [../systems/${name}] - ++ ( - if modules == profile.modules - then modules - else modules ++ profile.modules - ); - }; - - mkHMCfg = name: { - pkgs ? nixpkgs.legacyPackages."x86_64-linux", - extraSpecialArgs ? {inherit inputs;}, - modules ? [], - }: - hm.lib.homeManagerConfiguration { - inherit extraSpecialArgs pkgs; - - modules = - [ - ../users/${name}/home.nix - - { - _module.args.osConfig = {}; - programs.home-manager.enable = true; - } - ] - ++ modules; - }; -in { - mapSystems = mapAttrs mkSystemCfg; - mapHMUsers = mapAttrs mkHMCfg; -} diff --git a/parts/lib/default.nix b/parts/lib/default.nix deleted file mode 100644 index c499eec..0000000 --- a/parts/lib/default.nix +++ /dev/null @@ -1,8 +0,0 @@ -args: { - flake.lib = { - configs = import ./configs.nix args; - utils = { - nginx = import ./utils/nginx.nix args; - }; - }; -} diff --git a/parts/lib/utils/nginx.nix b/parts/lib/utils/nginx.nix deleted file mode 100644 index 57be4fb..0000000 --- a/parts/lib/utils/nginx.nix +++ /dev/null @@ -1,22 +0,0 @@ -{lib, ...}: let - inherit (builtins) mapAttrs; - inherit (lib) recursiveUpdate; -in { - mkProxy = endpoint: port: { - "${endpoint}" = { - proxyPass = "http://localhost:${toString port}"; - proxyWebsockets = true; - }; - }; - - mkVHosts = let - commonSettings = { - enableACME = true; - # workaround for https://github.com/NixOS/nixpkgs/issues/210807 - acmeRoot = null; - - addSSL = true; - }; - in - mapAttrs (_: recursiveUpdate commonSettings); -} diff --git a/parts/modules/darwin/base/default.nix b/parts/modules/darwin/base/default.nix deleted file mode 100644 index 42c0335..0000000 --- a/parts/modules/darwin/base/default.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ - config, - lib, - ... -}: let - cfg = config.base; - inherit (lib) mkDefault mkEnableOption mkIf; -in { - options.base.enable = mkEnableOption "base darwin module"; - - imports = [ - ../../shared - ./nix.nix - ./packages.nix - ]; - - config = mkIf cfg.enable { - base = { - defaultPackages.enable = mkDefault true; - defaultLocale.enable = mkDefault true; - documentation.enable = mkDefault true; - nix-settings.enable = mkDefault true; - }; - - programs = { - bash.enable = true; - zsh.enable = true; - }; - - services.nix-daemon.enable = true; - }; -} diff --git a/parts/modules/darwin/base/nix.nix b/parts/modules/darwin/base/nix.nix deleted file mode 100644 index c853650..0000000 --- a/parts/modules/darwin/base/nix.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ - config, - lib, - inputs, - ... -}: let - inherit (builtins) attrNames map; - inherit (lib) mkIf; - cfg = config.base.nix-settings; - - channelPath = i: "${inputs.${i}.outPath}"; - - mapInputs = fn: map fn (attrNames inputs); -in { - config = mkIf cfg.enable { - nix.nixPath = mapInputs (i: "${i}=${channelPath i}"); - }; -} diff --git a/parts/modules/darwin/base/packages.nix b/parts/modules/darwin/base/packages.nix deleted file mode 100644 index 97fb77c..0000000 --- a/parts/modules/darwin/base/packages.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ - config, - lib, - ... -}: let - cfg = config.base.defaultPackages; - inherit (lib) mkIf; -in { - config = mkIf cfg.enable { - programs.vim.enable = true; - }; -} diff --git a/parts/modules/darwin/default.nix b/parts/modules/darwin/default.nix deleted file mode 100644 index ed9c7e1..0000000 --- a/parts/modules/darwin/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -_: { - imports = [ - ./base - ./desktop - ]; -} diff --git a/parts/modules/darwin/desktop/default.nix b/parts/modules/darwin/desktop/default.nix deleted file mode 100644 index 1f71642..0000000 --- a/parts/modules/darwin/desktop/default.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: let - cfg = config.desktop; - inherit (lib) mkDefault mkEnableOption mkIf; -in { - options.desktop = { - enable = mkEnableOption "enable desktop darwin support"; - gpg.enable = mkEnableOption "enable gpg"; - }; - - imports = [ - ./homebrew.nix - ]; - - config = mkIf cfg.enable { - fonts.fonts = with pkgs; - mkDefault [ - (nerdfonts.override {fonts = ["FiraCode"];}) - ]; - - programs.gnupg.agent.enable = cfg.gpg.enable; - }; -} diff --git a/parts/modules/darwin/desktop/homebrew.nix b/parts/modules/darwin/desktop/homebrew.nix deleted file mode 100644 index a5f705e..0000000 --- a/parts/modules/darwin/desktop/homebrew.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ - config, - lib, - ... -}: let - cfg = config.desktop.homebrew; - inherit (lib) mkDefault mkEnableOption mkIf; -in { - options.desktop.homebrew.enable = mkEnableOption "enable homebrew support"; - - config = mkIf cfg.enable { - homebrew = { - enable = mkDefault true; - caskArgs.require_sha = true; - onActivation = mkDefault { - autoUpdate = true; - cleanup = "uninstall"; - upgrade = true; - }; - - casks = let - # thanks @nekowinston :p - skipSha = name: { - inherit name; - args = {require_sha = false;}; - }; - noQuarantine = name: { - inherit name; - args = {no_quarantine = true;}; - }; - in [ - (lib.recursiveUpdate (noQuarantine "chromium") (skipSha "chromium")) - ]; - }; - }; -} diff --git a/parts/modules/default.nix b/parts/modules/default.nix deleted file mode 100644 index 4b3dddb..0000000 --- a/parts/modules/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ - flake = { - nixosModules.default = import ../modules/nixos; - darwinModules.default = import ../modules/darwin; - }; -} diff --git a/parts/modules/nixos/base/default.nix b/parts/modules/nixos/base/default.nix deleted file mode 100644 index ed0fb23..0000000 --- a/parts/modules/nixos/base/default.nix +++ /dev/null @@ -1,34 +0,0 @@ -{ - config, - lib, - ... -}: let - cfg = config.base; - inherit (lib) mkDefault mkEnableOption mkIf; -in { - options.base.enable = mkEnableOption "base nixos module"; - - imports = [ - ../../shared - ./documentation.nix - ./locale.nix - ./network.nix - ./nix.nix - ./packages.nix - ./root.nix - ./security.nix - ./systemd.nix - ./upgrade-diff.nix - ]; - - config = mkIf cfg.enable { - base = { - defaultPackages.enable = mkDefault true; - defaultLocale.enable = mkDefault true; - defaultRoot.enable = mkDefault true; - documentation.enable = mkDefault true; - networking.enable = mkDefault true; - nix-settings.enable = mkDefault true; - }; - }; -} diff --git a/parts/modules/nixos/base/documentation.nix b/parts/modules/nixos/base/documentation.nix deleted file mode 100644 index 68a194f..0000000 --- a/parts/modules/nixos/base/documentation.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: let - cfg = config.base.documentation; - inherit (lib) mkIf; -in { - config = mkIf cfg.enable { - environment.systemPackages = with pkgs; [man-pages man-pages-posix]; - documentation = { - man = { - generateCaches = true; - man-db.enable = true; - }; - - dev.enable = true; - }; - }; -} diff --git a/parts/modules/nixos/base/locale.nix b/parts/modules/nixos/base/locale.nix deleted file mode 100644 index 7259ef2..0000000 --- a/parts/modules/nixos/base/locale.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ - config, - lib, - ... -}: let - cfg = config.base.defaultLocale; - inherit (lib) mkIf; -in { - config = mkIf cfg.enable { - i18n = { - supportedLocales = [ - "en_US.UTF-8/UTF-8" - ]; - - defaultLocale = "en_US.UTF-8"; - }; - }; -} diff --git a/parts/modules/nixos/base/network.nix b/parts/modules/nixos/base/network.nix deleted file mode 100644 index 5bc90d1..0000000 --- a/parts/modules/nixos/base/network.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ - config, - lib, - ... -}: let - cfg = config.base.networking; - inherit (lib) mkEnableOption mkIf; -in { - options.base.networking.enable = mkEnableOption "networking"; - - config = mkIf cfg.enable { - networking.networkmanager = { - enable = true; - dns = "systemd-resolved"; - }; - services.resolved = { - enable = lib.mkDefault true; - dnssec = "allow-downgrade"; - extraConfig = '' - [Resolve] - DNS=1.1.1.1 1.0.0.1 - DNSOverTLS=yes - ''; - }; - }; -} diff --git a/parts/modules/nixos/base/nix.nix b/parts/modules/nixos/base/nix.nix deleted file mode 100644 index 3dcac11..0000000 --- a/parts/modules/nixos/base/nix.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ - config, - lib, - inputs, - ... -}: let - inherit (builtins) attrNames map; - inherit (lib) mkDefault mkIf; - cfg = config.base.nix-settings; - - channelPath = i: "/etc/nix/channels/${i}"; - - mapInputs = fn: map fn (attrNames inputs); -in { - config = mkIf cfg.enable { - nix = { - nixPath = mapInputs (i: "${i}=${channelPath i}"); - gc.dates = mkDefault "weekly"; - }; - - systemd.tmpfiles.rules = - mapInputs (i: "L+ ${channelPath i} - - - - ${inputs.${i}.outPath}"); - }; -} diff --git a/parts/modules/nixos/base/packages.nix b/parts/modules/nixos/base/packages.nix deleted file mode 100644 index 7390a40..0000000 --- a/parts/modules/nixos/base/packages.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ - config, - lib, - ... -}: let - cfg = config.base.defaultPackages; - inherit (lib) mkIf; -in { - config = mkIf cfg.enable { - programs = { - git.enable = true; - vim.defaultEditor = true; - }; - }; -} diff --git a/parts/modules/nixos/base/root.nix b/parts/modules/nixos/base/root.nix deleted file mode 100644 index ecc5203..0000000 --- a/parts/modules/nixos/base/root.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ - config, - lib, - ... -}: let - cfg = config.base.defaultRoot; - inherit (lib) mkDefault mkEnableOption mkIf; - - # yes this is a bad way to detect which option should be used (or exists) - # but i'm lazy. please do not copy this - passwordFile = - if lib.versionAtLeast config.system.stateVersion "23.11" - then "hashedPasswordFile" - else "passwordFile"; -in { - options.base.defaultRoot.enable = mkEnableOption "default root user"; - - config = mkIf cfg.enable { - users.users.root = { - home = mkDefault "/root"; - uid = mkDefault config.ids.uids.root; - group = mkDefault "root"; - "${passwordFile}" = mkDefault config.age.secrets.rootPassword.path; - }; - }; -} diff --git a/parts/modules/nixos/base/security.nix b/parts/modules/nixos/base/security.nix deleted file mode 100644 index e13d1c7..0000000 --- a/parts/modules/nixos/base/security.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ - lib, - pkgs, - ... -}: let - inherit (lib) mkDefault; -in { - security = { - apparmor.enable = mkDefault true; - audit.enable = mkDefault true; - auditd.enable = mkDefault true; - polkit.enable = mkDefault true; - rtkit.enable = mkDefault true; - sudo.execWheelOnly = true; - }; - - services.dbus.apparmor = mkDefault "enabled"; - - users = { - defaultUserShell = pkgs.bash; - mutableUsers = false; - }; - - nix.settings = { - trusted-users = ["root" "@wheel"]; - }; -} diff --git a/parts/modules/nixos/base/systemd.nix b/parts/modules/nixos/base/systemd.nix deleted file mode 100644 index 2888c0b..0000000 --- a/parts/modules/nixos/base/systemd.nix +++ /dev/null @@ -1,7 +0,0 @@ -_: { - services = { - journald.extraConfig = '' - MaxRetentionSec=1w - ''; - }; -} diff --git a/parts/modules/nixos/base/upgrade-diff.nix b/parts/modules/nixos/base/upgrade-diff.nix deleted file mode 100644 index 68be9af..0000000 --- a/parts/modules/nixos/base/upgrade-diff.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ - config, - pkgs, - ... -}: { - system.activationScripts."upgrade-diff" = { - supportsDryActivation = true; - text = '' - ${pkgs.nvd}/bin/nvd --nix-bin-dir=${config.nix.package}/bin diff /run/current-system "$systemConfig" - ''; - }; -} diff --git a/parts/modules/nixos/default.nix b/parts/modules/nixos/default.nix deleted file mode 100644 index 3ae2f08..0000000 --- a/parts/modules/nixos/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -_: { - imports = [ - ./base - ./desktop - ./hardware - ]; -} diff --git a/parts/modules/nixos/desktop/audio.nix b/parts/modules/nixos/desktop/audio.nix deleted file mode 100644 index c601563..0000000 --- a/parts/modules/nixos/desktop/audio.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ - config, - lib, - ... -}: let - cfg = config.desktop.audio; - inherit (lib) mkEnableOption mkIf; -in { - options.desktop.audio.enable = mkEnableOption "audio support"; - - config = mkIf cfg.enable { - services = { - pipewire = { - enable = true; - wireplumber.enable = true; - alsa.enable = true; - jack.enable = true; - pulse.enable = true; - }; - }; - hardware.pulseaudio.enable = false; - }; -} diff --git a/parts/modules/nixos/desktop/budgie/default.nix b/parts/modules/nixos/desktop/budgie/default.nix deleted file mode 100644 index 4605eb1..0000000 --- a/parts/modules/nixos/desktop/budgie/default.nix +++ /dev/null @@ -1,58 +0,0 @@ -{ - config, - pkgs, - lib, - ... -}: let - cfg = config.desktop.budgie; - inherit (lib) mkEnableOption mkIf; -in { - options.desktop.budgie.enable = mkEnableOption "enable budgie"; - - config = mkIf cfg.enable { - desktop.enable = true; - - services.xserver = { - displayManager.lightdm.greeters.slick = { - theme = { - name = "Materia-dark"; - package = pkgs.materia-theme; - }; - iconTheme = { - name = "Papirus-Dark"; - package = pkgs.papirus-icon-theme; - }; - cursorTheme = { - name = "Breeze-gtk"; - package = pkgs.libsForQt5.breeze-gtk; - }; - }; - - desktopManager.budgie = { - enable = true; - extraGSettingsOverrides = '' - [org.gnome.desktop.interface:Budgie] - gtk-theme="Materia-dark" - icon-theme="Papirus-Dark" - cursor-theme="Breeze-gtk" - font-name="Noto Sans 10" - document-font-name="Noto Sans 10" - monospace-font-name="Fira Code 10" - enable-hot-corners=true - ''; - }; - }; - - environment.budgie.excludePackages = with pkgs; [ - qogir-theme - qogir-icon-theme - ]; - - environment.systemPackages = with pkgs; [ - alacritty - breeze-gtk - materia-theme - papirus-icon-theme - ]; - }; -} diff --git a/parts/modules/nixos/desktop/default.nix b/parts/modules/nixos/desktop/default.nix deleted file mode 100644 index f0ab74c..0000000 --- a/parts/modules/nixos/desktop/default.nix +++ /dev/null @@ -1,41 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: let - cfg = config.desktop; - inherit (lib) mkDefault mkEnableOption mkIf; -in { - imports = [ - ./audio.nix - ./budgie - ./fonts.nix - ./gnome - ./plasma - ]; - - options.desktop.enable = mkEnableOption "desktop module"; - - config = mkIf cfg.enable { - base.enable = true; - desktop = { - audio.enable = mkDefault true; - fonts.enable = mkDefault true; - }; - - environment = { - noXlibs = lib.mkForce false; - systemPackages = with pkgs; [wl-clipboard xclip]; - }; - - programs = { - dconf.enable = true; - firefox.enable = true; - xwayland.enable = true; - }; - - services.xserver.enable = true; - xdg.portal.enable = true; - }; -} diff --git a/parts/modules/nixos/desktop/fonts.nix b/parts/modules/nixos/desktop/fonts.nix deleted file mode 100644 index feedf07..0000000 --- a/parts/modules/nixos/desktop/fonts.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ - config, - pkgs, - lib, - ... -}: let - cfg = config.desktop.fonts; - inherit (lib) mkEnableOption mkIf; -in { - options.desktop.fonts.enable = mkEnableOption "enable default fonts"; - - config = mkIf cfg.enable { - fonts = { - enableDefaultPackages = true; - - packages = with pkgs; [ - corefonts - fira-code - (nerdfonts.override {fonts = ["FiraCode"];}) - noto-fonts - noto-fonts-extra - noto-fonts-emoji - noto-fonts-cjk-sans - ]; - - fontconfig = { - enable = true; - defaultFonts = { - serif = ["Noto Serif"]; - sansSerif = ["Noto Sans"]; - emoji = ["Noto Color Emoji"]; - monospace = ["Fira Code"]; - }; - }; - }; - }; -} diff --git a/parts/modules/nixos/desktop/gnome/default.nix b/parts/modules/nixos/desktop/gnome/default.nix deleted file mode 100644 index bfe3d20..0000000 --- a/parts/modules/nixos/desktop/gnome/default.nix +++ /dev/null @@ -1,38 +0,0 @@ -{ - config, - pkgs, - lib, - ... -}: let - cfg = config.desktop.gnome; - inherit (lib) mkEnableOption mkIf; -in { - options.desktop.gnome.enable = mkEnableOption "enable gnome"; - - config = mkIf cfg.enable { - desktop.enable = true; - - environment = { - gnome.excludePackages = with pkgs; [ - gnome-tour - ]; - - sessionVariables = { - NIXOS_OZONE_WL = "1"; - }; - - systemPackages = with pkgs; [ - adw-gtk3 - blackbox-terminal - ]; - }; - - services.xserver = { - displayManager.gdm = { - enable = true; - wayland = lib.mkForce true; - }; - desktopManager.gnome.enable = true; - }; - }; -} diff --git a/parts/modules/nixos/desktop/plasma/default.nix b/parts/modules/nixos/desktop/plasma/default.nix deleted file mode 100644 index 2034802..0000000 --- a/parts/modules/nixos/desktop/plasma/default.nix +++ /dev/null @@ -1,31 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: let - cfg = config.desktop.plasma; - inherit (lib) mkEnableOption mkIf; -in { - options.desktop.plasma.enable = mkEnableOption "enable plasma"; - - config = mkIf cfg.enable { - desktop.enable = true; - - environment = { - plasma5.excludePackages = with pkgs.libsForQt5; [ - khelpcenter - plasma-browser-integration - print-manager - ]; - }; - - services.xserver = { - displayManager.sddm.enable = true; - desktopManager.plasma5 = { - enable = true; - useQtScaling = true; - }; - }; - }; -} diff --git a/parts/modules/nixos/features/tailscale.nix b/parts/modules/nixos/features/tailscale.nix deleted file mode 100644 index 5a00110..0000000 --- a/parts/modules/nixos/features/tailscale.nix +++ /dev/null @@ -1,67 +0,0 @@ -{ - config, - lib, - pkgs, - self, - ... -}: let - cfg = config.features.tailscale; - inherit (lib) mkDefault mkEnableOption mkIf optionalAttrs; -in { - options.features.tailscale = { - enable = mkEnableOption "enable support for tailscale"; - ssh.enable = mkEnableOption "enable support for tailscale ssh"; - }; - - config = mkIf cfg.enable { - age.secrets = let - baseDir = "${self}/parts/secrets/systems/${config.networking.hostName}"; - in - mkIf cfg.ssh.enable { - tailscaleAuthKey.file = "${baseDir}/tailscaleAuthKey.age"; - }; - - networking.firewall = - { - allowedUDPPorts = [config.services.tailscale.port]; - trustedInterfaces = ["tailscale0"]; - } - // optionalAttrs cfg.ssh.enable { - allowedTCPPorts = [22]; - }; - - services = { - tailscale.enable = mkDefault true; - }; - - # https://tailscale.com/kb/1096/nixos-minecraft/ - systemd.services = mkIf cfg.ssh.enable { - tailscale-autoconnect = { - description = "Automatic connection to Tailscale"; - - after = ["network-pre.target" "tailscale.service"]; - wants = ["network-pre.target" "tailscale.service"]; - wantedBy = ["multi-user.target"]; - - serviceConfig.Type = "oneshot"; - - script = let - inherit (pkgs) tailscale jq; - in '' - # wait for tailscaled to settle - sleep 2 - - # check if we are already authenticated to tailscale - status="$(${tailscale}/bin/tailscale status -json | ${jq}/bin/jq -r .BackendState)" - if [ $status = "Running" ]; then # if so, then do nothing - exit 0 - fi - - # otherwise authenticate with tailscale - ${tailscale}/bin/tailscale up --ssh \ - --auth-key "file:${config.age.secrets.tailscaleAuthKey.path}" - ''; - }; - }; - }; -} diff --git a/parts/modules/nixos/features/virtualisation.nix b/parts/modules/nixos/features/virtualisation.nix deleted file mode 100644 index 206a98e..0000000 --- a/parts/modules/nixos/features/virtualisation.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: let - cfg = config.features.virtualisation; - inherit (lib) mkEnableOption mkIf; -in { - options.features.virtualisation.enable = mkEnableOption "enable podman"; - - config.virtualisation = mkIf cfg.enable { - podman = { - enable = true; - enableNvidia = true; - extraPackages = with pkgs; [podman-compose]; - autoPrune.enable = true; - }; - oci-containers.backend = "podman"; - }; -} diff --git a/parts/modules/nixos/hardware/default.nix b/parts/modules/nixos/hardware/default.nix deleted file mode 100644 index 1217b5a..0000000 --- a/parts/modules/nixos/hardware/default.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ - config, - lib, - ... -}: let - cfg = config.hardware; - inherit (lib) mkEnableOption mkIf; -in { - options.hardware.enable = mkEnableOption "hardware module"; - - imports = [ - ./ssd.nix - ./nvidia.nix - ]; - - config = mkIf cfg.enable { - hardware.enableAllFirmware = true; - }; -} diff --git a/parts/modules/nixos/hardware/nvidia.nix b/parts/modules/nixos/hardware/nvidia.nix deleted file mode 100644 index dd371f2..0000000 --- a/parts/modules/nixos/hardware/nvidia.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: let - cfg = config.hardware.nvidia; - inherit (lib) mkEnableOption mkIf; -in { - options.hardware.nvidia.enable = mkEnableOption "enable nvidia support"; - - config = mkIf cfg.enable { - environment.sessionVariables = { - LIBVA_DRIVER_NAME = "vdpau"; - VDPAU_DRIVER = "nvidia"; - }; - - hardware = { - enable = true; - - nvidia = { - package = config.boot.kernelPackages.nvidiaPackages.stable; - modesetting.enable = true; - }; - - opengl = { - enable = true; - # make steam work - driSupport32Bit = true; - extraPackages = [pkgs.vaapiVdpau]; - }; - }; - - services.xserver.videoDrivers = ["nvidia"]; - }; -} diff --git a/parts/modules/nixos/hardware/ssd.nix b/parts/modules/nixos/hardware/ssd.nix deleted file mode 100644 index 2995d93..0000000 --- a/parts/modules/nixos/hardware/ssd.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ - config, - lib, - ... -}: let - cfg = config.hardware.ssd; - inherit (lib) mkEnableOption mkIf; -in { - options.hardware.ssd.enable = mkEnableOption "ssd settings"; - - config = mkIf cfg.enable { - hardware.enable = true; - services.fstrim.enable = true; - }; -} diff --git a/parts/modules/nixos/server/acme.nix b/parts/modules/nixos/server/acme.nix deleted file mode 100644 index 69e02ac..0000000 --- a/parts/modules/nixos/server/acme.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ - config, - lib, - self, - ... -}: let - cfg = config.server.acme; - inherit (lib) mkEnableOption mkIf; -in { - options.server.acme = { - enable = mkEnableOption "acme"; - }; - - config = mkIf cfg.enable { - age.secrets.cloudflareApiKey.file = "${self}/parts/secrets/systems/${config.networking.hostName}/cloudflareApiKey.age"; - - security.acme = { - acceptTerms = true; - defaults = { - email = "[email protected]"; - dnsProvider = "cloudflare"; - credentialsFile = config.age.secrets.cloudflareApiKey.path; - }; - }; - }; -} diff --git a/parts/modules/nixos/server/default.nix b/parts/modules/nixos/server/default.nix deleted file mode 100644 index acab4fc..0000000 --- a/parts/modules/nixos/server/default.nix +++ /dev/null @@ -1,47 +0,0 @@ -{ - config, - lib, - pkgs, - inputs, - ... -}: let - cfg = config.server; - inherit (lib) mkDefault mkEnableOption mkIf; -in { - options.server.enable = mkEnableOption "enable server configuration"; - - imports = [ - ./acme.nix - ./secrets.nix - ./services - ]; - - config = mkIf cfg.enable { - _module.args.unstable = inputs.nixpkgs.legacyPackages.${pkgs.stdenv.hostPlatform.system}; - - base = { - enable = true; - documentation.enable = false; - defaultPackages.enable = false; - networking.enable = false; - }; - - nix = { - gc = { - dates = "*-*-1,5,9,13,17,21,25,29 00:00:00"; - options = "-d --delete-older-than 2d"; - }; - - settings.allowed-users = [config.networking.hostName]; - }; - - programs = { - git.enable = mkDefault true; - vim.defaultEditor = mkDefault true; - }; - - security = { - pam.enableSSHAgentAuth = mkDefault true; - }; - }; -} diff --git a/parts/modules/nixos/server/secrets.nix b/parts/modules/nixos/server/secrets.nix deleted file mode 100644 index 2dc6083..0000000 --- a/parts/modules/nixos/server/secrets.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - config, - lib, - self, - ... -}: let - cfg = config.server.secrets; - inherit (lib) mkEnableOption mkIf; -in { - options.server.secrets = { - enable = mkEnableOption "enable secret management"; - }; - - config.age = let - baseDir = "${self}/parts/secrets/systems/${config.networking.hostName}"; - in - mkIf cfg.enable { - identityPaths = ["/etc/age/key"]; - - secrets = { - rootPassword.file = "${baseDir}/rootPassword.age"; - userPassword.file = "${baseDir}/userPassword.age"; - }; - }; -} diff --git a/parts/modules/nixos/server/services/cloudflared.nix b/parts/modules/nixos/server/services/cloudflared.nix deleted file mode 100644 index 2bf7907..0000000 --- a/parts/modules/nixos/server/services/cloudflared.nix +++ /dev/null @@ -1,41 +0,0 @@ -{ - config, - lib, - self, - ... -}: let - cfg = config.server.services.cloudflared; - inherit (lib) mkEnableOption mkIf; -in { - options.server.services.cloudflared = { - enable = mkEnableOption "cloudflared"; - }; - - config = mkIf cfg.enable { - age.secrets.cloudflaredCreds = { - file = "${self}/parts/secrets/systems/${config.networking.hostName}/cloudflaredCreds.age"; - mode = "400"; - owner = "cloudflared"; - group = "cloudflared"; - }; - - services.cloudflared = { - enable = true; - tunnels = { - "${config.networking.hostName}-nginx" = { - default = "http_status:404"; - - ingress = let - inherit (config.services) nginx; - in - lib.genAttrs - (builtins.attrNames nginx.virtualHosts) - (_: {service = "http://localhost:${builtins.toString nginx.defaultHTTPListenPort}";}); - - originRequest.noTLSVerify = true; - credentialsFile = config.age.secrets.cloudflaredCreds.path; - }; - }; - }; - }; -} diff --git a/parts/modules/nixos/server/services/default.nix b/parts/modules/nixos/server/services/default.nix deleted file mode 100644 index 23f2542..0000000 --- a/parts/modules/nixos/server/services/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -_: { - imports = [ - ./cloudflared.nix - ./hercules.nix - ./promtail.nix - ]; -} diff --git a/parts/modules/nixos/server/services/hercules.nix b/parts/modules/nixos/server/services/hercules.nix deleted file mode 100644 index b11a133..0000000 --- a/parts/modules/nixos/server/services/hercules.nix +++ /dev/null @@ -1,57 +0,0 @@ -{ - config, - lib, - self, - unstable, - ... -}: let - cfg = config.server.services.hercules-ci; - inherit (lib) mkEnableOption mkIf; -in { - options.server.services.hercules-ci = { - enable = mkEnableOption "enable hercules-ci"; - secrets.enable = mkEnableOption "manage secrets for hercules-ci"; - }; - - config = mkIf cfg.enable { - age.secrets = let - baseDir = "${self}/parts/secrets/systems/${config.networking.hostName}"; - hercArgs = { - mode = "400"; - owner = "hercules-ci-agent"; - group = "hercules-ci-agent"; - }; - in - mkIf cfg.secrets.enable { - binaryCache = - { - file = "${baseDir}/binaryCache.age"; - } - // hercArgs; - - clusterToken = - { - file = "${baseDir}/clusterToken.age"; - } - // hercArgs; - - secretsJson = - { - file = "${baseDir}/secretsJson.age"; - } - // hercArgs; - }; - - services = { - hercules-ci-agent = { - enable = true; - package = unstable.hercules-ci-agent; - settings = { - binaryCachesPath = config.age.secrets.binaryCache.path; - clusterJoinTokenPath = config.age.secrets.clusterToken.path; - secretsJsonPath = config.age.secrets.secretsJson.path; - }; - }; - }; - }; -} diff --git a/parts/modules/nixos/server/services/promtail.nix b/parts/modules/nixos/server/services/promtail.nix deleted file mode 100644 index 63faf15..0000000 --- a/parts/modules/nixos/server/services/promtail.nix +++ /dev/null @@ -1,47 +0,0 @@ -{ - config, - lib, - ... -}: let - cfg = config.server.services.promtail; - inherit (lib) mkEnableOption mkIf mkOption types; -in { - options.server.services.promtail = { - enable = mkEnableOption "enable promtail"; - - clients = mkOption { - type = types.listOf types.attrs; - default = [{}]; - description = "clients for promtail"; - }; - }; - - config.services.promtail = mkIf cfg.enable { - enable = true; - configuration = { - inherit (cfg) clients; - server.disable = true; - - scrape_configs = [ - { - job_name = "journal"; - - journal = { - max_age = "12h"; - labels = { - job = "systemd-journal"; - host = "${config.networking.hostName}"; - }; - }; - - relabel_configs = [ - { - source_labels = ["__journal__systemd_unit"]; - target_label = "unit"; - } - ]; - } - ]; - }; - }; -} diff --git a/parts/modules/shared/base/default.nix b/parts/modules/shared/base/default.nix deleted file mode 100644 index e18de58..0000000 --- a/parts/modules/shared/base/default.nix +++ /dev/null @@ -1,8 +0,0 @@ -_: { - imports = [ - ./documentation.nix - ./locale.nix - ./nix.nix - ./packages.nix - ]; -} diff --git a/parts/modules/shared/base/documentation.nix b/parts/modules/shared/base/documentation.nix deleted file mode 100644 index ecc5813..0000000 --- a/parts/modules/shared/base/documentation.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ - config, - lib, - ... -}: let - cfg = config.base.documentation; - inherit (lib) mkEnableOption mkIf; -in { - options.base.documentation.enable = mkEnableOption "base module documentation"; - - config = mkIf cfg.enable { - documentation.man.enable = true; - }; -} diff --git a/parts/modules/shared/base/locale.nix b/parts/modules/shared/base/locale.nix deleted file mode 100644 index ecae786..0000000 --- a/parts/modules/shared/base/locale.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ - config, - lib, - ... -}: let - cfg = config.base.defaultLocale; - inherit (lib) mkEnableOption mkIf; -in { - options.base.defaultLocale.enable = mkEnableOption "default locale"; - - config = mkIf cfg.enable { - time.timeZone = "America/New_York"; - }; -} diff --git a/parts/modules/shared/base/nix.nix b/parts/modules/shared/base/nix.nix deleted file mode 100644 index 2c95933..0000000 --- a/parts/modules/shared/base/nix.nix +++ /dev/null @@ -1,42 +0,0 @@ -{ - config, - inputs, - lib, - pkgs, - ... -}: let - cfg = config.base.nix-settings; - inherit (lib) mkDefault mkEnableOption mkIf; - inherit (pkgs.stdenv) isLinux; -in { - options.base.nix-settings.enable = mkEnableOption "base nix settings"; - - config = mkIf cfg.enable { - nix = { - registry = - { - n.flake = mkDefault inputs.nixpkgs; - } - // (builtins.mapAttrs (_: flake: {inherit flake;}) - (inputs.nixpkgs.lib.filterAttrs (n: _: n != "nixpkgs") inputs)); - - settings = { - auto-optimise-store = isLinux; - experimental-features = ["nix-command" "flakes" "auto-allocate-uids" "repl-flake"]; - - trusted-substituters = ["https://cache.garnix.io"]; - trusted-public-keys = ["cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="]; - }; - - gc = { - automatic = mkDefault true; - options = mkDefault "--delete-older-than 7d"; - }; - }; - - nixpkgs = { - overlays = with inputs; [nur.overlay getchoo.overlays.default self.overlays.default]; - config.allowUnfree = true; - }; - }; -} diff --git a/parts/modules/shared/base/packages.nix b/parts/modules/shared/base/packages.nix deleted file mode 100644 index 38cd6e7..0000000 --- a/parts/modules/shared/base/packages.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: let - cfg = config.base.defaultPackages; - inherit (lib) mkEnableOption mkIf; -in { - options.base.defaultPackages.enable = mkEnableOption "base module default packages"; - - config = mkIf cfg.enable { - environment.systemPackages = with pkgs; [ - python311 - ]; - - programs = { - gnupg.agent.enable = true; - }; - }; -} diff --git a/parts/modules/shared/default.nix b/parts/modules/shared/default.nix deleted file mode 100644 index 0199860..0000000 --- a/parts/modules/shared/default.nix +++ /dev/null @@ -1,5 +0,0 @@ -_: { - imports = [ - ./base - ]; -} diff --git a/parts/overlays/btop.nix b/parts/overlays/btop.nix deleted file mode 100644 index b2a5b24..0000000 --- a/parts/overlays/btop.nix +++ /dev/null @@ -1,14 +0,0 @@ -_: prev: { - btop = - if prev.stdenv.isLinux - then - prev.symlinkJoin { - inherit (prev.btop) passthru; - name = "btop-nodesktop"; - paths = [prev.btop]; - postBuild = '' - rm $out/share/applications/btop.desktop - ''; - } - else prev.btop; -} diff --git a/parts/overlays/default.nix b/parts/overlays/default.nix deleted file mode 100644 index 66869c4..0000000 --- a/parts/overlays/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{lib, ...}: { - flake.overlays.default = lib.composeManyExtensions [ - (import ./btop.nix) - (import ./discord.nix) - (import ./fish.nix) - ]; -} diff --git a/parts/overlays/discord.nix b/parts/overlays/discord.nix deleted file mode 100644 index dfb0cae..0000000 --- a/parts/overlays/discord.nix +++ /dev/null @@ -1,31 +0,0 @@ -_: prev: let - mkOverride = d: let - # TODO: re-enable openASAR when gnome wayland decorations work with it - d' = d; #.override {withOpenASAR = true;}; - inherit (d') pname; - - desktopName = - if pname == "discord-canary" - then "Discord Canary" - else "Discord"; - - flags = "--enable-gpu-rasterization --enable-zero-copy --enable-gpu-compositing --enable-native-gpu-memory-buffers --enable-oop-rasterization --enable-features=UseSkiaRenderer,WaylandWindowDecorations"; - desktopItem = prev.makeDesktopItem { - name = pname; - exec = "${builtins.replaceStrings [" "] [""] desktopName} ${flags}"; - icon = pname; - inherit desktopName; - genericName = d'.meta.description; - categories = ["Network" "InstantMessaging"]; - mimeTypes = ["x-scheme-handler/discord"]; - }; - in - if prev.stdenv.isLinux - then d'.overrideAttrs (_: {inherit desktopItem;}) - else if (pname == "discord" && prev.stdenv.isDarwin) - then d' - else d; -in { - discord = mkOverride prev.discord; - discord-canary = mkOverride prev.discord-canary; -} diff --git a/parts/overlays/fish.nix b/parts/overlays/fish.nix deleted file mode 100644 index 4e7fffc..0000000 --- a/parts/overlays/fish.nix +++ /dev/null @@ -1,14 +0,0 @@ -_: prev: { - fish = - if prev.stdenv.isLinux - then - prev.symlinkJoin { - inherit (prev.fish) passthru; - name = "fish-nodesktop"; - paths = [prev.fish]; - postBuild = '' - rm $out/share/applications/fish.desktop - ''; - } - else prev.fish; -} diff --git a/parts/secrets/secrets.nix b/parts/secrets/secrets.nix deleted file mode 100644 index 7ebc07a..0000000 --- a/parts/secrets/secrets.nix +++ /dev/null @@ -1,17 +0,0 @@ -let - main = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ5K+yLHuz4kyCkJDX2Gd/uGVNEJroIAU/h0f9E2Mapn getchoo-nix" - ]; - - atlas = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBA861lnShM2ejpzn9arzhpw33I4XdtULfZWhMp/plvL root@atlas"] ++ main; -in { - "shared/rootPassword.age".publicKeys = main; - "shared/sethPassword.age".publicKeys = main; - - "systems/atlas/rootPassword.age".publicKeys = atlas; - "systems/atlas/userPassword.age".publicKeys = atlas; - "systems/atlas/miniflux.age".publicKeys = atlas; - "systems/atlas/tailscaleAuthKey.age".publicKeys = atlas; - "systems/atlas/cloudflaredCreds.age".publicKeys = atlas; - "systems/atlas/cloudflareApiKey.age".publicKeys = atlas; -} diff --git a/parts/secrets/shared/rootPassword.age b/parts/secrets/shared/rootPassword.age deleted file mode 100644 index 3770a2d..0000000 --- a/parts/secrets/shared/rootPassword.age +++ /dev/null @@ -1,10 +0,0 @@ ------BEGIN AGE ENCRYPTED FILE----- -YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1lZDI1NTE5IEk5MkEzUSAxWmJN -N2JKK3RvdE00MFVqOExvc0I0M05BM1NvclQ0YkdKelBhb0g0c3hnCjVEMUZ5OWI2 -d2FoeXJlREJGM29GdFJHNlpEVGMvTldkT0pyQ2trS1VBTDQKLT4gZS1ncmVhc2Ug -MngodlYgKlczXkptUiBEQF85NAozLzQzZlVZMEpsUzdjY0JwdTFXczMyMEI2ODd2 -MjVVCi0tLSArTDBuNkF3UU5kK2doelhxcFhQUDJvekJxRVhLbkttYUk1OHJBS1JR -QVc4CpYqifbaJyErbpJ9zw2M8T/nSfVM1vL/bXU0/CuSP7LwIsrrHkghuR6JyS3p -POwDVg6hmNrGf//VJILqm4TKqrshWbQk99poXbEmr1hoGMZovXHYl+FkwZfVr6DW -OABQJfFnrR4ZusvM7O0zdkkcxMtEi+iEVJeIf0jQEkKJQ4gTM2DcjGAeU1G/c2U= ------END AGE ENCRYPTED FILE----- diff --git a/parts/secrets/shared/sethPassword.age b/parts/secrets/shared/sethPassword.age deleted file mode 100644 index 4015d60..0000000 --- a/parts/secrets/shared/sethPassword.age +++ /dev/null @@ -1,12 +0,0 @@ ------BEGIN AGE ENCRYPTED FILE----- -YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1lZDI1NTE5IEk5MkEzUSByV01G -VW5QVjkrRm1NaGVpdU9FcGJRMlVuUG5WRHpoOWhFNExXUzRCbUJNCjRJMmZCSzEw -S3BvSEdMemRkamUrcXoyckFqVTN0N2FuYytvUDdNN2p1QkkKLT4gTHhOOnIpLWdy -ZWFzZSBDLD9jPSogSSNjPDNhIWcgYCBWZi8KSk5TOXZmL1RnVXI4aTM0N1NIb29Y -bHdxNXZJWGVhOUtIanAzYlcyZTJFS3hJZ2ZtUVkyNnc3RXNxczNZeERjYQo0Y0Ju -NFhyQzhYWHFSYnlhUjExT1gwawotLS0gQ0hJWDRQTzZRMVNXOFhYQWpnZ0hoQVdv -b2VieUVTTm92SVJVOUplbVVkQQp39CqRv/NPvkJXqme6PWfaRUbcMUky+LolZe5G -DJ2Dy0++hyV3xBJbrfJUJPzdRrKuZ8o0UFwss1RuqVWjwLYmiwb9OafddpCMwuOw -BfuGB7HykaOYrgbgvmJuaZNUrM1wKnQXTZAzqB+TjI7MHWRyFgRkD4NuD2BWpxY9 -y+JxjbEa0MZF5W/CsTQM ------END AGE ENCRYPTED FILE----- diff --git a/parts/secrets/systems/atlas/binaryCache.age b/parts/secrets/systems/atlas/binaryCache.age deleted file mode 100644 index 4a5a4b8..0000000 --- a/parts/secrets/systems/atlas/binaryCache.age +++ /dev/null @@ -1,17 +0,0 @@ ------BEGIN AGE ENCRYPTED FILE----- -YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1lZDI1NTE5IGxXSVVGUSBDNXhv -cU1uLzVidkVaVHZRNHhHaTdWUjNQYzRNcnloTVkvdjJSWSsxb1VvCnRaanRnUktI -S0tGT2JzS2toY0lHMEhzZ0ZOdG1OUFNCMTVZSzV0b3VaK2MKLT4gc3NoLWVkMjU1 -MTkgSTkyQTNRIHdyNlczYkpHdS81T0dGWGc5a3FlY2FWN1hCSTBoSis5eGhkRjZy -SjAvaVUKTUZDVWNqQ1pOMHNSUWZMRkNXK2FjZ0JiSEt1YzRLQTRmVVQzaWx1MitE -TQotPiBbNGBUYEUtZ3JlYXNlCm1rOFJiUmZJa3NkbHU2Wk93b3E0TFZqSlJJVTlB -UTMxSzZxT0pnCi0tLSBPY00rbXphVXFWN2R2NWJJeE9Wa3ZVMkd6WFVsNk5sTjQ0 -K3RnK0xXVkFRCg1GCPUODHhK0qOcFXAa25ya2VcUhpvaCkU5bwVgHd42wKSAxqjW -adE7bXyoo94kpY7lPehG8t1ucQxZDqfz8fqBw/Qe/TncGUKbXrwnpjnkC7wENv7Y -BwAmSB47esamvlsmIvXKX9p8ccJhyUrEPL/olrs698NiokoeF8ceN524K9Ik1Cjq -4CAS7H1fZ04Bd0uhjNkLdiKMf2tzoSicjVIU0Nv1uTtCW3hlOT82gqAPsYRouSW8 -SffI9irxkqwUkIMAMLdG3VAdgdcgNfgVSmw1IUQ2Xf9hgU5VyUX9PTZ2H+yag02W -fjDkSHcjYxjMrWspQC/4dW3RknxJoIsRwXMzI1obQ5MnWgowR1hj/0CxQdPbXqE/ -dhHS+NdzjjTs8Eyp7IMXUkGxobObJCFy6Tb1Rt9ahcdZ4hPmDRT8s9E12P7GPZEq -hvDtf5X7wPxHig3GWDNuq9jXV39G2uk= ------END AGE ENCRYPTED FILE----- diff --git a/parts/secrets/systems/atlas/cloudflareApiKey.age b/parts/secrets/systems/atlas/cloudflareApiKey.age deleted file mode 100644 index e26a8a1..0000000 --- a/parts/secrets/systems/atlas/cloudflareApiKey.age +++ /dev/null @@ -1,15 +0,0 @@ ------BEGIN AGE ENCRYPTED FILE----- -YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1lZDI1NTE5IGxXSVVGUSBNaW5V -NEx0dU5xSTBNUWFBMWxQcHc2NkJ0cU5rMHIrK0FaS05wOEZaWVJFClBLZGo1em5N -OGdrT0NISDhaaFp5bmlrRkxpVnlkMWEwbEpQR0ljQnVFaWMKLT4gc3NoLWVkMjU1 -MTkgSTkyQTNRIGxtZDhnWGw2UUlRNmlibWZJdm5qeDN4bys2Z3ZTQWUyZmNwOE5k -Ny8yZ00KQXlhc2tBTCtTeXN3Zk1IZWhWMEM4dTBtQ2cydURlR2dzVlNJc1N4STQz -VQotPiBzc2gtZWQyNTUxOSBqN0xJVUEgOXRvQytHZEp1cThYc2ExV2NSdDVzUXA0 -bGdRMENWVGwvWkdWRDNuNWtSbwpxaGNBZEx2Z3JkYTFxT3pNbXd6aHNPdlRiUTNS -RFB1T2RiWlVkZUFjRWhBCi0+IDdsLWdyZWFzZSA9Z1csZFcxbApyazRscUFIR1JX -aFNaV1hCUHU4VzZyNWFha2NRWFMzWXdpbUYxWEpodFNsNWQwOWxGaVpGUVZHemls -bjQxNEU0CllSamI0RmdNOU9qVkdCYXZ2T0VCWCsrakpwcwotLS0gMlkrMGI1Z0dp -dXl4eUd5eUNVZTFzckNTNVIzdXYvS0NoM0FObC83TG1QRQpUVcyYhenxo5+EvEfx -RlnURdpStJwr2Uf9PowvV8Kz8OXCf222/jFm1MSr2c5HY04sTJuIrY8jyShKGkZb -gX/rktW7xQMlJu6NDObyJFHnHTSbTrNhl6XtyjQeRw== ------END AGE ENCRYPTED FILE----- diff --git a/parts/secrets/systems/atlas/cloudflaredCreds.age b/parts/secrets/systems/atlas/cloudflaredCreds.age deleted file mode 100644 index 800dd96..0000000 --- a/parts/secrets/systems/atlas/cloudflaredCreds.age +++ /dev/null @@ -1,13 +0,0 @@ ------BEGIN AGE ENCRYPTED FILE----- -YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1lZDI1NTE5IGxXSVVGUSBudzFm -MmhMR1IzT2FiK2xKRVl5SG5vS1dSbDlieVIzek44bFg0WE9TZXdRCkdWdE9OS0JQ -TU5HVU9rWlBTRlNCQ2NFTzlsbWJ1ZzVCYjVXN2NDU1NTTDgKLT4gc3NoLWVkMjU1 -MTkgSTkyQTNRIDNyNDBNYkV3bEpWN2RkTXplaXEzSlhpc2hIeGJZYXhPWldRN3B2 -MVJBaUUKYS9ua1M2R0FNalRqNXdGVGVQbkxldktyZjl2MW1XWjNDMEVvS2lYQWhi -cwotPiAvU3U7PS1ncmVhc2UgQVxeJFBKdiBRMisjRwoKLS0tIHRCSjJCaFY4U0Mw -dGJTdVV3d0ZBRDdxV2VyWVdkUWd2c0tGQ1oxYi9scjAKzIRCDNZ+82I9EsLCN6Sd -uNvQIyga1EyjqF0SOWeXKe81TldrkoCvOiQaYSNK2JSwtDlM6uL0KZzWOOlUE1lV -Z9BwyDC/QhPWd2hAv/YQS+nRsgyUy8bFbLv8/tohB5ukEHqoHIUEMb9s+kIAJmtF -QhQSNBXyqhzQ8BNQnqSFmLrAKl1IsJ4VuEYODsC0fNobinYygGji624yuZRd3YeV -9UxvJPMoNLcBtsFuP49Cj/0wrVSoak7BhBUfkRwCsDcqfT8= ------END AGE ENCRYPTED FILE----- diff --git a/parts/secrets/systems/atlas/clusterToken.age b/parts/secrets/systems/atlas/clusterToken.age deleted file mode 100644 index 5ca3074..0000000 --- a/parts/secrets/systems/atlas/clusterToken.age +++ /dev/null @@ -1,17 +0,0 @@ ------BEGIN AGE ENCRYPTED FILE----- -YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1lZDI1NTE5IGxXSVVGUSB6cnhF -UXZIbjBpdVBjcEROaEhhV2QyNWw4NUlzU3dnWXRwdE5HZjM0cDJJCkNheUoyVDdK -MUJaVDQ0d2RxYVU0VWlKZFdLa1ZzSFRFREFieVVXNlJVelEKLT4gc3NoLWVkMjU1 -MTkgSTkyQTNRIDBJODBiS0wxTG52ZGFuTkF5WVJrbksrd2psT1lpcUxXekFoTzN6 -dW1RQmsKcDd6aFI4Z1Q0RUJLVjZWUkJmNG1WMUw2VWI4cWprM0MwUzhUeUsxWUt0 -TQotPiBqdCxGaCktZ3JlYXNlIHZja1ciNSB+PCghWiAvYVZnVWYgJApaT2s2czIr -a2xWV0h5T1ZVbDN1WTVRQ2JRVkN3bndRVzZweGJWcXI2SlRYYVRyTTRmOWVGK2lz -dW13ajRkNGgxCmxqZWxtdXZ6eEZId1RaZmZhL3B0QlFXRVh3UFcKLS0tIG5hR1Z2 -ZmZ5SlQ2WitscEdDRVpIMWg2UDNHdHltbnpUQ2RJejd2SEdOczgKB977ot8kAYxY -bVCk5eXqXXYRLiF8ynnVXlRKEXdOUBxreT6rISllcW+tZahAu67beZCJopqAMcLH -MREJloCuNnGPR1dTJDDd76ecOiFVpMdh6+zIF+juZ64LYjZN9CtnJlMlAk6CBniq -lDSiQTA0pyrZa3V+zFXYaqJRHhmMq9pn06mXIJV9IOV5Fy60VU1VXAW04lQxlC7+ -yQK+c+jPg2+cYqs7LCYP7UgDDzMXQ940DISwfj403ijEv96Fgp2+6Z/zLdh5pCOH -0xuV67ptxAk41mNEdXSMf7iW55ogkzDUVBQLVad2kOJKoSMLkaX/BhlvgrC74m8Q -+Icm7ol5b4lQuCLVFyurbCrVTA== ------END AGE ENCRYPTED FILE----- diff --git a/parts/secrets/systems/atlas/miniflux.age b/parts/secrets/systems/atlas/miniflux.age deleted file mode 100644 index 0be7920..0000000 --- a/parts/secrets/systems/atlas/miniflux.age +++ /dev/null @@ -1,12 +0,0 @@ ------BEGIN AGE ENCRYPTED FILE----- -YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1lZDI1NTE5IGxXSVVGUSBhUmhV -Y3JIQ01RL1ZZNXczVGJuckxnSndGbVZIVTE2bWNGZUtHdTdmSVJBCjNMTmxsSHhQ -Z2Q2Qm5PMGxsSDZrY3J3R0VMUlYvRlYrNzV1Z0RMTHFoTjQKLT4gc3NoLWVkMjU1 -MTkgSTkyQTNRIFpZNzRVbXVOemtFZU1pY1c5eUdYV0x5MUl0QmhwbElXSEtNMFhp -SXFCSDAKTkRvZ1lPVXozSkJZNDh0MkNsRCtSTmpCL3hEbXdPdjVhRVJJVVU4UTYx -SQotPiBKckFyUXQtZ3JlYXNlCi9sY3JUbkxCQ2c4aHlNVDFjcUQ4dGIvSTZET1ZK -QXJuYkJMem5zdy9OSkkKLS0tIGh6K3FxZTk0OW4wdDU3NFord0YwS0dDV0w4dGVH -REhMbyt3anRDQXBGeW8KVThL4z//n7UsTYkdD4Cpc3jVcaMJfBdir0ion0adIb3y -dhwVt6c88nXBrPe0a0esfq4Y8wwzq8cS916fSbkzChjTW7pI3DTFzZXJs/o7VIJA -aYLrEC8jWg== ------END AGE ENCRYPTED FILE----- diff --git a/parts/secrets/systems/atlas/rootPassword.age b/parts/secrets/systems/atlas/rootPassword.age deleted file mode 100644 index 9609bfa..0000000 --- a/parts/secrets/systems/atlas/rootPassword.age +++ /dev/null @@ -1,13 +0,0 @@ ------BEGIN AGE ENCRYPTED FILE----- -YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1lZDI1NTE5IGxXSVVGUSBpTEdi -ZlBDdkUraVhiZmVUVjBzNDRlc056cisvbzNVeFRPQkRJb1Z2VXhVCjBmU1JCbEds -RmhRc1kvK2dXS2RRZWFKRkRMaWttS2l3ZWF2ZkJsSUZJcGMKLT4gc3NoLWVkMjU1 -MTkgSTkyQTNRIGdGVHRlMGlGSzJxcXpDNnhTYzJUb01MU29HMkI3ZGdrU01OTkEz -S1RQVWsKMDVFQVUwWERDMGhKTnROdzVWZXRhR0tvdUU5TWh1Y21HUnZvWlNxcy9K -awotPiB0LWdyZWFzZSAwCjNxYlFKa29HcG85SzdFeXBZNUszeVdCVHVVYjh5UlF6 -dkRRZ3pBbXpXQVhLY2NGdXNWdnpNT2Jsblg2em13b0wKCi0tLSBxSUtkQ25WRFlW -NElUdVpnZTE4Q0VtMkhQNTJ2NEFGZWxNejgwM1Fvb2lNCuWdXCjQizC+xKTjhHvz -oFrtSCdddtStKjVO3yGgbgPfW85j0JDnCqrJcNX4ebnNED46OqmySItFVnxiCfAd -/ekLNrB8PDY16vRK8SsZ15GinEcTsrdlbHCJ5rnLi4II+idUcAeI3E/Uo2sP8gRa -kwNTM0Rt5tAeT3sMGB6ASFdgLT2eGhUWR6vkgMc= ------END AGE ENCRYPTED FILE----- diff --git a/parts/secrets/systems/atlas/secretsJson.age b/parts/secrets/systems/atlas/secretsJson.age deleted file mode 100644 index c5fdf34..0000000 --- a/parts/secrets/systems/atlas/secretsJson.age +++ /dev/null @@ -1,19 +0,0 @@ ------BEGIN AGE ENCRYPTED FILE----- -YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1lZDI1NTE5IGxXSVVGUSBIV2sy -ZitMaDRrOXBxYUlJZXVSbEpMSmpPUUV4STZqcExzaTJ2TGdxZTJBCmU3b3hFSHRp -VU83M1QzRGZsdmtJOUtvQ0F4cjltTWRJSzlUYVl2VDdVU3cKLT4gc3NoLWVkMjU1 -MTkgSTkyQTNRIHlPYVRwa0p1Q1o0WDZBa015RExjZk9iMXVLU1FZOHorT3haZFVU -TmNhVHMKRkJlbDAyU1IwbHduVFI1UHZqUDlIaGhhclFBbTIyOFZlM0x2SEx4Z29k -dwotPiA+YnphLWdyZWFzZQpkUlUwSVhkbkJ5S2ZvYjZDQk1yK3JLeC9YVVgvdnJX -YlVJWGVUZnVlNGxuQU9VVTZCNk10aEtGVUhjV1Mwd08zCi9xTmdNeGEvUVF0Q2hR -bFZwVzYvdkVqOXRCTEFvNGMvNzdnQmZhZ20xVXdnU1VpWmQ3Y2N0Yk1DY0MraVdB -Ci0tLSAwNTgyZERKUUk2MXFDOXhrT1drUmZhdHR5aTVBK0tpanFSTFJRYTN2WDhR -Cs/4/jHb8Op00lKo2IlJqQ3dSOlV3obyoeR6YBJoh9djxIR1LpZ3qSGuwB2l7Xqk -uBKGT+XT3hG+x/KhfFiHWyG3lMSI2xjqj7wfAlDDNMClnC298yDh4VoFoLxDkX9D -Mp/qnLiqLpFPZfJEIiFNa21yFIyVy191AwDXtzh8SLfj2jd7z+RW2YnH5L7wNeBU -2gMkI9QJ6BSw7yvMWO8TNvegGdBB4BajC8/CB5aX4m4YArhztfjP+2yD603WPVt4 -PZG3BiUqc+6tpWCqGFISl7fHY5d2onbJNHqqNBuwcKb/MtB+HOh0xhbg1gMCAi9R -zzA1dKvToSZy79hFzXfs0MruOOqNWBUaeis2e3BREDCglbfwPLoRQnXFdye1TUMr -aH9RrHDH2KCcwtwG52dIgrJIAE+Ij00VCbdYU5D8cswdngkYB8beAQWFX/NPLQlQ -i8spKTNdGoz7s2SZrfxw+2JIvbBY ------END AGE ENCRYPTED FILE----- diff --git a/parts/secrets/systems/atlas/tailscaleAuthKey.age b/parts/secrets/systems/atlas/tailscaleAuthKey.age deleted file mode 100644 index 45758a1..0000000 --- a/parts/secrets/systems/atlas/tailscaleAuthKey.age +++ /dev/null @@ -1,13 +0,0 @@ ------BEGIN AGE ENCRYPTED FILE----- -YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1lZDI1NTE5IGxXSVVGUSBBWS9z -b2dJcFFKRnl0TThXNnNDV1Z3VGlyN0pkNEE4UnN2TUZjNUdxclQ0CnUvQnNCalVx -SjZJMmRCWFZISGdkRUNyTVV1Vy93dlIvY29IWm1UQmh6Z3MKLT4gc3NoLWVkMjU1 -MTkgSTkyQTNRIDJBa3A5Qm1CRk1OVUJ4TFNJM0NXZW5ZT3Y4UXk2ZFJkSFhPd0JS -WVp4M2MKdFNJT3RIc3Z5MGFWWjRRYUVPdWc3dFVBR2hxSVNjQk5uc0pzeVBETnZ2 -bwotPiB4b0ViTkRRLWdyZWFzZQpBNHZXT3d2SXNkaXYrMElQc1NYMTRKNlVzRERE -OUtiTExHV1gzR3M0d0RHdU11NlZ6TkNUOEZ6Wk1FNlZuQ1o5CkF0WEI5RFJoUWNO -WWdQTG5lS21leHQ2TFY2aGx2N1lueWQrejZHVTdkMWtRT0pGOW9KOG1XdkxyY0FC -MAotLS0ga1FxNUdOWDNyaDFCSGI4WnNLNFB0QWtHMnhqK1JZRW9oUHRIN2VEYlo4 -NApZf2bwx5T8g+SRGKIelmVfUYx6kVu+BGMA/OKTKZmmZER1f4GfGm9ummZu9hnf -xgLNl+dlK+FetTk7267KO6TFGQGFge6SPJFi2WUosEQ6GZ10M2h9tFWA2xs= ------END AGE ENCRYPTED FILE----- diff --git a/parts/secrets/systems/atlas/userPassword.age b/parts/secrets/systems/atlas/userPassword.age deleted file mode 100644 index 3e658ba..0000000 --- a/parts/secrets/systems/atlas/userPassword.age +++ /dev/null @@ -1,14 +0,0 @@ ------BEGIN AGE ENCRYPTED FILE----- -YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1lZDI1NTE5IGxXSVVGUSBJajlU -eFFSMjBlTUxoUEg3ZlNjb2tUSncwOUFnODRKZHlFai9wRkFaWVhFCmJNbnovL3NL -VjZHLzB6cDVMM0Y1bXllY3RWOEY5NWVkOWhKNmZ0eUJrQk0KLT4gc3NoLWVkMjU1 -MTkgSTkyQTNRIDJRd1lMdU9scDhFMVk5azhDc0dwMGljU2tiQkMxMDBESkpiaXdE -V3BFMDgKUWZ5UkttQmw2a3huVlhsNi81WHYxYlpJdnJ6T29UUHJ6MEZwakJUYzN1 -cwotPiA+bC1ncmVhc2UgSyl8Rm9wLUAgd1hHd3JqdWoKSHZldG9wMmRhM0ZvcEts -cUJ1K0NJK2JYUmVFVHpqYUhBRW13VjhaNXhyS3ZVL29hbVpycklOdmREZCtVeFA4 -QgpraXpwS1J2VC93YUx2bi9MMjZuUUhxQzdFaEEKLS0tIDBPczBUNUJEKzF4ZnB0 -aldTaEZwVjJ6OUtGYjFwZjUwMDJUeStzK1ZrcEUKwjr8W3jUtGjhvB0w8irGnIpR -tn8mLq5c9nMjUMAQ5qRWd6U0+XS1U7/UrP8zuzezlCNRri6tryOgujT7195CLr06 -9WAhEPqCN4FpyowsugbwPEuLgwCswn/YF5m6vg7T41m4VhXPkBlcRIR6c4T076ok -I3/MK2MEavBoGlW73cX4blDgtNozSxHLCQ== ------END AGE ENCRYPTED FILE----- diff --git a/parts/systems/atlas/default.nix b/parts/systems/atlas/default.nix deleted file mode 100644 index 24cb139..0000000 --- a/parts/systems/atlas/default.nix +++ /dev/null @@ -1,50 +0,0 @@ -{ - config, - pkgs, - ... -}: { - imports = [ - ./hardware-configuration.nix - ./miniflux.nix - ./nginx.nix - ]; - - _module.args.nixinate = { - host = "atlas"; - sshUser = "root"; - buildOn = "remote"; - substituteOnTarget = true; - hermetic = false; - }; - - boot = { - loader.systemd-boot.enable = true; - loader.efi.canTouchEfiVariables = true; - tmp.cleanOnBoot = true; - }; - - networking = { - domain = "mydadleft.me"; - hostName = "atlas"; - }; - - services = { - guzzle-api = { - enable = true; - domain = "api.${config.networking.domain}"; - nginx = { - enableACME = true; - acmeRoot = null; - addSSL = true; - }; - }; - }; - - users.users.atlas = { - isNormalUser = true; - shell = pkgs.bash; - passwordFile = config.age.secrets.userPassword.path; - }; - - zramSwap.enable = true; -} diff --git a/parts/systems/atlas/hardware-configuration.nix b/parts/systems/atlas/hardware-configuration.nix deleted file mode 100644 index 00c6cd8..0000000 --- a/parts/systems/atlas/hardware-configuration.nix +++ /dev/null @@ -1,29 +0,0 @@ -{modulesPath, ...}: { - imports = [ - (modulesPath + "/profiles/qemu-guest.nix") - ]; - - boot = { - extraModulePackages = []; - kernelModules = []; - - initrd = { - availableKernelModules = ["virtio_pci" "usbhid"]; - kernelModules = []; - }; - }; - - fileSystems = { - "/" = { - device = "/dev/disk/by-uuid/f0c84809-83f5-414b-a973-496d25d74c6d"; - fsType = "ext4"; - }; - - "/boot" = { - device = "/dev/disk/by-uuid/A253-0826"; - fsType = "vfat"; - }; - }; - - swapDevices = []; -} diff --git a/parts/systems/atlas/miniflux.nix b/parts/systems/atlas/miniflux.nix deleted file mode 100644 index 5ed5d40..0000000 --- a/parts/systems/atlas/miniflux.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ - config, - self, - ... -}: { - config = { - age.secrets = { - miniflux.file = "${self}/parts/secrets/systems/${config.networking.hostName}/miniflux.age"; - }; - - services.miniflux = { - enable = true; - adminCredentialsFile = config.age.secrets.miniflux.path; - config = { - BASE_URL = "https://miniflux.${config.networking.domain}"; - LISTEN_ADDR = "localhost:7000"; - }; - }; - }; -} diff --git a/parts/systems/atlas/nginx.nix b/parts/systems/atlas/nginx.nix deleted file mode 100644 index cdf483d..0000000 --- a/parts/systems/atlas/nginx.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ - config, - self, - ... -}: let - inherit (config.networking) domain; - inherit (self.lib.utils.nginx) mkVHosts mkProxy; -in { - server = { - acme.enable = true; - services.cloudflared.enable = true; - }; - - services.nginx = { - enable = true; - - recommendedGzipSettings = true; - recommendedOptimisation = true; - recommendedProxySettings = true; - recommendedTlsSettings = true; - - virtualHosts = mkVHosts { - "miniflux.${domain}" = { - locations = mkProxy "/" "7000"; - }; - - "msix.${domain}" = { - root = "/var/www/msix"; - }; - }; - }; -} diff --git a/parts/systems/caroline/default.nix b/parts/systems/caroline/default.nix deleted file mode 100644 index 3ec2dd2..0000000 --- a/parts/systems/caroline/default.nix +++ /dev/null @@ -1,17 +0,0 @@ -_: { - desktop = { - homebrew.enable = true; - gpg.enable = true; - }; - - homebrew.casks = ["altserver"]; - - networking = rec { - computerName = "caroline"; - hostName = computerName; - }; - - nix.settings.trusted-users = ["seth"]; - - services.tailscale.enable = true; -} diff --git a/parts/systems/default.nix b/parts/systems/default.nix deleted file mode 100644 index e9ef9ba..0000000 --- a/parts/systems/default.nix +++ /dev/null @@ -1,47 +0,0 @@ -{ - inputs, - self, - withSystem, - ... -}: { - flake = let - inherit (self.lib.configs) mapSystems; - profiles = import ./profiles.nix {inherit self inputs;}; - in { - darwinConfigurations = mapSystems { - caroline = { - system = "x86_64-darwin"; - profile = profiles.personal-darwin; - }; - }; - - nixosConfigurations = mapSystems { - glados = { - modules = with inputs; [ - lanzaboote.nixosModules.lanzaboote - ]; - profile = profiles.personal; - }; - - glados-wsl = { - modules = [inputs.nixos-wsl.nixosModules.wsl]; - profile = profiles.personal; - }; - - atlas = { - modules = [inputs.guzzle_api.nixosModules.default]; - system = "aarch64-linux"; - profile = profiles.server; - }; - }; - - openwrtConfigurations.turret = withSystem "x86_64-linux" ({pkgs, ...}: - pkgs.callPackage ./turret { - inherit (inputs) openwrt-imagebuilder; - }); - }; - - perSystem = {system, ...}: { - apps = (inputs.nixinate.nixinate.${system} self).nixinate; - }; -} diff --git a/parts/systems/glados-wsl/default.nix b/parts/systems/glados-wsl/default.nix deleted file mode 100644 index 98b57ed..0000000 --- a/parts/systems/glados-wsl/default.nix +++ /dev/null @@ -1,39 +0,0 @@ -{ - modulesPath, - pkgs, - ... -}: { - imports = [ - (modulesPath + "/profiles/minimal.nix") - ../../modules/nixos/features/tailscale.nix - ]; - - environment.systemPackages = with pkgs; [ - wslu - ]; - - base.networking.enable = false; - features.tailscale.enable = true; - - wsl = { - enable = true; - defaultUser = "seth"; - nativeSystemd = true; - wslConf.network = { - hostname = "glados-wsl"; - generateResolvConf = true; - }; - startMenuLaunchers = false; - interop.includePath = false; - }; - - services.dbus.apparmor = "disabled"; - - networking.hostName = "glados-wsl"; - - security = { - apparmor.enable = false; - audit.enable = false; - auditd.enable = false; - }; -} diff --git a/parts/systems/glados/boot.nix b/parts/systems/glados/boot.nix deleted file mode 100644 index 4a9af4e..0000000 --- a/parts/systems/glados/boot.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - lib, - pkgs, - ... -}: { - environment.systemPackages = with pkgs; [ - sbctl - tpm2-tss - ]; - - boot = { - initrd.systemd.enable = true; - kernelPackages = pkgs.linuxPackages_latest; - - bootspec.enable = true; - loader.systemd-boot.enable = lib.mkForce false; - - lanzaboote = { - enable = true; - pkiBundle = "/etc/secureboot"; - }; - - supportedFilesystems = ["btrfs" "ntfs"]; - }; -} diff --git a/parts/systems/glados/default.nix b/parts/systems/glados/default.nix deleted file mode 100644 index de2c1d5..0000000 --- a/parts/systems/glados/default.nix +++ /dev/null @@ -1,61 +0,0 @@ -{lib, ...}: { - imports = [ - ./boot.nix - ./hardware-configuration.nix - ../../modules/nixos/features/tailscale.nix - ../../modules/nixos/features/virtualisation.nix - ]; - - boot = { - kernelParams = ["amd_pstate=active"]; - kernel.sysctl = { - "vm.swappiness" = 100; - "vm.vfs_cache_pressure" = 500; - "vm.dirty_background_ratio" = 1; - "vm.dirty_ratio" = 50; - }; - }; - - desktop.gnome.enable = true; - - features = { - tailscale.enable = true; - virtualisation.enable = true; - }; - - hardware = { - nvidia.enable = true; - ssd.enable = true; - }; - - networking.hostName = "glados"; - - security.tpm2 = { - enable = true; - abrmd.enable = true; - }; - - services = { - flatpak.enable = true; - fwupd.enable = true; - }; - - systemd = { - services."prepare-kexec".wantedBy = ["multi-user.target"]; - tmpfiles.rules = let - nproc = 12; - in - builtins.map - (n: "w /sys/devices/system/cpu/cpu${builtins.toString n}/cpufreq/energy_performance_preference - - - - ${"balance_performance"}") - (lib.range 0 (nproc - 1)); - }; - - powerManagement.cpuFreqGovernor = "powersave"; - - zramSwap = { - enable = true; - algorithm = "zstd"; - swapDevices = 1; - memoryPercent = 50; - }; -} diff --git a/parts/systems/glados/hardware-configuration.nix b/parts/systems/glados/hardware-configuration.nix deleted file mode 100644 index a7ff9e9..0000000 --- a/parts/systems/glados/hardware-configuration.nix +++ /dev/null @@ -1,72 +0,0 @@ -# Do not modify this file! It was generated by ‘nixos-generate-config’ -# and may be overwritten by future invocations. Please make changes -# to /etc/nixos/configuration.nix instead. -{ - config, - lib, - modulesPath, - ... -}: { - imports = [ - (modulesPath + "/installer/scan/not-detected.nix") - ]; - - boot = { - extraModulePackages = []; - kernelModules = ["kvm-amd"]; - - initrd = { - availableKernelModules = ["xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod"]; - kernelModules = []; - - luks.devices."cryptroot" = { - device = "/dev/disk/by-uuid/bbbc1f37-53f5-4776-a70e-f2779179de50"; - allowDiscards = true; - crypttabExtraOpts = ["tpm2-device=auto"]; - }; - }; - }; - - fileSystems = { - "/" = { - device = "/dev/mapper/cryptroot"; - fsType = "btrfs"; - options = ["subvol=root" "compress=zstd" "noatime"]; - }; - - "/var/log" = { - device = "/dev/mapper/cryptroot"; - fsType = "btrfs"; - options = ["subvol=var_log" "compress=zstd" "noatime"]; - }; - - "/nix" = { - device = "/dev/mapper/cryptroot"; - fsType = "btrfs"; - options = ["subvol=nix" "compress=zstd" "noatime" "nodatacow"]; - }; - - "/home" = { - device = "/dev/mapper/cryptroot"; - fsType = "btrfs"; - options = ["subvol=home" "compress=zstd" "noatime"]; - }; - - "/boot" = { - device = "/dev/disk/by-uuid/B95B-9412"; - fsType = "vfat"; - }; - }; - - swapDevices = []; - - # Enables DHCP on each ethernet and wireless interface. In case of scripted networking - # (the default) this is the recommended approach. When using systemd-networkd it's - # still possible to use this option, but it's recommended to use it in conjunction - # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`. - networking.useDHCP = lib.mkDefault true; - # networking.interfaces.enp4s0.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; -} diff --git a/parts/systems/profiles.nix b/parts/systems/profiles.nix deleted file mode 100644 index eada9ac..0000000 --- a/parts/systems/profiles.nix +++ /dev/null @@ -1,102 +0,0 @@ -{ - inputs, - self, - ... -}: let - specialArgs = {inherit inputs self;}; -in { - personal = { - system = "x86_64-linux"; - builder = inputs.nixpkgs.lib.nixosSystem; - inherit specialArgs; - - modules = with inputs; [ - agenix.nixosModules.default - catppuccin.nixosModules.catppuccin - hm.nixosModules.home-manager - nur.nixosModules.nur - self.nixosModules.default - - ../users/seth/system.nix - - { - age = { - identityPaths = ["/etc/age/key"]; - secrets = let - baseDir = "${self}/parts/secrets/shared"; - in { - rootPassword.file = "${baseDir}/rootPassword.age"; - sethPassword.file = "${baseDir}/sethPassword.age"; - }; - }; - - base.enable = true; - system.stateVersion = "23.11"; - - home-manager = { - useGlobalPkgs = true; - useUserPackages = true; - extraSpecialArgs = specialArgs; - }; - } - ]; - }; - - personal-darwin = { - builder = inputs.darwin.lib.darwinSystem; - inherit specialArgs; - modules = with inputs; [ - hm.darwinModules.home-manager - self.darwinModules.default - - ../users/seth/system.nix - - { - base.enable = true; - desktop.enable = true; - system.stateVersion = 4; - - home-manager = { - useGlobalPkgs = true; - useUserPackages = true; - extraSpecialArgs = specialArgs; - - users.seth = { - imports = [ - ../users/seth/darwin.nix - ]; - - getchoo.desktop.enable = false; - }; - }; - } - ]; - }; - - server = { - builder = inputs.nixpkgs-stable.lib.nixosSystem; - inherit specialArgs; - - modules = with inputs; [ - agenix.nixosModules.default - ../modules/nixos/base - ../modules/nixos/server - ../modules/nixos/features/tailscale.nix - - { - features.tailscale = { - enable = true; - ssh.enable = true; - }; - - server = { - enable = true; - secrets.enable = true; - }; - - nix.registry.n.flake = nixpkgs-stable; - system.stateVersion = "23.05"; - } - ]; - }; -} diff --git a/parts/systems/turret/default.nix b/parts/systems/turret/default.nix deleted file mode 100644 index faac3d2..0000000 --- a/parts/systems/turret/default.nix +++ /dev/null @@ -1,38 +0,0 @@ -{ - pkgs, - openwrt-imagebuilder, - ... -}: let - inherit (pkgs) runCommand; - inherit (pkgs.stdenv) mkDerivation; - inherit (openwrt-imagebuilder.lib) build profiles; - wrtProfiles = profiles { - inherit pkgs; - release = "22.03.3"; - }; - config = mkDerivation { - name = "openwrt-config-files"; - src = ./files; - installPhase = '' - mkdir -p $out - cp -r * $out/ - ''; - }; - image = - wrtProfiles.identifyProfile "netgear_wac104" - // { - packages = ["https-dns-proxy"]; - - files = runCommand "image-files" {} '' - mkdir -p $out/etc/uci-defaults - cat > $out/etc/uci-defaults/99-custom <<EOF - uci -q batch << EOI - set system.@system[0].hostname='turret' - commit - EOI - EOF - cp -fr ${config}/etc/* $out/etc/ - ''; - }; -in - build image diff --git a/parts/systems/turret/files/etc/config/dhcp b/parts/systems/turret/files/etc/config/dhcp deleted file mode 100644 index 4a471cf..0000000 --- a/parts/systems/turret/files/etc/config/dhcp +++ /dev/null @@ -1,55 +0,0 @@ - -config dnsmasq - option domainneeded '1' - option boguspriv '1' - option filterwin2k '0' - option localise_queries '1' - option rebind_protection '1' - option rebind_localhost '1' - option local '/lan/' - option domain 'lan' - option expandhosts '1' - option nonegcache '0' - option authoritative '1' - option readethers '1' - option leasefile '/tmp/dhcp.leases' - option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto' - option nonwildcard '1' - option localservice '1' - option ednspacket_max '1232' - option doh_backup_noresolv '-1' - option noresolv '1' - list doh_backup_server '' - list doh_backup_server '/mask.icloud.com/' - list doh_backup_server '/mask-h2.icloud.com/' - list doh_backup_server '/use-application-dns.net/' - list doh_backup_server '127.0.0.1#5054' - list doh_backup_server '127.0.0.1#5053' - list server '/mask.icloud.com/' - list server '/mask-h2.icloud.com/' - list server '/use-application-dns.net/' - list server '127.0.0.1#5054' - list server '127.0.0.1#5053' - -config dhcp 'lan' - option interface 'lan' - option start '100' - option limit '150' - option leasetime '12h' - option dhcpv4 'server' - option dhcpv6 'server' - option ra 'server' - option ra_slaac '1' - list ra_flags 'managed-config' - list ra_flags 'other-config' - -config dhcp 'wan' - option interface 'wan' - option ignore '1' - -config odhcpd 'odhcpd' - option maindhcp '0' - option leasefile '/tmp/hosts/odhcpd' - option leasetrigger '/usr/sbin/odhcpd-update' - option loglevel '4' - diff --git a/parts/systems/turret/files/etc/config/dropbear b/parts/systems/turret/files/etc/config/dropbear deleted file mode 100644 index 2139ba0..0000000 --- a/parts/systems/turret/files/etc/config/dropbear +++ /dev/null @@ -1,5 +0,0 @@ -config dropbear - option PasswordAuth 'on' - option RootPasswordAuth 'on' - option Port '22' -# option BannerFile '/etc/banner' diff --git a/parts/systems/turret/files/etc/config/firewall b/parts/systems/turret/files/etc/config/firewall deleted file mode 100644 index b9a4647..0000000 --- a/parts/systems/turret/files/etc/config/firewall +++ /dev/null @@ -1,189 +0,0 @@ -config defaults - option syn_flood 1 - option input ACCEPT - option output ACCEPT - option forward REJECT -# Uncomment this line to disable ipv6 rules -# option disable_ipv6 1 - -config zone - option name lan - list network 'lan' - option input ACCEPT - option output ACCEPT - option forward ACCEPT - -config zone - option name wan - list network 'wan' - list network 'wan6' - option input REJECT - option output ACCEPT - option forward REJECT - option masq 1 - option mtu_fix 1 - -config forwarding - option src lan - option dest wan - -# We need to accept udp packets on port 68, -# see https://dev.openwrt.org/ticket/4108 -config rule - option name Allow-DHCP-Renew - option src wan - option proto udp - option dest_port 68 - option target ACCEPT - option family ipv4 - -# Allow IPv4 ping -config rule - option name Allow-Ping - option src wan - option proto icmp - option icmp_type echo-request - option family ipv4 - option target ACCEPT - -config rule - option name Allow-IGMP - option src wan - option proto igmp - option family ipv4 - option target ACCEPT - -# Allow DHCPv6 replies -# see https://github.com/openwrt/openwrt/issues/5066 -config rule - option name Allow-DHCPv6 - option src wan - option proto udp - option dest_port 546 - option family ipv6 - option target ACCEPT - -config rule - option name Allow-MLD - option src wan - option proto icmp - option src_ip fe80::/10 - list icmp_type '130/0' - list icmp_type '131/0' - list icmp_type '132/0' - list icmp_type '143/0' - option family ipv6 - option target ACCEPT - -# Allow essential incoming IPv6 ICMP traffic -config rule - option name Allow-ICMPv6-Input - option src wan - option proto icmp - list icmp_type echo-request - list icmp_type echo-reply - list icmp_type destination-unreachable - list icmp_type packet-too-big - list icmp_type time-exceeded - list icmp_type bad-header - list icmp_type unknown-header-type - list icmp_type router-solicitation - list icmp_type neighbour-solicitation - list icmp_type router-advertisement - list icmp_type neighbour-advertisement - option limit 1000/sec - option family ipv6 - option target ACCEPT - -# Allow essential forwarded IPv6 ICMP traffic -config rule - option name Allow-ICMPv6-Forward - option src wan - option dest * - option proto icmp - list icmp_type echo-request - list icmp_type echo-reply - list icmp_type destination-unreachable - list icmp_type packet-too-big - list icmp_type time-exceeded - list icmp_type bad-header - list icmp_type unknown-header-type - option limit 1000/sec - option family ipv6 - option target ACCEPT - -config rule - option name Allow-IPSec-ESP - option src wan - option dest lan - option proto esp - option target ACCEPT - -config rule - option name Allow-ISAKMP - option src wan - option dest lan - option dest_port 500 - option proto udp - option target ACCEPT - - -### EXAMPLE CONFIG SECTIONS -# do not allow a specific ip to access wan -#config rule -# option src lan -# option src_ip 192.168.45.2 -# option dest wan -# option proto tcp -# option target REJECT - -# block a specific mac on wan -#config rule -# option dest wan -# option src_mac 00:11:22:33:44:66 -# option target REJECT - -# block incoming ICMP traffic on a zone -#config rule -# option src lan -# option proto ICMP -# option target DROP - -# port redirect port coming in on wan to lan -#config redirect -# option src wan -# option src_dport 80 -# option dest lan -# option dest_ip 192.168.16.235 -# option dest_port 80 -# option proto tcp - -# port redirect of remapped ssh port (22001) on wan -#config redirect -# option src wan -# option src_dport 22001 -# option dest lan -# option dest_port 22 -# option proto tcp - -### FULL CONFIG SECTIONS -#config rule -# option src lan -# option src_ip 192.168.45.2 -# option src_mac 00:11:22:33:44:55 -# option src_port 80 -# option dest wan -# option dest_ip 194.25.2.129 -# option dest_port 120 -# option proto tcp -# option target REJECT - -#config redirect -# option src lan -# option src_ip 192.168.45.2 -# option src_mac 00:11:22:33:44:55 -# option src_port 1024 -# option src_dport 80 -# option dest_ip 194.25.2.129 -# option dest_port 120 -# option proto tcp diff --git a/parts/systems/turret/files/etc/config/https-dns-proxy b/parts/systems/turret/files/etc/config/https-dns-proxy deleted file mode 100644 index e5623ad..0000000 --- a/parts/systems/turret/files/etc/config/https-dns-proxy +++ /dev/null @@ -1,18 +0,0 @@ - -config main 'config' - option dnsmasq_config_update '*' - list force_dns_port '53' - list force_dns_port '853' - option procd_trigger_wan6 '0' - option canary_domains_icloud '0' - option canary_domains_mozilla '0' - option force_dns '0' - -config https-dns-proxy - option bootstrap_dns '1.1.1.1,1.0.0.1' - option resolver_url 'https://cloudflare-dns.com/dns-query' - option listen_addr '127.0.0.1' - option listen_port '5054' - option user 'nobody' - option group 'nogroup' - diff --git a/parts/systems/turret/files/etc/config/luci b/parts/systems/turret/files/etc/config/luci deleted file mode 100644 index 8eb8a9b..0000000 --- a/parts/systems/turret/files/etc/config/luci +++ /dev/null @@ -1,41 +0,0 @@ - -config core 'main' - option lang 'auto' - option mediaurlbase '/luci-static/bootstrap' - option resourcebase '/luci-static/resources' - option ubuspath '/ubus/' - -config extern 'flash_keep' - option uci '/etc/config/' - option dropbear '/etc/dropbear/' - option openvpn '/etc/openvpn/' - option passwd '/etc/passwd' - option opkg '/etc/opkg.conf' - option firewall '/etc/firewall.user' - option uploads '/lib/uci/upload/' - -config internal 'languages' - -config internal 'sauth' - option sessionpath '/tmp/luci-sessions' - option sessiontime '3600' - -config internal 'ccache' - option enable '1' - -config internal 'themes' - option Bootstrap '/luci-static/bootstrap' - option BootstrapDark '/luci-static/bootstrap-dark' - option BootstrapLight '/luci-static/bootstrap-light' - -config internal 'apply' - option rollback '90' - option holdoff '4' - option timeout '5' - option display '1.5' - -config internal 'diag' - option dns 'openwrt.org' - option ping 'openwrt.org' - option route 'openwrt.org' - diff --git a/parts/systems/turret/files/etc/config/network b/parts/systems/turret/files/etc/config/network deleted file mode 100644 index c71cf98..0000000 --- a/parts/systems/turret/files/etc/config/network +++ /dev/null @@ -1,29 +0,0 @@ - -config interface 'loopback' - option device 'lo' - option proto 'static' - option ipaddr '127.0.0.1' - option netmask '255.0.0.0' - -config globals 'globals' - option packet_steering '1' - option ula_prefix 'fd26:3166:dece::/48' - -config device - option name 'br-lan' - option type 'bridge' - list ports 'lan2' - list ports 'lan3' - list ports 'lan4' - -config interface 'lan' - option device 'br-lan' - option proto 'static' - option ipaddr '192.168.1.1' - option netmask '255.255.255.0' - option ip6assign '60' - -config interface 'wan' - option device 'lan1' - option proto 'dhcp' - diff --git a/parts/systems/turret/files/etc/config/rpcd b/parts/systems/turret/files/etc/config/rpcd deleted file mode 100644 index 176c643..0000000 --- a/parts/systems/turret/files/etc/config/rpcd +++ /dev/null @@ -1,10 +0,0 @@ -config rpcd - option socket /var/run/ubus/ubus.sock - option timeout 30 - -config login - option username 'root' - option password '$p$root' - list read '*' - list write '*' - diff --git a/parts/systems/turret/files/etc/config/system b/parts/systems/turret/files/etc/config/system deleted file mode 100644 index ee3415f..0000000 --- a/parts/systems/turret/files/etc/config/system +++ /dev/null @@ -1,16 +0,0 @@ - -config system - option hostname 'turret' - option timezone 'UTC' - option ttylogin '0' - option log_size '64' - option urandom_seed '0' - option compat_version '1.1' - -config timeserver 'ntp' - option enabled '1' - option enable_server '0' - list server '0.openwrt.pool.ntp.org' - list server '1.openwrt.pool.ntp.org' - list server '2.openwrt.pool.ntp.org' - list server '3.openwrt.pool.ntp.org' diff --git a/parts/systems/turret/files/etc/config/ucitrack b/parts/systems/turret/files/etc/config/ucitrack deleted file mode 100644 index bb4cdbc..0000000 --- a/parts/systems/turret/files/etc/config/ucitrack +++ /dev/null @@ -1,56 +0,0 @@ -config network - option init network - list affects dhcp - -config wireless - list affects network - -config firewall - option init firewall - list affects luci-splash - list affects qos - list affects miniupnpd - -config olsr - option init olsrd - -config dhcp - option init dnsmasq - list affects odhcpd - -config odhcpd - option init odhcpd - -config dropbear - option init dropbear - -config httpd - option init httpd - -config fstab - option exec '/sbin/block mount' - -config qos - option init qos - -config system - option init led - option exec '/etc/init.d/log reload' - list affects luci_statistics - list affects dhcp - -config luci_splash - option init luci_splash - -config upnpd - option init miniupnpd - -config ntpclient - option init ntpclient - -config samba - option init samba - -config tinyproxy - option init tinyproxy - diff --git a/parts/systems/turret/files/etc/config/uhttpd b/parts/systems/turret/files/etc/config/uhttpd deleted file mode 100644 index cb2ff71..0000000 --- a/parts/systems/turret/files/etc/config/uhttpd +++ /dev/null @@ -1,31 +0,0 @@ - -config uhttpd 'main' - list listen_http '0.0.0.0:80' - list listen_http '[::]:80' - list listen_https '0.0.0.0:443' - list listen_https '[::]:443' - option redirect_https '0' - option home '/www' - option rfc1918_filter '1' - option max_requests '3' - option max_connections '100' - option cert '/etc/uhttpd.crt' - option key '/etc/uhttpd.key' - option cgi_prefix '/cgi-bin' - list lua_prefix '/cgi-bin/luci=/usr/lib/lua/luci/sgi/uhttpd.lua' - option script_timeout '60' - option network_timeout '30' - option http_keepalive '20' - option tcp_keepalive '1' - option ubus_prefix '/ubus' - -config cert 'defaults' - option days '730' - option key_type 'ec' - option bits '2048' - option ec_curve 'P-256' - option country 'ZZ' - option state 'Somewhere' - option location 'Unknown' - option commonname 'OpenWrt' - diff --git a/parts/systems/turret/files/etc/config/wireless b/parts/systems/turret/files/etc/config/wireless deleted file mode 100644 index c8bb9d7..0000000 --- a/parts/systems/turret/files/etc/config/wireless +++ /dev/null @@ -1,34 +0,0 @@ - -config wifi-device 'radio0' - option type 'mac80211' - option path '1e140000.pcie/pci0000:00/0000:00:01.0/0000:02:00.0' - option band '2g' - option disabled '0' - option htmode 'HT40' - option channel '1' - option cell_density '0' - -config wifi-iface 'default_radio0' - option device 'radio0' - option network 'lan' - option mode 'ap' - option ssid 'Box-2.4G' - option encryption 'psk2' - option key 'REPLACEME' - -config wifi-device 'radio1' - option type 'mac80211' - option path '1e140000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0' - option band '5g' - option disabled '0' - option htmode 'VHT40' - option channel '36' - option cell_density '0' - -config wifi-iface 'default_radio1' - option device 'radio1' - option network 'lan' - option mode 'ap' - option ssid 'Box-5G' - option key 'REPLACEME' - option encryption 'psk2' diff --git a/parts/systems/turret/files/etc/dropbear/authorized_keys b/parts/systems/turret/files/etc/dropbear/authorized_keys deleted file mode 100644 index 495c605..0000000 --- a/parts/systems/turret/files/etc/dropbear/authorized_keys +++ /dev/null @@ -1 +0,0 @@ -ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIERx0I8DKtALZ9VrYnY1iBEpwl2pBlRiS8oJQvZwpl5e seth@glados
diff --git a/parts/users/default.nix b/parts/users/default.nix deleted file mode 100644 index a639abe..0000000 --- a/parts/users/default.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ - lib, - config, - inputs, - self, - ... -}: let - inherit (self.lib.configs) mapHMUsers; - inherit (inputs) nixpkgs; - - pkgsFor = lib.genAttrs config.systems ( - system: - import nixpkgs { - system = "x86_64-linux"; - overlays = with inputs; [nur.overlay getchoo.overlays.default]; - } - ); -in { - flake.homeConfigurations = mapHMUsers { - seth.pkgs = pkgsFor."x86_64-linux"; - }; -} diff --git a/parts/users/seth/darwin.nix b/parts/users/seth/darwin.nix deleted file mode 100644 index 74e6489..0000000 --- a/parts/users/seth/darwin.nix +++ /dev/null @@ -1,8 +0,0 @@ -{pkgs, ...}: { - home.packages = with pkgs; [ - discord - iterm2 - #prismlauncher - #spotify - ]; -} diff --git a/parts/users/seth/default.nix b/parts/users/seth/default.nix deleted file mode 100644 index 123e20f..0000000 --- a/parts/users/seth/default.nix +++ /dev/null @@ -1,12 +0,0 @@ -{inputs, ...}: { - imports = with inputs; [ - ./desktop - ./programs - ./shell - arkenfox.hmModules.arkenfox - catppuccin.homeManagerModules.catppuccin - nix-index-database.hmModules.nix-index - ]; - - home.stateVersion = "23.11"; -} diff --git a/parts/users/seth/desktop/budgie/default.nix b/parts/users/seth/desktop/budgie/default.nix deleted file mode 100644 index 7eced2b..0000000 --- a/parts/users/seth/desktop/budgie/default.nix +++ /dev/null @@ -1,44 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: let - cfg = config.getchoo.desktop.budgie; - inherit (lib) mkIf; - fromYaml = file: let - json = with pkgs; - runCommand "converted.json" {} '' - ${yj}/bin/yj < ${file} > $out - ''; - in - with builtins; fromJSON (readFile json); -in { - config = mkIf cfg.enable { - programs.alacritty = { - enable = true; - settings = let - file = - pkgs.fetchFromGitHub { - owner = "catppuccin"; - repo = "alacritty"; - rev = "3c808cbb4f9c87be43ba5241bc57373c793d2f17"; - sha256 = "sha256-w9XVtEe7TqzxxGUCDUR9BFkzLZjG8XrplXJ3lX6f+x0="; - } - + "/catppuccin-mocha.yml"; - in - (fromYaml file) - // { - }; - }; - - dconf = { - enable = true; - settings = { - "com.solus-project.budgie-panel:Budgie" = { - pinned-launchers = ["firefox.desktop" "nemo.desktop" "discord.desktop"]; - }; - }; - }; - }; -} diff --git a/parts/users/seth/desktop/default.nix b/parts/users/seth/desktop/default.nix deleted file mode 100644 index bdcef3d..0000000 --- a/parts/users/seth/desktop/default.nix +++ /dev/null @@ -1,43 +0,0 @@ -{ - config, - lib, - pkgs, - osConfig, - ... -}: let - cfg = config.getchoo.desktop; - desktops = ["budgie" "gnome" "plasma"]; - inherit (lib) mkEnableOption mkIf; -in { - imports = [ - ./budgie - ./gnome - ./plasma - ]; - - options.getchoo.desktop = - { - enable = mkEnableOption "desktop configuration" // {default = osConfig.desktop.enable or false;}; - } - // lib.genAttrs desktops (desktop: { - enable = - mkEnableOption desktop - // {default = osConfig.desktop.${desktop}.enable or false;}; - }); - - config = mkIf cfg.enable { - home.packages = with pkgs; [ - discord - element-desktop - spotify - steam - prismlauncher - ]; - - getchoo.programs = { - chromium.enable = true; - firefox.enable = true; - mangohud.enable = true; - }; - }; -} diff --git a/parts/users/seth/desktop/gnome/default.nix b/parts/users/seth/desktop/gnome/default.nix deleted file mode 100644 index 82a4708..0000000 --- a/parts/users/seth/desktop/gnome/default.nix +++ /dev/null @@ -1,89 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: let - cfg = config.getchoo.desktop.gnome; - inherit (lib) mkIf; -in { - config = mkIf cfg.enable { - home.packages = with pkgs; - [ - adw-gtk3 - papirus-icon-theme - tuba - ] - ++ (with pkgs.gnomeExtensions; [ - blur-my-shell - burn-my-windows - caffeine - gradience - ]); - - dconf = { - enable = true; - settings = { - "org/gnome/shell" = { - disable-user-extensions = false; - - enabled-extensions = [ - ]; - - favorite-apps = [ - "firefox.desktop" - "org.gnome.Nautilus.desktop" - "discord.desktop" - ]; - }; - - "org/gnome/desktop/interface" = { - color-scheme = "prefer-dark"; - document-font-name = ''Noto Sans 11''; - font-antialiasing = ''rgba''; - font-name = ''Noto Sans 11''; - icon-theme = ''Papirus-Dark''; - monospace-font-name = ''FiraCode Nerd Font 10''; - }; - - "org/gnome/desktop/peripherals/mouse" = { - accel-profile = ''flat''; - }; - - "org/gnome/desktop/wm/preferences" = { - titlebar-font = ''Noto Sans Bold 11''; - }; - - "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0" = { - name = "blackbox"; - command = "blackbox"; - binding = "<Control><Alt>t"; - }; - - "com/raggesilver/BlackBox" = { - font = ''FiraCode Nerd Font 12''; - theme-dark = ''Catppuccin-Mocha''; - remember-window-size = true; - }; - }; - }; - - gtk = { - enable = true; - theme = { - name = "adw-gtk3"; - package = pkgs.adw-gtk3; - }; - }; - - xdg.dataFile."blackbox/schemes/Catppuccin-Mocha.json".source = - pkgs.fetchFromGitHub { - owner = "catppuccin"; - repo = "tilix"; - rev = "3fd05e03419321f2f2a6aad6da733b28be1765ef"; - sha256 = "sha256-SI7QxQ+WBHzeuXbTye+s8pi4tDVZOV4Aa33mRYO276k="; - } - + "/src/Catppuccin-Mocha.json"; - }; -} diff --git a/parts/users/seth/desktop/plasma/default.nix b/parts/users/seth/desktop/plasma/default.nix deleted file mode 100644 index 4f59528..0000000 --- a/parts/users/seth/desktop/plasma/default.nix +++ /dev/null @@ -1,59 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: let - cfg = config.getchoo.desktop.plasma; - inherit (lib) mkIf; -in { - config = mkIf cfg.enable { - home.packages = with pkgs; [ - catppuccin-cursors - (catppuccin-kde.override - { - flavour = ["mocha"]; - accents = ["mauve"]; - }) - - (catppuccin-kvantum.override - { - variant = "Mocha"; - accent = "Mauve"; - }) - - libsForQt5.qtstyleplugin-kvantum - papirus-icon-theme - ]; - - xdg = { - configFile = let - themeDir = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}"; - in { - "gtk-4.0/gtk.css".source = "${themeDir}/gtk-4.0/gtk.css"; - "gtk-4.0/gtk-dark.css".source = "${themeDir}/gtk-4.0/gtk-dark.css"; - }; - - dataFile."konsole/catppuccin-mocha.colorscheme".source = - pkgs.fetchFromGitHub { - owner = "catppuccin"; - repo = "konsole"; - rev = "7d86b8a1e56e58f6b5649cdaac543a573ac194ca"; - sha256 = "EwSJMTxnaj2UlNJm1t6znnatfzgm1awIQQUF3VPfCTM="; - } - + "/Catppuccin-Mocha.colorscheme"; - }; - - gtk = { - enable = true; - - theme = { - name = "Catppuccin-Mocha-Standard-Mauve-dark"; - package = pkgs.catppuccin-gtk.override { - accents = ["mauve"]; - variant = "mocha"; - }; - }; - }; - }; -} diff --git a/parts/users/seth/home.nix b/parts/users/seth/home.nix deleted file mode 100644 index a3d9cce..0000000 --- a/parts/users/seth/home.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ - lib, - pkgs, - ... -}: { - imports = [./.]; - - home = let - username = "seth"; - inherit (pkgs.stdenv) isLinux isDarwin; - optionalLinuxDarwin = lib.optionalString (isLinux || isDarwin); - in { - inherit username; - homeDirectory = optionalLinuxDarwin ( - if isLinux - then "/home/${username}" - else "/Users/${username}" - ); - }; -} diff --git a/parts/users/seth/programs/chromium.nix b/parts/users/seth/programs/chromium.nix deleted file mode 100644 index e313235..0000000 --- a/parts/users/seth/programs/chromium.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ - config, - lib, - ... -}: let - cfg = config.getchoo.programs.chromium; - inherit (lib) mkEnableOption mkIf; -in { - options.getchoo.programs.chromium.enable = mkEnableOption "chromium" // {default = config.getchoo.desktop.enable;}; - - config = mkIf cfg.enable { - programs.chromium = { - enable = true; - # hw accel support - commandLineArgs = [ - "--ignore-gpu-blocklist" - "--enable-gpu-rasterization" - "--enable-gpu-compositing" - #"--enable-native-gpu-memory-buffers" - "--enable-zero-copy" - "--enable-features=VaapiVideoDecoder,VaapiVideoEncoder,CanvasOopRasterization,RawDraw,WebRTCPipeWireCapturer,Vulkan,WaylandWindowDecorations,WebUIDarkMode" - "--enable-features=WebRTCPipeWireCapturer,WaylandWindowDecorations,WebUIDarkMode" - "--force-dark-mode" - ]; - }; - }; -} diff --git a/parts/users/seth/programs/default.nix b/parts/users/seth/programs/default.nix deleted file mode 100644 index 03dfa1b..0000000 --- a/parts/users/seth/programs/default.nix +++ /dev/null @@ -1,52 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: let - cfg = config.getchoo.programs.defaultPrograms; - inherit (lib) mkDefault mkEnableOption mkIf; -in { - options.getchoo.programs.defaultPrograms.enable = mkEnableOption "default programs" // {default = true;}; - - imports = [ - ./chromium.nix - ./firefox - ./git.nix - ./gpg.nix - ./mangohud.nix - ./neovim - ./ssh.nix - ./vim.nix - ]; - - config = mkIf cfg.enable { - home.packages = with pkgs; [ - fd - nix-your-shell - nurl - rclone - restic - ]; - - catppuccin.flavour = mkDefault "mocha"; - - programs = { - btop = { - enable = mkDefault true; - catppuccin.enable = mkDefault true; - }; - - direnv = { - enable = mkDefault true; - nix-direnv.enable = mkDefault true; - }; - - ripgrep.enable = mkDefault true; - - nix-index-database.comma.enable = mkDefault true; - }; - - xdg.enable = mkDefault true; - }; -} diff --git a/parts/users/seth/programs/firefox/arkenfox.nix b/parts/users/seth/programs/firefox/arkenfox.nix deleted file mode 100644 index fbe9a5c..0000000 --- a/parts/users/seth/programs/firefox/arkenfox.nix +++ /dev/null @@ -1,70 +0,0 @@ -{ - config, - lib, - ... -}: let - cfg = config.getchoo.programs.firefox; - inherit (lib) genAttrs mkEnableOption mkIf recursiveUpdate; - - enableSections = sections: genAttrs sections (_: {enable = true;}); -in { - options.getchoo.programs.firefox.arkenfoxConfig.enable = - mkEnableOption "default arkenfox config" // {default = true;}; - - config.programs.firefox = mkIf (cfg.enable && cfg.arkenfoxConfig.enable) { - arkenfox = { - enable = true; - version = "118.0"; - }; - - profiles.arkenfox.arkenfox = - recursiveUpdate { - enable = true; - - # enable safe browsing - "0400"."0403"."browser.safebrowsing.downloads.remote.enabled".value = true; - - # fix hulu - "1200"."1201"."security.ssl.require_safe_negotiation".value = false; - - "2600"."2651"."browser.download.useDownloadDir" = { - enable = true; - value = true; - }; - - # disable rfp letterboxing - "4500"."4504"."privacy.resistFingerprinting.letterboxing".value = false; - - "5000" = { - "5003"."signon.rememberSignons".enable = true; - # enable search autocomplete - "5021"."keyword.enabled".value = true; - }; - - # enable drm - "5500"."5508"."media.eme.enabled" = { - enable = true; - value = true; - }; - } (enableSections [ - "0100" - "0200" - "0300" - "0400" - "0600" - "0700" - "0800" - "0900" - "1000" - "1200" - "1600" - "1700" - "2000" - "2400" - "2600" - "2700" - "2800" - "4500" - ]); - }; -} diff --git a/parts/users/seth/programs/firefox/default.nix b/parts/users/seth/programs/firefox/default.nix deleted file mode 100644 index 82ba80d..0000000 --- a/parts/users/seth/programs/firefox/default.nix +++ /dev/null @@ -1,50 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: let - cfg = config.getchoo.programs.firefox; - inherit (lib) mkEnableOption mkIf; -in { - options.getchoo.programs.firefox.enable = mkEnableOption "firefox" // {default = config.getchoo.desktop.enable;}; - - imports = [ - ./arkenfox.nix - ]; - - config = mkIf cfg.enable { - home.sessionVariables = { - MOZ_ENABLE_WAYLAND = "1"; - }; - - programs.firefox = { - enable = true; - profiles.arkenfox = { - extensions = with pkgs.nur.repos.rycee.firefox-addons; [ - bitwarden - floccus - private-relay - ublock-origin - ]; - - isDefault = true; - - settings = { - # disable firefox accounts & pocket - "extensions.pocket.enabled" = false; - "identity.fxaccounts.enabled" = false; - - "gfx.webrender.all" = true; - "fission.autostart" = true; - - # hw accel - "media.ffmpeg.vaapi.enabled" = true; - - # widevine drm - "media.gmp-widevinecdm.enabled" = true; - }; - }; - }; - }; -} diff --git a/parts/users/seth/programs/git.nix b/parts/users/seth/programs/git.nix deleted file mode 100644 index ec92f8d..0000000 --- a/parts/users/seth/programs/git.nix +++ /dev/null @@ -1,51 +0,0 @@ -{ - config, - lib, - ... -}: let - cfg = config.getchoo.programs.git; - inherit (lib) mkEnableOption mkIf; -in { - options.getchoo.programs.git.enable = mkEnableOption "git" // {default = true;}; - - config = mkIf cfg.enable { - programs = { - gh = { - enable = true; - settings = { - git_protocol = "https"; - editor = "nvim"; - prompt = "enabled"; - }; - - gitCredentialHelper = { - enable = true; - hosts = ["https://github.com" "https://github.example.com"]; - }; - }; - - git = { - enable = true; - - delta = { - enable = true; - options = { - syntax-theme = "catppuccin"; - }; - }; - - extraConfig = { - init = {defaultBranch = "main";}; - }; - - signing = { - key = "D31BD0D494BBEE86"; - signByDefault = true; - }; - - userEmail = "[email protected]"; - userName = "seth"; - }; - }; - }; -} diff --git a/parts/users/seth/programs/gpg.nix b/parts/users/seth/programs/gpg.nix deleted file mode 100644 index f4f1a33..0000000 --- a/parts/users/seth/programs/gpg.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ - config, - lib, - pkgs, - osConfig, - ... -}: let - cfg = config.getchoo.programs.gpg; - inherit (lib) mkEnableOption mkIf; -in { - options.getchoo.programs.gpg.enable = mkEnableOption "gpg" // {default = true;}; - - config = mkIf cfg.enable { - programs.gpg.enable = true; - - services.gpg-agent = lib.mkIf pkgs.stdenv.isLinux { - enable = true; - - enableBashIntegration = config.programs.bash.enable; - enableFishIntegration = config.programs.fish.enable; - enableZshIntegration = config.programs.zsh.enable; - - pinentryFlavor = - if osConfig ? programs - then osConfig.programs.gnupg.agent.pinentryFlavor or "curses" - else "curses"; - }; - }; -} diff --git a/parts/users/seth/programs/mangohud.nix b/parts/users/seth/programs/mangohud.nix deleted file mode 100644 index 1ab8bb0..0000000 --- a/parts/users/seth/programs/mangohud.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ - config, - lib, - ... -}: let - cfg = config.getchoo.programs.mangohud; - inherit (lib) mkEnableOption mkIf; -in { - options.getchoo.programs.mangohud.enable = - mkEnableOption "mangohud" - // {default = config.getchoo.desktop.enable;}; - - config = mkIf cfg.enable { - programs.mangohud = { - enable = true; - settings = { - legacy_layout = false; - cpu_stats = true; - cpu_temp = true; - gpu_stats = true; - gpu_temp = true; - fps = true; - frametime = true; - media_player = true; - media_player_name = "spotify"; - }; - }; - }; -} diff --git a/parts/users/seth/programs/neovim/.luarc.json b/parts/users/seth/programs/neovim/.luarc.json deleted file mode 100644 index 23b9ee2..0000000 --- a/parts/users/seth/programs/neovim/.luarc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "workspace.checkThirdParty": false -}
\ No newline at end of file diff --git a/parts/users/seth/programs/neovim/default.nix b/parts/users/seth/programs/neovim/default.nix deleted file mode 100644 index f02935a..0000000 --- a/parts/users/seth/programs/neovim/default.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ - config, - lib, - pkgs, - inputs, - ... -}: let - cfg = config.getchoo.programs.neovim; - inherit (lib) mkEnableOption mkIf; -in { - options.getchoo.programs.neovim.enable = mkEnableOption "neovim" // {default = true;}; - - config = mkIf cfg.enable { - home.packages = [ - inputs.getchvim.packages.${pkgs.stdenv.hostPlatform.system}.default - ]; - }; -} diff --git a/parts/users/seth/programs/ssh.nix b/parts/users/seth/programs/ssh.nix deleted file mode 100644 index 080a60e..0000000 --- a/parts/users/seth/programs/ssh.nix +++ /dev/null @@ -1,50 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: let - cfg = config.getchoo.programs.ssh; - inherit (lib) mkEnableOption mkIf; -in { - options.getchoo.programs.ssh.enable = mkEnableOption "ssh" // {default = true;}; - - config = mkIf cfg.enable { - programs.ssh = { - enable = true; - package = pkgs.openssh; - - matchBlocks = let - sshDir = "${config.home.homeDirectory}/.ssh"; - in { - # git forges - "codeberg.org" = { - identityFile = "${sshDir}/codeberg"; - user = "git"; - }; - - # linux packaging - "aur.archlinux.org" = { - identityFile = "${sshDir}/aur"; - user = "aur"; - }; - - "pagure.io" = { - identityFile = "${sshDir}/copr"; - user = "git"; - }; - - # router - "192.168.1.1" = { - identityFile = "${sshDir}/openwrt"; - user = "root"; - }; - - # servers - "atlas".user = "atlas"; - }; - }; - - services.ssh-agent.enable = pkgs.stdenv.isLinux; - }; -} diff --git a/parts/users/seth/programs/vim.nix b/parts/users/seth/programs/vim.nix deleted file mode 100644 index 0f81cfb..0000000 --- a/parts/users/seth/programs/vim.nix +++ /dev/null @@ -1,43 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: let - cfg = config.getchoo.programs.vim; - inherit (lib) mkEnableOption mkIf; -in { - options.getchoo.programs.vim.enable = mkEnableOption "vim" // {default = true;}; - - config = mkIf cfg.enable { - programs.vim = { - enable = true; - packageConfigurable = pkgs.vim; - settings = { - expandtab = false; - shiftwidth = 2; - tabstop = 2; - }; - extraConfig = '' - " https://wiki.archlinux.org/title/XDG_Base_Directory - set runtimepath^=$XDG_CONFIG_HOME/vim - set runtimepath+=$XDG_DATA_HOME/vim - set runtimepath+=$XDG_CONFIG_HOME/vim/after - - set packpath^=$XDG_DATA_HOME/vim,$XDG_CONFIG_HOME/vim - set packpath+=$XDG_CONFIG_HOME/vim/after,$XDG_DATA_HOME/vim/after - set packpath^=$XDG_DATA_HOME/vim,$XDG_CONFIG_HOME/vim - set packpath+=$XDG_CONFIG_HOME/vim/after,$XDG_DATA_HOME/vim/after - - let g:netrw_home = $XDG_DATA_HOME."/vim" - call mkdir($XDG_DATA_HOME."/vim/spell", 'p') - - set backupdir=$XDG_STATE_HOME/vim/backup | call mkdir(&backupdir, 'p') - set directory=$XDG_STATE_HOME/vim/swap | call mkdir(&directory, 'p') - set undodir=$XDG_STATE_HOME/vim/undo | call mkdir(&undodir, 'p') - set viewdir=$XDG_STATE_HOME/vim/view | call mkdir(&viewdir, 'p') - set viminfofile=$XDG_STATE_HOME/vim/viminfo - ''; - }; - }; -} diff --git a/parts/users/seth/shell/bash.nix b/parts/users/seth/shell/bash.nix deleted file mode 100644 index f9a1afa..0000000 --- a/parts/users/seth/shell/bash.nix +++ /dev/null @@ -1,21 +0,0 @@ -{config, ...}: { - programs.bash = { - enable = true; - bashrcExtra = '' - nixfile=${config.home.homeDirectory}/.nix-profile/etc/profile.d/nix.sh - [ -e "$nixfile" ] && source "$nixfile" - ''; - historyFile = "${config.xdg.stateHome}/bash/history"; - historyFileSize = 1000; - historySize = 100; - shellOptions = [ - "cdspell" - "checkjobs" - "checkwinsize" - "dirspell" - "globstar" - "histappend" - "no_empty_cmd_completion" - ]; - }; -} diff --git a/parts/users/seth/shell/default.nix b/parts/users/seth/shell/default.nix deleted file mode 100644 index 0b09bf6..0000000 --- a/parts/users/seth/shell/default.nix +++ /dev/null @@ -1,64 +0,0 @@ -{ - config, - pkgs, - ... -}: { - imports = [ - ./bash.nix - ./fish.nix - ]; - - programs = { - bat = { - enable = true; - catppuccin.enable = true; - }; - - eza = { - enable = true; - enableAliases = true; - icons = true; - }; - - starship = { - enable = true; - enableBashIntegration = false; - enableZshIntegration = false; - settings = - { - format = "$all"; - palette = "catppuccin_mocha"; - command_timeout = 250; - } - // fromTOML (builtins.readFile ./starship.toml) - // fromTOML (builtins.readFile - (pkgs.fetchFromGitHub { - owner = "catppuccin"; - repo = "starship"; - rev = "5629d2356f62a9f2f8efad3ff37476c19969bd4f"; - hash = "sha256-nsRuxQFKbQkyEI4TXgvAjcroVdG+heKX5Pauq/4Ota0="; - } - + "/palettes/mocha.toml")); - }; - }; - - home = { - sessionVariables = let - inherit (config.xdg) configHome dataHome stateHome; - in { - EDITOR = "nvim"; - VISUAL = "$EDITOR"; - GPG_TTY = "$(tty)"; - CARGO_HOME = "${dataHome}/cargo"; - RUSTUP_HOME = "${dataHome}/rustup"; - LESSHISTFILE = "${stateHome}/less/history"; - NPM_CONFIG_USERCONFIG = "${configHome}/npm/npmrc"; - }; - - shellAliases = { - diff = "diff --color=auto"; - g = "git"; - gs = "g status"; - }; - }; -} diff --git a/parts/users/seth/shell/fish.nix b/parts/users/seth/shell/fish.nix deleted file mode 100644 index fc241d0..0000000 --- a/parts/users/seth/shell/fish.nix +++ /dev/null @@ -1,39 +0,0 @@ -{ - config, - pkgs, - ... -}: { - programs.fish = { - enable = true; - catppuccin.enable = true; - - interactiveShellInit = '' - set -l nixfile ${config.home.homeDirectory}/.nix-profile/etc/profile.d/nix.fish - if test -e $nixfile - source $nixfile - end - - nix-your-shell fish | source - - abbr -a !! --position anywhere --function last_history_item - ''; - - functions = { - last_history_item.body = "echo $history[1]"; - }; - - shellAbbrs = { - nixgc = "sudo nix-collect-garbage -d && nix-collect-garbage -d"; - }; - - plugins = let - mkFishPlugins = builtins.map (plugin: { - name = plugin; - inherit (pkgs.fishPlugins.${plugin}) src; - }); - in - mkFishPlugins [ - "autopair" - ]; - }; -} diff --git a/parts/users/seth/shell/starship.toml b/parts/users/seth/shell/starship.toml deleted file mode 100644 index 94a2922..0000000 --- a/parts/users/seth/shell/starship.toml +++ /dev/null @@ -1,220 +0,0 @@ -[aws] -symbol = " " - -[bun] -format = "via [$symbol]($style)" - -[buf] -format = "via [$symbol]($style)" -symbol = " " - -[c] -symbol = " " - -[cmake] -format = "via [$symbol]($style)" - -[cobol] -format = "via [$symbol]($style)" - -[conda] -symbol = " " - -[crystal] -format = "via [$symbol]($style)" - -[daml] -format = "via [$symbol]($style)" - -[dart] -format = "via [$symbol]($style)" -symbol = " " - -[directory] -read_only = " " - -[deno] -format = "via [$symbol]($style)" - -[docker_context] -symbol = " " - -[dotnet] -format = "[$symbol(🎯 $tfm )]($style)" - -[elixir] -format = 'via [$symbol]($style)' -symbol = " " - -[elm] -format = 'via [$symbol]($style)' -symbol = " " - -[erlang] -format = 'via [$symbol]($style)' - -[fennel] -format = 'via [$symbol]($style)' - -[fossil_branch] -symbol = " " - -[git_branch] -symbol = " " - -[golang] -format = 'via [$symbol]($style)' -symbol = " " - -[gradle] -format = 'via [$symbol]($style)' - -[guix_shell] -symbol = " " - -[haskell] -symbol = " " - -[haxe] -format = 'via [$symbol]($style)' -symbol = "⌘ " - -[helm] -format = 'via [$symbol]($style)' - -[hg_branch] -symbol = " " - -[java] -symbol = " " - -[julia] -format = 'via [$symbol]($style)' -symbol = " " - -[kotlin] -format = 'via [$symbol]($style)' - -[lua] -format = 'via [$symbol]($style)' -symbol = " " - -[memory_usage] -symbol = " " - -[meson] -format = 'via [$symbol]($style)' -symbol = "喝 " - -[nim] -format = 'via [$symbol]($style)' -symbol = " " - -[nix_shell] -symbol = " " - -[nodejs] -format = 'via [$symbol]($style)' -symbol = " " - -[ocaml] -format = 'via [$symbol(\($switch_indicator$switch_name\) )]($style)' - -[opa] -format = 'via [$symbol]($style)' - -[os.symbols] -Alpine = " " -Amazon = " " -Android = " " -Arch = " " -CentOS = " " -Debian = " " -DragonFly = " " -Emscripten = " " -EndeavourOS = " " -Fedora = " " -FreeBSD = " " -Garuda = " " -Gentoo = " " -HardenedBSD = "ﲊ " -Illumos = " " -Linux = " " -Macos = " " -Manjaro = " " -Mariner = " " -MidnightBSD = " " -Mint = " " -NetBSD = " " -NixOS = " " -OpenBSD = " " -openSUSE = " " -OracleLinux = " " -Pop = " " -Raspbian = " " -Redhat = " " -RedHatEnterprise = " " -Redox = " " -Solus = "ﴱ " -SUSE = " " -Ubuntu = " " -Unknown = " " -Windows = " " - -[package] -symbol = " " - -[perl] -format = 'via [$symbol]($style)' - -[php] -format = 'via [$symbol]($style)' - -[pijul_channel] -symbol = "🪺 " - -[pulumi] -format = 'via [$symbol$stack]($style)' - -[purescript] -format = 'via [$symbol]($style)' - -[python] -format = 'via [$symbol]($style)' -symbol = " " - -[raku] -format = 'via [$symbol]($style)' - -[red] -format = 'via [$symbol]($style)' - -[rlang] -format = 'via [$symbol]($style)' -symbol = "ﳒ " - -[ruby] -format = 'via [$symbol]($style)' -symbol = " " - -[rust] -format = 'via [$symbol]($style)' -symbol = " " - -[scala] -symbol = " " - -[spack] -symbol = "🅢 " - -[swift] -format = 'via [$symbol]($style)' - -[vagrant] -format = 'via [$symbol]($style)' - -[vlang] -format = 'via [$symbol]($style)' - -[zig] -format = 'via [$symbol]($style)' diff --git a/parts/users/seth/shell/zsh.nix b/parts/users/seth/shell/zsh.nix deleted file mode 100644 index 23d5813..0000000 --- a/parts/users/seth/shell/zsh.nix +++ /dev/null @@ -1,114 +0,0 @@ -{ - config, - pkgs, - ... -}: { - programs.zsh = { - enable = true; - enableAutosuggestions = true; - - completionInit = '' - autoload -Uz bashcompinit compinit - local zdump="${config.xdg.cacheHome}/zsh/zdump" - bashcompinit - compinit -d "$zdump" - if [[ ! "$zdump.zwc" -nt "$zdump" ]] - then - zcompile "$zdump" - fi - unset zdump - ''; - - defaultKeymap = "emacs"; - dotDir = ".config/zsh"; - - initExtra = '' - if [[ -r "$XDG_CACHE_HOME/p10k-instant-prompt-*.zsh" ]]; then - source "$XDG_CACHE_HOME/p10k-instant-prompt-*.zsh" - fi - autoload -Uz promptinit colors - promptinit - colors - - nix-your-shell zsh | source /dev/stdin - - zmodload zsh/zutil - zmodload zsh/complist - zstyle ":completion::*" group-name "" - zstyle ":completion:*" menu "select" - zstyle ":completion:*" squeeze-slashes "true" - zstyle ":completion::*" use-cache "true" - zstyle ":completion::*" cache-path "$zdump" - - unsetopt beep - unsetopt hist_beep - unsetopt ignore_braces - unsetopt list_beep - setopt always_to_end - setopt prompt_subst - setopt share_history - - # clear backbuffer with ctrl-l - function clear-screen-and-scrollback() { - echoti civis >"$TTY" - printf '%b' '\e[H\e[2J' >"$TTY" - zle .reset-prompt - zle -R - printf '%b' '\e[3J' >"$TTY" - echoti cnorm >"$TTY" - } - - zle -N clear-screen-and-scrollback - bindkey '^L' clear-screen-and-scrollback - - [[ ! -f ~/.config/zsh/.p10k.zsh ]] || source ~/.config/zsh/.p10k.zsh - ''; - - history = { - expireDuplicatesFirst = true; - path = "${config.xdg.stateHome}/zsh/zsh_history"; - save = 1000; - size = 100; - }; - - plugins = [ - { - name = "cattppuccin-zsh-syntax-highlighting"; - src = pkgs.fetchFromGitHub { - owner = "catppuccin"; - repo = "zsh-syntax-highlighting"; - rev = "06d519c20798f0ebe275fc3a8101841faaeee8ea"; - sha256 = "sha256-Q7KmwUd9fblprL55W0Sf4g7lRcemnhjh4/v+TacJSfo="; - }; - - file = "themes/catppuccin_mocha-zsh-syntax-highlighting.zsh"; - } - - { - name = "nix-zsh-completions"; - src = pkgs.nix-zsh-completions; - file = "share/zsh/plugins/nix/nix-zsh-completions.plugin.zsh"; - } - - { - name = "powerlevel10k"; - src = pkgs.zsh-powerlevel10k; - file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme"; - } - - { - name = "zsh-autopair"; - src = pkgs.zsh-autopair; - file = "share/zsh/zsh-autopair/autopair.zsh"; - } - - { - name = "zsh-completions"; - src = pkgs.zsh-completions; - file = "share/zsh-completions/zsh-completions.plugin.zsh"; - } - ]; - - enableSyntaxHighlighting = true; - }; -} diff --git a/parts/users/seth/system.nix b/parts/users/seth/system.nix deleted file mode 100644 index f3957c7..0000000 --- a/parts/users/seth/system.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: { - users.users.seth = let - inherit (pkgs.stdenv.hostPlatform) isLinux isDarwin; - in - lib.recursiveUpdate - { - shell = pkgs.fish; - home = - if isDarwin - then "/Users/seth" - else "/home/seth"; - } - (lib.optionalAttrs isLinux { - extraGroups = ["wheel"]; - isNormalUser = true; - hashedPasswordFile = config.age.secrets.sethPassword.path; - }); - - programs.fish.enable = true; - - home-manager.users.seth = { - imports = [./.]; - nixpkgs.overlays = config.nixpkgs.overlays; - }; -} |
