Compare commits

..

No commits in common. "c7283f4314229804a832f1f73b91216843d285a0" and "1b3ce49ffa87c9dd4c38c7c3ba502848a529d182" have entirely different histories.

2 changed files with 7 additions and 10 deletions

View File

@ -3,8 +3,6 @@
let
cfg = config.snowhawk.redshift;
cfgDir = config.xdg.configHome + "/redshift";
sops = config.snowhawk.sops.enable;
in
{
options.snowhawk.redshift = {
@ -16,13 +14,12 @@ in
Unit = {
Description = "redshift service";
PartOf = [ "graphical-session.target" ];
After = lib.mkIf sops [ "sops-nix.service" ];
};
Service = {
Type = "exec";
ExecStart =
let
catFile = file: "\$(${pkgs.coreutils}/bin/cat ${file})";
catFile = file: "$(${pkgs.coreutils}/bin/cat ${file})";
toPaths = deg: "${cfgDir}/${deg}";
fetchLatLon = lib.right
(lib.strings.concatStringsSep ":")
@ -30,14 +27,14 @@ in
(map toPaths)
[ "lat" "lon" ];
in
''${pkgs.bash}/bin/bash -c "${pkgs.redshift}/bin/redshift -l ${fetchLatLon}"'';
"${pkgs.redshift}/bin/redshift -l ${fetchLatLon}";
};
Install = {
WantedBy = [ "graphical-session.target" ];
};
};
sops.secrets = lib.mkIf sops {
sops.secrets = {
"locations/snowhawk/lat".path = "${cfgDir}/lat";
"locations/snowhawk/lon".path = "${cfgDir}/lon";
};

View File

@ -6,8 +6,8 @@ ssh_hosts:
caveserver: ENC[AES256_GCM,data:Fm86oJgeHD/dVqYRKny2/GC7nr3UuR54W46RbS7qgb0UhDsoUkoorIFw+orNhVvHouCc//WtGPCzRFca8u/pkQ9uauCtX/JlSxgHB6Ks08FOTSg=,iv:nGGJo64mEcUQgO9no8uLrws6AtRNUd7nEsYVFVIXkno=,tag:roNPGw39YNEBb2NWllbtHA==,type:str]
locations:
snowhawk:
lat: ENC[AES256_GCM,data:N7CsvQ==,iv:BfSp2jXBZDEEyNHhpo3SAwEVIWI0timAT2S1l76ODn0=,tag:Mf99+rM/m3Wh8BmmITKjpg==,type:str]
lon: ENC[AES256_GCM,data:dITeYwVzSA==,iv:s+St+As7wgAaUf8/qnAdCM932WY5c9S0qUFhUlzx3W0=,tag:iqqPhmHZ+t+CRZPdZxYVxA==,type:str]
lat: ENC[AES256_GCM,data:tDaccQ==,iv:l59sQXCNgXTLRJG7ialO9MJU1zgNXOMiN71Hr6ZWl5Y=,tag:uQaMPsrfHhO1C3hJ7ZJXJQ==,type:float]
lon: ENC[AES256_GCM,data:+3gfq/VyzQ==,iv:tJT8D+wTPj9jZ9xATfUiDqI9Fg+Z9imtQoEY3OzHzXk=,tag:PP4Yad45yscRS4aBFjOqEA==,type:float]
sops:
kms: []
gcp_kms: []
@ -23,8 +23,8 @@ sops:
SjZNOWNndEIrMDFZRnV3QlRheklvMncK5n4lzgSrEDQ0M8m4SAslQvl2vq39owY9
s3SrXYCvQo6nsKKJMgaN0fnrSqxdSLbnrDYFchaF2fhdXozR8508PA==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2024-07-24T08:39:41Z"
mac: ENC[AES256_GCM,data:Rg/rkbSyCkVJfISTfHDdNAfwN8cygYya5zqfJg9ZfaVSmbUBoxkWInaEoXcvRLj7GbJl/ZE1coi7/wj4sIECAfUU56MRObxNFa29YPAhBGLb+mwuDDD8Sp9HssnqBbMQXgjUu+JNPRhXkNQJ8vE0UkGjAKjtu9BB4GzKs8GXQ2A=,iv:mkAqcQCIQl4uEn91MxavLY8yS5zjR+1/5BMWgNsK5Jo=,tag:fCyUVItQqbUBUwbCo3rNYA==,type:str]
lastmodified: "2024-07-24T06:51:29Z"
mac: ENC[AES256_GCM,data:bBkRAhqN6dFAFUppG/qjuivvoMlpvwk2nox89DbntGCu/pj8BcdVRDbE7jN3gAYBbLiA/sw7BrwoBPhOgtYTL0qmH3ZEcvvhcsf0I2UQ8meTJMDDqqOI3f1AcHK2oqrqflkbnndsx8h48/wwza84WjORRVLibkclwueI1WvxhBc=,iv:sPKO51qkZyoYmtoR5CQw72gxGGkiWdgQdByLOHI5ySs=,tag:XcknL4zeg9pA7tbwHbnhvg==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.9.0