Use nixosModules and homeManagerModules for config
This commit is contained in:
parent
88a054f3b4
commit
2de0e1a2d6
46 changed files with 151 additions and 190 deletions
|
@ -3,9 +3,9 @@
|
|||
with lib;
|
||||
|
||||
{
|
||||
options.features.cli.docker.enable = mkEnableOption "Enable Docker";
|
||||
options.nixosModules.docker.enable = mkEnableOption "Enable Docker";
|
||||
|
||||
config = mkIf config.features.cli.docker.enable {
|
||||
config = mkIf config.nixosModules.docker.enable {
|
||||
virtualisation.docker = {
|
||||
enable = true;
|
||||
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
with lib;
|
||||
|
||||
{
|
||||
options.features.desktop.autorandr.enable = mkEnableOption "Enable autorandr";
|
||||
options.nixosModules.autorandr.enable = mkEnableOption "Enable autorandr";
|
||||
|
||||
config = mkIf config.features.desktop.autorandr.enable {
|
||||
config = mkIf config.nixosModules.autorandr.enable {
|
||||
services.autorandr = {
|
||||
enable = true;
|
||||
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
with lib;
|
||||
|
||||
{
|
||||
options.features.desktop.dwm.enable = mkEnableOption "Enable dwm";
|
||||
options.nixosModules.dwm.enable = mkEnableOption "Enable dwm";
|
||||
|
||||
config = mkIf config.features.desktop.dwm.enable {
|
||||
config = mkIf config.nixosModules.dwm.enable {
|
||||
services = {
|
||||
dwm-status = {
|
||||
enable = true;
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
with lib;
|
||||
|
||||
{
|
||||
options.features.desktop.peek.enable = mkEnableOption "Enable peek";
|
||||
options.nixosModules.peek.enable = mkEnableOption "Enable peek";
|
||||
|
||||
config = mkIf config.features.desktop.peek.enable {
|
||||
config = mkIf config.nixosModules.peek.enable {
|
||||
environment.systemPackages = with pkgs; [ peek ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
with lib;
|
||||
|
||||
{
|
||||
options.features.desktop.screenkey.enable = mkEnableOption "Enable screenkey";
|
||||
options.nixosModules.screenkey.enable = mkEnableOption "Enable screenkey";
|
||||
|
||||
config = mkIf config.features.desktop.screenkey.enable {
|
||||
config = mkIf config.nixosModules.screenkey.enable {
|
||||
environment.systemPackages = with pkgs; [ screenkey ];
|
||||
|
||||
home-manager.users.${username}.xdg.configFile."screenkey.json".text = builtins.toJSON {
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
with lib;
|
||||
|
||||
{
|
||||
options.features.desktop.thunar.enable = mkEnableOption "Enable thunar";
|
||||
options.nixosModules.thunar.enable = mkEnableOption "Enable thunar";
|
||||
|
||||
config = mkIf config.features.desktop.thunar.enable {
|
||||
config = mkIf config.nixosModules.thunar.enable {
|
||||
programs.thunar = {
|
||||
enable = true;
|
||||
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
with lib;
|
||||
|
||||
{
|
||||
options.features.desktop.gaming.enable = mkEnableOption "Enable games";
|
||||
options.nixosModules.gaming.enable = mkEnableOption "Enable games";
|
||||
|
||||
config = mkIf config.features.desktop.gaming.enable {
|
||||
config = mkIf config.nixosModules.gaming.enable {
|
||||
programs.steam.enable = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [ zeroad ];
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.features.homelab.audiobookshelf;
|
||||
cfg = config.nixosModules.audiobookshelf;
|
||||
in
|
||||
{
|
||||
options.features.homelab.audiobookshelf.enable = mkEnableOption "Enable audiobookshelf";
|
||||
options.nixosModules.audiobookshelf.enable = mkEnableOption "Enable audiobookshelf";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services = {
|
||||
|
|
|
@ -9,12 +9,12 @@
|
|||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.features.homelab.beaverhabits;
|
||||
cfg = config.nixosModules.beaverhabits;
|
||||
|
||||
port = 8084;
|
||||
in
|
||||
{
|
||||
options.features.homelab.beaverhabits.enable = mkEnableOption "Enable beaverhabits";
|
||||
options.nixosModules.beaverhabits.enable = mkEnableOption "Enable beaverhabits";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
virtualisation = {
|
||||
|
|
|
@ -8,11 +8,11 @@
|
|||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.features.homelab.freshrss;
|
||||
cfg = config.nixosModules.freshrss;
|
||||
port = 4003;
|
||||
in
|
||||
{
|
||||
options.features.homelab.freshrss.enable = mkEnableOption "Enable freshrss";
|
||||
options.nixosModules.freshrss.enable = mkEnableOption "Enable freshrss";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# Auto-generated using compose2nix v0.3.2-pre.
|
||||
|
|
|
@ -11,9 +11,9 @@ let
|
|||
port = 8082;
|
||||
in
|
||||
{
|
||||
options.features.homelab.pihole.enable = mkEnableOption "Enable pihole";
|
||||
options.nixosModules.pihole.enable = mkEnableOption "Enable pihole";
|
||||
|
||||
config = mkIf config.features.homelab.pihole.enable {
|
||||
config = mkIf config.nixosModules.pihole.enable {
|
||||
virtualisation = {
|
||||
docker = {
|
||||
enable = true;
|
||||
|
|
|
@ -8,13 +8,13 @@
|
|||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.features.homelab.tubearchivist-container;
|
||||
cfg = config.nixosModules.tubearchivist-container;
|
||||
|
||||
port = 8085;
|
||||
url = "tubearchivist.oliverdavies.uk";
|
||||
in
|
||||
{
|
||||
options.features.homelab.tubearchivist-container = {
|
||||
options.nixosModules.tubearchivist-container = {
|
||||
enable = mkEnableOption "Enable the tubearchivist-container service.";
|
||||
};
|
||||
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
with lib;
|
||||
|
||||
{
|
||||
options.features.homelab.forgejo.enable = mkEnableOption "Enable forgejo";
|
||||
options.nixosModules.forgejo.enable = mkEnableOption "Enable forgejo";
|
||||
|
||||
config = mkIf config.features.homelab.forgejo.enable {
|
||||
config = mkIf config.nixosModules.forgejo.enable {
|
||||
services = {
|
||||
forgejo = {
|
||||
enable = true;
|
||||
|
|
|
@ -6,9 +6,9 @@ let
|
|||
port = 2222;
|
||||
in
|
||||
{
|
||||
options.features.homelab.gitea.enable = mkEnableOption "Enable gitea";
|
||||
options.nixosModules.gitea.enable = mkEnableOption "Enable gitea";
|
||||
|
||||
config = mkIf config.features.homelab.gitea.enable {
|
||||
config = mkIf config.nixosModules.gitea.enable {
|
||||
services = {
|
||||
gitea = {
|
||||
enable = true;
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
with lib;
|
||||
|
||||
{
|
||||
options.features.homelab.immich.enable = mkEnableOption "Enable immich";
|
||||
options.nixosModules.immich.enable = mkEnableOption "Enable immich";
|
||||
|
||||
config = mkIf config.features.homelab.immich.enable {
|
||||
config = mkIf config.nixosModules.immich.enable {
|
||||
services.immich = {
|
||||
enable = true;
|
||||
group = "media";
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
with lib;
|
||||
|
||||
{
|
||||
options.features.homelab.jellyfin.enable = mkEnableOption "Enable jellyfin";
|
||||
options.nixosModules.jellyfin.enable = mkEnableOption "Enable jellyfin";
|
||||
|
||||
config = mkIf config.features.homelab.jellyfin.enable {
|
||||
config = mkIf config.nixosModules.jellyfin.enable {
|
||||
services.jellyfin = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
|
|
|
@ -6,9 +6,9 @@ let
|
|||
url = "paperless.oliverdavies.uk";
|
||||
in
|
||||
{
|
||||
options.features.homelab.paperless.enable = mkEnableOption "Enable paperless";
|
||||
options.nixosModules.paperless.enable = mkEnableOption "Enable paperless";
|
||||
|
||||
config = mkIf config.features.homelab.paperless.enable {
|
||||
config = mkIf config.nixosModules.paperless.enable {
|
||||
services = {
|
||||
paperless = {
|
||||
enable = true;
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
with lib;
|
||||
|
||||
{
|
||||
options.features.homelab.vaultwarden.enable = mkEnableOption "Enable vaultwarden";
|
||||
options.nixosModules.vaultwarden.enable = mkEnableOption "Enable vaultwarden";
|
||||
|
||||
config = mkIf config.features.homelab.vaultwarden.enable {
|
||||
config = mkIf config.nixosModules.vaultwarden.enable {
|
||||
services = {
|
||||
vaultwarden = {
|
||||
enable = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue