kde with teams
This commit is contained in:
parent
39a732d893
commit
deeda4b05a
7 changed files with 349 additions and 293 deletions
106
home/home.nix
106
home/home.nix
|
@ -13,15 +13,13 @@ in {
|
|||
|
||||
imports = [
|
||||
./programs/helix.nix
|
||||
./programs/wlogout.nix
|
||||
./programs/fuzzel.nix
|
||||
./programs/qtile.nix
|
||||
# ./programs/swayosd.nix
|
||||
./programs/swaync.nix
|
||||
./programs/firefox.nix
|
||||
./programs/kitty.nix
|
||||
./programs/zsh.nix
|
||||
./util/ez.nix
|
||||
./util/firefox-webapp.nix
|
||||
inputs.plasma-manager.homeManagerModules.plasma-manager # TODO: set up manually, use rc2nix to convert
|
||||
inputs.nix-flatpak.homeManagerModules.nix-flatpak
|
||||
];
|
||||
|
||||
home.packages = with pkgs;
|
||||
|
@ -29,8 +27,6 @@ in {
|
|||
thunderbird
|
||||
strawberry
|
||||
inkscape
|
||||
(xfce.thunar.override {thunarPlugins = [xfce.thunar-archive-plugin xfce.thunar-volman xfce.thunar-media-tags-plugin];})
|
||||
peazip
|
||||
|
||||
imv
|
||||
|
||||
|
@ -48,7 +44,6 @@ in {
|
|||
slurp
|
||||
|
||||
libnotify
|
||||
gtklock
|
||||
playerctl
|
||||
|
||||
kooha
|
||||
|
@ -56,7 +51,6 @@ in {
|
|||
onlyoffice-bin
|
||||
|
||||
croc
|
||||
logseq
|
||||
|
||||
xorg.xrdb
|
||||
culr
|
||||
|
@ -87,55 +81,29 @@ in {
|
|||
enable = true;
|
||||
};
|
||||
|
||||
services.avizo = {
|
||||
enable = true;
|
||||
settings = with pkgs.rice.palette; {
|
||||
default = {
|
||||
height = 120;
|
||||
width = 300;
|
||||
time = 1.0;
|
||||
border-radius = 16;
|
||||
fade-in = 0.5;
|
||||
fade-out = 1.0;
|
||||
padding = pkgs.rice.borders.gaps_in;
|
||||
block-count = 16;
|
||||
block-spacing = 4;
|
||||
block-height = 4;
|
||||
background = lib.strings.concatStrings ["rgba(" "${toString bright.black.r}" " ," "${toString bright.black.g}" " ," "${toString bright.black.b}" " , 1.0)"];
|
||||
border-color = lib.strings.concatStrings ["rgba(" "${toString bright.yellow.r}" " ," "${toString bright.yellow.g}" " ," "${toString bright.yellow.b}" " , 1.0)"];
|
||||
bar-fg-color = lib.strings.concatStrings ["rgba(" "${toString bright.yellow.r}" " ," "${toString bright.yellow.g}" " ," "${toString bright.yellow.b}" " , 1.0)"];
|
||||
bar-bg-color = lib.strings.concatStrings ["rgba(" "${toString util.bg.r}" " ," "${toString util.bg.g}" " ," "${toString util.bg.b}" " , 1.0)"];
|
||||
};
|
||||
services.udiskie.enable = true; # TODO is this fixed now?
|
||||
|
||||
services.flatpak.packages = [
|
||||
"com.logseq.Logseq"
|
||||
# "com.github.IsmaelMartinez.teams_for_linux"
|
||||
];
|
||||
services.flatpak.overrides = {
|
||||
global = {
|
||||
Context.sockets = ["wayland" "!x11" "!fallback-x11"];
|
||||
Environment."ELECTRON_OZONE_PLATFORM_HINT" = "auto";
|
||||
};
|
||||
};
|
||||
|
||||
services.swayidle = {
|
||||
enable = true;
|
||||
timeouts = [
|
||||
{
|
||||
timeout = 300;
|
||||
command = "${lib.getExe pkgs.gtklock} &";
|
||||
}
|
||||
{
|
||||
timeout = 900;
|
||||
command = "${lib.getExe' pkgs.systemd "systemctl"} suspend";
|
||||
}
|
||||
];
|
||||
# events = [
|
||||
# {
|
||||
# event = "before-sleep";
|
||||
# command = "${lib.getExe pkgs.gtklock}";
|
||||
# }
|
||||
# {
|
||||
# event = "lock";
|
||||
# command = "${lib.getExe pkgs.gtklock}";
|
||||
# }
|
||||
# ];
|
||||
systemdTarget = "qtile-session.target";
|
||||
programs.firefox.webapps = {
|
||||
teams = {
|
||||
url = "https://teams.microsoft.com";
|
||||
id = 1;
|
||||
extraSettings = config.programs.firefox.profiles.default.settings;
|
||||
name = "Microsoft Teams";
|
||||
icon = ./ms_teams.png;
|
||||
};
|
||||
};
|
||||
|
||||
services.udiskie.enable = false; # TODO change once upstream python package is fixed in nixpkgs
|
||||
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
extensions = with pkgs.vscode-extensions; [
|
||||
|
@ -162,10 +130,10 @@ in {
|
|||
};
|
||||
|
||||
systemd.user.startServices = "sd-switch";
|
||||
ezServices = with pkgs; {
|
||||
swaybg = "${lib.getExe swaybg} -i ${rice.bg.image} -m fill";
|
||||
# swayosd = "${lib.getExe' swayosd "swayosd"} --max-volume 100";
|
||||
};
|
||||
# ezServices = with pkgs; {
|
||||
# swaybg = "${lib.getExe swaybg} -i ${rice.bg.image} -m fill";
|
||||
# # swayosd = "${lib.getExe' swayosd "swayosd"} --max-volume 100";
|
||||
# };
|
||||
|
||||
xdg.enable = true;
|
||||
xresources.properties = with palette-hex; {
|
||||
|
@ -208,18 +176,18 @@ in {
|
|||
comment = "A privacy-first, open-source platform for knowledge management and collaboration.";
|
||||
};
|
||||
|
||||
gtk = with pkgs.rice; {
|
||||
enable = true;
|
||||
theme = with gtk-theme; {
|
||||
inherit package name;
|
||||
};
|
||||
iconTheme = with icons; {
|
||||
inherit package name;
|
||||
};
|
||||
font = with fonts.sans; {
|
||||
inherit name size package;
|
||||
};
|
||||
};
|
||||
# gtk = with pkgs.rice; {
|
||||
# enable = true;
|
||||
# theme = with gtk-theme; {
|
||||
# inherit package name;
|
||||
# };
|
||||
# iconTheme = with icons; {
|
||||
# inherit package name;
|
||||
# };
|
||||
# font = with fonts.sans; {
|
||||
# inherit name size package;
|
||||
# };
|
||||
# };
|
||||
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
|
|
BIN
home/ms_teams.png
Normal file
BIN
home/ms_teams.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 135 KiB |
|
@ -11,6 +11,8 @@
|
|||
name = "Default";
|
||||
settings = {
|
||||
"browser.startup.homepage" = "about:blank";
|
||||
"widget.use-xdg-desktop-portal.file-picker" = 1;
|
||||
"widget.use-xdg-desktop-portal.mime-handler" = 1;
|
||||
};
|
||||
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
|
||||
vimium-c
|
||||
|
|
203
home/util/firefox-webapp.nix
Normal file
203
home/util/firefox-webapp.nix
Normal file
|
@ -0,0 +1,203 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (builtins) getAttr stringLength substring;
|
||||
inherit (lib) mkOption;
|
||||
inherit (lib.attrsets) mapAttrs mapAttrs' nameValuePair;
|
||||
inherit (lib.strings) concatStringsSep toUpper;
|
||||
|
||||
make-app-profiles = cfg:
|
||||
mapAttrs' (name: cfg:
|
||||
nameValuePair "home-manager-webapp-${name}" {
|
||||
inherit (cfg) id;
|
||||
|
||||
userChrome = ''
|
||||
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
|
||||
|
||||
browser {
|
||||
margin-right: 0px; margin-bottom: 0px;
|
||||
}
|
||||
|
||||
#TabsToolbar {
|
||||
visibility: collapse !important;
|
||||
}
|
||||
|
||||
#nav-bar {
|
||||
margin-top: 0;
|
||||
margin-bottom: -42px;
|
||||
z-index: -100;
|
||||
}
|
||||
|
||||
#main-window[windowtype="navigator:browser"] {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
||||
.tab-background[selected="true"] {
|
||||
background: ${cfg.backgroundColor} !important;
|
||||
}
|
||||
'';
|
||||
|
||||
settings =
|
||||
cfg.extraSettings
|
||||
// {
|
||||
"browser.sessionstore.resume_session_once" = false;
|
||||
"browser.sessionstore.resume_from_crash" = false;
|
||||
"browser.cache.disk.enable" = false;
|
||||
"browser.cache.disk.capacity" = 0;
|
||||
"browser.cache.disk.filesystem_reported" = 1;
|
||||
"browser.cache.disk.smart_size.enabled" = false;
|
||||
"browser.cache.disk.smart_size.first_run" = false;
|
||||
"browser.cache.disk.smart_size.use_old_max" = false;
|
||||
"browser.ctrlTab.previews" = true;
|
||||
"browser.tabs.warnOnClose" = false;
|
||||
"plugin.state.flash" = 2;
|
||||
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
|
||||
"browser.tabs.drawInTitlebar" = false;
|
||||
"browser.tabs.inTitlebar" = 0;
|
||||
"browser.contentblocking.category" = "strict";
|
||||
"network.cookie.lifetimePolicy" = 0;
|
||||
"layout.css.prefers-color-scheme.content-override" = getAttr cfg.theme {
|
||||
dark = 0;
|
||||
light = 1;
|
||||
system = 2;
|
||||
};
|
||||
};
|
||||
})
|
||||
cfg;
|
||||
in {
|
||||
options.programs.firefox.webapps = mkOption {
|
||||
default = {};
|
||||
|
||||
type = with lib.types;
|
||||
attrsOf (submodule {
|
||||
options = {
|
||||
####################
|
||||
# Firefox settings #
|
||||
####################
|
||||
url = mkOption {
|
||||
type = str;
|
||||
description = "The URL of the webapp to launch.";
|
||||
};
|
||||
|
||||
id = mkOption {
|
||||
type = int;
|
||||
description = "The Firefox profile ID to set.";
|
||||
};
|
||||
|
||||
extraArgs = mkOption {
|
||||
type = listOf str;
|
||||
default = [];
|
||||
description = "Extra args to launch Firefox with.";
|
||||
};
|
||||
|
||||
extraSettings = mkOption {
|
||||
type = attrsOf (either bool (either int str));
|
||||
default = {};
|
||||
description = "Additional Firefox profile settings.";
|
||||
};
|
||||
|
||||
backgroundColor = mkOption {
|
||||
type = str;
|
||||
default = "rgba(0, 0, 0, 0)";
|
||||
description = "The background color to use for loading pages.";
|
||||
};
|
||||
|
||||
theme = mkOption {
|
||||
type = enum ["dark" "light" "system"];
|
||||
default = "system";
|
||||
description = "The application CSS theme to use, if supported.";
|
||||
};
|
||||
|
||||
#########################
|
||||
# Desktop file settings #
|
||||
#########################
|
||||
|
||||
# Copied from xdg.desktopEntries, with slight modification for default settings
|
||||
name = mkOption {
|
||||
type = nullOr str;
|
||||
default = null;
|
||||
description = "Specific name of the application. Defaults to the capitalized attribute name.";
|
||||
};
|
||||
|
||||
mimeType = mkOption {
|
||||
description = "The MIME type(s) supported by this application.";
|
||||
type = nullOr (listOf str);
|
||||
default = ["text/html" "text/xml" "application/xhtml_xml"];
|
||||
};
|
||||
|
||||
# Copied verbatim from xdg.desktopEntries.
|
||||
genericName = mkOption {
|
||||
type = nullOr str;
|
||||
default = null;
|
||||
description = "Generic name of the application.";
|
||||
};
|
||||
|
||||
comment = mkOption {
|
||||
type = nullOr str;
|
||||
default = null;
|
||||
description = "Tooltip for the entry.";
|
||||
};
|
||||
|
||||
categories = mkOption {
|
||||
type = nullOr (listOf str);
|
||||
default = null;
|
||||
description = "Categories in which the entry should be shown in a menu.";
|
||||
};
|
||||
|
||||
icon = mkOption {
|
||||
type = nullOr (either str path);
|
||||
default = null;
|
||||
description = "Icon to display in file manager, menus, etc.";
|
||||
};
|
||||
|
||||
prefersNonDefaultGPU = mkOption {
|
||||
type = nullOr bool;
|
||||
default = null;
|
||||
description = ''
|
||||
If true, the application prefers to be run on a more
|
||||
powerful discrete GPU if available.
|
||||
'';
|
||||
};
|
||||
};
|
||||
});
|
||||
|
||||
description = "Websites to create special site-specific Firefox instances for.";
|
||||
};
|
||||
|
||||
config = {
|
||||
programs.firefox.profiles = make-app-profiles config.programs.firefox.webapps;
|
||||
|
||||
xdg.desktopEntries =
|
||||
mapAttrs (name: cfg: {
|
||||
inherit (cfg) genericName comment categories icon mimeType prefersNonDefaultGPU;
|
||||
|
||||
name =
|
||||
if cfg.name == null
|
||||
then (toUpper (substring 0 1 name)) + (substring 1 (stringLength name) name)
|
||||
else cfg.name;
|
||||
|
||||
startupNotify = true;
|
||||
terminal = false;
|
||||
type = "Application";
|
||||
|
||||
exec = concatStringsSep " " ([
|
||||
"${config.programs.firefox.package}/bin/firefox"
|
||||
"--class"
|
||||
"WebApp-${name}"
|
||||
"-P"
|
||||
"${config.programs.firefox.profiles."home-manager-webapp-${name}".path}"
|
||||
"--no-remote"
|
||||
]
|
||||
++ cfg.extraArgs
|
||||
++ ["${cfg.url}"]);
|
||||
|
||||
settings = {
|
||||
X-MultipleArgs = "false"; # Consider enabling, don't know what this does
|
||||
StartupWMClass = "WebApp-${name}";
|
||||
};
|
||||
})
|
||||
config.programs.firefox.webapps;
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue