From ec288ab54f92c51e3640d6185209104098785e9b Mon Sep 17 00:00:00 2001 From: creator54 Date: Tue, 17 Sep 2024 18:03:22 +0000 Subject: [PATCH] fix: pinpoint kernel to allow rebuilding, seperate phoenix-arm ref: https://github.com/elitak/nixos-infect/issues/192 --- flake.nix | 31 +++++++++++++++++++++++++------ systems/server/configuration.nix | 10 ++++++++++ 2 files changed, 35 insertions(+), 6 deletions(-) diff --git a/flake.nix b/flake.nix index 15cef8f..9121932 100644 --- a/flake.nix +++ b/flake.nix @@ -30,7 +30,7 @@ specialArgs = { inherit inputs; }; system = "x86_64-linux"; modules = [ - ./modules/configs/minimal + ./modules/configs/minimal ./systems/server/configuration.nix inputs.home-manager.nixosModules.default ]; @@ -41,7 +41,17 @@ system = "x86_64-linux"; modules = [ ./systems/phoenix - ./modules/configs/minimal + ./modules/configs/minimal + inputs.home-manager.nixosModules.default + ]; + }; + + phoenix-arm = nixpkgs.lib.nixosSystem { + specialArgs = { inherit inputs; }; + system = "aarch64-linux"; + modules = [ + ./systems/phoenix + ./modules/configs/minimal inputs.home-manager.nixosModules.default ]; }; @@ -51,10 +61,10 @@ system = "x86_64-linux"; modules = [ ./systems/blade - ./modules/configs/minimal + ./modules/configs/minimal inputs.nix-snapd.nixosModules.default inputs.home-manager.nixosModules.default - inputs.nix-flatpak.nixosModules.nix-flatpak + inputs.nix-flatpak.nixosModules.nix-flatpak ]; }; cospi = nixpkgs.lib.nixosSystem { @@ -62,10 +72,10 @@ system = "x86_64-linux"; modules = [ ./systems/cospi - ./modules/configs/full + ./modules/configs/full inputs.nix-snapd.nixosModules.default inputs.home-manager.nixosModules.default - inputs.nix-flatpak.nixosModules.nix-flatpak + inputs.nix-flatpak.nixosModules.nix-flatpak ]; }; }; @@ -88,6 +98,15 @@ path = inputs.deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.phoenix; }; }; + + phoenix-arm = { + hostname = "phoenix"; #should be same in ~/.ssh/config + sshUser = "root"; #should be same in ~/.ssh/config + profiles.system = { + user = "root"; + path = inputs.deploy-rs.lib.aarch64-linux.activate.nixos self.nixosConfigurations.phoenix; + }; + }; }; # This is highly advised, and will prevent many possible mistakes diff --git a/systems/server/configuration.nix b/systems/server/configuration.nix index 9f58d64..92fdc62 100644 --- a/systems/server/configuration.nix +++ b/systems/server/configuration.nix @@ -8,6 +8,16 @@ in ]; environment.systemPackages = with pkgs; [ cachix home-manager ]; + boot.kernelPackages = pkgs.linuxPackagesFor (pkgs.linux_6_1.override { + argsOverride = rec { + src = pkgs.fetchurl { + url = "mirror://kernel/linux/kernel/v6.x/linux-${version}.tar.xz"; + sha256 = "sha256-XrRwb4mPUIgVUv9RRtiSEy0//FKYAzv/4nCH06RMRXM="; + }; + version = "6.1.103"; + modDirVersion = "6.1.103"; + }; + }); boot.tmp.cleanOnBoot = true; networking = {