refactor(hosts): use modules/ssh with sensible defaults
This commit is contained in:
@@ -35,7 +35,7 @@ in
|
|||||||
../../modules/audio
|
../../modules/audio
|
||||||
../../modules/localization
|
../../modules/localization
|
||||||
../../modules/fonts
|
../../modules/fonts
|
||||||
../../modules/ssh/hardened-openssh.nix
|
../../modules/ssh
|
||||||
../../modules/storage
|
../../modules/storage
|
||||||
../../modules/stylix
|
../../modules/stylix
|
||||||
(import ../../modules/secrets { inherit lib inputs config; })
|
(import ../../modules/secrets { inherit lib inputs config; })
|
||||||
@@ -111,16 +111,9 @@ in
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
services = {
|
services.locate = {
|
||||||
locate = {
|
enable = true;
|
||||||
enable = true;
|
package = pkgs.plocate;
|
||||||
package = pkgs.plocate;
|
|
||||||
};
|
|
||||||
|
|
||||||
openssh = {
|
|
||||||
enable = true;
|
|
||||||
harden = true;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ in
|
|||||||
../../modules/users
|
../../modules/users
|
||||||
../../modules/localization
|
../../modules/localization
|
||||||
../../modules/fonts
|
../../modules/fonts
|
||||||
../../modules/ssh/hardened-openssh.nix
|
../../modules/ssh
|
||||||
../../modules/storage
|
../../modules/storage
|
||||||
../../modules/stylix
|
../../modules/stylix
|
||||||
(import ../../modules/secrets { inherit lib inputs config; })
|
(import ../../modules/secrets { inherit lib inputs config; })
|
||||||
@@ -100,10 +100,6 @@ in
|
|||||||
|
|
||||||
services = {
|
services = {
|
||||||
fwupd.enable = true;
|
fwupd.enable = true;
|
||||||
openssh = {
|
|
||||||
enable = true;
|
|
||||||
harden = true;
|
|
||||||
};
|
|
||||||
locate = {
|
locate = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.plocate;
|
package = pkgs.plocate;
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ in
|
|||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./hard.nix
|
./hard.nix
|
||||||
../../modules/ssh/hardened-openssh.nix
|
../../modules/ssh
|
||||||
];
|
];
|
||||||
|
|
||||||
ssh = {
|
ssh = {
|
||||||
@@ -59,13 +59,6 @@ in
|
|||||||
|
|
||||||
security.sudo.wheelNeedsPassword = false;
|
security.sudo.wheelNeedsPassword = false;
|
||||||
|
|
||||||
services = {
|
|
||||||
openssh = {
|
|
||||||
enable = true;
|
|
||||||
harden = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
vim
|
vim
|
||||||
git
|
git
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ in
|
|||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./hard.nix
|
./hard.nix
|
||||||
../../modules/ssh/hardened-openssh.nix
|
../../modules/ssh
|
||||||
];
|
];
|
||||||
|
|
||||||
ssh = {
|
ssh = {
|
||||||
@@ -52,11 +52,6 @@ in
|
|||||||
security.sudo.wheelNeedsPassword = false;
|
security.sudo.wheelNeedsPassword = false;
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
openssh = {
|
|
||||||
enable = true;
|
|
||||||
harden = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
paperless = {
|
paperless = {
|
||||||
enable = true;
|
enable = true;
|
||||||
passwordFile = "/etc/paperless-admin-pass";
|
passwordFile = "/etc/paperless-admin-pass";
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ in
|
|||||||
inputs.disko.nixosModules.disko
|
inputs.disko.nixosModules.disko
|
||||||
../../modules/common
|
../../modules/common
|
||||||
./hard.nix
|
./hard.nix
|
||||||
../../modules/ssh/hardened-openssh.nix
|
../../modules/ssh
|
||||||
../../modules/docker
|
../../modules/docker
|
||||||
../../modules/uptime-kuma
|
../../modules/uptime-kuma
|
||||||
];
|
];
|
||||||
@@ -78,9 +78,4 @@ in
|
|||||||
enable = true;
|
enable = true;
|
||||||
maxretry = 5;
|
maxretry = 5;
|
||||||
};
|
};
|
||||||
|
|
||||||
services.openssh = {
|
|
||||||
enable = true;
|
|
||||||
harden = true;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ in
|
|||||||
../../modules/localization
|
../../modules/localization
|
||||||
../../modules/x
|
../../modules/x
|
||||||
../../modules/fonts
|
../../modules/fonts
|
||||||
../../modules/ssh/hardened-openssh.nix
|
../../modules/ssh
|
||||||
../../modules/storage
|
../../modules/storage
|
||||||
(import ../../modules/secrets {
|
(import ../../modules/secrets {
|
||||||
inherit lib inputs config;
|
inherit lib inputs config;
|
||||||
@@ -63,9 +63,5 @@ in
|
|||||||
services = {
|
services = {
|
||||||
qemuGuest.enable = true;
|
qemuGuest.enable = true;
|
||||||
spice-vdagentd.enable = true;
|
spice-vdagentd.enable = true;
|
||||||
openssh = {
|
|
||||||
enable = true;
|
|
||||||
harden = true;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ let
|
|||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../modules/ssh/hardened-openssh.nix
|
../modules/ssh
|
||||||
];
|
];
|
||||||
|
|
||||||
ssh.username = username;
|
ssh.username = username;
|
||||||
@@ -37,21 +37,5 @@ in
|
|||||||
|
|
||||||
security.sudo.wheelNeedsPassword = false;
|
security.sudo.wheelNeedsPassword = false;
|
||||||
|
|
||||||
services.openssh = {
|
|
||||||
enable = true;
|
|
||||||
harden = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
# sdImage.postBuildCommands =
|
|
||||||
# let
|
|
||||||
# bootloaderPackage = pkgs.ubootOrangePiZero2;
|
|
||||||
# bootloaderSubpath = "/u-boot-sunxi-with-spl.bin";
|
|
||||||
# in
|
|
||||||
# ''
|
|
||||||
# dd if=${bootloaderPackage}${bootloaderSubpath} of=$img \
|
|
||||||
# bs=8 seek=1024 \
|
|
||||||
# conv=notrunc
|
|
||||||
# '';
|
|
||||||
|
|
||||||
system.stateVersion = "26.05";
|
system.stateVersion = "26.05";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ let
|
|||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../modules/ssh/hardened-openssh.nix
|
../modules/ssh
|
||||||
];
|
];
|
||||||
|
|
||||||
ssh.username = username;
|
ssh.username = username;
|
||||||
@@ -60,11 +60,6 @@ in
|
|||||||
|
|
||||||
security.sudo.wheelNeedsPassword = false;
|
security.sudo.wheelNeedsPassword = false;
|
||||||
|
|
||||||
services.openssh = {
|
|
||||||
enable = true;
|
|
||||||
harden = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
libraspberrypi
|
libraspberrypi
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user