Merge pull request #44 from wi11-holdsworth/enhancement/37
enhancement/37
This commit is contained in:
commit
ca3a986b4d
6 changed files with 32 additions and 6 deletions
|
|
@ -25,7 +25,19 @@
|
||||||
|
|
||||||
networking.hostName = "${hostName}";
|
networking.hostName = "${hostName}";
|
||||||
|
|
||||||
services.openssh.enable = true;
|
# hardened openssh
|
||||||
|
services.openssh = {
|
||||||
|
passwordAuthentication = false;
|
||||||
|
allowSFTP = false;
|
||||||
|
challengeResponseAuthentication = false;
|
||||||
|
extraConfig = ''
|
||||||
|
AllowTcpForwarding yes
|
||||||
|
X11Forwarding no
|
||||||
|
AllowAgentForwarding no
|
||||||
|
AllowStreamLocalForwarding no
|
||||||
|
AuthenticationMethods publickey
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
system.stateVersion = "24.11";
|
system.stateVersion = "24.11";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,8 +13,7 @@
|
||||||
"localisation"
|
"localisation"
|
||||||
"network"
|
"network"
|
||||||
"nh"
|
"nh"
|
||||||
"nix-settings"
|
"nix"
|
||||||
"nixpkgs"
|
|
||||||
"nixvim"
|
"nixvim"
|
||||||
"syncthing"
|
"syncthing"
|
||||||
"systemd-boot"
|
"systemd-boot"
|
||||||
|
|
|
||||||
|
|
@ -6,5 +6,6 @@
|
||||||
networking = {
|
networking = {
|
||||||
hostName = "${hostName}";
|
hostName = "${hostName}";
|
||||||
networkmanager.enable = true;
|
networkmanager.enable = true;
|
||||||
|
firewall.enable = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,14 @@
|
||||||
{
|
{
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
# rip out default packages
|
||||||
|
environment.defaultPackages = lib.mkForce [ ];
|
||||||
|
|
||||||
|
# allow packages with non-free licenses
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
gc = {
|
gc = {
|
||||||
automatic = true;
|
automatic = true;
|
||||||
|
|
@ -11,6 +21,7 @@
|
||||||
persistent = true;
|
persistent = true;
|
||||||
};
|
};
|
||||||
settings = {
|
settings = {
|
||||||
|
allowed-users = [ "@wheel" ];
|
||||||
experimental-features = [
|
experimental-features = [
|
||||||
"nix-command"
|
"nix-command"
|
||||||
"flakes"
|
"flakes"
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
{
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
}
|
|
||||||
6
modules/nixos/features/sudo.nix
Normal file
6
modules/nixos/features/sudo.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
security.sudo.execWheelOnly = true;
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue