30
hosts/common/user/configs/gui/openlens/default.nix
Normal file
30
hosts/common/user/configs/gui/openlens/default.nix
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
home ? throw "home argument is required",
|
||||
}:
|
||||
{ config, pkgs, ... }:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user};
|
||||
in
|
||||
{
|
||||
home-manager.users.${user} = {
|
||||
home.packages = [ (pkgs.callPackage ./package.nix { }) ];
|
||||
|
||||
xdg.configFile."OpenLens/lens-user-store.json".source =
|
||||
(pkgs.formats.json { }).generate "lens-user-store.json"
|
||||
{
|
||||
__internal__ = {
|
||||
migrations = {
|
||||
version = "6.5.0";
|
||||
};
|
||||
};
|
||||
|
||||
preferences = {
|
||||
colorTheme = "system";
|
||||
editorConfiguration.fontFamily = builtins.head hmConfig.theme.font.monospace.names;
|
||||
terminalConfig.fontFamily = builtins.head hmConfig.theme.font.monospace.names;
|
||||
terminalCopyOnSelect = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
34
hosts/common/user/configs/gui/openlens/package.nix
Normal file
34
hosts/common/user/configs/gui/openlens/package.nix
Normal file
@@ -0,0 +1,34 @@
|
||||
# https://github.com/NixOS/nixpkgs/commit/4b29fd82fc757855333ef222742a48d7176eabb9#diff-b8be2fa008db0ba3e0c782ccc6d04465140ce1e59d9e58ba1942c9e9384ce58bL39
|
||||
{ lib, pkgs }:
|
||||
pkgs.appimageTools.wrapType2 rec {
|
||||
pname = "openlens";
|
||||
version = "6.5.2-366";
|
||||
|
||||
src = pkgs.fetchurl {
|
||||
url = "https://github.com/MuhammedKalkan/OpenLens/releases/download/v${version}/OpenLens-${version}.x86_64.AppImage";
|
||||
sha256 = "sha256-ZAltAS/U/xh4kCT7vQ+NHAzWV7z0uE5GMQICHKSdj8k=";
|
||||
};
|
||||
|
||||
appimageContents = pkgs.appimageTools.extractType2 {
|
||||
inherit pname version src;
|
||||
};
|
||||
|
||||
unshareIpc = false;
|
||||
|
||||
extraInstallCommands = ''
|
||||
install -m 444 -D ${appimageContents}/open-lens.desktop $out/share/applications/${pname}.desktop
|
||||
install -m 444 -D ${appimageContents}/usr/share/icons/hicolor/512x512/apps/open-lens.png \
|
||||
$out/share/icons/hicolor/512x512/apps/${pname}.png
|
||||
substituteInPlace $out/share/applications/${pname}.desktop \
|
||||
--replace 'Icon=open-lens' 'Icon=${pname}' \
|
||||
--replace 'Exec=AppRun' 'Exec=${pname}'
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Kubernetes IDE";
|
||||
homepage = "https://github.com/MuhammedKalkan/OpenLens";
|
||||
license = licenses.mit;
|
||||
mainProgram = "openlens";
|
||||
platforms = [ "x86_64-linux" ];
|
||||
};
|
||||
}
|
@@ -108,7 +108,7 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
xdg.configFile.".vscode/argv.json".source = (pkgs.formats.json { }).generate "argv.json" {
|
||||
home.file.".vscode/argv.json".source = (pkgs.formats.json { }).generate "argv.json" {
|
||||
password-store = "basic";
|
||||
};
|
||||
|
||||
|
@@ -49,6 +49,7 @@ in
|
||||
(import ../../../common/user/configs/gui/networking { inherit user home; })
|
||||
(import ../../../common/user/configs/gui/obs { inherit user home; })
|
||||
(import ../../../common/user/configs/gui/obsidian { inherit user home; })
|
||||
(import ../../../common/user/configs/gui/openlens { inherit user home; })
|
||||
(import ../../../common/user/configs/gui/pipewire { inherit user home; })
|
||||
(import ../../../common/user/configs/gui/qalculate { inherit user home; })
|
||||
(import ../../../common/user/configs/gui/qt { inherit user home; })
|
||||
|
Reference in New Issue
Block a user