Skip to content

Commit

Permalink
nix: services: Run specific profile.
Browse files Browse the repository at this point in the history
  • Loading branch information
wigust committed Dec 21, 2024
1 parent 035abe0 commit cc18670
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 13 deletions.
8 changes: 4 additions & 4 deletions dotfiles/nix/container-systemd/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 12 additions & 9 deletions dotfiles/nix/modules/services/firefox.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,25 @@ in
};
};
config = mkIf cfg.enable {
systemd.user.services.firefox = {
systemd.user.services."firefox@" = {
Unit = {
Description = "Firefox web browser";
};
Service = {
ExecStart = pkgs.writeScript "firefox.sh" ''
#!${pkgs.runtimeShell}
ExecStart =
let
script = pkgs.writeScript "firefox.sh" ''
#!${pkgs.runtimeShell}
XDG_RUNTIME_DIR=/mnt/guix/run/user/1000
export XDG_RUNTIME_DIR
XDG_RUNTIME_DIR=/mnt/guix/run/user/1000
export XDG_RUNTIME_DIR
WAYLAND_DISPLAY=wayland-1
export WAYLAND_DISPLAY
WAYLAND_DISPLAY=wayland-1
export WAYLAND_DISPLAY
exec -a firefox ${pkgs.firefox}/bin/firefox "$@"
'';
exec -a firefox ${pkgs.firefox}/bin/firefox -P "$@"
'';
in "${script} %i";
Type = "simple";
};
};
Expand Down
11 changes: 11 additions & 0 deletions dotfiles/nix/pc0/home-manager.nix
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,17 @@
};

services.firefox.enable = true;
systemd.user.services."firefox@pcaaxem9.default" = {
Unit = {
Description = "Firefox web browser default profile";
};
};
systemd.user.services."firefox@twitch" = {
Unit = {
Description = "Firefox web browser twitch profile";
};
};

services.foot.enable = true;

# The home.stateVersion option no longer has a default value. It used to
Expand Down

0 comments on commit cc18670

Please sign in to comment.