Compare commits
5 Commits
dddd1a9ec6
...
1b3ce49ffa
Author | SHA1 | Date |
---|---|---|
Zynh Ludwig | 1b3ce49ffa | |
Zynh Ludwig | d48b81fbac | |
Zynh Ludwig | 9ce514aa6d | |
Zynh Ludwig | f2699971d4 | |
Zynh Ludwig | 3fe55b566a |
|
@ -3,6 +3,7 @@
|
|||
let
|
||||
cfg = config.snowhawk.git;
|
||||
macos = config.snowhawk.macos.enable;
|
||||
sops = config.snowhawk.sops.enable;
|
||||
in
|
||||
{
|
||||
options.snowhawk.git = {
|
||||
|
@ -70,7 +71,7 @@ in
|
|||
|
||||
sops.secrets =
|
||||
let home = config.home.homeDirectory;
|
||||
in {
|
||||
in lib.mkIf sops {
|
||||
"private_keys/personal_git" = {
|
||||
path = "${home}/.ssh/personal_git";
|
||||
};
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
{ lib, config, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.snowhawk.redshift;
|
||||
cfgDir = config.xdg.configHome + "/redshift";
|
||||
in
|
||||
{
|
||||
options.snowhawk.redshift = {
|
||||
enable = lib.mkEnableOption "redshift home-manager module";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
systemd.user.services.redshift = {
|
||||
Unit = {
|
||||
Description = "redshift service";
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
};
|
||||
Service = {
|
||||
Type = "exec";
|
||||
ExecStart =
|
||||
let
|
||||
catFile = file: "$(${pkgs.coreutils}/bin/cat ${file})";
|
||||
toPaths = deg: "${cfgDir}/${deg}";
|
||||
fetchLatLon = lib.right
|
||||
(lib.strings.concatStringsSep ":")
|
||||
(map catFile)
|
||||
(map toPaths)
|
||||
[ "lat" "lon" ];
|
||||
in
|
||||
"${pkgs.redshift}/bin/redshift -l ${fetchLatLon}";
|
||||
};
|
||||
Install = {
|
||||
WantedBy = [ "graphical-session.target" ];
|
||||
};
|
||||
};
|
||||
|
||||
sops.secrets = {
|
||||
"locations/snowhawk/lat".path = "${cfgDir}/lat";
|
||||
"locations/snowhawk/lon".path = "${cfgDir}/lon";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
let
|
||||
cfg = config.snowhawk.ssh;
|
||||
sops = config.snowhawk.sops.enable;
|
||||
in
|
||||
{
|
||||
options.snowhawk.ssh = {
|
||||
|
@ -41,7 +42,7 @@ in
|
|||
|
||||
sops.secrets =
|
||||
let home = config.home.homeDirectory;
|
||||
in {
|
||||
in lib.mkIf sops {
|
||||
"private_keys/msiserver" = {
|
||||
path = "${home}/.ssh/msiserver";
|
||||
};
|
||||
|
|
|
@ -21,6 +21,7 @@ in
|
|||
sops.enable = true;
|
||||
defaultPrograms.enable = true;
|
||||
playerctl.enable = true;
|
||||
redshift.enable = true;
|
||||
};
|
||||
snowhawk.ssh = {
|
||||
enable = true;
|
||||
|
|
|
@ -10,7 +10,7 @@ rec {
|
|||
name = hostname;
|
||||
value = nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = { inherit inputs; };
|
||||
specialArgs = { inherit inputs lib; };
|
||||
modules = [
|
||||
../hosts/${hostname}/hardware-configuration.nix
|
||||
../hosts/${hostname}/configuration.nix
|
||||
|
@ -36,7 +36,7 @@ rec {
|
|||
name = "${user}${hostStr}";
|
||||
value = inputs.home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages."${system}";
|
||||
extraSpecialArgs = { inherit inputs; };
|
||||
extraSpecialArgs = { inherit inputs lib; };
|
||||
|
||||
modules = [
|
||||
../hosts/${configHost}/home.nix
|
||||
|
|
|
@ -4,6 +4,10 @@ private_keys:
|
|||
caveserver: ENC[AES256_GCM,data:bf3+bhbbX08NPk31Wy26ZsYzUIg2fv7SjWZ73CEOPTQZf8yLy32A63oJX71qtPIj6PcpbsHfrYGMKYHuMUYr5N9fYDhiXEbesAt1nX9HOsq0UwYSl7HWucRHkorkIq09r5oVB4CWoYEj6/2HmZhbYJgEZdMptActi3+eRobgjTdqtq4Q8K0tp9X3VeE2Ca/M17DEz9y93aMKunXbD38jS+zZs0SI1OtyC0V9MenAtiiadBznexq6IVwsp/4mcAiv0udFn7lwCYpPPsSKoCjFYfNIPu/0rCIEag3/bdJHPJA0fng37E4ZGA3ZCwy4PhaJ88kJBAqLJ8u1mQ+UGNFtZBaqww+RIAStkq958tYoyZaI4C+E+XpGRs6FsthN9lsJZ1skiT41vxsfb9+M2sELv+Jm9xDkHJr7+pjtGkN2xEvWS/DrzsKxl4qCw+ZkyE5VNS7vW+gfM+7XieooxXJlQEihlYWflRd1aikYfEizXXWaM6XlLsHtFYEmtQMvesB8XCeoCVT47XgGNqmaNFEEo6Pdl5ke6WO4Gi5K,iv:FZWDaT+ernolWiLZbE67g9JWNCgCwdUyglv8cwAeFO0=,tag:emCa72E1HIjU6+PAJvICcQ==,type:str]
|
||||
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: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: []
|
||||
|
@ -19,8 +23,8 @@ sops:
|
|||
SjZNOWNndEIrMDFZRnV3QlRheklvMncK5n4lzgSrEDQ0M8m4SAslQvl2vq39owY9
|
||||
s3SrXYCvQo6nsKKJMgaN0fnrSqxdSLbnrDYFchaF2fhdXozR8508PA==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2024-07-11T13:01:36Z"
|
||||
mac: ENC[AES256_GCM,data:z5r+j5O0cwXOUDUwJX5lpvaFG36VViqbuVpyAdSNMIDBzQt335YyPwFl99ghXupfuUN/HB7+EZbRHC2/VqV0t8v3XgndfYnrQ2gr2bS3HM5/ucjgsffAfAyCilV/ybDgKF0dZ+rDh/FxbBScvRul64x8sEzR8SJfKmDr5hxxa9I=,iv:HtyfXMfLX3hUN5OJ4n9PSX/YuPH2h1qLolskY5rwHdE=,tag:v4H41BvP+5l6ltfpUQKAYw==,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
|
||||
|
|
Loading…
Reference in New Issue