From 5fb7fe5cd628c8ad63eac59004dee359ed03fe4a Mon Sep 17 00:00:00 2001 From: Mohammad Rafiq Date: Fri, 4 Apr 2025 18:30:26 +0800 Subject: [PATCH] refactor: change orpheus config --- flake.nix | 36 +++++++----------------------------- 1 file changed, 7 insertions(+), 29 deletions(-) diff --git a/flake.nix b/flake.nix index a34ea46..f9292e7 100644 --- a/flake.nix +++ b/flake.nix @@ -23,6 +23,7 @@ ./modules/nix-config.nix ./modules/security.nix ./modules/users.nix + ./modules/networking.nix ]; desktopModules = [ ./modules/graphical.nix @@ -41,7 +42,6 @@ ./modules/filesystems/hw-nemesis.nix ./modules/hardware/cpu_amd.nix ./modules/hardware/nvidia.nix - ./modules/networking.nix inputs.nixos-hardware.nixosModules.gigabyte-b650 { boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; @@ -52,49 +52,27 @@ ./modules/bootloaders/systemd-boot.nix ./modules/filesystems/impermanence.nix ./modules/hardware/cpu_intel.nix - ./modules/networking.nix ]) ++ (lib.optionals (hostname == "orpheus") [ - # inputs.nixos-hardware.nixosModules.raspberry-pi-4 - # Base SD image module for the target architecture - "${inputs.nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix" + inputs.nixos-hardware.nixosModules.raspberry-pi-4 ( { pkgs, - config, lib, + bootDisk, ... }: { nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux"; - # fileSystems."/" = { - # device = bootDisk; - # fsType = "ext4"; - # }; + fileSystems."/" = { + device = bootDisk; + fsType = "ext4"; + }; services.cage = { enable = true; user = "rafiq"; program = "${pkgs.firefox}/bin/firefox -kiosk -private-window https://youtube.com/tv"; }; - networking = { - hostName = hostname; - useDHCP = lib.mkDefault true; - - # Configures a simple stateful firewall. - # By default, it doesn't allow any incoming connections. - firewall = { - enable = true; - allowedTCPPorts = [ - 22 # SSH - ]; - }; - }; - services.openssh.enable = true; - services.openssh.settings.PrintMotd = true; - services.tailscale = { - enable = true; - authKeyFile = config.sops.secrets.ts_auth_key.path; - }; } ) ]);