diff --git a/disk-config.nix b/disk-config.nix index 603a86b..a0951c2 100644 --- a/disk-config.nix +++ b/disk-config.nix @@ -22,7 +22,7 @@ }; }; SWAP = { - size = "32G"; + size = "130G"; content = { type = "mdraid"; name = "swap"; @@ -57,7 +57,7 @@ }; }; SWAP = { - size = "32G"; + size = "130G"; content = { type = "mdraid"; name = "swap"; diff --git a/flake.nix b/flake.nix index c385f1e..355fb0d 100644 --- a/flake.nix +++ b/flake.nix @@ -62,15 +62,17 @@ }; }; - mkNixosConfiguration = { - system ? "x86_64-linux", - hostname, - username, - args ? {}, - modules, - }: let - specialArgs = argDefaults // {inherit hostname username;} // args; - in + mkNixosConfiguration = + { system ? "x86_64-linux" + , hostname + , username + , args ? { } + , modules + , + }: + let + specialArgs = argDefaults // { inherit hostname username; } // args; + in nixpkgs.lib.nixosSystem { inherit system specialArgs; modules = @@ -80,14 +82,18 @@ ] ++ modules; }; - in { - formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra; + in + { + formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixpkgs-fmt; + formatter.aarch64-linux = nixpkgs.legacyPackages.x86_64-linux.nixpkgs-fmt; + formatter.aarch64-darwin = nixpkgs.legacyPackages.x86_64-linux.nixpkgs-fmt; nixosConfigurations.robot = mkNixosConfiguration { hostname = "robot"; + system = "aarch64-linux"; username = "sakhib"; modules = [ - ./amd.nix + # ./amd.nix disko.nixosModules.disko ./robot.nix ./linux.nix @@ -102,9 +108,9 @@ remoteBuild = true; nodes = { robot = { - hostname = "95.216.248.236"; + hostname = "65.109.74.214"; profiles.system = { - path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.robot; + path = deploy-rs.lib.aarch64-linux.activate.nixos self.nixosConfigurations.robot; }; }; }; diff --git a/hardware-configuration.nix b/hardware-configuration.nix index c341178..5f6f71e 100644 --- a/hardware-configuration.nix +++ b/hardware-configuration.nix @@ -1,15 +1,14 @@ -{ - lib, - modulesPath, - ... +{ lib +, modulesPath +, ... }: { imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "sd_mod" "nvme"]; - boot.initrd.kernelModules = []; - boot.extraModulePackages = []; + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "sd_mod" "nvme" ]; + boot.initrd.kernelModules = [ ]; + boot.extraModulePackages = [ ]; networking.useNetworkd = true; networking.useDHCP = false; @@ -22,5 +21,5 @@ networkConfig.IPv6AcceptRA = "no"; }; - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux"; } diff --git a/shell.nix b/shell.nix index 7626e40..380b98e 100644 --- a/shell.nix +++ b/shell.nix @@ -1,16 +1,15 @@ -{ - pkgs ? let +{ pkgs ? let lock = (builtins.fromJSON (builtins.readFile ./flake.lock)).nodes.nixpkgs.locked; nixpkgs = fetchTarball { url = "https://github.com/nixos/nixpkgs/archive/${lock.rev}.tar.gz"; sha256 = lock.narHash; }; in - import nixpkgs {overlays = [];}, - ... + import nixpkgs { overlays = [ ]; } +, ... }: { default = pkgs.mkShell { - NIX_CONFIG = "extra-experimental-features = nix-command flakes repl-flake"; + NIX_CONFIG = "extra-experimental-features = nix-command flakes"; nativeBuildInputs = with pkgs; [ nix nil @@ -19,4 +18,4 @@ just ]; }; -} \ No newline at end of file +}