refactor secrets
This commit is contained in:
parent
b1192bf17a
commit
d6b94213d4
6 changed files with 21 additions and 14 deletions
|
@ -3,7 +3,7 @@
|
||||||
secrets,
|
secrets,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
user = (import ../../secrets.nix).users;
|
user = secrets.users;
|
||||||
in {
|
in {
|
||||||
users.mutableUsers = false;
|
users.mutableUsers = false;
|
||||||
users.users = {
|
users.users = {
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
lanzaboote,
|
lanzaboote,
|
||||||
nixneovimplugins,
|
nixneovimplugins,
|
||||||
} @ inputs: let
|
} @ inputs: let
|
||||||
user = (import ./secrets.nix).users;
|
secrets = import ./secrets.nix;
|
||||||
in {
|
in {
|
||||||
formatter."x86_64-linux" = nixpkgs.legacyPackages."x86_64-linux".alejandra;
|
formatter."x86_64-linux" = nixpkgs.legacyPackages."x86_64-linux".alejandra;
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
|
@ -47,7 +47,7 @@
|
||||||
};
|
};
|
||||||
overlays = [(import ./packages) nixneovimplugins.overlays.default];
|
overlays = [(import ./packages) nixneovimplugins.overlays.default];
|
||||||
};
|
};
|
||||||
specialArgs = inputs;
|
specialArgs = inputs // {inherit secrets;};
|
||||||
modules = [
|
modules = [
|
||||||
{
|
{
|
||||||
system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev;
|
system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev;
|
||||||
|
@ -64,7 +64,8 @@
|
||||||
home-manager = {
|
home-manager = {
|
||||||
useUserPackages = true;
|
useUserPackages = true;
|
||||||
useGlobalPkgs = true;
|
useGlobalPkgs = true;
|
||||||
users.${user.primary.userName} = {pkgs, ...}: {
|
extraSpecialArgs = {inherit secrets;};
|
||||||
|
users.${secrets.users.primary.userName} = {pkgs, ...}: {
|
||||||
imports = [
|
imports = [
|
||||||
impermanence.nixosModules.home-manager.impermanence
|
impermanence.nixosModules.home-manager.impermanence
|
||||||
./home
|
./home
|
||||||
|
@ -82,7 +83,7 @@
|
||||||
allowUnfree = true;
|
allowUnfree = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
specialArgs = inputs;
|
specialArgs = inputs // {inherit secrets;};
|
||||||
modules = [
|
modules = [
|
||||||
{
|
{
|
||||||
system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev;
|
system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev;
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
{pkgs, ...}: let
|
{
|
||||||
user = (import ../../secrets.nix).users;
|
pkgs,
|
||||||
|
secrets,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
user = secrets.users;
|
||||||
in {
|
in {
|
||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{...}: let
|
{secrets, ...}: {
|
||||||
secrets = import ../../../secrets.nix;
|
|
||||||
in {
|
|
||||||
services.caddy = {
|
services.caddy = {
|
||||||
enable = true;
|
enable = true;
|
||||||
email = secrets.caddy_config.email;
|
email = secrets.caddy_config.email;
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
{pkgs, ...}: let
|
{
|
||||||
frp_config = (import ../../../secrets.nix).frp_config;
|
pkgs,
|
||||||
|
secrets,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
frp_config = secrets.frp_config;
|
||||||
in {
|
in {
|
||||||
systemd.services.frpc = {
|
systemd.services.frpc = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{ ... }: let
|
{secrets, ...}: let
|
||||||
user = (import ../../../secrets.nix).users;
|
user = secrets.users;
|
||||||
in {
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
./dbus.nix
|
./dbus.nix
|
||||||
|
|
Loading…
Reference in a new issue