mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 09:07:21 +01:00
feat: full nix-topology
This commit is contained in:
parent
ed15ef02bb
commit
c7132d2d85
38 changed files with 2464 additions and 807 deletions
|
|
@ -1,12 +1,16 @@
|
|||
{ lib, ... }:
|
||||
{
|
||||
options.node.secretsDir = lib.mkOption {
|
||||
description = "Path to the secrets directory for this node.";
|
||||
type = lib.types.path;
|
||||
default = ./.;
|
||||
};
|
||||
options.node.name = lib.mkOption {
|
||||
description = "Node Name.";
|
||||
type = lib.types.str;
|
||||
options = {
|
||||
node = {
|
||||
secretsDir = lib.mkOption {
|
||||
description = "Path to the secrets directory for this node.";
|
||||
type = lib.types.path;
|
||||
default = ./.;
|
||||
};
|
||||
name = lib.mkOption {
|
||||
description = "Node Name.";
|
||||
type = lib.types.str;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -72,6 +72,8 @@
|
|||
zls
|
||||
ansible-language-server
|
||||
|
||||
elk-to-svg
|
||||
|
||||
];
|
||||
|
||||
nixpkgs.config.permittedInsecurePackages = [
|
||||
|
|
|
|||
14
modules/nixos/common/topology.nix
Normal file
14
modules/nixos/common/topology.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{ self, lib, config, ... }:
|
||||
{
|
||||
options.swarselsystems.info = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "";
|
||||
};
|
||||
config.topology = {
|
||||
id = config.node.name;
|
||||
self = {
|
||||
hardware.info = config.swarselsystems.info;
|
||||
icon = lib.mkIf config.swarselsystems.isLaptop "devices.laptop";
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue