chore: only warn when hostkey is missing

This commit is contained in:
oddlama 2023-03-27 16:58:07 +02:00
parent 6c5d117c1e
commit 0bc49cc3f9
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
9 changed files with 34 additions and 16 deletions

View file

@ -1,3 +1,8 @@
# About
## Stuff
This is my personal nix config. This is my personal nix config.
- Secrets can be created/edited by running `nix run .#edit-secret some/secret.age` - Secrets can be created/edited by running `nix run .#edit-secret some/secret.age`
@ -16,7 +21,7 @@ all commands using these extra parameters, or permanently add the following the
extra-builtins-file = /path/to/nix-config/nix/extra-builtins.nix extra-builtins-file = /path/to/nix-config/nix/extra-builtins.nix
``` ```
# Misc ## Misc
Generate self-signed cert: Generate self-signed cert:

18
flake.lock generated
View file

@ -166,11 +166,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1679480702, "lastModified": 1679756596,
"narHash": "sha256-npuRD61YmxUPitI1TqKwlxLrU6iGl5E+BPT196LgUDo=", "narHash": "sha256-wQp7CoYqREPGssf1F0JKx2A4tScbu3iNgI1kS74ib/8=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "363c46b2480f1b73ec37cf68caac61f5daa82a2e", "rev": "225d1fb77e6c9f9be1ffd65c8e5eb9cf583aa698",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -196,11 +196,11 @@
}, },
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1679224149, "lastModified": 1679598117,
"narHash": "sha256-TSY37Zv0icF/aijR3/KWGLVBlnKKHlG9QTj7vHbF/UU=", "narHash": "sha256-Vs1f/7imI77OkMOQhO3xgx4jalN2Gx3D3C2wmnlpWJM=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "a4bc66709604ab78abc575b60baa6d23ae027a59", "rev": "648021dcb2b65498eed3ea3a7339cdfc3bea4d82",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -211,11 +211,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1679262748, "lastModified": 1679705136,
"narHash": "sha256-DQCrrAFrkxijC6haUzOC5ZoFqpcv/tg2WxnyW3np1Cc=", "narHash": "sha256-MDlZUR7wJ3PlPtqwwoGQr3euNOe0vdSSteVVOef7tBY=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "60c1d71f2ba4c80178ec84523c2ca0801522e0a6", "rev": "8f40f2f90b9c9032d1b824442cfbbe0dbabd0dbd",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -73,7 +73,7 @@ in {
ln -sv ${../../../nix/overlays} $out/overlays ln -sv ${../../../nix/overlays} $out/overlays
''; '';
stateVersion = "22.11"; stateVersion = "23.05";
}; };
systemd = { systemd = {

View file

@ -26,7 +26,11 @@ with nixpkgs.lib; let
}; };
# Setup parameters for Secrets # Setup parameters for Secrets
rekey.forceRekeyOnSystem = "x86_64-linux"; rekey.forceRekeyOnSystem = "x86_64-linux";
rekey.hostPubkey = ../secrets/pubkeys + "/${config.networking.hostName}.pub"; rekey.hostPubkey = let
pubkeyPath = ../hosts + "/${hostName}/secrets/host.pub";
in
mkIf (pathExists pubkeyPath || trace "Missing pubkey for ${hostName}: ${toString pubkeyPath} not found, using dummy replacement key for now." false)
pubkeyPath;
rekey.masterIdentities = self.secrets.masterIdentities; rekey.masterIdentities = self.secrets.masterIdentities;
rekey.extraEncryptionPubkeys = self.secrets.extraEncryptionPubkeys; rekey.extraEncryptionPubkeys = self.secrets.extraEncryptionPubkeys;
}) })

View file

@ -2,13 +2,12 @@
imports = [ imports = [
./modules/uid.nix ./modules/uid.nix
#./atuin.nix
#./bash.nix
#./btop.nix #./btop.nix
./fish.nix #./fish.nix
./git.nix ./git.nix
./htop.nix ./htop.nix
./neovim ./neovim
./nushell.nix
#./ssh.nix #./ssh.nix
./starship.nix ./starship.nix
#./tmux.nix #./tmux.nix
@ -17,7 +16,7 @@
]; ];
home = { home = {
stateVersion = "22.11"; stateVersion = "23.05";
packages = with pkgs; [ packages = with pkgs; [
bandwhich bandwhich
btop btop
@ -26,6 +25,7 @@
neofetch neofetch
rclone rclone
ripgrep ripgrep
rnr
rsync rsync
sd sd
tree tree

9
users/common/nushell.nix Normal file
View file

@ -0,0 +1,9 @@
{
lib,
pkgs,
...
}: {
programs.nushell = {
enable = true;
};
}