mirror of
https://github.com/JulienMalka/snowfield.git
synced 2025-03-27 06:10:53 +01:00
Sending people to ssh jail
This commit is contained in:
parent
8e4ddf4ef0
commit
3bce60caa4
3 changed files with 42 additions and 0 deletions
38
lib/default.nix
Normal file
38
lib/default.nix
Normal file
|
@ -0,0 +1,38 @@
|
|||
{ nixpkgs, home-manager, sops-nix, nixpkgs-unstable, inputs }:
|
||||
with builtins;
|
||||
|
||||
let
|
||||
overlay-unstable = final: prev: {
|
||||
unstable = nixpkgs-unstable.legacyPackages.x86_64-linux;
|
||||
};
|
||||
in
|
||||
{
|
||||
|
||||
mkMachine = host: host-config: modules: nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = {
|
||||
inherit inputs;
|
||||
};
|
||||
modules = builtins.attrValues modules ++ [
|
||||
./base.nix
|
||||
sops-nix.nixosModules.sops
|
||||
host-config
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useUserPackages = true;
|
||||
nixpkgs.overlays = [
|
||||
inputs.neovim-nightly-overlay.overlay
|
||||
overlay-unstable
|
||||
(final: prev:
|
||||
{
|
||||
tinystatus = prev.pkgs.callPackage ./packages/tinystatus {};
|
||||
mosh = prev.pkgs.callPackage ./packages/mosh {};
|
||||
})
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
importConfig = with builtins; path: (mapAttrs (name: value: import (path + "/${name}/default.nix")) (readDir path));
|
||||
|
||||
}
|
|
@ -34,6 +34,8 @@
|
|||
|
||||
nix.maxJobs = lib.mkDefault 4;
|
||||
|
||||
services.fail2ban.enable = true;
|
||||
|
||||
networking.hostName = "lisa";
|
||||
networking.interfaces.ens18.useDHCP = true;
|
||||
networking.interfaces.ens19.useDHCP = false;
|
||||
|
|
|
@ -21,6 +21,8 @@ in
|
|||
networking.interfaces.enp2s0f0.useDHCP = true;
|
||||
networking.interfaces.enp2s0f1.useDHCP = true;
|
||||
|
||||
services.fail2ban.enable = true;
|
||||
|
||||
services.zfs.autoSnapshot.enable = true;
|
||||
services.zfs.autoScrub.enable = true;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue