mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-04-21 00:11:26 +02:00
feat: simplify flake.nix
This commit is contained in:
@@ -1,7 +1,12 @@
|
||||
|
||||
{ config, pkgs, agenix, mysecrets, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
agenix,
|
||||
mysecrets,
|
||||
|
||||
username,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
agenix.darwinModules.default
|
||||
];
|
||||
@@ -11,8 +16,8 @@
|
||||
];
|
||||
|
||||
# if you changed this key, you need to regenerate all encrypt files from the decrypt contents!
|
||||
age.identityPaths = [
|
||||
"/Users/ryan/.ssh/juliet-age" # macOS
|
||||
age.identityPaths = [
|
||||
"/Users/${username}/.ssh/juliet-age" # macOS
|
||||
];
|
||||
|
||||
age.secrets = {
|
||||
@@ -31,7 +36,7 @@
|
||||
|
||||
# place secrets in /etc/
|
||||
environment.etc = {
|
||||
# wireguard config used with `wg-quick up wg-business`
|
||||
# wireguard config used with `wg-quick up wg-business`
|
||||
# Fix DNS for WireGuard on macOS: https://github.com/ryan4yin/nix-config/issues/5
|
||||
"wireguard/wg-business.conf" = {
|
||||
source = config.age.secrets."wg-business.conf".path;
|
||||
@@ -39,7 +44,7 @@
|
||||
|
||||
# The following secrets are used by home-manager modules
|
||||
# But nix-darwin doesn't support environment.etc.<name>.mode
|
||||
# So we need to change its mode manually
|
||||
# So we need to change its mode manually
|
||||
"agenix/alias-for-work.nushell" = {
|
||||
source = config.age.secrets."alias-for-work.nushell".path;
|
||||
};
|
||||
@@ -56,5 +61,4 @@
|
||||
system.activationScripts.postUserActivation.text = ''
|
||||
sudo chmod 644 /etc/agenix/*
|
||||
'';
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
|
||||
{ config, pkgs, agenix, mysecrets, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
agenix,
|
||||
mysecrets,
|
||||
|
||||
username,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
agenix.nixosModules.default
|
||||
];
|
||||
@@ -11,8 +16,8 @@
|
||||
];
|
||||
|
||||
# if you changed this key, you need to regenerate all encrypt files from the decrypt contents!
|
||||
age.identityPaths = [
|
||||
"/home/ryan/.ssh/juliet-age" # Linux
|
||||
age.identityPaths = [
|
||||
"/home/${username}/.ssh/juliet-age" # Linux
|
||||
];
|
||||
|
||||
# Used only by NixOS Modules
|
||||
@@ -37,7 +42,7 @@
|
||||
|
||||
# place secrets in /etc/
|
||||
environment.etc = {
|
||||
# wireguard config used with `wg-quick up wg-business`
|
||||
# wireguard config used with `wg-quick up wg-business`
|
||||
"wireguard/wg-business.conf" = {
|
||||
source = config.age.secrets."wg-business.conf".path;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user