diff --git a/flake.lock b/flake.lock index 24e8227..c99927a 100644 --- a/flake.lock +++ b/flake.lock @@ -283,6 +283,21 @@ "type": "github" } }, + "flake-utils_4": { + "locked": { + "lastModified": 1659877975, + "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "format-all": { "flake": false, "locked": { @@ -483,6 +498,30 @@ "type": "github" } }, + "nix-on-droid": { + "inputs": { + "flake-utils": "flake-utils_3", + "home-manager": [ + "home-manager" + ], + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1658777837, + "narHash": "sha256-12rIm639nXldGgyc1uPbF/oz2jTrpgl8zvqxrIq+Jek=", + "owner": "t184256", + "repo": "nix-on-droid", + "rev": "d49fd3a0c874d34a3c3f33fa73cd7a364a1332e3", + "type": "github" + }, + "original": { + "owner": "t184256", + "repo": "nix-on-droid", + "type": "github" + } + }, "nix-straight": { "flake": false, "locked": { @@ -780,6 +819,7 @@ "java": "java", "mozilla": "mozilla", "nix-doom-emacs": "nix-doom-emacs", + "nix-on-droid": "nix-on-droid", "nixos-generators": "nixos-generators", "nixpkgs": "nixpkgs_2", "nixpkgs-unstable": "nixpkgs-unstable_2", @@ -939,7 +979,7 @@ "wsl": { "inputs": { "flake-compat": "flake-compat_3", - "flake-utils": "flake-utils_3", + "flake-utils": "flake-utils_4", "nixpkgs": [ "nixpkgs" ] diff --git a/flake.nix b/flake.nix index 1d8a666..6280798 100644 --- a/flake.nix +++ b/flake.nix @@ -57,6 +57,13 @@ url = "github:nathans-flakes/gamescope"; inputs.nixpkgs.follows = "nixpkgs"; }; + nix-on-droid = { + url = "github:t184256/nix-on-droid"; + inputs = { + nixpkgs.follows = "nixpkgs"; + home-manager.follows = "home-manager"; + }; + }; }; outputs = @@ -76,6 +83,7 @@ , nixos-generators , wsl , gamescope + , nix-on-droid }@inputs: let makeNixosSystem = { system, hostName, extraModules ? [ ], ourNixpkgs ? nixpkgs }: ourNixpkgs.lib.nixosSystem { @@ -156,6 +164,13 @@ ]; }; }; + # Android systems + nixOnDroidConfigurations = { + tablet = nix-on-droid.lib.nixOnDroidConfiguration { + config = ./machines/tablet/configuration.nix; + system = "aarch64-linux"; + }; + }; packages = { x86_64-linux = { # Hyper-V image diff --git a/machines/tablet/configuration.nix b/machines/tablet/configuration.nix new file mode 100644 index 0000000..865d469 --- /dev/null +++ b/machines/tablet/configuration.nix @@ -0,0 +1,5 @@ +{ config, lib, pkgs, ... }: + +{ + +} diff --git a/modules/common/programs/utils.nix b/modules/common/programs/utils.nix new file mode 100644 index 0000000..863f132 --- /dev/null +++ b/modules/common/programs/utils.nix @@ -0,0 +1,33 @@ +{ config, lib, pkgs, ... }: +let + nathan = config.nathan; +in +with lib; +{ + config = mkMerge [ + (mkIf nathan.programs.utils.core + { + environment.systemPackages = with pkgs; [ + # Basic command line utilities + wget + tmux + nano + unzip + any-nix-shell + htop + # For nslookup + dnsutils + # Mosh for better high-latency ssh + mosh + # PV for viewing pipes + pv + ]; + }) + (mkIf nathan.programs.utils.devel { + environment.systemPackages = with pkgs; [ + gcc + binutils + ]; + }) + ]; +} diff --git a/modules/linux/programs/utils.nix b/modules/linux/programs/utils.nix index 2171ab8..b672c4d 100644 --- a/modules/linux/programs/utils.nix +++ b/modules/linux/programs/utils.nix @@ -4,6 +4,9 @@ let in with lib; { + imports = [ + ../../common/programs/utils.nix + ]; config = mkMerge [ (mkIf nathan.programs.utils.core { @@ -23,11 +26,6 @@ with lib; pv ]; }) - (mkIf nathan.programs.utils.binfmt { - boot.binfmt.emulatedSystems = [ - "aarch64-linux" - ]; - }) (mkIf nathan.programs.utils.devel { environment.systemPackages = with pkgs; [ gcc diff --git a/modules/nix-on-droid/default.nix b/modules/nix-on-droid/default.nix new file mode 100644 index 0000000..17acfb2 --- /dev/null +++ b/modules/nix-on-droid/default.nix @@ -0,0 +1,5 @@ +{ config, lib, pkgs, ... }: +let + inherit (import ../lib.nix { inherit lib; inherit pkgs; }) nLib; +in +{ }