about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--dotfiles/.xinitrc5
-rw-r--r--hosts/default.nix15
-rw-r--r--hosts/luna/home.nix2
-rw-r--r--hosts/phobos/home.nix6
-rw-r--r--hosts/vm/home.nix2
-rw-r--r--secrets/default.nixbin346 -> 391 bytes
6 files changed, 17 insertions, 13 deletions
diff --git a/dotfiles/.xinitrc b/dotfiles/.xinitrc
index 2547276..a4a32a9 100644
--- a/dotfiles/.xinitrc
+++ b/dotfiles/.xinitrc
@@ -1,7 +1,6 @@
 #!/bin/sh
 
 export LC_CTYPE="en_US.UTF-8"
-export LOCATION="52.954784:-1.158109"
 export _JAVA_AWT_WM_NONREPARENTING=1
 
 userresources=$HOME/.Xresources
@@ -55,7 +54,7 @@ xrandr --auto
 sxhkd &
 clipmenud &
 unclutter &
-redshift &
+redshift -l $LOCATION &
 numlockx on
 
 systemctl --user start graphical-session.target
@@ -64,7 +63,7 @@ dunst &
 
 dwmbar &
 
-while :; do ssh-agent smart-wallpaper -d ~/Images/Wallpapers/Day -n ~/Images/Wallpapers/Night -r; done &
+while :; do ssh-agent smart-wallpaper -d ~/Images/Wallpapers/Day -n ~/Images/Wallpapers/Night -l $LOCATION -r; done &
 
 exec dwm 2> /tmp/dwm.log
 
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
diff --git a/secrets/default.nix b/secrets/default.nix
index d9dda87..bcf48c9 100644
--- a/secrets/default.nix
+++ b/secrets/default.nix
Binary files differ