diff options
author | Baitinq <manuelpalenzuelamerino@gmail.com> | 2022-07-03 22:56:22 +0200 |
---|---|---|
committer | Baitinq <manuelpalenzuelamerino@gmail.com> | 2022-07-03 22:56:22 +0200 |
commit | f56e0823324bb7a3821dd9f554b211876f874e66 (patch) | |
tree | 9f664082b7256ffe4f39b0ed614ac53ff78b043f /hosts | |
parent | Change synaptics sensibility (diff) | |
download | nixos-config-f56e0823324bb7a3821dd9f554b211876f874e66.tar.gz nixos-config-f56e0823324bb7a3821dd9f554b211876f874e66.tar.bz2 nixos-config-f56e0823324bb7a3821dd9f554b211876f874e66.zip |
Add location in a per host approach
Diffstat (limited to 'hosts')
-rw-r--r-- | hosts/default.nix | 15 | ||||
-rw-r--r-- | hosts/luna/home.nix | 2 | ||||
-rw-r--r-- | hosts/phobos/home.nix | 6 | ||||
-rw-r--r-- | hosts/vm/home.nix | 2 |
4 files changed, 15 insertions, 10 deletions
diff --git a/hosts/default.nix b/hosts/default.nix index 30fef61..16e8d03 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -1,12 +1,14 @@ { user, lib, nixpkgs, nur, inputs, home-manager, ... }: let + secrets = import ../secrets; + hosts = [ - { hostname = "phobos"; system = "x86_64-linux"; } - { hostname = "luna"; system = "x86_64-linux"; } - { hostname = "vm"; system = "x86_64-linux"; } + { 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; } ]; - mkHost = hostname: system: + mkHost = hostname: system: location: let pkgs = import nixpkgs { inherit system; @@ -17,8 +19,7 @@ let (import ../overlays) ]; }; - secrets = import ../secrets; - extraArgs = { inherit pkgs inputs user secrets hostname; }; + extraArgs = { inherit pkgs inputs user secrets hostname location; }; in nixpkgs.lib.nixosSystem { inherit system; @@ -43,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 }: { name = hostname; value = mkHost hostname system; }) hosts) +builtins.listToAttrs (map ({ hostname, system, location }: { name = hostname; value = mkHost hostname system location; }) hosts) diff --git a/hosts/luna/home.nix b/hosts/luna/home.nix index bcac39c..cb8f5e9 100644 --- a/hosts/luna/home.nix +++ b/hosts/luna/home.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, inputs, user, hostname, secrets, ... }: +{ config, lib, pkgs, inputs, user, hostname, location, secrets, ... }: let dotfiles = ../../dotfiles; in diff --git a/hosts/phobos/home.nix b/hosts/phobos/home.nix index 422fbe7..8891df0 100644 --- a/hosts/phobos/home.nix +++ b/hosts/phobos/home.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, inputs, user, hostname, secrets, ... }: +{ config, lib, pkgs, inputs, user, hostname, location, secrets, ... }: let dotfiles = ../../dotfiles; in @@ -18,6 +18,10 @@ in mov-cli ]); + home.sessionVariables = { + LOCATION = "${location}"; + }; + programs.firefox.profiles.default.settings = { "media.ffmpeg.vaapi.enabled" = true; #Hardware acceleration }; diff --git a/hosts/vm/home.nix b/hosts/vm/home.nix index c3d555f..a409b37 100644 --- a/hosts/vm/home.nix +++ b/hosts/vm/home.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, inputs, user, hostname, secrets, ... }: +{ config, lib, pkgs, inputs, user, hostname, location, secrets, ... }: let dotfiles = ../../dotfiles; in |