From 603d0b3e880fcc2f1273b9f7ea54da2949c249c4 Mon Sep 17 00:00:00 2001 From: Dave Gallant Date: Sat, 18 Nov 2023 22:42:23 -0500 Subject: [PATCH] Cleanup --- home/default.nix | 2 +- modules/common/fonts.nix | 2 - modules/common/linux.nix | 41 ++++++++++--------- modules/machines/hephaestus/configuration.nix | 32 ++------------- modules/packages/common.nix | 11 +---- outputs.nix | 9 ---- 6 files changed, 27 insertions(+), 70 deletions(-) diff --git a/home/default.nix b/home/default.nix index adbdf8f..24b0460 100644 --- a/home/default.nix +++ b/home/default.nix @@ -440,7 +440,7 @@ in { ] ++ lib.optionals stdenv.isLinux [ ms-vsliveshare.vsliveshare - # ms-python.python + ms-python.python ]; }; diff --git a/modules/common/fonts.nix b/modules/common/fonts.nix index d4169e4..5f135eb 100644 --- a/modules/common/fonts.nix +++ b/modules/common/fonts.nix @@ -1,5 +1,4 @@ {pkgs, ...}: { - # Set system-wide fonts. fonts.fonts = with pkgs; [ dejavu_fonts fira-code @@ -14,7 +13,6 @@ noto-fonts-extra ]; - # Set default fonts. fonts.fontconfig.defaultFonts = { sansSerif = ["Noto Sans"]; serif = ["Noto Serif"]; diff --git a/modules/common/linux.nix b/modules/common/linux.nix index 8d83671..070a5d4 100644 --- a/modules/common/linux.nix +++ b/modules/common/linux.nix @@ -2,13 +2,15 @@ boot.kernelPackages = pkgs.linuxPackages; boot.supportedFilesystems = ["ntfs"]; - system.stateVersion = "23.05"; + system = { + autoUpgrade.enable = true; + stateVersion = "23.05"; + }; - system.autoUpgrade.enable = true; - - systemd.services.tailscaled.after = ["network-online.target" "systemd-resolved.service"]; - nix.extraOptions = "experimental-features = nix-command flakes"; - nix.package = pkgs.nixUnstable; + nix = { + extraOptions = "experimental-features = nix-command flakes"; + package = pkgs.nixUnstable; + }; users.users.dave = { isNormalUser = true; @@ -24,8 +26,6 @@ time.timeZone = "America/Toronto"; - sound.enable = true; - hardware.pulseaudio.enable = true; # Enable Vulkan @@ -41,18 +41,20 @@ dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server }; - virtualisation.docker.enable = true; - virtualisation.libvirtd.enable = true; - - virtualisation.podman.enable = true; - - programs.zsh.enable = true; - - programs.gnupg.agent = { - enable = true; - enableSSHSupport = true; + virtualisation = { + docker.enable = true; + libvirtd.enable = true; + podman.enable = true; + }; + + programs = { + corectrl.enable = true; + gnupg.agent = { + enable = true; + enableSSHSupport = true; + }; + zsh.enable = true; }; - programs.corectrl.enable = true; services = { avahi = { @@ -69,7 +71,6 @@ }; gnome.gnome-keyring.enable = true; printing.enable = true; - tailscale.enable = true; xserver = { enable = true; diff --git a/modules/machines/hephaestus/configuration.nix b/modules/machines/hephaestus/configuration.nix index 5030f93..d8a711c 100644 --- a/modules/machines/hephaestus/configuration.nix +++ b/modules/machines/hephaestus/configuration.nix @@ -14,40 +14,16 @@ interfaces.enp34s0 = { useDHCP = true; }; - defaultGateway = { - address = "192.168.1.2"; - interface = "enp34s0"; - }; firewall = { - allowedTCPPorts = [ - 25565 # minecraft - 19999 # netdata - ]; allowedUDPPorts = [ 41641 # tailscale ]; }; }; - services.sshd.enable = true; - - services.tailscale.enable = true; - - services.xserver.videoDrivers = ["amdgpu"]; - - services.minecraft-server = { - enable = false; - eula = true; - declarative = true; - - serverProperties = { - server-port = 25565; - gamemode = "survival"; - motd = "NixOS Minecraft server."; - max-players = 5; - enable-rcon = true; - "rcon.password" = "changeme"; - level-seed = "10292992"; - }; + services = { + sshd.enable = true; + tailscale.enable = true; + xserver.videoDrivers = ["amdgpu"]; }; } diff --git a/modules/packages/common.nix b/modules/packages/common.nix index a8a711f..6048eb3 100644 --- a/modules/packages/common.nix +++ b/modules/packages/common.nix @@ -9,8 +9,7 @@ in { environment.systemPackages = with pkgs; let common = [ - # classics - colordiff + # essentials curl gcc git-crypt @@ -51,7 +50,6 @@ in { kubecolor kubectl kubectx - kustomize minikube stern unstable.helm-docs @@ -102,10 +100,6 @@ in { neofetch pfetch - # backup - rclone - restic - # infra terraform-ls terraformer @@ -121,9 +115,6 @@ in { nixpkgs-review rnix-lsp - # cloud - cloud-sql-proxy - # python poetry python310 diff --git a/outputs.nix b/outputs.nix index 49af859..8ef4bb2 100644 --- a/outputs.nix +++ b/outputs.nix @@ -79,15 +79,6 @@ ++ defaultModules ++ desktopLinuxModules; }; - aether = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - modules = - [ - ./modules/machines/aether/configuration.nix - nix-ld.nixosModules.nix-ld - ] - ++ defaultModules; - }; }; darwinConfigurations = let