add single-file NixOS aspects

Standalone NixOS modules: ai, bluetooth, dev, fwupd, libvirtd,
networkmanager, podman

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
William 2026-02-06 22:36:37 -03:00
parent 92e16d0032
commit 5247bbda03
7 changed files with 87 additions and 0 deletions

12
aspects/ai.nix Normal file
View file

@ -0,0 +1,12 @@
{ ... }:
{
flake.modules.nixos.ai = { inputs, pkgs, ... }: {
environment.systemPackages =
(with pkgs; [claude-desktop]) ++
(with inputs.nix-ai-tools.packages.${pkgs.system}; [
claude-code
claudebox
opencode
]);
};
}

6
aspects/bluetooth.nix Normal file
View file

@ -0,0 +1,6 @@
{ ... }:
{
flake.modules.nixos.bluetooth = { config, lib, pkgs, ... }: {
hardware.bluetooth.enable = true;
};
}

19
aspects/dev.nix Normal file
View file

@ -0,0 +1,19 @@
{ ... }:
{
flake.modules.nixos.dev = { config, lib, pkgs, ... }: {
environment.systemPackages = with pkgs; [
android-tools
bat
lazygit
fd
fzf
glow
nixfmt
nix-init
nix-output-monitor
ripgrep
];
users.users.user.extraGroups = [ "adbusers" ];
};
}

6
aspects/fwupd.nix Normal file
View file

@ -0,0 +1,6 @@
{ ... }:
{
flake.modules.nixos.fwupd = { config, lib, pkgs, ... }: {
services.fwupd.enable = true;
};
}

18
aspects/libvirtd.nix Normal file
View file

@ -0,0 +1,18 @@
{ ... }:
{
flake.modules.nixos.libvirtd = { config, lib, pkgs, ... }: {
virtualisation = {
libvirtd.enable = true;
spiceUSBRedirection.enable = true;
};
programs.virt-manager.enable = true;
networking.firewall.trustedInterfaces = [ "virbr0" ];
users.users.user.extraGroups = [
"libvirt"
"libvirtd"
];
};
}

View file

@ -0,0 +1,11 @@
{ ... }:
{
flake.modules.nixos.networkmanager = { config, lib, pkgs, ... }: {
networking.networkmanager = {
enable = true;
wifi.backend = "iwd";
};
users.users.user.extraGroups = [ "networkmanager" ];
};
}

15
aspects/podman.nix Normal file
View file

@ -0,0 +1,15 @@
{ ... }:
{
flake.modules.nixos.podman = { config, lib, pkgs, ... }: {
virtualisation.podman = {
enable = true;
autoPrune.enable = true;
extraPackages = [ pkgs.podman-compose ];
};
systemd = {
services.podman-auto-update.enable = true;
timers.podman-auto-update.enable = true;
};
};
}