nix-config/hosts/nixedo/configuration.nix
Oliver Davies eea806e0f8 Allow for autoloading modules
Autoloads files within modules/ and makes them available by their module
type and name, e.g. `mixins-zsh`, `editor-nvim` and `users-opdavies`
when imported with `inputs.self.nixosModules`.

Based on afab322e6d/modules/default.nix.

This assumes there will be a modules/*.nix file and currently doesn't
work with modules/*/default.nix. This is something I'd like to add in
the future.

I also want find a cleaner way to pass arguments into these shortcuts as
this also doesn't work in their implementation as far as I can see.
2025-04-10 09:07:16 +01:00

57 lines
1.1 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ inputs, ... }:
{
imports = with inputs.self.nixosModules; [
./hardware-configuration.nix
./secrets.nix
./services.nix
mixins-common
mixins-docker
mixins-zsh
users-opdavies
./modules/acme.nix
./modules/audiobookshelf.nix
./modules/containers/pi-hole.nix
./modules/forgejo.nix
./modules/immich.nix
./modules/jellyfin.nix
./modules/paperless.nix
];
nixosModules = {
audiobookshelf.enable = true;
immich.enable = true;
jellyfin.enable = true;
paperless.enable = true;
pihole.enable = true;
};
programs.dconf.enable = true;
services.logind.lidSwitchExternalPower = "ignore";
boot.loader = {
efi = {
canTouchEfiVariables = true;
efiSysMountPoint = "/boot/efi";
};
systemd-boot.enable = true;
};
networking.networkmanager.enable = true;
users.groups.media = { };
networking.firewall.allowedTCPPorts = [
80
443
];
}