Added mosh module

This commit is contained in:
Julien Malka 2021-12-25 16:37:08 +01:00
parent 43fe8ad54f
commit 8103e8e236
No known key found for this signature in database
GPG key ID: 3C68E13964FEA07F
5 changed files with 31 additions and 18 deletions

View file

@ -6,6 +6,7 @@
./users/default.nix
./users/julien.nix
];
luj.nix.enable = true;
luj.secrets.enable = true;
luj.ssh-server.enable = true;
@ -21,7 +22,7 @@
};
programs.mosh.enable = true;
luj.programs.mosh.enable = true;
programs.gnupg.agent.enable = true;
environment.systemPackages = with pkgs; [
@ -34,5 +35,4 @@
environment.variables.EDITOR = "nvim";
}

View file

@ -11,16 +11,18 @@
./home-julien.nix
];
luj.mediaserver.enable = true;
luj.homepage.enable = true;
luj.drone = {
enable = true;
nginx = {
luj = {
mediaserver.enable = true;
homepage.enable = true;
drone = {
enable = true;
subdomain = "ci";
nginx = {
enable = true;
subdomain = "ci";
};
};
};
nix.maxJobs = lib.mkDefault 8;
networking.hostName = "lisa"; # Define your hostname.
@ -30,10 +32,7 @@
address = "2a01:e0a:5f9:9681:5880:c9ff:fe9f:3dfb";
prefixLength = 120;
}];
networking.firewall.allowedTCPPorts = [ 22 80 443 8096 8920 ];
networking.firewall.allowedUDPPorts = [ 22 80 443 1900 7359 ];
networking.firewall.allowedUDPPortRanges = [{ from = 60000; to = 61000; }];
networking.firewall.allowedTCPPorts = [ 80 443 8096 8920 ];
networking.firewall.allowedUDPPorts = [ 80 443 1900 7359 ];
system.stateVersion = "20.09"; # Did you read the comment?
}

View file

@ -28,7 +28,6 @@
keyMap = "fr";
};
nixpkgs.config.allowUnfree = true;
hardware.trackpoint = {
enable = true;

View file

@ -23,9 +23,8 @@ in
networking.interfaces.enp2s0f0.useDHCP = true;
networking.interfaces.enp2s0f1.useDHCP = true;
networking.firewall.enable = true;
networking.firewall.allowedTCPPorts = [ 22 80 443 ];
networking.firewall.allowedUDPPorts = [ 22 80 443 ];
networking.firewall.allowedUDPPortRanges = [{ from = 60000; to = 61000; }];
networking.firewall.allowedTCPPorts = [ 80 443 ];
networking.firewall.allowedUDPPorts = [ 80 443 ];
services.zfs.autoSnapshot.enable = true;

16
modules/mosh/default.nix Normal file
View file

@ -0,0 +1,16 @@
{ pkgs, config, lib, inputs, ... }:
let
cfg = config.luj.programs.mosh;
in
with lib;
{
options.luj.programs.mosh = {
enable = mkEnableOption "Enable mosh program";
};
config = mkIf cfg.enable
{
programs.mosh.enable = true;
networking.firewall.allowedUDPPortRanges = [{ from = 60000; to = 61000; }];
};
}