Compare commits
3 Commits
fd03c87c18
...
3552314e69
Author | SHA1 | Date | |
---|---|---|---|
3552314e69 | |||
adb963a48d | |||
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,10 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [ git-crypt ];
|
||||
home.packages = with pkgs; [
|
||||
git-crypt
|
||||
libsecret
|
||||
];
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
@ -22,6 +25,7 @@
|
||||
extraConfig = {
|
||||
push.autoSetupRemote = true;
|
||||
safe.directory = "/etc/nixos";
|
||||
credential.helper = "${pkgs.git.override { withLibsecret = true; }}/bin/git-credential-libsecret";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -1,7 +1,13 @@
|
||||
{ pkgs, inputs, ... }:
|
||||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
common = import ../../../common.nix;
|
||||
theme = import ../../../theme.nix;
|
||||
loader = import ../../secretsLoader.nix lib;
|
||||
in
|
||||
{
|
||||
imports = [ inputs.hyprpanel.homeManagerModules.hyprpanel ];
|
||||
@ -74,7 +80,8 @@ in
|
||||
};
|
||||
weather = {
|
||||
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