refactor secrets

This commit is contained in:
Adithya 2023-07-01 17:45:08 +05:30
parent b1192bf17a
commit d6b94213d4
Signed by: adtya
GPG key ID: 48FC9915FFD326D0
6 changed files with 21 additions and 14 deletions

View file

@ -3,7 +3,7 @@
secrets,
...
}: let
user = (import ../../secrets.nix).users;
user = secrets.users;
in {
users.mutableUsers = false;
users.users = {

View file

@ -34,7 +34,7 @@
lanzaboote,
nixneovimplugins,
} @ inputs: let
user = (import ./secrets.nix).users;
secrets = import ./secrets.nix;
in {
formatter."x86_64-linux" = nixpkgs.legacyPackages."x86_64-linux".alejandra;
nixosConfigurations = {
@ -47,7 +47,7 @@
};
overlays = [(import ./packages) nixneovimplugins.overlays.default];
};
specialArgs = inputs;
specialArgs = inputs // {inherit secrets;};
modules = [
{
system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev;
@ -64,7 +64,8 @@
home-manager = {
useUserPackages = true;
useGlobalPkgs = true;
users.${user.primary.userName} = {pkgs, ...}: {
extraSpecialArgs = {inherit secrets;};
users.${secrets.users.primary.userName} = {pkgs, ...}: {
imports = [
impermanence.nixosModules.home-manager.impermanence
./home
@ -82,7 +83,7 @@
allowUnfree = true;
};
};
specialArgs = inputs;
specialArgs = inputs // {inherit secrets;};
modules = [
{
system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev;

View file

@ -1,5 +1,9 @@
{pkgs, ...}: let
user = (import ../../secrets.nix).users;
{
pkgs,
secrets,
...
}: let
user = secrets.users;
in {
programs.git = {
enable = true;

View file

@ -1,6 +1,4 @@
{...}: let
secrets = import ../../../secrets.nix;
in {
{secrets, ...}: {
services.caddy = {
enable = true;
email = secrets.caddy_config.email;

View file

@ -1,5 +1,9 @@
{pkgs, ...}: let
frp_config = (import ../../../secrets.nix).frp_config;
{
pkgs,
secrets,
...
}: let
frp_config = secrets.frp_config;
in {
systemd.services.frpc = {
enable = true;

View file

@ -1,5 +1,5 @@
{ ... }: let
user = (import ../../../secrets.nix).users;
{secrets, ...}: let
user = secrets.users;
in {
imports = [
./dbus.nix