feat: 0425 update

This commit is contained in:
2025-04-25 20:50:45 +08:00
parent 2242e26ede
commit dd010c6271
13 changed files with 173 additions and 195 deletions

View File

@@ -29,7 +29,7 @@ lib.my.makeSwitch {
"la"
];
};
initExtra = ''
initContent = ''
source ${pkgs.omz}/share/omz/omz.zsh
'';
sessionVariables = {

View File

@@ -17,14 +17,10 @@ lib.my.makeHomeProgramConfig {
programs.vscode = {
enable = true;
package = pkgs.vscodium;
profiles.default = {
extensions = with pkgs.open-vsx; [
eamodio.gitlens
rust-lang.rust-analyzer
dbaeumer.vscode-eslint
];
};
};
};
my.persist.homeDirs = [
".config/VSCodium"
];
};
}

View File

@@ -17,7 +17,7 @@ lib.my.makeSwitch {
gnumake
github-cli # gh
];
programs.zsh.initExtraFirst = ''
programs.zsh.initContent = ''
source ${./github-cli-comp}
'';
programs.direnv.enable = true;

View File

@@ -10,6 +10,15 @@ in
{
options.my.persist = {
enable = lib.mkEnableOption "persist";
location = lib.mkOption {
type = lib.types.str;
example = lib.literalExpression ''
"/persistent"
'';
description = lib.mdDoc ''
Persistent location
'';
};
homeDirs = lib.mkOption {
type = with lib.types; listOf str;
default = [ ];
@@ -64,7 +73,7 @@ in
config = lib.mkIf cfg.enable {
programs.fuse.userAllowOther = true;
environment.persistence."/persistent" = {
environment.persistence.${cfg.location} = {
hideMounts = true;
directories = cfg.nixosDirs;
files = cfg.nixosFiles;

View File

@@ -16,7 +16,7 @@ in
};
sshKeyPath = lib.mkOption {
type = lib.types.str;
default = "/persistent/home/${username}/.ssh/id_ed25519";
default = "${config.my.persist.location}/home/${username}/.ssh/id_ed25519";
};
};