Skip to content

Commit

Permalink
git is now available in nixos minimal iso 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
iynaix committed Dec 6, 2024
1 parent f7a5f97 commit 4eacf65
Show file tree
Hide file tree
Showing 8 changed files with 76 additions and 51 deletions.
52 changes: 37 additions & 15 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
20 changes: 12 additions & 8 deletions hosts/iso/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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, ... }:
{
Expand All @@ -36,7 +37,6 @@ let
})
btop
eza
git
home-manager
tree
yazi
Expand Down Expand Up @@ -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";
}
7 changes: 2 additions & 5 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions nixos/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
16 changes: 8 additions & 8 deletions overlays/generated.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
"swww": {
"cargoLocks": null,
"date": "2024-11-30",
"date": "2024-12-05",
"extract": null,
"name": "swww",
"passthru": null,
Expand All @@ -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,
Expand All @@ -60,7 +60,7 @@
},
"yazi-plugins": {
"cargoLocks": null,
"date": "2024-12-03",
"date": "2024-12-05",
"extract": null,
"name": "yazi-plugins",
"passthru": null,
Expand All @@ -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,
Expand Down
16 changes: 8 additions & 8 deletions overlays/generated.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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";
Expand Down
7 changes: 2 additions & 5 deletions recover.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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."

0 comments on commit 4eacf65

Please sign in to comment.