rename tree to modules

This commit is contained in:
Callum Leslie 2026-04-22 18:54:27 +01:00
parent cc0d8d78d3
commit 7404996570
Signed by: cleslie
GPG key ID: D382C4AFEECEAA90
13 changed files with 72 additions and 51 deletions

View file

@ -39,7 +39,7 @@
inputs.flake-parts.flakeModules.easyOverlay inputs.flake-parts.flakeModules.easyOverlay
inputs.pre-commit-hooks.flakeModule inputs.pre-commit-hooks.flakeModule
inputs.treefmt-nix.flakeModule inputs.treefmt-nix.flakeModule
(inputs.import-tree ./tree) (inputs.import-tree ./modules)
]; ];
systems = import inputs.systems; systems = import inputs.systems;

View file

@ -1,4 +1,5 @@
{...}: { { ... }:
{
flake.nixosModules.boot = { flake.nixosModules.boot = {
boot = { boot = {
loader = { loader = {

View file

@ -1,13 +1,17 @@
{...}: { { ... }:
flake.nixosModules.deploy = { {
flake.nixosModules.deploy =
{
config, config,
pkgs, pkgs,
lib, lib,
... ...
}: }:
with lib; let with lib;
let
cfg = config.c.services.remote-deploy; cfg = config.c.services.remote-deploy;
in { in
{
options.c.services.remote-deploy = { options.c.services.remote-deploy = {
enable = mkEnableOption "Enable remote deployment with nixinate."; enable = mkEnableOption "Enable remote deployment with nixinate.";
host = mkOption { host = mkOption {
@ -50,8 +54,7 @@
config = mkIf cfg.enable { config = mkIf cfg.enable {
_module.args = { _module.args = {
nixinate = { nixinate = {
inherit inherit (cfg)
(cfg)
host host
buildOn buildOn
port port

View file

@ -0,0 +1,8 @@
{ ... }:
{
flake.nixosModules.gpg-pinentry-wayland =
{ pkgs, ... }:
{
services.dbus.packages = [ pkgs.gcr ];
};
}

9
modules/hm.nix Normal file
View file

@ -0,0 +1,9 @@
{ ... }:
{
flake.nixosModules.hm =
{ ... }:
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
};
}

10
modules/keys.nix Normal file
View file

@ -0,0 +1,10 @@
{ ... }:
{
flake.nixosModules.keys =
{ lib, ... }:
{
options.keys = lib.mkOption {
default = import ../lib/keys.nix;
};
};
}

View file

@ -1,4 +1,5 @@
{inputs, ...}: { { inputs, ... }:
{
flake.nixosModules.nix-config = { flake.nixosModules.nix-config = {
nix = { nix = {
registry.nixpkgs.flake = inputs.nixpkgs; registry.nixpkgs.flake = inputs.nixpkgs;

8
modules/secrets.nix Normal file
View file

@ -0,0 +1,8 @@
{ ... }:
{
flake.nixosModules.secrets =
{ ... }:
{
imports = [ ../secrets/secrets-configuration.nix ];
};
}

View file

@ -1,12 +1,16 @@
{...}: { { ... }:
flake.nixosModules.tailscale = { {
flake.nixosModules.tailscale =
{
config, config,
lib, lib,
... ...
}: }:
with lib; let with lib;
let
cfg = config.c.services.mesh; cfg = config.c.services.mesh;
in { in
{
options.c.services.mesh = { options.c.services.mesh = {
enable = mkEnableOption "Enable tailscale daemon."; enable = mkEnableOption "Enable tailscale daemon.";
exitNode = mkOption { exitNode = mkOption {

View file

@ -1,5 +0,0 @@
{...}: {
flake.nixosModules.gpg-pinentry-wayland = {pkgs, ...}: {
services.dbus.packages = [pkgs.gcr];
};
}

View file

@ -1,6 +0,0 @@
{...}: {
flake.nixosModules.hm = {...}: {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
};
}

View file

@ -1,7 +0,0 @@
{...}: {
flake.nixosModules.keys = {lib, ...}: {
options.keys = lib.mkOption {
default = import ../lib/keys.nix;
};
};
}

View file

@ -1,5 +0,0 @@
{...}: {
flake.nixosModules.secrets = {...}: {
imports = [../secrets/secrets-configuration.nix];
};
}