Skip to content

Commit

Permalink
🚧 Start with secrets. somehow.
Browse files Browse the repository at this point in the history
  • Loading branch information
MathieuDR committed Nov 30, 2024
1 parent f2c28ad commit 70c4022
Show file tree
Hide file tree
Showing 9 changed files with 126 additions and 11 deletions.
2 changes: 2 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
source_up_if_exists
use flake
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
result
.pre-commit-config.yaml
.direnv
16 changes: 14 additions & 2 deletions configuration/nixos/security.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
{self, ...}: {
{
pkgs,
self,
...
}: {
# local caddy certificate
security.pki.certificates = [
# HPI Certificate
(builtins.readFile "${self}/secrets/hpi_ca.crt")
(builtins.readFile "${self}/data/secrets/hpi_ca.crt")
];

programs.gnupg = {
dirmngr.enable = true;
agent = {
enable = true;
pinentryPackage = pkgs.pinentry-curses;
};
};
}
File renamed without changes.
10 changes: 10 additions & 0 deletions data/secrets/secrets.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
let
anchor = "";
all_recipients = [anchor];
in {
# network
"network/beeconnected.age".publicKeys = all_recipients;

# common
"common/gpg.age".publicKeys = all_recipients;
}
98 changes: 90 additions & 8 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
# global, so they can be `.follow`ed
# systems.url = "github:nix-systems/default-linux";

agenix = {
url = "github:ryantm/agenix";
inputs.nixpkgs.follows = "nixpkgs";
};

nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
Expand Down Expand Up @@ -43,7 +48,6 @@
inputs.hyprland.follows = "hyprland";
};

#Personal NIXVIM
yvim = {
url = "github:mathieudr/nixvim";
inputs.nixpkgs.follows = "nixpkgs";
Expand All @@ -65,6 +69,7 @@
perSystem = {
config,
pkgs,
system,
...
}: {
devShells.default = pkgs.mkShell {
Expand All @@ -75,6 +80,7 @@
pkgs.fzf
pkgs.nodePackages.prettier
(config.packages.repl)
(inputs.agenix.packages.${system}.default)
];
name = "dots";
DIRENV_LOG_FORMAT = "";
Expand Down
1 change: 1 addition & 0 deletions home-manager/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
inherit extraSpecialArgs;
modules = [
self.homeManagerModules.default
inputs.agenix.homeManagerModules.default
inputs.catppuccin.homeManagerModules.catppuccin
config.home-manager.shared
./anchor
Expand Down
1 change: 1 addition & 0 deletions hosts/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
inherit inputs self hostname user;
};
modules = [
inputs.agenix.nixosModules.default
self.nixosModules.default
config.nixos.shared
./${hostname}
Expand Down

0 comments on commit 70c4022

Please sign in to comment.