fixed secrets path

This commit is contained in:
Harry 2024-08-25 12:44:14 +02:00
parent 27730ec2c0
commit f7bc81be81
6 changed files with 22 additions and 12 deletions

View file

@ -1,11 +1,11 @@
{ config, ... }: { config, secrets, ... }:
{ {
imports = [ imports = [
./backups-repos.nix ./backups-repos.nix
]; ];
sops.secrets.borgRepoPassword = { }; sops.secrets.borgRepoPassword = { };
sops.secrets.borgRemoteServerPassword = { sops.secrets.borgRemoteServerPassword = {
sopsFile = "/home/homelab/secrets/backup.yaml"; sopsFile = "${secrets}/secrets/backup.yaml";
}; };
services.borgbackup.jobs = { services.borgbackup.jobs = {

View file

@ -1,4 +1,9 @@
{ config, lib, ... }: {
config,
lib,
secrets,
...
}:
with lib; with lib;
let let
@ -14,7 +19,7 @@ in
config = { config = {
sops.secrets.slskd = { sops.secrets.slskd = {
sopsFile = ../../../secrets/slskd.env; sopsFile = "${secrets}/secrets/slskd.env";
format = "dotenv"; format = "dotenv";
}; };

View file

@ -1,4 +1,9 @@
{ config, lib, ... }: {
config,
secrets,
lib,
...
}:
with lib; with lib;
let let
@ -16,7 +21,7 @@ in
config = { config = {
sops.secrets.transmission = { sops.secrets.transmission = {
sopsFile = ../../../secrets/transmission.json; sopsFile = "${secrets}/secrets/transmission.json";
path = "/var/lib/secrets/transmission/settings.json"; path = "/var/lib/secrets/transmission/settings.json";
}; };

View file

@ -1,6 +1,7 @@
{ {
config, config,
lib, lib,
secrets,
pkgs, pkgs,
... ...
}: }:
@ -33,7 +34,7 @@ in
#TODO: add Radarr/Sonarr/... api key support #TODO: add Radarr/Sonarr/... api key support
config = { config = {
sops.secrets."homepage" = { sops.secrets."homepage" = {
sopsFile = ../../../secrets/homepage.env; sopsFile = "${secrets}/secrets/homepage.env";
format = "dotenv"; format = "dotenv";
}; };

View file

@ -23,18 +23,18 @@
}@inputs: }@inputs:
let let
username = "harry123"; username = "harry123";
secrets = builtins.toString inputs.nix-secrets;
specialArgs = { specialArgs = {
inherit username; inherit username;
inherit secrets;
}; };
in in
{ {
nixosConfigurations = { nixosConfigurations = {
sisyphe = nixpkgs.lib.nixosSystem { sisyphe = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = { specialArgs = specialArgs;
inherit inputs;
};
modules = [ modules = [
./hosts/sisyphe/configuration.nix ./hosts/sisyphe/configuration.nix
sops-nix.nixosModules.sops sops-nix.nixosModules.sops

View file

@ -3,14 +3,13 @@
config, config,
lib, lib,
pkgs, pkgs,
inputs, secrets,
... ...
}: }:
let let
ip = "192.168.1.177"; ip = "192.168.1.177";
gateway = "192.168.1.1"; gateway = "192.168.1.1";
username = "homelab"; username = "homelab";
secrets = builtins.toString inputs.nix-secrets;
in in
{ {
# setting up networking!! # setting up networking!!