Skip to content

Commit

Permalink
base: sshd defaults, cert-viewer, other defaults, upgrade deps
Browse files Browse the repository at this point in the history
  • Loading branch information
mkg20001 committed Mar 22, 2024
1 parent 7e937a7 commit 7ec7e54
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
6 changes: 3 additions & 3 deletions flake.lock

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

3 changes: 2 additions & 1 deletion modules/base-tools.nix
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,6 @@
# added in nixos
sysz
iftop
] ++ (if pkgs ? "cert-viewer" then [ pkgs.cert-viewer ] else []);
cert-viewer
];
}
5 changes: 5 additions & 0 deletions modules/defaults/base/sshd.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,10 @@ with lib;
UseDns = false;
UsePAM = mkDefault true;
};

# https://gitlab.com/gitlab-org/gitlab-foss/-/blob/master/doc/user/gitlab_com/index.md#ssh-host-keys-fingerprints
knownHosts."gitlab.com".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAfuCHKVTjquxvt6CM6tdG4SLp1Btn/nOeHHE5UOzRdf";
# https://github.blog/2021-09-01-improving-git-protocol-security-github/#new-host-keys
knownHosts."github.com".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl";
};
}
2 changes: 2 additions & 0 deletions modules/defaults/misc.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
security.sudo.enable = false;
users.mutableUsers = false;
networking.useDHCP = true;
boot.initrd.systemd.enable = true;

# todo: su exec only possible in root group

# firewall
networking.firewall.enable = true;
networking.nftables.enable = true;
networking.nftables.flushRuleset = false;

# lock-out protection
networking.firewall.allowedTCPPorts = [ 22 ];
Expand Down

0 comments on commit 7ec7e54

Please sign in to comment.