diff --git a/flake.lock b/flake.lock index f4d3850..55a42aa 100644 --- a/flake.lock +++ b/flake.lock @@ -53,11 +53,19 @@ "yafas": "yafas" }, "locked": { +<<<<<<< Updated upstream "lastModified": 1713178514, "narHash": "sha256-WbG/7YWAT0n37LS7unI6gJjYQERkORsRXRovBCXAYqw=", "owner": "chaotic-cx", "repo": "nyx", "rev": "546bfa46a80292e800d2767db90170d64d92c200", +======= + "lastModified": 1712786091, + "narHash": "sha256-YK84WXkrqs0/uVoXb8x3+xx1P1dn/IoO+DwD6P/+7n0=", + "owner": "chaotic-cx", + "repo": "nyx", + "rev": "0d1cb79bc1fdae025f557f6c5053c69b35f4cc35", +>>>>>>> Stashed changes "type": "github" }, "original": { @@ -113,11 +121,19 @@ ] }, "locked": { +<<<<<<< Updated upstream "lastModified": 1712765734, "narHash": "sha256-HakehmZVdhbXHNaTzoSwIHdvy1A3A7XXEIUHV2cC7d8=", "owner": "girlbossceo", "repo": "conduwuit", "rev": "7d92cad55f58ef55d5c95ecf3753e0fa75ab11e1", +======= + "lastModified": 1712690805, + "narHash": "sha256-5/gL5CM1MeuHh3zoSyt07lhJTb5GBGRTIGFqONyJl9g=", + "owner": "girlbossceo", + "repo": "conduwuit", + "rev": "6345742e8b83a528353beb0fbb0e5b54aa39191d", +>>>>>>> Stashed changes "type": "github" }, "original": { @@ -384,11 +400,19 @@ ] }, "locked": { +<<<<<<< Updated upstream "lastModified": 1713166971, "narHash": "sha256-t0P/rKlsE5l1O3O2LYtAelLzp7PeoPCSzsIietQ1hSM=", "owner": "nix-community", "repo": "home-manager", "rev": "1c43dcfac48a2d622797f7ab741670fdbcf8f609", +======= + "lastModified": 1712759992, + "narHash": "sha256-2APpO3ZW4idlgtlb8hB04u/rmIcKA8O7pYqxF66xbNY=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "31357486b0ef6f4e161e002b6893eeb4fafc3ca9", +>>>>>>> Stashed changes "type": "github" }, "original": { @@ -404,11 +428,19 @@ ] }, "locked": { +<<<<<<< Updated upstream "lastModified": 1713166971, "narHash": "sha256-t0P/rKlsE5l1O3O2LYtAelLzp7PeoPCSzsIietQ1hSM=", "owner": "nix-community", "repo": "home-manager", "rev": "1c43dcfac48a2d622797f7ab741670fdbcf8f609", +======= + "lastModified": 1712759992, + "narHash": "sha256-2APpO3ZW4idlgtlb8hB04u/rmIcKA8O7pYqxF66xbNY=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "31357486b0ef6f4e161e002b6893eeb4fafc3ca9", +>>>>>>> Stashed changes "type": "github" }, "original": { @@ -441,11 +473,19 @@ ] }, "locked": { +<<<<<<< Updated upstream "lastModified": 1712909442, "narHash": "sha256-D+VrmsPLkEbxNcI7lp9rGFR33RumbQIyhhjJ4PooWBs=", "owner": "Jovian-Experiments", "repo": "Jovian-NixOS", "rev": "8886e3da78fcefb11935ea85da3d1572bf444c55", +======= + "lastModified": 1712521891, + "narHash": "sha256-qJRkB7QZo2mdR/nABeHQKi3xkQxUsSGjVVQXTSHQocI=", + "owner": "Jovian-Experiments", + "repo": "Jovian-NixOS", + "rev": "ec53086c76303dc8880fa7ba06c45abcae8b3398", +>>>>>>> Stashed changes "type": "github" }, "original": { @@ -467,11 +507,19 @@ "rust-overlay": "rust-overlay" }, "locked": { +<<<<<<< Updated upstream "lastModified": 1712983637, "narHash": "sha256-PSoOKfevRvoVZdMqijl9VcaB5OqgCoAgQ8UpsEAdEDQ=", "owner": "martinvonz", "repo": "jj", "rev": "82c85ba7542b0a5c938f53d71f9a481fc37eda1d", +======= + "lastModified": 1712679520, + "narHash": "sha256-TQ9Y4wQV+wIuMBGkwbkDey+mcfdHH+ix7ccepzFQBNc=", + "owner": "martinvonz", + "repo": "jj", + "rev": "580a90b6944f3a658e5bdea8d6f43afebd91eda7", +>>>>>>> Stashed changes "type": "github" }, "original": { @@ -531,11 +579,19 @@ ] }, "locked": { +<<<<<<< Updated upstream "lastModified": 1712992043, "narHash": "sha256-xUbqDxGiDab1et16JupBHpliGNpRSUcKfm++7t0UgBo=", "owner": "YaLTeR", "repo": "niri", "rev": "71be19b234d58f4ec447e921633506beb81a52c0", +======= + "lastModified": 1712736594, + "narHash": "sha256-r9i9cZUB02l0qhJ7Q4g3zXM8uClM4zxjEYM1AAFq48I=", + "owner": "YaLTeR", + "repo": "niri", + "rev": "0cd149c939c1f756a96381a84801073021ac1e63", +>>>>>>> Stashed changes "type": "github" }, "original": { @@ -637,11 +693,19 @@ }, "nixos-hardware": { "locked": { +<<<<<<< Updated upstream "lastModified": 1712909959, "narHash": "sha256-7/5ubuwdEbQ7Z+Vqd4u0mM5L2VMNDsBh54visp27CtQ=", "owner": "NixOS", "repo": "nixos-hardware", "rev": "f58b25254be441cd2a9b4b444ed83f1e51244f1f", +======= + "lastModified": 1712760404, + "narHash": "sha256-4zhaEW1nB+nGbCNMjOggWeY5nXs/H0Y71q0+h+jdxoU=", + "owner": "NixOS", + "repo": "nixos-hardware", + "rev": "e1c4bac14beb8c409d0534382cf967171706b9d9", +>>>>>>> Stashed changes "type": "github" }, "original": { @@ -653,12 +717,21 @@ }, "nixpkgs": { "locked": { +<<<<<<< Updated upstream "lastModified": 1712963716, "narHash": "sha256-WKm9CvgCldeIVvRz87iOMi8CFVB1apJlkUT4GGvA0iM=", "rev": "cfd6b5fc90b15709b780a5a1619695a88505a176", "revCount": 611350, "type": "tarball", "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.611350%2Brev-cfd6b5fc90b15709b780a5a1619695a88505a176/018eddfc-e6d9-74bb-a823-20f2ae60079b/source.tar.gz" +======= + "lastModified": 1712608508, + "narHash": "sha256-vMZ5603yU0wxgyQeHJryOI+O61yrX2AHwY6LOFyV1gM=", + "rev": "4cba8b53da471aea2ab2b0c1f30a81e7c451f4b6", + "revCount": 609462, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.609462%2Brev-4cba8b53da471aea2ab2b0c1f30a81e7c451f4b6/018ec465-ecc0-7383-ad59-bf84009e7b07/source.tar.gz" +>>>>>>> Stashed changes }, "original": { "type": "tarball", @@ -699,11 +772,19 @@ }, "nixpkgs-stable_3": { "locked": { +<<<<<<< Updated upstream "lastModified": 1713013257, "narHash": "sha256-ZEfGB3YCBVggvk0BQIqVY7J8XF/9jxQ68fCca6nib+8=", "owner": "NixOS", "repo": "nixpkgs", "rev": "90055d5e616bd943795d38808c94dbf0dd35abe8", +======= + "lastModified": 1712741485, + "narHash": "sha256-bCs0+MSTra80oXAsnM6Oq62WsirOIaijQ/BbUY59tR4=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "b2cf36f43f9ef2ded5711b30b1f393ac423d8f72", +>>>>>>> Stashed changes "type": "github" }, "original": { @@ -744,11 +825,19 @@ }, "nixpkgs_4": { "locked": { +<<<<<<< Updated upstream "lastModified": 1712963716, "narHash": "sha256-WKm9CvgCldeIVvRz87iOMi8CFVB1apJlkUT4GGvA0iM=", "owner": "NixOS", "repo": "nixpkgs", "rev": "cfd6b5fc90b15709b780a5a1619695a88505a176", +======= + "lastModified": 1712608508, + "narHash": "sha256-vMZ5603yU0wxgyQeHJryOI+O61yrX2AHwY6LOFyV1gM=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "4cba8b53da471aea2ab2b0c1f30a81e7c451f4b6", +>>>>>>> Stashed changes "type": "github" }, "original": { diff --git a/hosts/nas/configuration.nix b/hosts/nas/configuration.nix index 412fb6c..6823cd6 100644 --- a/hosts/nas/configuration.nix +++ b/hosts/nas/configuration.nix @@ -36,7 +36,9 @@ in { jellyseerr.enable = true; - homepage.enable = true; + homarr.enable = true; + + homepage.enable = false; sabnzbd.enable = true; diff --git a/modules/apps/homarr/default.nix b/modules/apps/homarr/default.nix new file mode 100644 index 0000000..9643033 --- /dev/null +++ b/modules/apps/homarr/default.nix @@ -0,0 +1,26 @@ +{ lib, pkgs, config, ... }: +with lib; +let cfg = config.nas-apps.homarr; +in { + imports = [ ./options.nix ]; + + config = mkIf cfg.enable { + virtualisation.oci-containers.containers."${cfg.name}" = { + autoStart = cfg.autoStart; + image = cfg.image; + ports = [ "${cfg.httpPort}:7575" ]; + volumes = [ + "${cfg.configPath}/configs:/app/data/configs" + "${cfg.configPath}/icons:/app/public/icons" + "${cfg.configPath}/data:/data" + "/var/run/docker.sock:/var/run/docker.sock" + "/var/run/podman/podman.sock:/var/run/podman.sock" + ]; + environment = { + # PUID = cfg.puid; + # PGID = cfg.pgid; + TZ = cfg.timeZone; + }; + }; + }; +} diff --git a/modules/apps/homarr/options.nix b/modules/apps/homarr/options.nix new file mode 100644 index 0000000..ab2ce17 --- /dev/null +++ b/modules/apps/homarr/options.nix @@ -0,0 +1,46 @@ +{ lib, ... }: +with lib; { + options.nas-apps.homarr = { + enable = mkEnableOption "homarr docker service"; + + autoStart = mkOption { + type = types.bool; + default = true; + }; + + httpPort = mkOption { + type = types.str; + default = "7575"; + }; + + name = mkOption { + type = types.str; + default = "homarr"; + }; + + image = mkOption { + type = types.str; + default = "ghcr.io/ajnart/homarr"; + }; + + configPath = mkOption { + type = types.str; + default = "/mnt/ssd/ssd_app_data/homarr"; + }; + + puid = mkOption { + type = types.str; + default = "911"; + }; + + pgid = mkOption { + type = types.str; + default = "1000"; + }; + + timeZone = mkOption { + type = types.str; + default = "America/Chicago"; + }; + }; +} diff --git a/modules/default.nix b/modules/default.nix index c21dd4d..7608b17 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -4,6 +4,7 @@ ./apps/collabora # ./apps/dashy ./apps/discover-wrapped + ./apps/homarr ./apps/homepage ./apps/jellyfin ./apps/jellyseerr