mirror of
https://github.com/Alexandre1a/NixOSDots.git
synced 2026-03-10 00:09:46 +01:00
Changed the location of secrets.nix and adapted it
This commit is contained in:
parent
1f9a3f6869
commit
4818ff82af
@ -5,9 +5,11 @@
|
|||||||
imports = [
|
imports = [
|
||||||
inputs.spicetify-nix.homeManagerModules.spicetify
|
inputs.spicetify-nix.homeManagerModules.spicetify
|
||||||
../../modules/home-manager/spicetify.nix
|
../../modules/home-manager/spicetify.nix
|
||||||
|
../../modules/home-manager/secrets.nix
|
||||||
../../modules/common/zed.nix
|
../../modules/common/zed.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
# Git config
|
# Git config
|
||||||
git = {
|
git = {
|
||||||
|
|||||||
@ -5,7 +5,6 @@
|
|||||||
imports =
|
imports =
|
||||||
[
|
[
|
||||||
inputs.sops-nix.nixosModules.sops
|
inputs.sops-nix.nixosModules.sops
|
||||||
inputs.sops-nix.homeManagerModules.sops
|
|
||||||
../../modules/nixos/secrets.nix # Sops
|
../../modules/nixos/secrets.nix # Sops
|
||||||
../../modules/nixos/wireless.nix # For the wifi
|
../../modules/nixos/wireless.nix # For the wifi
|
||||||
../../modules/nixos/locale.nix # For localisation options
|
../../modules/nixos/locale.nix # For localisation options
|
||||||
|
|||||||
@ -377,15 +377,16 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
# Secrets management with Sops-nix
|
|
||||||
sops.secrets = lib.mkIf (cfg.githubToken != null || cfg.braveSearchApiKey != null) {
|
sops = lib.mkIf (cfg.githubToken != null || cfg.braveSearchApiKey != null) {
|
||||||
|
secrets = {
|
||||||
"zed/github_token" = lib.mkIf (cfg.githubToken != null) {
|
"zed/github_token" = lib.mkIf (cfg.githubToken != null) {
|
||||||
sopsFile = ../../secrets/secrets.yaml;
|
sopsFile = ../../secrets/secrets.yaml;
|
||||||
owner = config.home.username or "alex";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
"zed/brave_api_key" = lib.mkIf (cfg.braveSearchApiKey != null) {
|
"zed/brave_api_key" = lib.mkIf (cfg.braveSearchApiKey != null) {
|
||||||
sopsFile = ../../secrets/secrets.yaml;
|
sopsFile = ../../secrets/secrets.yaml;
|
||||||
owner = config.home.username or "alex";
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -1,8 +1,10 @@
|
|||||||
|
{ config, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
sops = {
|
sops = {
|
||||||
defaultSopsFile = ../../secrets/secrets.yaml;
|
defaultSopsFile = ../../secrets/secrets.yaml;
|
||||||
defaultSopsFormat = "yaml";
|
defaultSopsFormat = "yaml";
|
||||||
|
|
||||||
age.keyFile = "/home/alex/.config/sops/age/keys.txt";
|
age.keyFile = "${config.home.homeDirectory}/.config/sops/age/keys.txt";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user