ditch nixpkgs link from /run/current-system

This commit is contained in:
Kiara Grouwstra 2025-04-17 16:04:38 +02:00
parent 4f93303ef8
commit 69b6cac387

View file

@ -1,8 +1,7 @@
{ lib, pkgs, ... }: { lib, ... }:
let let
inherit (lib) mkDefault; inherit (lib) mkDefault;
nixPath = "/run/current-system/nixpkgs";
in in
{ {
imports = [ imports = [
@ -16,15 +15,6 @@ in
system.stateVersion = "24.05"; # do not change system.stateVersion = "24.05"; # do not change
nixpkgs.hostPlatform = mkDefault "x86_64-linux"; nixpkgs.hostPlatform = mkDefault "x86_64-linux";
# use flake's nixpkgs over channels
nix.nixPath = [ "nixpkgs=${nixPath}" ];
system.extraSystemBuilderCmds = ''
ln -sv ${pkgs.path} $out/nixpkgs
'';
systemd.tmpfiles.rules = [
"L+ ${nixPath} - - - - ${pkgs.path}"
];
## This is just nice to have, but it is also particularly important for the ## This is just nice to have, but it is also particularly important for the
## Forgejo CI runners because the Nix configuration in the actions is directly ## Forgejo CI runners because the Nix configuration in the actions is directly
## taken from here. ## taken from here.