diff --git a/flake.nix b/flake.nix index 8308122..d01a838 100644 --- a/flake.nix +++ b/flake.nix @@ -162,5 +162,30 @@ # } # ]; }; + + nixosConfigurations."thancred" = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = { + inherit userName userEmail; + hostname = "thancred"; + role = "server"; + }; + modules = [ + myOverlays + ./modules/common + ./modules/machine/thancred + + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.extraSpecialArgs = extraSpecialArgs; + home-manager.backupFileExtension = "bak"; + home-manager.users.${userName}.imports = [ + ./home + ]; + } + ]; + }; }; } diff --git a/modules/machine/thancred/configuration.nix b/modules/machine/thancred/configuration.nix new file mode 100644 index 0000000..7ca30bd --- /dev/null +++ b/modules/machine/thancred/configuration.nix @@ -0,0 +1,83 @@ +{ + pkgs, + userName, + ... +}: { + imports = [ + ../../apps/gaming.nix + ../../pwrMgmt + ../../networking/core.nix + ../../virtualization/podman.nix + ]; + + # Enable flakes for NixOS + nix.settings.experimental-features = ["nix-command" "flakes"]; + + # Custom kernel/boot stuff + boot.kernelPackages = pkgs.linuxPackages_latest; + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + # Set your timezone + time.timeZone = "America/Detroit"; + + # Enable OpenSSH + services.openssh.enable = true; + + # Enable keyring + services.gnome.gnome-keyring.enable = true; + + # Enable GnuPG + programs.gnupg.agent = { + enable = true; + enableSSHSupport = true; + }; + + # Enable SUID wrappers (some programs need them) + programs.mtr.enable = true; + + # Enable Polkit + security.polkit.enable = true; + + # Power management (see ../../pwrMgmt/default.nix) + pwrMgmt = { + enable = true; + cpuFreqGovernor = "performance"; + powertop.enable = false; + }; + + gaming = { + vintage-story.enable = true; + }; + + networking = { + firewall = { + enable = true; + tcpPorts = { + allowedPorts = [ 42420 ]; + }; + udpPorts = { + allowedPorts = [ 42420 ]; + }; + }; + networkManager.enable = true; + }; + + # Podman module (see ../../virtualization/podman.nix) + # podman = { + # enable = true; + # extraPackages = with pkgs; [ + # docker-credential-helpers + # toolbox + # cosign + # crane + # podman-tui + # podman-desktop + # ]; + # }; + + # Add username to groups "wheel" and "video" - more may be added here later + users.users.${userName}.extraGroups = ["wheel" "podman" "network"]; + + system.stateVersion = "24.11"; +} diff --git a/modules/machine/thancred/default.nix b/modules/machine/thancred/default.nix new file mode 100644 index 0000000..3c4d411 --- /dev/null +++ b/modules/machine/thancred/default.nix @@ -0,0 +1,6 @@ +{ ... }: { + imports = [ + ./configuration.nix + ./hardware-configuration.nix + ]; +} diff --git a/modules/machine/thancred/hardware-configuration.nix b/modules/machine/thancred/hardware-configuration.nix new file mode 100644 index 0000000..c81f1da --- /dev/null +++ b/modules/machine/thancred/hardware-configuration.nix @@ -0,0 +1,3 @@ +{ ... }: { + # TODO: needs to filled out later +}