From 4ae4e8da55560f8e3b560abbe65897577c5b4540 Mon Sep 17 00:00:00 2001 From: Tasia Iso Date: Thu, 18 Apr 2024 21:10:13 +0200 Subject: [PATCH] lol --- README.md | 2 +- flake.nix | 12 ++- hosts/new-new-phoenix/configuration.nix | 98 +++++++++++++++++++ hosts/{pc => theseus}/configuration.nix | 2 +- .../hardware-configuration.nix | 0 5 files changed, 110 insertions(+), 4 deletions(-) create mode 100644 hosts/new-new-phoenix/configuration.nix rename hosts/{pc => theseus}/configuration.nix (98%) rename hosts/{pc => theseus}/hardware-configuration.nix (100%) diff --git a/README.md b/README.md index f61732f..26da0a1 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Build enry and upload a generation: TODO # Hosts -## pc +## theseus My main PC. Mostly unused because of power constraints diff --git a/flake.nix b/flake.nix index 26a3414..8c7bad8 100644 --- a/flake.nix +++ b/flake.nix @@ -62,11 +62,11 @@ ]; }; - pc = unstable.lib.nixosSystem { + theseus = unstable.lib.nixosSystem { system = "x86_64-linux"; specialArgs = {inherit inputs outputs;}; modules = [ - ./hosts/pc/configuration.nix + ./hosts/theseus/configuration.nix ]; }; @@ -85,6 +85,14 @@ ./hosts/enry/configuration.nix ]; }; + + new-new-phoenix = unstable.lib.nixosSystem { + system = "aarch64-linux"; + specialArgs = {inherit inputs outputs;}; + modules = [ + ./hosts/new-new-phoenix/configuration.nix + ]; + }; }; }; } diff --git a/hosts/new-new-phoenix/configuration.nix b/hosts/new-new-phoenix/configuration.nix new file mode 100644 index 0000000..5b8d024 --- /dev/null +++ b/hosts/new-new-phoenix/configuration.nix @@ -0,0 +1,98 @@ +{ + pkgs, + lib, + ... +}: { + imports = [ + ./hardware-configuration.nix + ../../common/default.nix + ../../common/full-install.nix + ../../common/allow-unfree.nix + + ../../common/locales/en.nix + ../../common/locales/fr-keymap.nix + ../../common/hardware/intelcpu.nix + ../../common/hardware/amdgpu.nix + ../../common/hardware/ssd.nix + + ../../common/de/plasma6.nix + # ../../common/de/hyprland.nix + + # ../../common/packages/syncthing.nix + ../../common/packages/adguardhome.nix + ../../common/tasia-packages.nix + + # ../../modules/nixos/vedirect-reader.nix + ]; + + boot = { + kernelPackages = pkgs.linuxPackages_latest; + # boot.kernelModules = [ "fuse" "kvm-intel" "coretemp" ]; + }; + + networking = { + hostName = "new-new-phoenix"; + + firewall = { + enable = true; + allowedTCPPorts = [ + 8080 # ? + 12345 # tildefriends + 13378 # audiobookshelf + ]; + allowedUDPPorts = [ + 8080 # ? + ]; + }; + }; + + users.users.tasia = { + isNormalUser = true; + description = "User"; + extraGroups = ["networkmanager" "wheel" "syncthing"]; + initialPassword = "correcthorsebatterystaple"; + openssh.authorizedKeys.keys = [ + # TODO: Add your SSH public key(s) here, if you plan on using SSH to connect + ]; + }; + + services.btrfs.autoScrub = { + enable = true; + interval = "weekly"; + fileSystems = ["/"]; + }; + + # services.vedirect-reader.enable = true; + + virtualisation.docker.enable = true; + # services.flatpak.enable = false; + + # Some programs need SUID wrappers, can be configured further or are + # started in user sessions. + programs.mtr.enable = true; + programs.gnupg.agent = { + enable = true; + enableSSHSupport = true; + }; + + programs.steam = { + enable = true; + remotePlay.openFirewall = false; # Open ports in the firewall for Steam Remote Play + dedicatedServer.openFirewall = false; # Open ports in the firewall for Source Dedicated Server + }; + + services.syncthing = { + dataDir = lib.mkForce "/home/user"; + configDir = lib.mkForce "/data/sync/configuration/"; + }; + + # Needed to build enry + boot.binfmt.emulatedSystems = ["aarch64-linux"]; + + environment.systemPackages = with pkgs; [ + # + ]; + + # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion + system.stateVersion = "23.11"; +} diff --git a/hosts/pc/configuration.nix b/hosts/theseus/configuration.nix similarity index 98% rename from hosts/pc/configuration.nix rename to hosts/theseus/configuration.nix index e16949f..888bd65 100644 --- a/hosts/pc/configuration.nix +++ b/hosts/theseus/configuration.nix @@ -29,7 +29,7 @@ }; networking = { - hostName = "pc"; + hostName = "theseus"; firewall.enable = true; }; diff --git a/hosts/pc/hardware-configuration.nix b/hosts/theseus/hardware-configuration.nix similarity index 100% rename from hosts/pc/hardware-configuration.nix rename to hosts/theseus/hardware-configuration.nix