From c0b7d6da8d048be7951a957c4e4b9dd9ac59b23b Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Wed, 1 May 2019 11:07:12 -0300 Subject: Put device specific configuration in local-configuration.nix file. --- nixos/configuration.nix | 6 ++++-- nixos/velhinho.nix | 4 ++++ 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 nixos/velhinho.nix (limited to 'nixos') diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 01e3b78..5411570 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -1,5 +1,7 @@ { config, pkgs, ... }: +let localConfiguration = import /etc/nixos/local-configuration.nix; +in { imports = [ # Include the results of the hardware scan. @@ -16,7 +18,7 @@ luks.devices = [ { name = "root"; - device = "/dev/sda3"; + device = localConfiguration.luksDevice; preLVM = true; } ]; @@ -31,7 +33,7 @@ }; }; - networking.hostName = "velhinho-nixos"; # Define your hostname. + networking.hostName = localConfiguration.hostName; networking.networkmanager.enable = true; # Auto-upgrade channel diff --git a/nixos/velhinho.nix b/nixos/velhinho.nix new file mode 100644 index 0000000..d06ed5f --- /dev/null +++ b/nixos/velhinho.nix @@ -0,0 +1,4 @@ +{ + hostName = "velhinho-nixos"; + luksDevice = "/dev/sda3"; +} -- cgit v1.2.3