]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - flakes/openarc/flake.nix
Add monitoring script with smartctl
[perso/Immae/Config/Nix.git] / flakes / openarc / flake.nix
index f4ce653e3de42d612a660c28f10b644e06481731..17a3fdd8bd0e3817dde832a693007ec573fd7879 100644 (file)
@@ -2,9 +2,7 @@
   description = "Open source ARC implementation";
 
   inputs.myuids = {
-    url = "https://git.immae.eu/perso/Immae/Config/Nix.git";
-    type = "git";
-    dir = "flakes/myuids";
+    url = "path:../myuids";
   };
   inputs.flake-utils.url = "github:numtide/flake-utils";
   inputs.nixpkgs.url = "github:NixOS/nixpkgs";
       nixosModule = { config, lib, pkgs, ... }:
         let
           cfg = config.services.openarc;
-          defaultSock = "local:/run/openarc/openarc.sock";
-          args = [ "-f" "-p" cfg.socket ] ++ lib.optionals (cfg.configFile != null) [ "-c" cfg.configFile ];
+          defaultSock = "/run/openarc/openarc.sock";
+          args = [ "-f" "-p" "local:${cfg.socket}" ] ++ lib.optionals (cfg.configFile != null) [ "-c" cfg.configFile ];
         in {
+          # Necessary for situations where flake gets included multiple times
+          key = builtins.hashString "sha256" (builtins.path { path = self.sourceInfo.outPath; name = "source"; });
           options = {
             services.openarc = {
               enable = lib.mkOption {