diff options
author | Baitinq <manuelpalenzuelamerino@gmail.com> | 2022-07-13 17:20:56 +0200 |
---|---|---|
committer | Baitinq <manuelpalenzuelamerino@gmail.com> | 2022-07-13 17:23:51 +0200 |
commit | c4ab92d285082dfb45f14f6542701489362707dd (patch) | |
tree | 86bae89eff436973f8206a6fa596036524a4d0d8 | |
parent | Remove unnecessary packages that can be replaced with , (diff) | |
download | nixos-config-c4ab92d285082dfb45f14f6542701489362707dd.tar.gz nixos-config-c4ab92d285082dfb45f14f6542701489362707dd.tar.bz2 nixos-config-c4ab92d285082dfb45f14f6542701489362707dd.zip |
Add timezone to the mkHost function
-rw-r--r-- | hosts/configuration.nix | 4 | ||||
-rw-r--r-- | hosts/default.nix | 12 | ||||
-rw-r--r-- | secrets/default.nix | bin | 440 -> 476 bytes |
3 files changed, 8 insertions, 8 deletions
diff --git a/hosts/configuration.nix b/hosts/configuration.nix index e834335..9913f35 100644 --- a/hosts/configuration.nix +++ b/hosts/configuration.nix @@ -1,4 +1,4 @@ -{ secrets, lib, pkgs, config, hostname, inputs, user, ... }: { +{ secrets, lib, pkgs, config, hostname, inputs, user, timezone, ... }: { imports = [ ../modules/doas @@ -25,7 +25,7 @@ }; # Set your time zone. - time.timeZone = "Europe/Madrid"; + time.timeZone = timezone; networking = { hostName = hostname; # Define your hostname. diff --git a/hosts/default.nix b/hosts/default.nix index 03ba710..bdba1f8 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -3,12 +3,12 @@ let secrets = import ../secrets; hosts = [ - { hostname = "phobos"; system = "x86_64-linux"; location = secrets.main_location; } - { hostname = "luna"; system = "x86_64-linux"; location = secrets.main_location; } - { hostname = "vm"; system = "x86_64-linux"; location = secrets.main_location; } + { hostname = "phobos"; system = "x86_64-linux"; timezone=secrets.main_timezone; location = secrets.main_location; } + { hostname = "luna"; system = "x86_64-linux"; timezone=secrets.main_timezone; location = secrets.main_location; } + { hostname = "vm"; system = "x86_64-linux"; timezone=secrets.main_timezone; location = secrets.main_location; } ]; - mkHost = { hostname, system, location }: + mkHost = { hostname, system, timezone, location }: let pkgs = import nixpkgs { inherit system; @@ -19,7 +19,7 @@ let (import ../overlays) ]; }; - extraArgs = { inherit pkgs inputs user secrets hostname location; }; + extraArgs = { inherit pkgs inputs user secrets hostname timezone location; }; in nixpkgs.lib.nixosSystem { inherit system; @@ -44,4 +44,4 @@ in Map each element of the list applying the mkHost function to its elements and returning a set in the listToAttrs format builtins.listToAttrs on the result */ -builtins.listToAttrs (map ({ hostname, system, location }: { name = hostname; value = mkHost { inherit hostname system location; }; }) hosts) +builtins.listToAttrs (map ({ hostname, system, timezone, location }: { name = hostname; value = mkHost { inherit hostname system timezone location; }; }) hosts) diff --git a/secrets/default.nix b/secrets/default.nix index 518dce8..0084741 100644 --- a/secrets/default.nix +++ b/secrets/default.nix Binary files differ |