about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBaitinq <manuelpalenzuelamerino@gmail.com>2023-02-05 02:48:10 +0100
committerBaitinq <manuelpalenzuelamerino@gmail.com>2023-02-05 12:00:27 +0100
commit799b2cd63e39e8a5c264739460f1c96fa05010b1 (patch)
treeb1a980cf97a4f2fbe2ab9a956433d1430f44dce5
parentHosts: Use flake nixpkgs as system nixpkgs in nix-* cmds (diff)
downloadnixos-config-799b2cd63e39e8a5c264739460f1c96fa05010b1.tar.gz
nixos-config-799b2cd63e39e8a5c264739460f1c96fa05010b1.tar.bz2
nixos-config-799b2cd63e39e8a5c264739460f1c96fa05010b1.zip
Hosts: Use /etc/hosts from flake input
-rw-r--r--flake.lockbin5848 -> 6306 bytes
-rw-r--r--flake.nix5
-rw-r--r--hosts/configuration.nix5
3 files changed, 7 insertions, 3 deletions
diff --git a/flake.lock b/flake.lock
index 3d2b026..4d3ecc3 100644
--- a/flake.lock
+++ b/flake.lock
Binary files differdiff --git a/flake.nix b/flake.nix
index 30b3784..0599000 100644
--- a/flake.nix
+++ b/flake.nix
@@ -22,6 +22,11 @@
 
     nix-index.url = "github:Mic92/nix-index-database";
 
+    hosts = {
+      url = "github:StevenBlack/hosts";
+      flake = false;
+    };
+
     wallpapers = {
       url = "github:Baitinq/Wallpapers";
       flake = false;
diff --git a/hosts/configuration.nix b/hosts/configuration.nix
index ec000b0..7f312ab 100644
--- a/hosts/configuration.nix
+++ b/hosts/configuration.nix
@@ -33,13 +33,12 @@
     tmpOnTmpfs = true;
   };
 
-  # Set your time zone.
   time.timeZone = timezone;
 
   networking = {
-    hostName = hostname; # Define your hostname.
+    hostName = hostname;
     enableIPv6 = true;
-    extraHosts = builtins.readFile "${dotfiles}/hosts";
+    extraHosts = builtins.readFile "${inputs.hosts}/hosts";
     dhcpcd.enable = true;
     resolvconf.enable = true;
     nameservers = [ "127.0.0.1" ];