mirror of
https://github.com/buckley310/nixos-config.git
synced 2024-12-21 19:24:15 +00:00
move nixpkgs from share to etc
This commit is contained in:
parent
ad8231ce7e
commit
6fa15fa684
1 changed files with 5 additions and 12 deletions
|
@ -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"
|
||||||
|
|
Loading…
Reference in a new issue