From 4eacf653d9c0cb6d09b4433c6273a27e44c85d0c Mon Sep 17 00:00:00 2001 From: Lin Xianyi Date: Fri, 6 Dec 2024 16:29:30 +0800 Subject: [PATCH] git is now available in nixos minimal iso :rocket: --- flake.lock | 52 +++++++++++++++++++++++++++++------------ flake.nix | 5 ++++ hosts/iso/default.nix | 20 +++++++++------- install.sh | 7 ++---- nixos/default.nix | 4 ++-- overlays/generated.json | 16 ++++++------- overlays/generated.nix | 16 ++++++------- recover.sh | 7 ++---- 8 files changed, 76 insertions(+), 51 deletions(-) diff --git a/flake.lock b/flake.lock index 2509151c..8068e2c7 100644 --- a/flake.lock +++ b/flake.lock @@ -140,11 +140,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1732896163, - "narHash": "sha256-eS0vSZT0ZUguR6Jf6CyupvDn4m+r/mgN6Vtg61ECYC0=", + "lastModified": 1733323168, + "narHash": "sha256-d5DwB4MZvlaQpN6OQ4SLYxb5jA4UH5EtV5t5WOtjLPU=", "owner": "cachix", "repo": "devenv", - "rev": "2c928a199d56191d7a53f29ccafa56238c8ce4e5", + "rev": "efa9010b8b1cfd5dd3c7ed1e172a470c3b84a064", "type": "github" }, "original": { @@ -301,11 +301,11 @@ }, "locked": { "dir": "pkgs/firefox-addons", - "lastModified": 1733285001, - "narHash": "sha256-cQy3DtimwMrNNIHk/NP5axTppQKN6Kqh9/Koo5sGLv0=", + "lastModified": 1733390410, + "narHash": "sha256-bM3FIksaYkRloRh3y6GzuUrsJB7EizYtzeCgyftQ9rc=", "owner": "rycee", "repo": "nur-expressions", - "rev": "10c4c4789aa328b0cb20a37285a31f8528962294", + "rev": "5f39164f253794b0101d596b7d4a7a0253f4b762", "type": "gitlab" }, "original": { @@ -773,11 +773,11 @@ ] }, "locked": { - "lastModified": 1733175814, - "narHash": "sha256-zFOtOaqjzZfPMsm1mwu98syv3y+jziAq5DfWygaMtLg=", + "lastModified": 1733389730, + "narHash": "sha256-KZMu4ddMll5khS0rYkJsVD0hVqjMNHlhTM3PCQar0Ag=", "owner": "nix-community", "repo": "home-manager", - "rev": "bf23fe41082aa0289c209169302afd3397092f22", + "rev": "65912bc6841cf420eb8c0a20e03df7cbbff5963f", "type": "github" }, "original": { @@ -786,6 +786,27 @@ "type": "github" } }, + "home-manager-stable": { + "inputs": { + "nixpkgs": [ + "nixpkgs-stable" + ] + }, + "locked": { + "lastModified": 1733050161, + "narHash": "sha256-lYnT+EYE47f5yY3KS/Kd4pJ6CO9fhCqumkYYkQ3TK20=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "62d536255879be574ebfe9b87c4ac194febf47c5", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "release-24.11", + "repo": "home-manager", + "type": "github" + } + }, "impermanence": { "locked": { "lastModified": 1731242966, @@ -1231,11 +1252,11 @@ }, "nixpkgs-stable_2": { "locked": { - "lastModified": 1733120037, - "narHash": "sha256-En+gSoVJ3iQKPDU1FHrR6zIxSLXKjzKY+pnh9tt+Yts=", + "lastModified": 1733261153, + "narHash": "sha256-eq51hyiaIwtWo19fPEeE0Zr2s83DYMKJoukNLgGGpek=", "owner": "nixos", "repo": "nixpkgs", - "rev": "f9f0d5c5380be0a599b1fb54641fa99af8281539", + "rev": "b681065d0919f7eb5309a93cea2cfa84dec9aa88", "type": "github" }, "original": { @@ -1406,11 +1427,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1733220378, - "narHash": "sha256-tWCskBne7LigfeXRWnUFJKKTLOYmmdqiwdqom2Sml1s=", + "lastModified": 1733431684, + "narHash": "sha256-Tbdi0SEOuxABTDp0sCI7wdTnmpcnQOPzPo4jSWP0u+8=", "owner": "nix-community", "repo": "nixvim", - "rev": "78bfbf7b7eb7a1b6cf42e199547de55a55ba2cea", + "rev": "6348336db0e0b17ab6d9c73bc8206db84ebf00d1", "type": "github" }, "original": { @@ -1545,6 +1566,7 @@ "firefox-addons": "firefox-addons", "focal": "focal", "home-manager": "home-manager", + "home-manager-stable": "home-manager-stable", "impermanence": "impermanence", "nix-index-database": "nix-index-database", "nixos-hardware": "nixos-hardware", diff --git a/flake.nix b/flake.nix index 04c17eb5..3ad4aa7a 100644 --- a/flake.nix +++ b/flake.nix @@ -12,6 +12,11 @@ inputs.nixpkgs.follows = "nixpkgs"; }; + home-manager-stable = { + url = "github:nix-community/home-manager/release-24.11"; + inputs.nixpkgs.follows = "nixpkgs-stable"; + }; + # hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1&rev=918d8340afd652b011b937d29d5eea0be08467f5"; devenv.url = "github:cachix/devenv"; diff --git a/hosts/iso/default.nix b/hosts/iso/default.nix index b2504176..1f4786d1 100644 --- a/hosts/iso/default.nix +++ b/hosts/iso/default.nix @@ -8,12 +8,13 @@ let repo_url = "https://raw.githubusercontent.com/iynaix/dotfiles"; user = "nixos"; mkIso = - nixpkgs: isoPath: - lib.nixosSystem { + nixpkgs: home-manager: isoPath: + # use the lib from the nixpkgs passed in, so the nixos version will be correct + nixpkgs.lib.nixosSystem { inherit system; modules = [ "${nixpkgs}/nixos/modules/installer/cd-dvd/${isoPath}.nix" - inputs.home-manager.nixosModules.home-manager + home-manager.nixosModules.home-manager ( { config, pkgs, ... }: { @@ -36,7 +37,6 @@ let }) btop eza - git home-manager tree yazi @@ -136,8 +136,12 @@ let }; in { - kde-iso = mkIso inputs.nixpkgs-stable "installation-cd-graphical-calamares-plasma5"; - minimal-iso = mkIso inputs.nixpkgs-stable "installation-cd-minimal"; - kde-iso-unstable = mkIso inputs.nixpkgs "installation-cd-graphical-calamares-plasma5"; - minimal-iso-unstable = mkIso inputs.nixpkgs "installation-cd-minimal"; + kde-iso = + mkIso inputs.nixpkgs-stable inputs.home-manager-stable + "installation-cd-graphical-calamares-plasma5"; + minimal-iso = mkIso inputs.nixpkgs-stable inputs.home-manager-stable "installation-cd-minimal"; + kde-iso-unstable = + mkIso inputs.nixpkgs inputs.home-manager + "installation-cd-graphical-calamares-plasma5"; + minimal-iso-unstable = mkIso inputs.nixpkgs inputs.home-manager "installation-cd-minimal"; } diff --git a/install.sh b/install.sh index 9dd7e4bd..f14f0d47 100755 --- a/install.sh +++ b/install.sh @@ -197,14 +197,11 @@ fi read -rp "Enter git rev for flake (default: main): " git_rev echo "Installing NixOS" -# nixos minimal iso does not have git for whatever fucking stupid reason??? if [[ $repo == "github:iynaix/dotfiles" ]]; then # root password is irrelevant if initialPassword is set in the config - nix-shell -p git nixFlakes --command \ - "sudo nixos-install --no-root-password --flake \"$repo/${git_rev:-main}#$host\" --option tarball-ttl 0" + sudo nixos-install --no-root-password --flake "$repo/${git_rev:-main}#$host" --option tarball-ttl 0 else - nix-shell -p git nixFlakes --command \ - "sudo nixos-install --flake \"$repo/${git_rev:-main}#$host\" --option tarball-ttl 0" + sudo nixos-install --flake "$repo/${git_rev:-main}#$host" --option tarball-ttl 0 fi # only relevant for iynaix os diff --git a/nixos/default.nix b/nixos/default.nix index 9f6e1b66..b9e3c7f3 100644 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -202,8 +202,8 @@ # systemd.services.NetworkManager-wait-online.enable = false; # create an otg specialisation for laptops - specialisation = { - otg.configuration = lib.mkIf isLaptop { }; + specialisation = lib.mkIf isLaptop { + otg.configuration = { }; }; custom.persist = { diff --git a/overlays/generated.json b/overlays/generated.json index d95e5412..b6a32768 100644 --- a/overlays/generated.json +++ b/overlays/generated.json @@ -21,7 +21,7 @@ }, "swww": { "cargoLocks": null, - "date": "2024-11-30", + "date": "2024-12-05", "extract": null, "name": "swww", "passthru": null, @@ -33,11 +33,11 @@ "name": null, "owner": "LGFae", "repo": "swww", - "rev": "1bd7166f0e06bbb4f1c175b35bfef582b4e639ac", - "sha256": "sha256-yp7P0gQ0EThnOL2Fy87S6IsKdyrUSA/oMVk3BvNrJKE=", + "rev": "004dfd8b91c1d271b499bb99eb7c6746b1c2e069", + "sha256": "sha256-fgLWCUouo4RhTfLB5/aPT8mpU/GVgbUiubwrHYg0pTI=", "type": "github" }, - "version": "1bd7166f0e06bbb4f1c175b35bfef582b4e639ac" + "version": "004dfd8b91c1d271b499bb99eb7c6746b1c2e069" }, "wallust": { "cargoLocks": null, @@ -60,7 +60,7 @@ }, "yazi-plugins": { "cargoLocks": null, - "date": "2024-12-03", + "date": "2024-12-05", "extract": null, "name": "yazi-plugins", "passthru": null, @@ -72,11 +72,11 @@ "name": null, "owner": "yazi-rs", "repo": "plugins", - "rev": "40eafa3e4c7383db865ac1d61bbc0fa22be0ef01", - "sha256": "sha256-Ey3lDmhFLpp/sD3sC/kNgsN7JZz+i2dU+bvqKODOxzo=", + "rev": "ec97f8847feeb0307d240e7dc0f11d2d41ebd99d", + "sha256": "sha256-By8XuqVJvS841u+8Dfm6R8GqRAs0mO2WapK6r2g7WI8=", "type": "github" }, - "version": "40eafa3e4c7383db865ac1d61bbc0fa22be0ef01" + "version": "ec97f8847feeb0307d240e7dc0f11d2d41ebd99d" }, "yazi-time-travel": { "cargoLocks": null, diff --git a/overlays/generated.nix b/overlays/generated.nix index 458b581f..3ef1f4c2 100644 --- a/overlays/generated.nix +++ b/overlays/generated.nix @@ -14,15 +14,15 @@ }; swww = { pname = "swww"; - version = "1bd7166f0e06bbb4f1c175b35bfef582b4e639ac"; + version = "004dfd8b91c1d271b499bb99eb7c6746b1c2e069"; src = fetchFromGitHub { owner = "LGFae"; repo = "swww"; - rev = "1bd7166f0e06bbb4f1c175b35bfef582b4e639ac"; + rev = "004dfd8b91c1d271b499bb99eb7c6746b1c2e069"; fetchSubmodules = false; - sha256 = "sha256-yp7P0gQ0EThnOL2Fy87S6IsKdyrUSA/oMVk3BvNrJKE="; + sha256 = "sha256-fgLWCUouo4RhTfLB5/aPT8mpU/GVgbUiubwrHYg0pTI="; }; - date = "2024-11-30"; + date = "2024-12-05"; }; wallust = { pname = "wallust"; @@ -39,15 +39,15 @@ }; yazi-plugins = { pname = "yazi-plugins"; - version = "40eafa3e4c7383db865ac1d61bbc0fa22be0ef01"; + version = "ec97f8847feeb0307d240e7dc0f11d2d41ebd99d"; src = fetchFromGitHub { owner = "yazi-rs"; repo = "plugins"; - rev = "40eafa3e4c7383db865ac1d61bbc0fa22be0ef01"; + rev = "ec97f8847feeb0307d240e7dc0f11d2d41ebd99d"; fetchSubmodules = false; - sha256 = "sha256-Ey3lDmhFLpp/sD3sC/kNgsN7JZz+i2dU+bvqKODOxzo="; + sha256 = "sha256-By8XuqVJvS841u+8Dfm6R8GqRAs0mO2WapK6r2g7WI8="; }; - date = "2024-12-03"; + date = "2024-12-05"; }; yazi-time-travel = { pname = "yazi-time-travel"; diff --git a/recover.sh b/recover.sh index ada859d4..e55d2972 100755 --- a/recover.sh +++ b/recover.sh @@ -76,14 +76,11 @@ fi read -rp "Enter git rev for flake (default: main): " git_rev echo "Re-installing NixOS" -# nixos minimal iso does not have git for whatever fucking stupid reason??? if [[ $repo == "github:iynaix/dotfiles" ]]; then # root password is irrelevant if initialPassword is set in the config - nix-shell -p git nixFlakes --command \ - "sudo nixos-install --no-root-password --flake \"$repo/${git_rev:-main}#$host\" --option tarball-ttl 0" + sudo nixos-install --no-root-password --flake "$repo/${git_rev:-main}#$host" --option tarball-ttl 0 else - nix-shell -p git nixFlakes --command \ - "sudo nixos-install --flake \"$repo/${git_rev:-main}#$host\" --option tarball-ttl 0" + sudo nixos-install --flake "$repo/${git_rev:-main}#$host" --option tarball-ttl 0 fi echo "Installation complete. It is now safe to reboot." \ No newline at end of file