ssh service and npins update

This commit is contained in:
boyreau 2026-08-30 18:18:59 +02:00
commit 70839731e1
4 changed files with 23 additions and 20 deletions

View file

@ -6,6 +6,7 @@
/etc/nixos/modules/nix.nix /etc/nixos/modules/nix.nix
/etc/nixos/modules/tailscale.nix /etc/nixos/modules/tailscale.nix
/etc/nixos/modules/ssl.nix /etc/nixos/modules/ssl.nix
/etc/nixos/modules/ssh.nix
./hardware-configuration.nix ./hardware-configuration.nix
./users.nix ./users.nix
@ -18,17 +19,6 @@
"/nix/var/nix/profiles/per-user/root/channels" "/nix/var/nix/profiles/per-user/root/channels"
]; ];
services.openssh.enable = true;
services.openssh.listenAddresses = [
{
addr = "0.0.0.0";
port = 22;
}
];
services.openssh.ports = [ 22 ];
services.openssh.settings.PermitRootLogin = "yes";
services.openssh.settings.AllowUsers = [ "root" ];
networking.hostName = "pepere"; networking.hostName = "pepere";
networking.networkmanager.enable = true; networking.networkmanager.enable = true;

View file

@ -17,6 +17,7 @@ in
/etc/nixos/modules/ssl.nix /etc/nixos/modules/ssl.nix
/etc/nixos/modules/tailscale.nix /etc/nixos/modules/tailscale.nix
/etc/nixos/modules/backup /etc/nixos/modules/backup
/etc/nixos/modules/ssh.nix
# machine-specific config # machine-specific config
./bootloader.nix ./bootloader.nix

12
modules/ssh.nix Normal file
View file

@ -0,0 +1,12 @@
{
services.openssh.enable = true;
services.openssh.ports = [ 22 ];
services.openssh.settings.PermitRootLogin = "yes";
services.openssh.settings.AllowUsers = [ "root" ];
# Firewall
services.openssh.openFirewall = false;
networking.firewall.interfaces."tailscale0".allowedTCPPorts = [
22
];
}

View file

@ -9,9 +9,9 @@
}, },
"branch": "release-26.05", "branch": "release-26.05",
"submodules": false, "submodules": false,
"revision": "d4fd24667c8cbef124bb70a20380cab75ec8474d", "revision": "173b7e8d40fdc8c296a9c99854314f17a3a1704c",
"url": "https://github.com/nix-community/home-manager/archive/d4fd24667c8cbef124bb70a20380cab75ec8474d.tar.gz", "url": "https://github.com/nix-community/home-manager/archive/173b7e8d40fdc8c296a9c99854314f17a3a1704c.tar.gz",
"hash": "sha256-Rgs2xKnGLFWQscxUaXX07oyZeuMDOHEbqDOsgliLFGM=" "hash": "sha256-YbRcLdU/yK4gWsQg7V8WTKZHfXL33g8+wSFUX3wyevs="
}, },
"jail.nix": { "jail.nix": {
"type": "Git", "type": "Git",
@ -34,9 +34,9 @@
}, },
"branch": "release", "branch": "release",
"submodules": false, "submodules": false,
"revision": "e2c327cc00fd5243685fee69e90e4c7eb2f6e8ba", "revision": "c9a4fc582b213bfc8cc9068302c7ad72abc36c7c",
"url": "https://github.com/xddxdd/nix-cachyos-kernel/archive/e2c327cc00fd5243685fee69e90e4c7eb2f6e8ba.tar.gz", "url": "https://github.com/xddxdd/nix-cachyos-kernel/archive/c9a4fc582b213bfc8cc9068302c7ad72abc36c7c.tar.gz",
"hash": "sha256-bh1OUi/3AMR7hytDwhQL+FMr/MklvjcJrlp5ijJKtJw=" "hash": "sha256-k6HoyMr33AtlCxdxEmq15uLbwosj1KNxN/H2DYlFrwg="
}, },
"nixpkgs": { "nixpkgs": {
"type": "Tarball", "type": "Tarball",
@ -52,9 +52,9 @@
}, },
"branch": "master", "branch": "master",
"submodules": false, "submodules": false,
"revision": "f1406619a3884cd5c47992a70b8b35c9c0fcb4c9", "revision": "a8627b21b9107c5711c96b84f32a9a4b3d45295f",
"url": "https://github.com/Mic92/sops-nix/archive/f1406619a3884cd5c47992a70b8b35c9c0fcb4c9.tar.gz", "url": "https://github.com/Mic92/sops-nix/archive/a8627b21b9107c5711c96b84f32a9a4b3d45295f.tar.gz",
"hash": "sha256-aCWC8ngycU7OdJrU2+Je3qf+1a2ykuBvpPhZT/9tXMc=" "hash": "sha256-gkig4nPi1CWc4Z50GBsjE4ygSE7hMpl/TwID2an2Cck="
} }
}, },
"version": 7 "version": 7