From 7f216a1d71305c6f9571d890949e631c61f2711b Mon Sep 17 00:00:00 2001 From: Alexander Bantyev Date: Tue, 21 Apr 2020 01:29:16 +0300 Subject: [PATCH] Update build default.nix --- build | 2 +- default.nix | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/build b/build index 3d94ef1..0cfbf9c 100755 --- a/build +++ b/build @@ -7,7 +7,7 @@ nixpkgs=$(nix eval --raw '(import ./nix/sources.nix).nixpkgs') nix-store --realise $nixpkgs -export NIX_PATH=nixpkgs=$nixpkgs:nixos-config=/etc/nixos/configuration.nix +export NIX_PATH=nixpkgs=$nixpkgs:nixos-config="`pwd`" if [[ -n $INSIDE_EMACS ]] then diff --git a/default.nix b/default.nix index 73de210..297632e 100755 --- a/default.nix +++ b/default.nix @@ -5,21 +5,19 @@ # This is main nixos configuration # To use this configuration: # 1. Add your own secret.nix to this folder -# 2. Replace /etc/nixos/configuration.nix with the following: -# import /path/to/this/nixos-config "Vendor-Type" +# 2. ./install or ./bootstrap # 3. Log in to application and services where neccesary -device: # This is the device we're on now { config, pkgs, lib, ... }: let sources = import ./nix/sources.nix; -in { +in rec { imports = [ "${./hardware-configuration}/${device}.nix" "${sources.home-manager}/nixos" (import ./modules device) ]; - inherit device; + device = builtins.replaceStrings ["\n"] [""] (builtins.readFile /etc/hostname); system.stateVersion = "18.03"; }