refactor(natu): remove custom Nix linter
This commit was merged in pull request #184.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
}:
|
||||
# Configures Firefox as the desktop browser.
|
||||
let
|
||||
cfg = config.modules.desktop.apps.firefox; # NOLINT(let_order)
|
||||
cfg = config.modules.desktop.apps.firefox;
|
||||
in
|
||||
{
|
||||
options.modules.desktop.apps.firefox = {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
}:
|
||||
# Imports existing ZFS pools that hold durable service state.
|
||||
let
|
||||
cfg = config.modules.host.zfs; # NOLINT(let_order)
|
||||
cfg = config.modules.host.zfs;
|
||||
in
|
||||
{
|
||||
options.modules.host.zfs = {
|
||||
|
||||
@@ -7,19 +7,17 @@
|
||||
# Configures inbound and outbound SSH access.
|
||||
let
|
||||
cfg = config.modules.network.ssh;
|
||||
user = config.user.name; # NOLINT(let_order)
|
||||
user = config.user.name;
|
||||
|
||||
# NOLINT(let_order)
|
||||
workstationNames = [
|
||||
"neogaia"
|
||||
"zeus"
|
||||
];
|
||||
serverNames = [ "pikachu" ];
|
||||
|
||||
isWorkstation = lib.elem config.networking.hostName workstationNames; # NOLINT(let_order)
|
||||
isServer = lib.elem config.networking.hostName serverNames; # NOLINT(let_order)
|
||||
isWorkstation = lib.elem config.networking.hostName workstationNames;
|
||||
isServer = lib.elem config.networking.hostName serverNames;
|
||||
|
||||
# NOLINT(let_order)
|
||||
clientKeyFor = host: builtins.readFile (../../hosts + "/${host}/ssh_user_ed25519_key.pub");
|
||||
hostKeysFor =
|
||||
host:
|
||||
@@ -28,7 +26,6 @@ let
|
||||
(../../hosts + "/${host}/ssh_host_rsa_key.pub")
|
||||
];
|
||||
|
||||
# NOLINT(let_order)
|
||||
managedTargets = lib.genAttrs (workstationNames ++ serverNames) (name: {
|
||||
hostName = registry.address.${name}.self;
|
||||
clientKey = clientKeyFor name;
|
||||
@@ -48,7 +45,6 @@ let
|
||||
};
|
||||
};
|
||||
|
||||
# NOLINT(let_order)
|
||||
mkTarget = name: target: {
|
||||
hostName = target.hostName or name;
|
||||
user = target.user or user;
|
||||
@@ -57,15 +53,14 @@ let
|
||||
clientKey = target.clientKey or null;
|
||||
hostKeys = target.hostKeys or [ ];
|
||||
};
|
||||
targets = lib.mapAttrs mkTarget (managedTargets // extraTargets); # NOLINT(let_order)
|
||||
targets = lib.mapAttrs mkTarget (managedTargets // extraTargets);
|
||||
|
||||
clientKeysFor = names: lib.filter (key: key != null) (map (name: targets.${name}.clientKey) names); # NOLINT(let_order)
|
||||
# NOLINT(let_order)
|
||||
clientKeysFor = names: lib.filter (key: key != null) (map (name: targets.${name}.clientKey) names);
|
||||
defaultAuthorizedKeys = lib.flatten (
|
||||
clientKeysFor workstationNames ++ lib.optional isServer (clientKeysFor serverNames)
|
||||
);
|
||||
|
||||
outboundTargetNames = # NOLINT(let_order)
|
||||
outboundTargetNames =
|
||||
let
|
||||
groupTargets =
|
||||
if isServer then
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
}:
|
||||
# Configures bridges for tagged VLANs on a physical interface that uses DHCP.
|
||||
let
|
||||
cfg = config.modules.network.vlans; # NOLINT(let_order)
|
||||
cfg = config.modules.network.vlans;
|
||||
in
|
||||
{
|
||||
options.modules.network.vlans = {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.modules.network.vpn-client; # NOLINT(let_order)
|
||||
cfg = config.modules.network.vpn-client;
|
||||
|
||||
vpnIcon = util.glyph [
|
||||
"db83"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.modules.services.copyparty; # NOLINT(let_order)
|
||||
cfg = config.modules.services.copyparty;
|
||||
|
||||
accountName = config.user.name;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.modules.services.homepage; # NOLINT(let_order)
|
||||
cfg = config.modules.services.homepage;
|
||||
|
||||
derivedAllowedHosts = lib.unique (
|
||||
lib.optional (selfRoute != null) selfRoute.domain
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.modules.services.navidrome; # NOLINT(let_order)
|
||||
cfg = config.modules.services.navidrome;
|
||||
in
|
||||
{
|
||||
options.modules.services.navidrome = {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
}:
|
||||
# fish for the primary user, configured through home-manager.
|
||||
let
|
||||
cfg = config.modules.shell.fish; # NOLINT(let_order)
|
||||
cfg = config.modules.shell.fish;
|
||||
commandsOf = shortcuts: lib.mapAttrs (_name: shortcut: shortcut.command) shortcuts;
|
||||
shortcuts = lib.attrByPath [ config.networking.hostName ] { } config.registry.shell-shortcut;
|
||||
user = config.user.name;
|
||||
|
||||
Reference in New Issue
Block a user