diff --git a/flake.lock b/flake.lock index f1e85e4..f9a8e48 100644 --- a/flake.lock +++ b/flake.lock @@ -276,6 +276,7 @@ "ranger-icons": "ranger-icons", "ranger-sixel": "ranger-sixel", "sea-orm-cli": "sea-orm-cli", + "webcord": "webcord", "wegank": "wegank" } }, @@ -352,6 +353,22 @@ "type": "github" } }, + "webcord": { + "locked": { + "lastModified": 1670198705, + "narHash": "sha256-cf+JUnVqSSq3H6dhti927gKwkFvWjEV7aKdi+rSNpRs=", + "owner": "huantianad", + "repo": "nixpkgs", + "rev": "cf38762a26b34f91de025755aea4d72f99b89266", + "type": "github" + }, + "original": { + "owner": "huantianad", + "ref": "webcord", + "repo": "nixpkgs", + "type": "github" + } + }, "wegank": { "inputs": { "nixpkgs": [ diff --git a/flake.nix b/flake.nix index e5cd452..1864408 100644 --- a/flake.nix +++ b/flake.nix @@ -31,6 +31,7 @@ material-wifi-icons.flake = false; sea-orm-cli.url = "github:lucperkins/nixpkgs/lperkins/sea-orm-cli"; + webcord.url = "github:huantianad/nixpkgs/webcord"; nil-lsp.url = "github:oxalica/nil"; nil-lsp.inputs.nixpkgs.follows = "nixpkgs-unstable"; diff --git a/overlays/default.nix b/overlays/default.nix index e39f8d0..89d5344 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -13,6 +13,8 @@ mpvpaper = inputs.wegank.packages.${prev.system}.mpvpaper; sea-orm-cli = inputs.sea-orm-cli.legacyPackages.${prev.system}.sea-orm-cli; + webcord = + inputs.webcord.legacyPackages.${prev.system}.webcord; nil-lsp = inputs.nil-lsp.packages.${prev.system}.nil; alacritty = (prev.unstable.alacritty.overrideAttrs (old-alacritty: rec { src = inputs.alacritty-sixel; diff --git a/user/chat.nix b/user/chat.nix index 75e7d91..8417484 100644 --- a/user/chat.nix +++ b/user/chat.nix @@ -1,7 +1,4 @@ -{ config, pkgs, lib, inputs, ... }: -let inherit (import ./variables.nix) key theme color accent font; -in { - +{ config, pkgs, lib, inputs, ... }: { systemd.user.services = { discord = { Unit = { @@ -10,7 +7,7 @@ in { After = [ "graphical-session.target" ]; }; Service = { - ExecStart = "/usr/bin/env flatpak run io.github.spacingbat3.webcord"; + ExecStart = "${pkgs.webcord}/bin/webcord"; Restart = "on-failure"; }; Install = { WantedBy = [ "sway-session.target" ]; }; @@ -29,13 +26,5 @@ in { }; }; - home.packages = with pkgs; [ tdesktop ]; - - home.activation = { - install_flatpaks = lib.hm.dag.entryAfter [ "writeBoundary" ] '' - $DRY_RUN_CMD flatpak $VERBOSE_ARG remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo || true - $DRY_RUN_CMD flatpak $VERBOSE_ARG install -y flathub io.github.spacingbat3.webcord || true - ''; - }; - + home.packages = with pkgs; [ tdesktop webcord ]; } diff --git a/user/home.nix b/user/home.nix index 9c5871d..6653c5a 100644 --- a/user/home.nix +++ b/user/home.nix @@ -70,7 +70,6 @@ in { ## chat thunderbird - # discord # I'm using webcord, see home.activation ## Theming orchis_theme_compact