all the work to make stylix work again, just need to update the flake lock when it's time
This commit is contained in:
		
							parent
							
								
									480bdcdcc4
								
							
						
					
					
						commit
						e4839e4d2e
					
				
					 6 changed files with 114 additions and 317 deletions
				
			
		| 
						 | 
				
			
			@ -131,7 +131,7 @@
 | 
			
		|||
      nix-index-database.nixosModules.nix-index
 | 
			
		||||
      {
 | 
			
		||||
        home-manager.sharedModules = [
 | 
			
		||||
          inputs.catppuccin.homeManagerModules.catppuccin
 | 
			
		||||
          inputs.catppuccin.homeModules.catppuccin
 | 
			
		||||
          ./home-manager/shared
 | 
			
		||||
          sops-nix.homeManagerModules.sops
 | 
			
		||||
        ];
 | 
			
		||||
| 
						 | 
				
			
			@ -164,7 +164,7 @@
 | 
			
		|||
    nixosModules = import ./modules/nixos;
 | 
			
		||||
    # Reusable home-manager modules you might want to export
 | 
			
		||||
    # These are usually stuff you would upstream into home-manager
 | 
			
		||||
    homeManagerModules = import ./modules/home-manager;
 | 
			
		||||
    # homeManagerModules = import ./modules/home-manager;
 | 
			
		||||
 | 
			
		||||
    # Your custom packages and modifications, exported as overlays
 | 
			
		||||
    overlays = import ./overlays {inherit inputs;};
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -4,6 +4,7 @@
 | 
			
		|||
    # catppuccin.enable = true;
 | 
			
		||||
    settings = {
 | 
			
		||||
      main = {
 | 
			
		||||
        font = "Atkinson Monolegible:size=12";
 | 
			
		||||
      };
 | 
			
		||||
 | 
			
		||||
      mouse = {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -13,33 +13,33 @@
 | 
			
		|||
  programs.plasma = {
 | 
			
		||||
    enable = true;
 | 
			
		||||
    desktop.mouseActions.verticalScroll = "switchVirtualDesktop";
 | 
			
		||||
    # kscreenlocker.appearance.wallpaper = "${osConfig.stylix.image}";
 | 
			
		||||
    # fonts = {
 | 
			
		||||
    #   fixedWidth = {
 | 
			
		||||
    #     pointSize = 11;
 | 
			
		||||
    #     family = "${osConfig.stylix.fonts.monospace.name}";
 | 
			
		||||
    #   };
 | 
			
		||||
    #   general = {
 | 
			
		||||
    #     pointSize = 11;
 | 
			
		||||
    #     family = "${osConfig.stylix.fonts.serif.name}";
 | 
			
		||||
    #   };
 | 
			
		||||
    #   menu = {
 | 
			
		||||
    #     pointSize = 11;
 | 
			
		||||
    #     family = "${osConfig.stylix.fonts.sansSerif.name}";
 | 
			
		||||
    #   };
 | 
			
		||||
    #   small = {
 | 
			
		||||
    #     pointSize = 11;
 | 
			
		||||
    #     family = "${osConfig.stylix.fonts.sansSerif.name}";
 | 
			
		||||
    #   };
 | 
			
		||||
    #   toolbar = {
 | 
			
		||||
    #     pointSize = 11;
 | 
			
		||||
    #     family = "${osConfig.stylix.fonts.sansSerif.name}";
 | 
			
		||||
    #   };
 | 
			
		||||
    #   windowTitle = {
 | 
			
		||||
    #     pointSize = 11;
 | 
			
		||||
    #     family = "${osConfig.stylix.fonts.sansSerif.name}";
 | 
			
		||||
    #   };
 | 
			
		||||
    # };
 | 
			
		||||
    kscreenlocker.appearance.wallpaper = "${osConfig.stylix.image}";
 | 
			
		||||
    fonts = {
 | 
			
		||||
      fixedWidth = {
 | 
			
		||||
        pointSize = 11;
 | 
			
		||||
        family = "${osConfig.stylix.fonts.monospace.name}";
 | 
			
		||||
      };
 | 
			
		||||
      general = {
 | 
			
		||||
        pointSize = 11;
 | 
			
		||||
        family = "${osConfig.stylix.fonts.serif.name}";
 | 
			
		||||
      };
 | 
			
		||||
      menu = {
 | 
			
		||||
        pointSize = 11;
 | 
			
		||||
        family = "${osConfig.stylix.fonts.sansSerif.name}";
 | 
			
		||||
      };
 | 
			
		||||
      small = {
 | 
			
		||||
        pointSize = 11;
 | 
			
		||||
        family = "${osConfig.stylix.fonts.sansSerif.name}";
 | 
			
		||||
      };
 | 
			
		||||
      toolbar = {
 | 
			
		||||
        pointSize = 11;
 | 
			
		||||
        family = "${osConfig.stylix.fonts.sansSerif.name}";
 | 
			
		||||
      };
 | 
			
		||||
      windowTitle = {
 | 
			
		||||
        pointSize = 11;
 | 
			
		||||
        family = "${osConfig.stylix.fonts.sansSerif.name}";
 | 
			
		||||
      };
 | 
			
		||||
    };
 | 
			
		||||
    panels = [
 | 
			
		||||
      {
 | 
			
		||||
        alignment = "left";
 | 
			
		||||
| 
						 | 
				
			
			@ -82,6 +82,7 @@
 | 
			
		|||
                "qBittorrent"
 | 
			
		||||
                "vlc"
 | 
			
		||||
                "steam"
 | 
			
		||||
                "Thunderbird Daily"
 | 
			
		||||
              ];
 | 
			
		||||
            };
 | 
			
		||||
          }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -54,36 +54,33 @@
 | 
			
		|||
      # };
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
  # stylix.enable = true;
 | 
			
		||||
  # qt.platformTheme.name = lib.mkForce "kvantum";
 | 
			
		||||
  # qt.style.name = lib.mkForce "kvantum";
 | 
			
		||||
 | 
			
		||||
  # stylix = {
 | 
			
		||||
  #   enable = true;
 | 
			
		||||
  #   autoEnable = true;
 | 
			
		||||
  #   base16Scheme = {
 | 
			
		||||
  #     scheme = "Catppuccin Macchiato";
 | 
			
		||||
  #     author = "https://github.com/catppuccin/catppuccin";
 | 
			
		||||
  #     base00 = "24273a";
 | 
			
		||||
  #     base01 = "1e2030";
 | 
			
		||||
  #     base02 = "363a4f";
 | 
			
		||||
  #     base03 = "494d64";
 | 
			
		||||
  #     base04 = "5b6078";
 | 
			
		||||
  #     base05 = "cad3f5";
 | 
			
		||||
  #     base06 = "f4dbd6";
 | 
			
		||||
  #     base07 = "b7bdf8";
 | 
			
		||||
  #     base08 = "ed8796";
 | 
			
		||||
  #     base09 = "f5a97f";
 | 
			
		||||
  #     base0A = "eed49f";
 | 
			
		||||
  #     base0B = "a6da95";
 | 
			
		||||
  #     base0C = "8bd5ca";
 | 
			
		||||
  #     base0D = "8aadf4";
 | 
			
		||||
  #     base0E = "c6a0f6";
 | 
			
		||||
  #     base0F = "f0c6c6";
 | 
			
		||||
  #   };
 | 
			
		||||
  #   image = ./background.jpg;
 | 
			
		||||
  #   cursor.package = pkgs.catppuccin-cursors;
 | 
			
		||||
  #   cursor.name = "catppuccin-macchiato-mauve-cursors";
 | 
			
		||||
  #   cursor.size = 16;
 | 
			
		||||
  # };
 | 
			
		||||
  stylix = {
 | 
			
		||||
    enable = true;
 | 
			
		||||
    autoEnable = true;
 | 
			
		||||
    base16Scheme = {
 | 
			
		||||
      scheme = "Catppuccin Macchiato";
 | 
			
		||||
      author = "https://github.com/catppuccin/catppuccin";
 | 
			
		||||
      base00 = "24273a";
 | 
			
		||||
      base01 = "1e2030";
 | 
			
		||||
      base02 = "363a4f";
 | 
			
		||||
      base03 = "494d64";
 | 
			
		||||
      base04 = "5b6078";
 | 
			
		||||
      base05 = "cad3f5";
 | 
			
		||||
      base06 = "f4dbd6";
 | 
			
		||||
      base07 = "b7bdf8";
 | 
			
		||||
      base08 = "ed8796";
 | 
			
		||||
      base09 = "f5a97f";
 | 
			
		||||
      base0A = "eed49f";
 | 
			
		||||
      base0B = "a6da95";
 | 
			
		||||
      base0C = "8bd5ca";
 | 
			
		||||
      base0D = "8aadf4";
 | 
			
		||||
      base0E = "c6a0f6";
 | 
			
		||||
      base0F = "f0c6c6";
 | 
			
		||||
    };
 | 
			
		||||
    image = ./background.jpg;
 | 
			
		||||
    cursor.package = pkgs.catppuccin-cursors;
 | 
			
		||||
    cursor.name = "catppuccin-macchiato-mauve-cursors";
 | 
			
		||||
    cursor.size = 16;
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -70,8 +70,8 @@
 | 
			
		|||
  catppuccin = {
 | 
			
		||||
    flavor = "macchiato";
 | 
			
		||||
    tty.enable = true;
 | 
			
		||||
    # sddm.enable = true;
 | 
			
		||||
    # sddm.flavor = "macchiato";
 | 
			
		||||
    sddm.enable = true;
 | 
			
		||||
    sddm.flavor = "macchiato";
 | 
			
		||||
    forgejo.enable = true;
 | 
			
		||||
    forgejo.flavor = "macchiato";
 | 
			
		||||
    # plymouth.enable = false;
 | 
			
		||||
| 
						 | 
				
			
			@ -87,70 +87,70 @@
 | 
			
		|||
    enableBrowserSocket = true;
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  # stylix = {
 | 
			
		||||
  #   enable = true;
 | 
			
		||||
  #   # targets.qt.platform = "kde6";
 | 
			
		||||
  #   autoEnable = true;
 | 
			
		||||
  #   base16Scheme = {
 | 
			
		||||
  #     scheme = "Catppuccin Macchiato";
 | 
			
		||||
  #     author = "https://github.com/catppuccin/catppuccin";
 | 
			
		||||
  #     base00 = "24273a";
 | 
			
		||||
  #     base01 = "1e2030";
 | 
			
		||||
  #     base02 = "363a4f";
 | 
			
		||||
  #     base03 = "494d64";
 | 
			
		||||
  #     base04 = "5b6078";
 | 
			
		||||
  #     base05 = "cad3f5";
 | 
			
		||||
  #     base06 = "f4dbd6";
 | 
			
		||||
  #     base07 = "b7bdf8";
 | 
			
		||||
  #     base08 = "ed8796";
 | 
			
		||||
  #     base09 = "f5a97f";
 | 
			
		||||
  #     base0A = "eed49f";
 | 
			
		||||
  #     base0B = "a6da95";
 | 
			
		||||
  #     base0C = "8bd5ca";
 | 
			
		||||
  #     base0D = "8aadf4";
 | 
			
		||||
  #     base0E = "c6a0f6";
 | 
			
		||||
  #     base0F = "f0c6c6";
 | 
			
		||||
  #   };
 | 
			
		||||
  #   image = ./background.jpg;
 | 
			
		||||
  #   cursor.package = pkgs.catppuccin-cursors.macchiatoMauve;
 | 
			
		||||
  #   cursor.name = "catppuccin-macchiato-mauve-cursors";
 | 
			
		||||
  #   cursor.size = 16;
 | 
			
		||||
  #   homeManagerIntegration.followSystem = true;
 | 
			
		||||
  #   fonts = {
 | 
			
		||||
  #     serif = {
 | 
			
		||||
  #       package = pkgs.dejavu_fonts;
 | 
			
		||||
  #       name = "DejaVu Serif";
 | 
			
		||||
  #     };
 | 
			
		||||
  stylix = {
 | 
			
		||||
    enable = true;
 | 
			
		||||
    autoEnable = true;
 | 
			
		||||
    base16Scheme = {
 | 
			
		||||
      scheme = "Catppuccin Macchiato";
 | 
			
		||||
      author = "https://github.com/catppuccin/catppuccin";
 | 
			
		||||
      base00 = "24273a";
 | 
			
		||||
      base01 = "1e2030";
 | 
			
		||||
      base02 = "363a4f";
 | 
			
		||||
      base03 = "494d64";
 | 
			
		||||
      base04 = "5b6078";
 | 
			
		||||
      base05 = "cad3f5";
 | 
			
		||||
      base06 = "f4dbd6";
 | 
			
		||||
      base07 = "b7bdf8";
 | 
			
		||||
      base08 = "ed8796";
 | 
			
		||||
      base09 = "f5a97f";
 | 
			
		||||
      base0A = "eed49f";
 | 
			
		||||
      base0B = "a6da95";
 | 
			
		||||
      base0C = "8bd5ca";
 | 
			
		||||
      base0D = "8aadf4";
 | 
			
		||||
      base0E = "c6a0f6";
 | 
			
		||||
      base0F = "f0c6c6";
 | 
			
		||||
    };
 | 
			
		||||
    image = ./background.jpg;
 | 
			
		||||
    cursor.package = pkgs.catppuccin-cursors.macchiatoMauve;
 | 
			
		||||
    cursor.name = "catppuccin-macchiato-mauve-cursors";
 | 
			
		||||
    cursor.size = 16;
 | 
			
		||||
    homeManagerIntegration.followSystem = true;
 | 
			
		||||
    fonts = {
 | 
			
		||||
      serif = {
 | 
			
		||||
        package = pkgs.atkinson-hyperlegible;
 | 
			
		||||
        name = "Atkinson Hyperlegible";
 | 
			
		||||
      };
 | 
			
		||||
 | 
			
		||||
  #     monospace = {
 | 
			
		||||
  #       package = pkgs.dejavu_fonts;
 | 
			
		||||
  #       name = "DejaVu Sans Mono";
 | 
			
		||||
  #     };
 | 
			
		||||
      monospace = {
 | 
			
		||||
        package = pkgs.atkinson-monolegible;
 | 
			
		||||
        name = "Atkinson Monolegible";
 | 
			
		||||
      };
 | 
			
		||||
 | 
			
		||||
  #     sansSerif = {
 | 
			
		||||
  #       package = pkgs.dejavu_fonts;
 | 
			
		||||
  #       name = "DejaVu Sans";
 | 
			
		||||
  #     };
 | 
			
		||||
      sansSerif = {
 | 
			
		||||
        package = pkgs.atkinson-hyperlegible;
 | 
			
		||||
        name = "Atkinson Hyperlegible";
 | 
			
		||||
      };
 | 
			
		||||
 | 
			
		||||
  #     emoji = {
 | 
			
		||||
  #       package = pkgs.noto-fonts-emoji-blob-bin;
 | 
			
		||||
  #       name = "Blobmoji";
 | 
			
		||||
  #     };
 | 
			
		||||
  #   };
 | 
			
		||||
  # };
 | 
			
		||||
      emoji = {
 | 
			
		||||
        package = pkgs.noto-fonts-emoji-blob-bin;
 | 
			
		||||
        name = "Blobmoji";
 | 
			
		||||
      };
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  fonts.packages = [
 | 
			
		||||
    pkgs.atkinson-hyperlegible
 | 
			
		||||
    pkgs.atkinson-monolegible
 | 
			
		||||
    pkgs.noto-fonts-emoji-blob-bin
 | 
			
		||||
    pkgs.noto-fonts
 | 
			
		||||
    pkgs.nerd-fonts.fira-mono
 | 
			
		||||
  ];
 | 
			
		||||
 | 
			
		||||
  fonts.fontconfig.defaultFonts = {
 | 
			
		||||
    emoji = ["Blobmoji"];
 | 
			
		||||
    monospace = ["Atkinson Monolegible"];
 | 
			
		||||
    sansSerif = ["Atkinson Hyperlegible"];
 | 
			
		||||
  };
 | 
			
		||||
  # fonts.fontconfig.defaultFonts = {
 | 
			
		||||
  #   emoji = ["Blobmoji"];
 | 
			
		||||
  #   monospace = ["Atkinson Monolegible"];
 | 
			
		||||
  #   sansSerif = ["Atkinson Hyperlegible"];
 | 
			
		||||
  # };
 | 
			
		||||
 | 
			
		||||
  networking =
 | 
			
		||||
    if config.services.vpn-ip.enable
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,202 +0,0 @@
 | 
			
		|||
{
 | 
			
		||||
  lib,
 | 
			
		||||
  buildNpmPackage,
 | 
			
		||||
  cargo,
 | 
			
		||||
  copyDesktopItems,
 | 
			
		||||
  dbus,
 | 
			
		||||
  electron_28,
 | 
			
		||||
  fetchFromGitLab,
 | 
			
		||||
  glib,
 | 
			
		||||
  gnome,
 | 
			
		||||
  gtk3,
 | 
			
		||||
  jq,
 | 
			
		||||
  libsecret,
 | 
			
		||||
  makeDesktopItem,
 | 
			
		||||
  makeWrapper,
 | 
			
		||||
  moreutils,
 | 
			
		||||
  napi-rs-cli,
 | 
			
		||||
  nodejs_18,
 | 
			
		||||
  patchutils_0_4_2,
 | 
			
		||||
  pkg-config,
 | 
			
		||||
  python3,
 | 
			
		||||
  runCommand,
 | 
			
		||||
  rustc,
 | 
			
		||||
  rustPlatform,
 | 
			
		||||
}: let
 | 
			
		||||
  description = "A secure and free password manager for all of your devices";
 | 
			
		||||
  icon = "bitwarden";
 | 
			
		||||
  electron = electron_28;
 | 
			
		||||
in
 | 
			
		||||
  buildNpmPackage rec {
 | 
			
		||||
    pname = "bitwarden-desktop";
 | 
			
		||||
    version = "2024.3.0";
 | 
			
		||||
 | 
			
		||||
    src = fetchFromGitLab {
 | 
			
		||||
      owner = "videostreaming";
 | 
			
		||||
      repo = "fcast";
 | 
			
		||||
      rev = "b13d0f7e8150c279d377a78f89d338b7fc0f5539";
 | 
			
		||||
      hash = "sha256-XEZB95GnfSy/wtTWpF8KlUQwyephUZmSLtbOwbcvd7g=";
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    patches = [
 | 
			
		||||
      ./electron-builder-package-lock.patch
 | 
			
		||||
    ];
 | 
			
		||||
 | 
			
		||||
    # The nested package-lock.json from upstream is out-of-date, so copy the
 | 
			
		||||
    # lock metadata from the root package-lock.json.
 | 
			
		||||
    postPatch = ''
 | 
			
		||||
      cat {,apps/desktop/src/}package-lock.json \
 | 
			
		||||
        | ${lib.getExe jq} -s '
 | 
			
		||||
          .[1].packages."".dependencies.argon2 = .[0].packages."".dependencies.argon2
 | 
			
		||||
            | .[0].packages."" = .[1].packages.""
 | 
			
		||||
            | .[1].packages = .[0].packages
 | 
			
		||||
            | .[1]
 | 
			
		||||
          ' \
 | 
			
		||||
        | ${moreutils}/bin/sponge apps/desktop/src/package-lock.json
 | 
			
		||||
    '';
 | 
			
		||||
 | 
			
		||||
    nodejs = nodejs_18;
 | 
			
		||||
 | 
			
		||||
    makeCacheWritable = true;
 | 
			
		||||
    npmFlags = ["--legacy-peer-deps"];
 | 
			
		||||
    npmWorkspace = "apps/desktop";
 | 
			
		||||
    npmDepsHash = "sha256-EpZXA+GkmHl5eqwIPTGHJZqrpr6k8gXneJG+GXumlkc=";
 | 
			
		||||
 | 
			
		||||
    cargoDeps = rustPlatform.fetchCargoTarball {
 | 
			
		||||
      name = "${pname}-${version}";
 | 
			
		||||
      inherit src;
 | 
			
		||||
      patches =
 | 
			
		||||
        map
 | 
			
		||||
        (
 | 
			
		||||
          patch:
 | 
			
		||||
            runCommand
 | 
			
		||||
            (builtins.baseNameOf patch)
 | 
			
		||||
            {nativeBuildInputs = [patchutils_0_4_2];}
 | 
			
		||||
            ''
 | 
			
		||||
              < ${patch} filterdiff -p1 --include=${lib.escapeShellArg cargoRoot}'/*' > $out
 | 
			
		||||
            ''
 | 
			
		||||
        )
 | 
			
		||||
        patches;
 | 
			
		||||
      patchFlags = ["-p4"];
 | 
			
		||||
      sourceRoot = "${src.name}/${cargoRoot}";
 | 
			
		||||
      hash = "sha256-qAqEFlUzT28fw6kLB8d7U8yXWevAU+q03zjN2xWsGyI=";
 | 
			
		||||
    };
 | 
			
		||||
    cargoRoot = "apps/desktop/desktop_native";
 | 
			
		||||
 | 
			
		||||
    env.ELECTRON_SKIP_BINARY_DOWNLOAD = "1";
 | 
			
		||||
 | 
			
		||||
    nativeBuildInputs = [
 | 
			
		||||
      cargo
 | 
			
		||||
      copyDesktopItems
 | 
			
		||||
      jq
 | 
			
		||||
      makeWrapper
 | 
			
		||||
      moreutils
 | 
			
		||||
      napi-rs-cli
 | 
			
		||||
      pkg-config
 | 
			
		||||
      python3
 | 
			
		||||
      rustc
 | 
			
		||||
      rustPlatform.cargoCheckHook
 | 
			
		||||
      rustPlatform.cargoSetupHook
 | 
			
		||||
    ];
 | 
			
		||||
 | 
			
		||||
    buildInputs = [
 | 
			
		||||
      glib
 | 
			
		||||
      gtk3
 | 
			
		||||
      libsecret
 | 
			
		||||
    ];
 | 
			
		||||
 | 
			
		||||
    preBuild = ''
 | 
			
		||||
      if [[ $(jq --raw-output '.devDependencies.electron' < package.json | grep -E --only-matching '^[0-9]+') != ${lib.escapeShellArg (lib.versions.major electron.version)} ]]; then
 | 
			
		||||
        echo 'ERROR: electron version mismatch'
 | 
			
		||||
        exit 1
 | 
			
		||||
      fi
 | 
			
		||||
    '';
 | 
			
		||||
 | 
			
		||||
    postBuild = ''
 | 
			
		||||
      pushd apps/desktop
 | 
			
		||||
 | 
			
		||||
      # desktop_native/index.js loads a file of that name regarldess of the libc being used
 | 
			
		||||
      mv desktop_native/desktop_native.* desktop_native/desktop_native.linux-x64-musl.node
 | 
			
		||||
 | 
			
		||||
      npm exec electron-builder -- \
 | 
			
		||||
        --dir \
 | 
			
		||||
        -c.electronDist=${electron}/libexec/electron \
 | 
			
		||||
        -c.electronVersion=${electron.version}
 | 
			
		||||
 | 
			
		||||
      popd
 | 
			
		||||
    '';
 | 
			
		||||
 | 
			
		||||
    doCheck = true;
 | 
			
		||||
 | 
			
		||||
    nativeCheckInputs = [
 | 
			
		||||
      dbus
 | 
			
		||||
      (gnome.gnome-keyring.override {useWrappedDaemon = false;})
 | 
			
		||||
    ];
 | 
			
		||||
 | 
			
		||||
    checkFlags = [
 | 
			
		||||
      "--skip=password::password::tests::test"
 | 
			
		||||
    ];
 | 
			
		||||
 | 
			
		||||
    checkPhase = ''
 | 
			
		||||
      runHook preCheck
 | 
			
		||||
 | 
			
		||||
      pushd ${cargoRoot}
 | 
			
		||||
      export HOME=$(mktemp -d)
 | 
			
		||||
      export -f cargoCheckHook runHook _eval _callImplicitHook
 | 
			
		||||
      export cargoCheckType=release
 | 
			
		||||
      dbus-run-session \
 | 
			
		||||
        --config-file=${dbus}/share/dbus-1/session.conf \
 | 
			
		||||
        -- bash -e -c cargoCheckHook
 | 
			
		||||
      popd
 | 
			
		||||
 | 
			
		||||
      runHook postCheck
 | 
			
		||||
    '';
 | 
			
		||||
 | 
			
		||||
    installPhase = ''
 | 
			
		||||
      runHook preInstall
 | 
			
		||||
 | 
			
		||||
      mkdir $out
 | 
			
		||||
 | 
			
		||||
      pushd apps/desktop/dist/linux-unpacked
 | 
			
		||||
      mkdir -p $out/opt/Bitwarden
 | 
			
		||||
      cp -r locales resources{,.pak} $out/opt/Bitwarden
 | 
			
		||||
      popd
 | 
			
		||||
 | 
			
		||||
      makeWrapper '${electron}/bin/electron' "$out/bin/bitwarden" \
 | 
			
		||||
        --add-flags $out/opt/Bitwarden/resources/app.asar \
 | 
			
		||||
        --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}" \
 | 
			
		||||
        --set-default ELECTRON_IS_DEV 0 \
 | 
			
		||||
        --inherit-argv0
 | 
			
		||||
 | 
			
		||||
      pushd apps/desktop/resources/icons
 | 
			
		||||
      for icon in *.png; do
 | 
			
		||||
        dir=$out/share/icons/hicolor/"''${icon%.png}"/apps
 | 
			
		||||
        mkdir -p "$dir"
 | 
			
		||||
        cp "$icon" "$dir"/${icon}.png
 | 
			
		||||
      done
 | 
			
		||||
      popd
 | 
			
		||||
 | 
			
		||||
      runHook postInstall
 | 
			
		||||
    '';
 | 
			
		||||
 | 
			
		||||
    desktopItems = [
 | 
			
		||||
      (makeDesktopItem {
 | 
			
		||||
        name = "bitwarden";
 | 
			
		||||
        exec = "bitwarden %U";
 | 
			
		||||
        inherit icon;
 | 
			
		||||
        comment = description;
 | 
			
		||||
        desktopName = "Bitwarden";
 | 
			
		||||
        categories = ["Utility"];
 | 
			
		||||
      })
 | 
			
		||||
    ];
 | 
			
		||||
 | 
			
		||||
    meta = {
 | 
			
		||||
      changelog = "https://github.com/bitwarden/clients/releases/tag/${src.rev}";
 | 
			
		||||
      inherit description;
 | 
			
		||||
      homepage = "https://bitwarden.com";
 | 
			
		||||
      license = lib.licenses.gpl3;
 | 
			
		||||
      maintainers = with lib.maintainers; [amarshall kiwi];
 | 
			
		||||
      platforms = ["x86_64-linux"];
 | 
			
		||||
      mainProgram = "bitwarden";
 | 
			
		||||
    };
 | 
			
		||||
  }
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue