aboutsummaryrefslogtreecommitdiff
path: root/nixos
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2019-05-01 11:07:12 -0300
committerEuAndreh <eu@euandre.org>2019-05-01 11:07:12 -0300
commitc0b7d6da8d048be7951a957c4e4b9dd9ac59b23b (patch)
tree1f08d592997cfa487b0fb25136b1cccd996982b7 /nixos
parentRemove custom build of Nods.js. (diff)
downloaddotfiles-c0b7d6da8d048be7951a957c4e4b9dd9ac59b23b.tar.gz
dotfiles-c0b7d6da8d048be7951a957c4e4b9dd9ac59b23b.tar.xz
Put device specific configuration in local-configuration.nix file.
Diffstat (limited to 'nixos')
-rw-r--r--nixos/configuration.nix6
-rw-r--r--nixos/velhinho.nix4
2 files changed, 8 insertions, 2 deletions
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";
+}