✨ Wildcard encrypt files in secrets dir, util function to load
secrets, use apu-key in weather widget
This commit is contained in:
parent
fd03c87c18
commit
7ab89cda7c
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -1 +1 @@
|
|||||||
home-manager/secrets/weather-api-key filter=git-crypt diff=git-crypt
|
home-manager/secrets/* filter=git-crypt diff=git-crypt
|
||||||
|
@ -1,7 +1,13 @@
|
|||||||
{ pkgs, inputs, ... }:
|
{
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
common = import ../../../common.nix;
|
common = import ../../../common.nix;
|
||||||
theme = import ../../../theme.nix;
|
theme = import ../../../theme.nix;
|
||||||
|
loader = import ../../secretsLoader.nix lib;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [ inputs.hyprpanel.homeManagerModules.hyprpanel ];
|
imports = [ inputs.hyprpanel.homeManagerModules.hyprpanel ];
|
||||||
@ -74,7 +80,8 @@ in
|
|||||||
};
|
};
|
||||||
weather = {
|
weather = {
|
||||||
unit = "metric";
|
unit = "metric";
|
||||||
location = "Bergen, Norway"; # TODO not working
|
location = "Bergen, Norway";
|
||||||
|
key = loader.loadSecret ../../secrets/weather-api-key;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
6
home-manager/secretsLoader.nix
Normal file
6
home-manager/secretsLoader.nix
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
lib:
|
||||||
|
|
||||||
|
{
|
||||||
|
loadSecret =
|
||||||
|
filePath: lib.strings.trim (lib.strings.removeSuffix "\n" (builtins.readFile filePath));
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user