base configuration
This commit is contained in:
9
lib/ldap.nix
Normal file
9
lib/ldap.nix
Normal file
@ -0,0 +1,9 @@
|
||||
{ lib, ... }:
|
||||
|
||||
{
|
||||
mkUserGroupOption = lib.mkOption {
|
||||
type = with lib.types; nullOr str;
|
||||
default = null;
|
||||
description = lib.mdDoc "Restrict logins to users in this group";
|
||||
};
|
||||
}
|
11
lib/modules.nix
Normal file
11
lib/modules.nix
Normal file
@ -0,0 +1,11 @@
|
||||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
mkOpinionatedOption = text: lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = config.opinionatedDefaults;
|
||||
description = lib.mdDoc "Whether to ${text}.";
|
||||
};
|
||||
|
||||
mkRecursiveDefault = lib.mapAttrsRecursive (_: lib.mkDefault);
|
||||
}
|
8
lib/nix.nix
Normal file
8
lib/nix.nix
Normal file
@ -0,0 +1,8 @@
|
||||
{ lib, ... }:
|
||||
|
||||
{
|
||||
# taken from https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/misc/nix-daemon.nix#L828-L832
|
||||
# a builder can run code for `gcc.arch` and inferior architectures
|
||||
gcc-system-features = arch: [ "gccarch-${arch}" ]
|
||||
++ map (x: "gccarch-${x}") lib.systems.architectures.inferiors.${arch};
|
||||
}
|
10
lib/ssh.nix
Normal file
10
lib/ssh.nix
Normal file
@ -0,0 +1,10 @@
|
||||
_:
|
||||
|
||||
{
|
||||
mkPubKey = name: type: publicKey: {
|
||||
"${name}-${type}" = {
|
||||
extraHostNames = [ name ];
|
||||
publicKey = "${type} ${publicKey}";
|
||||
};
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user