aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--flake.lock6
-rw-r--r--flake.nix150
2 files changed, 78 insertions, 78 deletions
diff --git a/flake.lock b/flake.lock
index 3de7356..16d5981 100644
--- a/flake.lock
+++ b/flake.lock
@@ -2,11 +2,11 @@
"nodes": {
"nixpkgs": {
"locked": {
- "lastModified": 1728888510,
- "narHash": "sha256-nsNdSldaAyu6PE3YUA+YQLqUDJh+gRbBooMMekZJwvI=",
+ "lastModified": 1729880355,
+ "narHash": "sha256-RP+OQ6koQQLX5nw0NmcDrzvGL8HDLnyXt/jHhL1jwjM=",
"owner": "nixos",
"repo": "nixpkgs",
- "rev": "a3c0b3b21515f74fd2665903d4ce6bc4dc81c77c",
+ "rev": "18536bf04cd71abd345f9579158841376fdd0c5a",
"type": "github"
},
"original": {
diff --git a/flake.nix b/flake.nix
index a4980d9..df7ad4a 100644
--- a/flake.nix
+++ b/flake.nix
@@ -1,85 +1,85 @@
{
- description = "WebTray Flake";
+ description = "WebTray Flake";
- inputs = {
- nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
- };
+ inputs = {
+ nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
+ };
- outputs =
- { self, nixpkgs }:
- let
- pkgs = import nixpkgs { system = "x86_64-linux"; };
- in
- {
- packages.x86_64-linux.default = pkgs.stdenv.mkDerivation {
- name = "webtray";
- src = self;
- buildPhase = "qmake . && make";
- installPhase = "mkdir -p $out/bin; install -t $out/bin webtray";
+ outputs =
+ { self, nixpkgs }:
+ let
+ pkgs = import nixpkgs { system = "x86_64-linux"; };
+ in
+ {
+ packages.x86_64-linux.default = pkgs.stdenv.mkDerivation {
+ name = "webtray";
+ src = self;
+ buildPhase = "qmake . && make";
+ installPhase = "mkdir -p $out/bin; install -t $out/bin webtray";
- nativeBuildInputs = with pkgs; [
- qt6.wrapQtAppsHook
- makeWrapper
- ];
+ nativeBuildInputs = [
+ pkgs.qt6.wrapQtAppsHook
+ pkgs.makeWrapper
+ ];
- buildInputs = with pkgs; [
- qt6.qmake
- qt6.full
- qt6.qtbase
- qt6.qtwayland
- ];
- };
+ buildInputs = with pkgs; [
+ pkgs.qt6.qmake
+ pkgs.qt6.qtwebengine
+ pkgs.qt6.qtbase
+ pkgs.qt6.qtwayland
+ ];
+ };
- overlays.default = final: prev: { inherit (self.packages.${prev.system}) webtray; };
+ overlays.default = final: prev: { inherit (self.packages.${prev.system}) webtray; };
- nixosModules.default =
- {
- pkgs,
- lib,
- config,
- ...
- }:
- {
- options.webtray.instances = lib.mkOption {
- type = lib.types.attrsOf (
- lib.types.submodule {
- options = {
- url = lib.mkOption {
- description = "URL of the WebTray instance";
- type = lib.types.strMatching "http[s]?://[a-z0-9.]*:?[0-9]*";
- };
- autoStart = lib.mkOption {
- description = "WebTray Instances to start on login";
- type = lib.types.bool;
- default = true;
- };
- openInWindow = lib.mkOption {
- description = "Open Instance as Window";
- type = lib.types.bool;
- default = false;
- };
- };
- }
- );
- };
+ nixosModules.default =
+ {
+ pkgs,
+ lib,
+ config,
+ ...
+ }:
+ {
+ options.webtray.instances = lib.mkOption {
+ type = lib.types.attrsOf (
+ lib.types.submodule {
+ options = {
+ url = lib.mkOption {
+ description = "URL of the WebTray instance";
+ type = lib.types.strMatching "http[s]?://[a-z0-9.]*:?[0-9]*";
+ };
+ autoStart = lib.mkOption {
+ description = "WebTray Instances to start on login";
+ type = lib.types.bool;
+ default = true;
+ };
+ openInWindow = lib.mkOption {
+ description = "Open Instance as Window";
+ type = lib.types.bool;
+ default = false;
+ };
+ };
+ }
+ );
+ };
- config = {
- environment.systemPackages = [ self.packages.${pkgs.system}.default ];
+ config = {
+ environment.systemPackages = [ self.packages.${pkgs.system}.default ];
- systemd.user.services = builtins.mapAttrs (name: value: {
- enable = true;
- requires = if value.autoStart then [ "tray.target" ] else [ ];
- wantedBy = [ "graphical-session.target" ];
- description = "WebTray Instance for ${name}";
- serviceConfig = {
- Type = "simple";
- Restart = "on-failure";
- ExecStart = "${self.packages.${pkgs.system}.default}/bin/webtray ${value.url}${
- if value.openInWindow then " --open-at-startup" else ""
- }";
- };
- }) config.webtray.instances;
- };
- };
- };
+ systemd.user.services = builtins.mapAttrs (name: value: {
+ enable = true;
+ requires = if value.autoStart then [ "tray.target" ] else [ ];
+ wantedBy = [ "graphical-session.target" ];
+ description = "WebTray Instance for ${name}";
+ serviceConfig = {
+ Type = "simple";
+ Restart = "on-failure";
+ ExecStart = "${self.packages.${pkgs.system}.default}/bin/webtray ${value.url}${
+ if value.openInWindow then " --open-at-startup" else ""
+ }";
+ };
+ }) config.webtray.instances;
+ };
+ };
+ };
}