From 1ed4cc766ed5a9a17e7a3d68abd9acfe32bb5156 Mon Sep 17 00:00:00 2001 From: Sridhar Ratnakumar Date: Thu, 15 Apr 2021 15:30:24 -0400 Subject: [PATCH] redshift --- features/current-location.nix | 11 +++++++++++ features/desktopish/default.nix | 1 + features/desktopish/redshift.nix | 9 +++++++++ features/monitor-brightness.nix | 2 +- flake.nix | 1 + hosts/p71.nix | 3 --- hosts/x1c7.nix | 2 -- 7 files changed, 23 insertions(+), 6 deletions(-) create mode 100644 features/current-location.nix create mode 100644 features/desktopish/redshift.nix diff --git a/features/current-location.nix b/features/current-location.nix new file mode 100644 index 0000000..2da4731 --- /dev/null +++ b/features/current-location.nix @@ -0,0 +1,11 @@ +{ config, pkgs, ... }: + +{ + time.timeZone = "America/New_York"; + + location = { + # Quebec City + latitude = 46.813359; + longitude = -71.215796; + }; +} diff --git a/features/desktopish/default.nix b/features/desktopish/default.nix index 7203319..862405e 100644 --- a/features/desktopish/default.nix +++ b/features/desktopish/default.nix @@ -8,6 +8,7 @@ ./fonts.nix ./touchpad-trackpoint.nix ./autolock.nix + ./redshift.nix # WMish things ./xmonad diff --git a/features/desktopish/redshift.nix b/features/desktopish/redshift.nix new file mode 100644 index 0000000..28d4826 --- /dev/null +++ b/features/desktopish/redshift.nix @@ -0,0 +1,9 @@ + +{ config, pkgs, ...}: + +# Based on https://nixos.wiki/wiki/Redshift +{ + services.redshift = { + enable = true; + }; +} diff --git a/features/monitor-brightness.nix b/features/monitor-brightness.nix index aa24eef..a5b117e 100644 --- a/features/monitor-brightness.nix +++ b/features/monitor-brightness.nix @@ -7,6 +7,6 @@ ddcutil # This can control the laptop display. - xorg.xbacklight + brightnessctl ]; } diff --git a/flake.nix b/flake.nix index cf2c798..24bd389 100644 --- a/flake.nix +++ b/flake.nix @@ -27,6 +27,7 @@ configurationNix # Features common to all of my machines + ./features/current-location.nix ./features/passwordstore.nix ./features/syncthing.nix ./features/protonvpn.nix diff --git a/hosts/p71.nix b/hosts/p71.nix index d890660..b8431a7 100644 --- a/hosts/p71.nix +++ b/hosts/p71.nix @@ -47,9 +47,6 @@ networking.networkmanager.enable = true; # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. - # Set your time zone. - time.timeZone = "America/New_York"; - # The global useDHCP flag is deprecated, therefore explicitly set to false here. # Per-interface useDHCP will be mandatory in the future, so this generated config # replicates the default behaviour. diff --git a/hosts/x1c7.nix b/hosts/x1c7.nix index e0bfacd..58b21f2 100644 --- a/hosts/x1c7.nix +++ b/hosts/x1c7.nix @@ -41,8 +41,6 @@ trustedUsers = [ "root" "srid" ]; }; - time.timeZone = "America/New_York"; - networking.hostName = "x1c7"; networking.networkmanager.enable = true;