Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sudosubin/home-manager-secrets
Secrets management for nix home-manager
https://github.com/sudosubin/home-manager-secrets
home-manager nix nixos
Last synced: 3 months ago
JSON representation
Secrets management for nix home-manager
- Host: GitHub
- URL: https://github.com/sudosubin/home-manager-secrets
- Owner: sudosubin
- License: mit
- Created: 2022-01-31T18:17:12.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-04-12T00:05:09.000Z (10 months ago)
- Last Synced: 2024-04-13T22:07:33.456Z (10 months ago)
- Topics: home-manager, nix, nixos
- Language: Nix
- Homepage:
- Size: 37.1 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# home-manager-secrets
`home-manager-secrets` is a [home-manager](https://github.com/nix-community/home-manager) module for managing secret files.
## Installation
```nix
# flake.nix
{
inputs = {
nixpkgs = {
url = "github:nixos/nixpkgs/nixpkgs-unstable";
};home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};home-manager-secrets = {
url = "github:sudosubin/home-manager-secrets";
# inputs.nixpkgs.follows = "nixpkgs";
};
};outputs = { self, nixpkgs, home-manager, home-manager-secrets, ...}: {
homeConfigurations = {
jdoe = home-manager.lib.homeManagerConfiguration {
system = "x86_64-linux";
homeDirectory = "/home/jdoe";
username = "jdoe";
configuration.imports = [
home-manager-secrets.homeManagerModules.home-manager-secrets
./home.nix
];
};
};
};
}
```## Usages
There are [more options](./docs/OPTIONS.md) available.
```nix
{ config, ... }:{
secrets.identityPaths = [ "${config.home.homeDirectory}/.ssh/id_ed25519" ];secrets.file = {
"foo/bar.txt" = {
path = "foo-bar-txt";
source = ./files/bar.txt.age;
symlinks = [ "${config.xdg.configHome}/foo/bar.txt" ];
};
};
}
```## Credits
This project was written with a lot of influence from [agenix](https://github.com/ryantm/agenix), [agenix#58](https://github.com/ryantm/agenix/pull/58), [homeage](https://github.com/jordanisaacs/homeage).