diff --git a/flake.nix b/flake.nix index 5f06978..a9b839d 100644 --- a/flake.nix +++ b/flake.nix @@ -41,8 +41,15 @@ latest = import nixpkgs-latest { inherit system config; }; version = "25.05"; }; + pkgs64 = let + system = "aarch64-linux"; + in import nixpkgs { inherit system config; } // { + unstable = import nixpkgs-unstable { inherit system config; }; + latest = import nixpkgs-latest { inherit system config; }; + version = "24.05"; + }; - nvidia-base = import ./flake-modules/nvidia.nix; + nvidia-base = import ./flake-modules/nvidia.nix; secrets = import ./git-crypt/secrets.nix; rice = import ./flake-modules/rice.nix pkgs; @@ -62,26 +69,15 @@ hyper = hyper-base // { inherit host; }; in { inherit pkgs inputs hyper rice; }; }; - make-nixondroid-system = host: nixpkgs.lib.nixosSystem { - inherit system; - modules = [ ./nix-on-droid.nix ]; - specialArgs = let - pkgs.version = "24.05"; - hyper = hyper-base // { - inherit host; - system = "aarch64-linux"; - home = assert 1 == 2; ""; - }; - in { inherit pkgs inputs hyper rice; }; - }; in { NxXPS = make-nixos-system "NxXPS" { enable = true; prime = true; }; NxNORTH = make-nixos-system "NxNORTH" { enable = true; prime = false; }; NxACE = make-nixos-system "NxACE" { enable = false; }; - NxWSL = make-nixos-wsl-system "NxWSL"; - - NxS23U = make-nixondroid-system "NxS23U"; + }; + nixOnDroidConfigurations.default = nix-on-droid.lib.nixOnDroidConfiguration { + pkgs = pkgs64; + modules = [ ./nix-on-droid.nix ]; }; homeConfigurations = let diff --git a/nix-on-droid.nix b/nix-on-droid.nix new file mode 100644 index 0000000..11e44ca --- /dev/null +++ b/nix-on-droid.nix @@ -0,0 +1,24 @@ +{ pkgs, ... }: +{ + # Simply install just the packages + environment.packages = with pkgs; [ + helix + git + lazygit + yazi + ]; + + # Backup etc files instead of failing to activate generation if a file already exists in /etc + environment.etcBackupExtension = ".bak"; + + # Read the changelog before changing this value + system.stateVersion = pkgs.version; + + # Set up nix for flakes + nix.extraOptions = '' + experimental-features = nix-command flakes + ''; + + # Set your time zone + time.timeZone = "Europe/Berlin"; +}