From 3f04056f70bb12e2ff9b164a6fb9e9e7e6a36efe Mon Sep 17 00:00:00 2001 From: Yorick van Pelt Date: Sun, 3 Jan 2021 17:12:16 +0100 Subject: [PATCH] treewide: remove impure nixpkgs --- conf | 3 +-- physical/3950x-hardware-config.nix | 4 ++-- physical/hetznercloud.nix | 5 ++--- physical/nuc.nix | 4 ++-- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/conf b/conf index 4839b60..2fbb461 100755 --- a/conf +++ b/conf @@ -4,8 +4,7 @@ if ! [ -e secrets.nix ] then git crypt unlock fi -# TODO: remove nixpkgs dependency -export NIX_PATH=yori-nix=$PWD:nixpkgs=channel:nixos-unstable +export NIX_PATH=yori-nix=$PWD host=$1 TARGET_HOST=$(nix eval --raw -f vpn.nix ips.$host) #TARGET_HOST=192.168.178.1 diff --git a/physical/3950x-hardware-config.nix b/physical/3950x-hardware-config.nix index 0c04697..66b12c4 100644 --- a/physical/3950x-hardware-config.nix +++ b/physical/3950x-hardware-config.nix @@ -1,11 +1,11 @@ # Do not modify this file! It was generated by ‘nixos-generate-config’ # and may be overwritten by future invocations. Please make changes # to /etc/nixos/configuration.nix instead. -{ config, lib, pkgs, ... }: +{ config, lib, pkgs, modulesPath, ... }: { imports = - [ + [ (modulesPath + "/installer/scan/not-detected.nix") ]; boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; diff --git a/physical/hetznercloud.nix b/physical/hetznercloud.nix index 38e0af1..0a5277c 100644 --- a/physical/hetznercloud.nix +++ b/physical/hetznercloud.nix @@ -1,11 +1,10 @@ -{ config, lib, pkgs, ... }: +{ config, lib, pkgs, modulesPath, ... }: let ipconf = (import ../secrets.nix).ipconf.${config.networking.hostName}; in { imports = - # todo: impure: - [ + [ (modulesPath + "/profiles/qemu-guest.nix") ]; boot.kernelPackages = pkgs.linuxPackages_latest; diff --git a/physical/nuc.nix b/physical/nuc.nix index fc17680..8ffb03e 100644 --- a/physical/nuc.nix +++ b/physical/nuc.nix @@ -1,10 +1,10 @@ -{ config, lib, pkgs, ... }: +{ config, lib, pkgs, modulesPath, ... }: let sources = import ../nix/sources.nix; in { imports = - [ + [ (modulesPath + "/installer/scan/not-detected.nix") ./. "${sources.nixos-hardware}/common/cpu/intel" ];