chore: nix fmt
This commit is contained in:
parent
a80bd4ed3b
commit
7266fff06e
128 changed files with 3402 additions and 2013 deletions
|
@ -1,7 +1,11 @@
|
|||
{ pkgs
|
||||
, lib
|
||||
, config
|
||||
, ... }: with lib; let
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.global.auth;
|
||||
pub = lib.pipe ./pub [
|
||||
builtins.readDir
|
||||
|
@ -10,9 +14,12 @@
|
|||
(foldr (payload: keys: (splitString "\n" payload) ++ keys) [ ])
|
||||
(foldr (candidate: keys: keys ++ (if candidate == "" then [ ] else [ candidate ])) [ ])
|
||||
];
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.global.auth = {
|
||||
enable = mkEnableOption "identity authentication in various software" // { default = true; };
|
||||
enable = mkEnableOption "identity authentication in various software" // {
|
||||
default = true;
|
||||
};
|
||||
openssh = {
|
||||
enable = mkEnableOption "openssh server";
|
||||
password = mkEnableOption "password authentication";
|
||||
|
@ -42,10 +49,13 @@ in {
|
|||
settings.PasswordAuthentication = cfg.openssh.password;
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 1300 ] ++ # utility port
|
||||
optional (cfg.openssh.enable && (cfg.openssh.port != null)) cfg.openssh.port;
|
||||
networking.firewall.allowedTCPPorts =
|
||||
[ 1300 ]
|
||||
# utility port
|
||||
++ optional (cfg.openssh.enable && (cfg.openssh.port != null)) cfg.openssh.port;
|
||||
|
||||
environment.persistence."/nix/persist/fhs".directories = [ ] ++
|
||||
optional cfg.openssh.enable "/etc/ssh";
|
||||
environment.persistence."/nix/persist/fhs".directories =
|
||||
[ ]
|
||||
++ optional cfg.openssh.enable "/etc/ssh";
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue