From cad0a45511399c604655a146c98eb85362a2b080 Mon Sep 17 00:00:00 2001
From: Victor <victor@xirion.net>
Date: Tue, 19 Dec 2023 13:52:05 +0100
Subject: [PATCH] more fixes

---
 flake.nix | 37 +++++++++++++++++++------------------
 1 file changed, 19 insertions(+), 18 deletions(-)

diff --git a/flake.nix b/flake.nix
index 0632709..a5e12b9 100644
--- a/flake.nix
+++ b/flake.nix
@@ -53,32 +53,33 @@
           '';
         };
 
-        
-
         devShells.default = pkgs.mkShell {
           shellHook = "${packages.default.preBuild}";
           inherit (packages.default)
             nativeBuildInputs buildInputs LIBCLANG_PATH;
         };
       }) // {
-          nixosModules.default = { config, lib, ... }:
-          with lib;
-          let cfg = config.services.gnome-autounlock-keyring;
-          in {
-            options.services.gnome-autounlock-keyring = {
-              enable = mkEnableOption "gnome-autounlock.keyring";
-            };
+        nixosModules = rec {
+          default = { config, lib, ... }:
+            with lib;
+            let cfg = config.services.gnome-autounlock-keyring;
+            in {
+              options.services.gnome-autounlock-keyring = {
+                enable = mkEnableOption "gnome-autounlock.keyring";
+              };
 
-            config = mkIf cfg.enable {
-              systemd.user.services.gnome-autounlock-keyring = {
-                description = "Automatically unlock gnome keyring using TPM";
-                wantedBy = [ "gnome-session.target" ];
-                script = ''
-                  ${packages.default}/bin/gnome-autounlock-keyring unlock
-                '';
-                serviceConfig = { Type = "oneshot"; };
+              config = mkIf cfg.enable {
+                systemd.user.services.gnome-autounlock-keyring = {
+                  description = "Automatically unlock gnome keyring using TPM";
+                  wantedBy = [ "gnome-session.target" ];
+                  script = ''
+                    ${self.packages.default}/bin/gnome-autounlock-keyring unlock
+                  '';
+                  serviceConfig = { Type = "oneshot"; };
+                };
               };
             };
-          };
+          gnome-autounlock-keyring = default;
+        };
       };
 }