refactor: simplify Nix module inputs and update configurations

Simplified input argument structures across multiple Nix modules by removing unnecessary bindings and standardizing formats. Enabled `system.primaryUser` setting and updated PAM configuration for sudo touch ID authentication. Removed deprecated or unused configurations, including user fields in metacfg and outdated options in some modules.
This commit is contained in:
Harald Hoyer 2025-05-27 13:12:18 +02:00
parent bbc247aa23
commit b453062c57
8 changed files with 24 additions and 50 deletions

View file

@ -1,8 +1,5 @@
{
lib,
pkgs,
config,
...
{ config
, ...
}:
{
home = {

View file

@ -1,8 +1,7 @@
{
lib,
pkgs,
config,
...
{ lib
, pkgs
, config
, ...
}:
{
home.sessionPath = [ "$HOME/bin" ];

View file

@ -1,8 +1,5 @@
{
lib,
pkgs,
config,
...
{ config
, ...
}:
{
home = {

View file

@ -1,9 +1,7 @@
{
options,
config,
pkgs,
lib,
...
{ config
, pkgs
, lib
, ...
}:
with lib;
with lib.metacfg;
@ -70,7 +68,6 @@ in
Day = 7;
};
options = "--delete-older-than 30d";
user = config.metacfg.user.name;
};
# flake-utils-plus

View file

@ -1,8 +1,7 @@
{
config,
lib,
pkgs,
...
{ config
, lib
, pkgs
, ...
}:
with lib;
with lib.metacfg;
@ -58,7 +57,7 @@ in
};
security = {
pam.enableSudoTouchIdAuth = true;
pam.services.sudo_local.touchIdAuth = true;
};
};
}

View file

@ -1,15 +0,0 @@
{ lib, config, ... }:
let
inherit (lib) types mkIf;
inherit (lib.metacfg) mkOpt enabled;
cfg = config.metacfg.services.nix-daemon;
in
{
options.metacfg.services.nix-daemon = {
enable = mkOpt types.bool true "Whether to enable the Nix daemon.";
};
config = mkIf cfg.enable { services.nix-daemon = enabled; };
}

View file

@ -1,8 +1,6 @@
{
lib,
config,
pkgs,
...
{ lib
, config
, ...
}:
with lib;
with lib.metacfg;
@ -10,8 +8,8 @@ let
common = import ../../common.nix { };
cfg = config.metacfg.user;
is-linux = pkgs.stdenv.isLinux;
is-darwin = pkgs.stdenv.isDarwin;
# is-linux = pkgs.stdenv.isLinux;
# is-darwin = pkgs.stdenv.isDarwin;
in
{
options.metacfg.user = with types; {
@ -25,6 +23,7 @@ in
};
config = {
system.primaryUser = cfg.name;
users.users.${cfg.name} = {
# NOTE: Setting the uid here is required for another
# module to evaluate successfully since it reads

View file

@ -46,5 +46,6 @@ with lib.metacfg;
users.users.harald.shell = pkgs.fish;
ids.gids.nixbld = 350;
system.stateVersion = 4;
}