mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
Clean up and SSH hardening partially.
This commit is contained in:
parent
f808f1b2fa
commit
c35d6120f0
1 changed files with 24 additions and 16 deletions
|
|
@ -6,33 +6,41 @@ let
|
||||||
in {
|
in {
|
||||||
imports = [ ../../modules ../users (sources.home-manager + "/nixos") ];
|
imports = [ ../../modules ../users (sources.home-manager + "/nixos") ];
|
||||||
|
|
||||||
nix.nixPath = [
|
|
||||||
"nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos"
|
|
||||||
"nixpkgs-unstable=${sources.nixpkgs-unstable}"
|
|
||||||
"nixpkgs-mozilla=${sources.nixpkgs-mozilla}"
|
|
||||||
"arc=${sources.arc-nixexprs}"
|
|
||||||
];
|
|
||||||
|
|
||||||
#boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
|
#boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
|
||||||
#boot.kernelParams = [ "quiet" ];
|
#boot.kernelParams = [ "quiet" ];
|
||||||
|
|
||||||
nixpkgs.config = { allowUnfree = true; };
|
nixpkgs.config = { allowUnfree = true; };
|
||||||
|
nix = {
|
||||||
|
nixPath = [
|
||||||
|
"nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos"
|
||||||
|
"nixpkgs-unstable=${sources.nixpkgs-unstable}"
|
||||||
|
"nixpkgs-mozilla=${sources.nixpkgs-mozilla}"
|
||||||
|
"arc=${sources.arc-nixexprs}"
|
||||||
|
];
|
||||||
|
gc.automatic = lib.mkDefault true;
|
||||||
|
gc.options = lib.mkDefault "--delete-older-than 1w";
|
||||||
|
trustedUsers = [ "root" "@wheel" ];
|
||||||
|
};
|
||||||
|
|
||||||
services.journald.extraConfig = "SystemMaxUse=512M";
|
services.journald.extraConfig = "SystemMaxUse=512M";
|
||||||
nix.gc.automatic = lib.mkDefault true;
|
|
||||||
nix.gc.options = lib.mkDefault "--delete-older-than 1w";
|
|
||||||
nix.trustedUsers = [ "root" "@wheel" ];
|
|
||||||
environment.variables = {
|
environment.variables = {
|
||||||
EDITOR = "emacs";
|
EDITOR = "emacs";
|
||||||
TERMINFO_DIRS = "${pkgs.kitty.terminfo.outPath}/share/terminfo";
|
TERMINFO_DIRS = "${pkgs.kitty.terminfo.outPath}/share/terminfo";
|
||||||
};
|
};
|
||||||
|
|
||||||
services.openssh.enable = true;
|
services.openssh = {
|
||||||
services.openssh.ports = lib.mkDefault [ 62954 ];
|
enable = true;
|
||||||
services.openssh.passwordAuthentication = false;
|
ports = lib.mkDefault [ 62954 ];
|
||||||
services.openssh.challengeResponseAuthentication = false;
|
passwordAuthentication = false;
|
||||||
services.openssh.permitRootLogin = lib.mkDefault "prohibit-password";
|
challengeResponseAuthentication = false;
|
||||||
services.openssh.extraConfig = "StreamLocalBindUnlink yes";
|
permitRootLogin = lib.mkDefault "prohibit-password";
|
||||||
|
kexAlgorithms = [ "curve25519-sha256@libssh.org" ];
|
||||||
|
extraConfig = ''
|
||||||
|
StreamLocalBindUnlink yes
|
||||||
|
LogLevel VERBOSE
|
||||||
|
'';
|
||||||
|
};
|
||||||
security.sudo.wheelNeedsPassword = lib.mkForce false;
|
security.sudo.wheelNeedsPassword = lib.mkForce false;
|
||||||
|
|
||||||
i18n.defaultLocale = "en_GB.UTF-8";
|
i18n.defaultLocale = "en_GB.UTF-8";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue