gold: add gold as a standalone home manager config

This commit is contained in:
Xinyang Li 2023-07-21 07:03:59 +00:00
parent ec6476d470
commit 9d4decff9c
5 changed files with 80 additions and 5 deletions

View file

@ -17,6 +17,24 @@
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1689068808,
"narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"locked": {
"lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
@ -31,7 +49,7 @@
"type": "github"
}
},
"flake-utils_2": {
"flake-utils_3": {
"locked": {
"lastModified": 1638122382,
"narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=",
@ -69,7 +87,7 @@
"nix-vscode-extensions": {
"inputs": {
"flake-compat": "flake-compat",
"flake-utils": "flake-utils",
"flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs"
},
"locked": {
@ -88,7 +106,7 @@
},
"nixos-cn": {
"inputs": {
"flake-utils": "flake-utils_2",
"flake-utils": "flake-utils_3",
"nixpkgs": [
"nixpkgs"
]
@ -220,6 +238,7 @@
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"home-manager": "home-manager",
"nix-vscode-extensions": "nix-vscode-extensions",
"nixos-cn": "nixos-cn",
@ -248,6 +267,21 @@
"repo": "sops-nix",
"type": "github"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",

View file

@ -22,6 +22,8 @@
sops-nix.url = "github:Mic92/sops-nix";
nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions";
flake-utils.url = "github:numtide/flake-utils";
};
@ -70,6 +72,7 @@
];
};
images.raspite = (mkNixos {
system = "aarch64-linux";
modules = [
@ -83,5 +86,13 @@
}
];
}).config.system.build.sdImage;
} //
(with flake-utils.lib; (eachSystem defaultSystems (system:
let pkgs = import nixpkgs { inherit system; }; in
{
packages = {
homeConfigurations."xin" = import ./home/xin/gold { inherit home-manager pkgs; };
};
}
)));
}

View file

@ -15,5 +15,20 @@
src = fishPlugins.hydro.src;
}
];
interactiveShellInit = ''
fish_config theme choose 'ayu Dark'
fish_config prompt choose arrow
${pkgs.nix-your-shell}/bin/nix-your-shell fish | source
function fish_right_prompt
if test -n "$IN_NIX_SHELL"
echo -n "<nix-shell>"
else if test $SHLVL -ge 3
echo -n "<🚀lv$SHLVL>"
end
end
'';
functions = {
gitignore = "curl -sL https://www.gitignore.io/api/$argv";
};
};
}

15
home/xin/gold/default.nix Normal file
View file

@ -0,0 +1,15 @@
{ pkgs, home-manager, ... }:
home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [
../common
{
home.username = "xin";
home.homeDirectory = "/home/xin";
home.stateVersion = "23.05";
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
}
];
}