# Espanso app -\> option not working for me

**URL:** https://discourse.nixos.org/t/espanso-app-option-not-working-for-me/21789
**Category:** Help
**Created:** [September 18, 2022, 2:24pm UTC](https://discourse.nixos.org/t/espanso-app-option-not-working-for-me/21789 "2022-09-18T14:24:03Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![gemstraam](https://discourse.nixos.org/user_avatar/discourse.nixos.org/gemstraam/32/7361_2.png) [@gemstraam](https://discourse.nixos.org/u/gemstraam)
#### Post date: [September 18, 2022, 2:24pm UTC](https://discourse.nixos.org/t/espanso-app-option-not-working-for-me/21789/1 "2022-09-18T14:24:03Z")

</div>

Hello Nix Wizards

I installed the Espanso app in NixOS 22.05 and the option to start “espanso daemon”.  
Somehow the daemon will not start and I have to do it manually each reboot.

Here’s the concerning part of my /etc/nixos/configuration.nix:

```auto
 users.users.me = {
    isNormalUser = true;
    extraGroups = ["networkmanager" "wheel" "libvirtd" "kvm" "scanner" "lp"];
    packages = with pkgs; [
      vimHugeX
      firefox
      thunderbird-102
      espanso
      copyq
      keepassxc
      joplin-desktop
      virt-manager
    ];
 };

services.espanso.enable = true;

```

the app is to find here: [https://search.nixos.org/packages?channel=22.05&from=0&size=50&sort=relevance&type=packages&query=espanso](https://search.nixos.org/packages?channel=22.05&from=0&size=50&sort=relevance&type=packages&query=espanso)

the option here: [https://search.nixos.org/options?channel=22.05&show=services.espanso.enable&from=0&size=50&sort=relevance&type=packages&query=espanso](https://search.nixos.org/options?channel=22.05&show=services.espanso.enable&from=0&size=50&sort=relevance&type=packages&query=espanso)

the option is declared as such:

```auto
{ config, lib, pkgs, ... }:

with lib;
let cfg = config.services.espanso;
in {
  meta = { maintainers = with lib.maintainers; [numkem]; };

  options = {
    services.espanso = { enable = options.mkEnableOption "Espanso"; };
  };

  config = mkIf cfg.enable {
    systemd.user.services.espanso = {
      description = "Espanso daemon";
      serviceConfig = {
        ExecStart = "${pkgs.espanso}/bin/espanso daemon";
        Restart = "on-failure";
      };
      wantedBy = ["default.target"];
    };

    environment.systemPackages = [pkgs.espanso];
  };
}

```

Would be lovely to get a hint! As I wouldn’t want to live without this great application!

Thank you

---

<div class="post-metadata">

### Author: ![tejing](https://discourse.nixos.org/user_avatar/discourse.nixos.org/tejing/32/4566_2.png) [@tejing](https://discourse.nixos.org/u/tejing)
#### Post date: [September 19, 2022, 9:50am UTC](https://discourse.nixos.org/t/espanso-app-option-not-working-for-me/21789/2 "2022-09-19T09:50:11Z")

</div>

While I don’t have the answer to your issue, I just wanted to point out that the module itself sets `environment.systemPackages = [pkgs.espanso];`, as modules generally do, so doing that in your own config is redundant.

---

<div class="post-metadata">

### Author: ![gemstraam](https://discourse.nixos.org/user_avatar/discourse.nixos.org/gemstraam/32/7361_2.png) [@gemstraam](https://discourse.nixos.org/u/gemstraam)
#### Post date: [September 19, 2022, 6:47pm UTC](https://discourse.nixos.org/t/espanso-app-option-not-working-for-me/21789/3 "2022-09-19T18:47:52Z")

</div>

thank you tejing, that is some good information already!

---

<div class="post-metadata">

### Author: ![nrdxp](https://discourse.nixos.org/user_avatar/discourse.nixos.org/nrdxp/32/8501_2.png) [@nrdxp](https://discourse.nixos.org/u/nrdxp)
#### Post date: [September 19, 2022, 7:02pm UTC](https://discourse.nixos.org/t/espanso-app-option-not-working-for-me/21789/4 "2022-09-19T19:02:01Z")

</div>

It should start with `default.target` according to the systemd unit, so what does the output of `systemctl --user status default.target` show?

---

<div class="post-metadata">

### Author: ![gemstraam](https://discourse.nixos.org/user_avatar/discourse.nixos.org/gemstraam/32/7361_2.png) [@gemstraam](https://discourse.nixos.org/u/gemstraam)
#### Post date: [September 19, 2022, 7:08pm UTC](https://discourse.nixos.org/t/espanso-app-option-not-working-for-me/21789/5 "2022-09-19T19:08:33Z")

</div>

Seems to be active:

```auto
● default.target - Main User Target
     Loaded: loaded (/etc/systemd/user/default.target; static)
     Active: active since Mon 2022-09-19 21:05:02 CEST; 2min 39s ago
      Until: Mon 2022-09-19 21:05:02 CEST; 2min 39s ago
       Docs: man:systemd.special(7)

```

Starting Espanso in the terminal with “espanso daemon” does work!
