move nixpkgs from share to etc

This commit is contained in:
Sean Buckley 2021-08-14 22:50:24 -04:00
parent ad8231ce7e
commit 6fa15fa684

View file

@ -1,9 +1,4 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
let
sc-scripts = map
(x: (pkgs.writeShellScriptBin "sc-${x}" "nixos-rebuild ${x} --refresh --flake github:buckley310/nixos-config"))
[ "switch" "build" "boot" ];
in
{ {
time.timeZone = "US/Eastern"; time.timeZone = "US/Eastern";
i18n.supportedLocales = [ "en_US.UTF-8/UTF-8" ]; i18n.supportedLocales = [ "en_US.UTF-8/UTF-8" ];
@ -18,14 +13,12 @@ in
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
environment.variables.NIXPKGS_ALLOW_UNFREE = "1"; environment.variables.NIXPKGS_ALLOW_UNFREE = "1";
environment.systemPackages = sc-scripts ++ [ environment.etc.nixpkgs.source = pkgs.path;
(pkgs.runCommand "nixpkgs" { } '' environment.systemPackages = map
mkdir -p $out/share (x: (pkgs.writeShellScriptBin "sc-${x}" "nixos-rebuild ${x} --refresh --flake github:buckley310/nixos-config"))
ln -s ${pkgs.path} $out/share/nixpkgs [ "switch" "build" "boot" ];
'')
];
nix.nixPath = [ "nixpkgs=/run/current-system/sw/share/nixpkgs" ]; nix.nixPath = [ "nixpkgs=/etc/nixpkgs" ];
systemd.tmpfiles.rules = [ systemd.tmpfiles.rules = [
"e /nix/var/log - - - 30d" "e /nix/var/log - - - 30d"