From 5f2c11e78b5d363902ebecbb3fc11a18409d4db9 Mon Sep 17 00:00:00 2001 From: RGBCube Date: Sun, 14 May 2023 12:50:39 +0300 Subject: [PATCH] Remove unused stuff and the projectPath hack --- .gitignore | 4 ---- flake.nix | 12 ------------ rebuild.sh | 2 -- 3 files changed, 18 deletions(-) diff --git a/.gitignore b/.gitignore index 16d3d30..2faa364 100644 --- a/.gitignore +++ b/.gitignore @@ -7,14 +7,10 @@ !machines/asus/firefox/ !machines/asus/git/ !machines/asus/helix/ -!machines/asus/intellij/ -!machines/asus/libreoffice/ !machines/asus/networkmanager/ !machines/asus/nushell/ !machines/asus/openttd/ !machines/asus/pipewire/ -!machines/asus/qbittorrent/ -!machines/asus/wine/ !machines/asus/xserver/ !flake.lock diff --git a/flake.nix b/flake.nix index b7648b3..60d26b1 100644 --- a/flake.nix +++ b/flake.nix @@ -77,18 +77,6 @@ normalUser = attributes: attributes // { isNormalUser = true; }; - - # Q: Can't we just do supply a relative path "./foo" ? - # A: When configuring our system with flakes, Nix copies them to the - # Nix store to run them. So we can't use relative paths as they will refer - # to a file which is in the Nix store, and is immutable because it is in - # the Nix store, which beats the point of abusing Home Managers - # mkOutOfStoreSymlink to create symlinks to mutable files. - # To avoid this, we must give an absolute path to a file, - # so we do this. The @pwd@ here is replaced by the rebuild script - # with the working directory, then changed back after the build. - # And yes, this is a major hack. - projectPath = "@pwd@"; } [ configurationDirectory home-manager.nixosModules.home-manager diff --git a/rebuild.sh b/rebuild.sh index 83ab2d2..760b961 100755 --- a/rebuild.sh +++ b/rebuild.sh @@ -19,9 +19,7 @@ fi sudo true -sed -i.old "s|@pwd@|$PWD|g" flake.nix sudo nixos-rebuild switch --impure --flake .#$machine || exit 1 -mv -f flake.nix.old flake.nix if [[ $1 != "-c" && $1 != "--clean-garbage" ]]; then read -p "Clean garbage? [Y/N]: " clean_garbage