refactor: cleanup (deadnix, nixfmt, statix)

This commit is contained in:
2026-03-11 23:23:38 +01:00
parent 7c92cc5c6a
commit 12481d7468
14 changed files with 20 additions and 22 deletions

View File

@@ -18,8 +18,8 @@ let
}; };
}; };
nodes = lib.genAttrs hostDirNames (hostname: nodes = lib.genAttrs hostDirNames (
mkNode hostname (utils.hostMeta ../hosts/${hostname}).deployment.tags hostname: mkNode hostname (utils.hostMeta ../hosts/${hostname}).deployment.tags
); );
in in
inputs.colmena.lib.makeHive { inputs.colmena.lib.makeHive {

View File

@@ -32,7 +32,7 @@
home = { home = {
stateVersion = "25.05"; stateVersion = "25.05";
username = config.host.username; inherit (config.host) username;
homeDirectory = "/home/${config.host.username}"; homeDirectory = "/home/${config.host.username}";
}; };

View File

@@ -30,7 +30,7 @@
home = { home = {
stateVersion = "25.05"; stateVersion = "25.05";
username = config.host.username; inherit (config.host) username;
homeDirectory = "/home/${config.host.username}"; homeDirectory = "/home/${config.host.username}";
}; };

View File

@@ -1,4 +1,9 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
{ {
options.nixgl.wrap = lib.mkOption { options.nixgl.wrap = lib.mkOption {

View File

@@ -1,5 +1,4 @@
{ {
lib,
pkgs, pkgs,
... ...
}: }:

View File

@@ -1,5 +1,3 @@
{ lib, ... }:
{ {
programs.waybar.settings = [ programs.waybar.settings = [
{ {

View File

@@ -95,7 +95,7 @@ in
my.yubikey = { my.yubikey = {
enable = false; enable = false;
username = config.host.username; inherit (config.host) username;
keys = [ keys = [
{ {
handle = "<KeyHandle1>"; handle = "<KeyHandle1>";

View File

@@ -16,7 +16,7 @@
}; };
ssh = { ssh = {
username = config.host.username; inherit (config.host) username;
publicHostname = config.host.name; publicHostname = config.host.name;
authorizedHosts = [ authorizedHosts = [
"andromache" "andromache"

View File

@@ -17,7 +17,7 @@
}; };
ssh = { ssh = {
username = config.host.username; inherit (config.host) username;
publicHostname = config.host.name; publicHostname = config.host.name;
authorizedHosts = [ authorizedHosts = [
"andromache" "andromache"

View File

@@ -23,7 +23,7 @@
networking.hostName = config.host.name; networking.hostName = config.host.name;
ssh = { ssh = {
username = config.host.username; inherit (config.host) username;
publicHostname = "server.hektormisplon.xyz"; publicHostname = "server.hektormisplon.xyz";
authorizedHosts = [ authorizedHosts = [
"andromache" "andromache"

View File

@@ -1,5 +1,3 @@
_:
{ {
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;

View File

@@ -1,5 +1,3 @@
_:
{ {
time.timeZone = "Europe/Brussels"; time.timeZone = "Europe/Brussels";
i18n.defaultLocale = "en_US.UTF-8"; i18n.defaultLocale = "en_US.UTF-8";

View File

@@ -1,5 +1,3 @@
_:
{ {
services.xserver.windowManager.xmonad = { services.xserver.windowManager.xmonad = {
enable = true; enable = true;

View File

@@ -4,8 +4,10 @@
dirNames = dirNames =
path: builtins.attrNames (lib.filterAttrs (_: type: type == "directory") (builtins.readDir path)); path: builtins.attrNames (lib.filterAttrs (_: type: type == "directory") (builtins.readDir path));
hostMeta = hostDir: hostMeta =
if builtins.pathExists (hostDir + "/meta.nix") hostDir:
then import (hostDir + "/meta.nix") if builtins.pathExists (hostDir + "/meta.nix") then
else throw "meta.nix required in ${hostDir}"; import (hostDir + "/meta.nix")
else
throw "meta.nix required in ${hostDir}";
} }