feat: modify wsl config
This commit is contained in:
@@ -1,9 +1,11 @@
|
|||||||
keys:
|
keys:
|
||||||
- &imxyy-nix age1jf5pg2x6ta8amj40xdy0stvcvrdlkwc2nrwtmkpymu0qclk0eg5qmm9kns
|
- &imxyy-nix age1jf5pg2x6ta8amj40xdy0stvcvrdlkwc2nrwtmkpymu0qclk0eg5qmm9kns
|
||||||
- &imxyy-nix-server age1hpgg6psejh4y6jcdd34wxuml75fnweqpe0kh8376yqsctsfn9qxs037kk6
|
- &imxyy-nix-server age1hpgg6psejh4y6jcdd34wxuml75fnweqpe0kh8376yqsctsfn9qxs037kk6
|
||||||
|
- &imxyy-cloudwin age1tp7th3rrv3x0l6jl76n0hjqjp223w2y586pkgr0hcjwdm254jd5shkj6a8
|
||||||
creation_rules:
|
creation_rules:
|
||||||
- path_regex: secrets/.*\.(yaml|toml|json|env|dae|txt)$
|
- path_regex: secrets/.*\.(yaml|toml|json|env|dae|txt)$
|
||||||
key_groups:
|
key_groups:
|
||||||
- age:
|
- age:
|
||||||
- *imxyy-nix
|
- *imxyy-nix
|
||||||
- *imxyy-nix-server
|
- *imxyy-nix-server
|
||||||
|
- *imxyy-cloudwin
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
{ ... }:
|
{ username, ... }:
|
||||||
{
|
{
|
||||||
my.home.programs.zsh.shellAliases = {
|
my.home.programs.zsh.shellAliases = {
|
||||||
localproxy_on = "export http_proxy=http://192.168.128.1:7890 https_proxy=http://192.168.128.1:7890 all_proxy=socks://192.168.128.1:7890";
|
localproxy_on = "export http_proxy=http://192.168.128.1:7890 https_proxy=http://192.168.128.1:7890 all_proxy=socks://192.168.128.1:7890";
|
||||||
};
|
};
|
||||||
my = {
|
my = {
|
||||||
|
sops.sshKeyPath = "/home/${username}/.ssh/id_ed25519";
|
||||||
coding.all.enable = true;
|
coding.all.enable = true;
|
||||||
cmd.misc.enable = true;
|
cmd.misc.enable = true;
|
||||||
xdg.enable = true;
|
xdg.enable = true;
|
||||||
cmd.media.all.enable = true;
|
cmd.media.all.enable = true;
|
||||||
desktop.media.all.enable = true;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,4 +14,7 @@
|
|||||||
PasswordAuthentication = true;
|
PasswordAuthentication = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# fix vscode remote
|
||||||
|
programs.nix-ld.enable = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,24 +1,34 @@
|
|||||||
{
|
{
|
||||||
|
lib,
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
|
||||||
username,
|
username,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
lib.my.makeSwitch {
|
let
|
||||||
inherit config;
|
cfg = config.my.sops;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.my.sops = {
|
||||||
|
enable = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
optionName = "sops secret settings";
|
};
|
||||||
optionPath = [ "sops" ];
|
sshKeyPath = lib.mkOption {
|
||||||
config' = {
|
type = lib.types.str;
|
||||||
|
default = "/persistent/home/${username}/.ssh/id_ed25519";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
sops.age.sshKeyPaths = [
|
sops.age.sshKeyPaths = [
|
||||||
"/persistent/home/${username}/.ssh/id_ed25519"
|
cfg.sshKeyPath
|
||||||
];
|
];
|
||||||
users.users.${username}.extraGroups = [ "keys" ];
|
users.users.${username}.extraGroups = [ "keys" ];
|
||||||
environment.variables.SOPS_AGE_KEY_FILE = "/run/secrets.d/age-keys.txt";
|
environment.variables.SOPS_AGE_KEY_FILE = "/run/secrets.d/age-keys.txt";
|
||||||
my.home = {
|
my.home = {
|
||||||
sops.age.sshKeyPaths = [
|
sops.age.sshKeyPaths = [
|
||||||
"/persistent/home/${username}/.ssh/id_ed25519"
|
cfg.sshKeyPath
|
||||||
];
|
];
|
||||||
home.packages = [
|
home.packages = [
|
||||||
pkgs.sops
|
pkgs.sops
|
||||||
|
|||||||
Reference in New Issue
Block a user