mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 17:17:22 +01:00
fix: small env related inaccuracies
Some checks failed
Flake check / Check flake (push) Has been cancelled
Some checks failed
Flake check / Check flake (push) Has been cancelled
This commit is contained in:
parent
5229a4c480
commit
6ea3851e72
18 changed files with 1415 additions and 1310 deletions
|
|
@ -1,24 +1,22 @@
|
|||
{ lib, config, globals, nixosConfig ? config, ... }:
|
||||
{ lib, config, nixosConfig ? config, ... }:
|
||||
let
|
||||
inherit (nixosConfig.repo.secrets.common.mail) address1 address2 address3 address4 allMailAddresses;
|
||||
inherit (nixosConfig.repo.secrets.common.calendar) source1 source1-name source2 source2-name source3 source3-name;
|
||||
inherit (nixosConfig.repo.secrets.common) fullName;
|
||||
inherit (config.swarselsystems) isPublic;
|
||||
crocDomain = globals.services.croc.domain;
|
||||
inherit (config.swarselsystems) isPublic homeDir;
|
||||
|
||||
DISPLAY = ":0";
|
||||
in
|
||||
{
|
||||
options.swarselmodules.env = lib.mkEnableOption "env settings";
|
||||
config = lib.mkIf config.swarselmodules.env {
|
||||
home.sessionVariables = {
|
||||
inherit DISPLAY;
|
||||
EDITOR = "e -w";
|
||||
DISPLAY = ":0";
|
||||
SWARSEL_LO_RES = config.swarselsystems.lowResolution;
|
||||
SWARSEL_HI_RES = config.swarselsystems.highResolution;
|
||||
} // (lib.optionalAttrs (!isPublic) {
|
||||
CROC_RELAY = crocDomain;
|
||||
GITHUB_NOTIFICATION_TOKEN_PATH = nixosConfig.sops.secrets.github-notifications-token.path;
|
||||
});
|
||||
systemd.user.sessionVariables = lib.mkIf (!isPublic) {
|
||||
} // (lib.optionalAttrs (!isPublic) { });
|
||||
systemd.user.sessionVariables = {
|
||||
DOCUMENT_DIR_PRIV = lib.mkForce "${homeDir}/Documents/Private";
|
||||
} // lib.optionalAttrs (!isPublic) {
|
||||
SWARSEL_MAIL1 = address1;
|
||||
SWARSEL_MAIL2 = address2;
|
||||
SWARSEL_MAIL3 = address3;
|
||||
|
|
|
|||
|
|
@ -2,6 +2,11 @@
|
|||
{
|
||||
options.swarselmodules.firefox = lib.mkEnableOption "firefox settings";
|
||||
config = lib.mkIf config.swarselmodules.firefox {
|
||||
|
||||
programs.zsh.sessionVariables = {
|
||||
MOZ_DISABLE_RDD_SANDBOX = "1";
|
||||
};
|
||||
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
package = pkgs.firefox; # uses overrides
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{ self, config, lib, ... }:
|
||||
{ self, config, lib, vars, ... }:
|
||||
let
|
||||
eachOutput = _: monitor: {
|
||||
inherit (monitor) name;
|
||||
|
|
@ -27,8 +27,8 @@ in
|
|||
# { command = "nextcloud --background"; }
|
||||
{ command = "vesktop --start-minimized --enable-speech-dispatcher --ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime"; }
|
||||
{ command = "element-desktop --hidden --enable-features=UseOzonePlatform --ozone-platform=wayland --disable-gpu-driver-bug-workarounds"; }
|
||||
{ command = "ANKI_WAYLAND=1 anki"; }
|
||||
{ command = "OBSIDIAN_USE_WAYLAND=1 obsidian"; }
|
||||
{ command = "anki"; }
|
||||
{ command = "obsidian"; }
|
||||
{ command = "nm-applet"; }
|
||||
# { command = "feishin"; }
|
||||
];
|
||||
|
|
@ -59,16 +59,16 @@ in
|
|||
};
|
||||
swayfxConfig = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "
|
||||
blur enable
|
||||
blur_xray disable
|
||||
blur_passes 1
|
||||
blur_radius 1
|
||||
shadows enable
|
||||
corner_radius 2
|
||||
titlebar_separator disable
|
||||
default_dim_inactive 0.02
|
||||
";
|
||||
default = ''
|
||||
blur enable
|
||||
blur_xray disable
|
||||
blur_passes 1
|
||||
blur_radius 1
|
||||
shadows enable
|
||||
corner_radius 2
|
||||
titlebar_separator disable
|
||||
default_dim_inactive 0.02
|
||||
'';
|
||||
internal = true;
|
||||
};
|
||||
};
|
||||
|
|
@ -85,15 +85,29 @@ in
|
|||
};
|
||||
swayfxConfig = lib.mkIf (!config.swarselsystems.isNixos) " ";
|
||||
};
|
||||
|
||||
wayland.windowManager.sway = {
|
||||
enable = true;
|
||||
checkConfig = false; # delete this line once SwayFX is fixed upstream
|
||||
# checkConfig = false; # delete this line once SwayFX is fixed upstream
|
||||
package = lib.mkIf config.swarselsystems.isNixos null;
|
||||
systemd = {
|
||||
enable = true;
|
||||
xdgAutostart = true;
|
||||
variables = [
|
||||
"DISPLAY"
|
||||
"WAYLAND_DISPLAY"
|
||||
"SWAYSOCK"
|
||||
"XDG_CURRENT_DESKTOP"
|
||||
"XDG_SESSION_TYPE"
|
||||
"NIXOS_OZONE_WL"
|
||||
"XCURSOR_THEME"
|
||||
"XCURSOR_SIZE"
|
||||
];
|
||||
};
|
||||
wrapperFeatures = {
|
||||
base = true;
|
||||
gtk = true;
|
||||
};
|
||||
wrapperFeatures.gtk = true;
|
||||
config = rec {
|
||||
modifier = "Mod4";
|
||||
# terminal = "kitty";
|
||||
|
|
@ -371,16 +385,10 @@ in
|
|||
};
|
||||
};
|
||||
extraSessionCommands = ''
|
||||
export SDL_VIDEODRIVER=wayland
|
||||
export QT_QPA_PLATFORM=wayland
|
||||
export QT_WAYLAND_DISABLE_WINDOWDECORATION="1"
|
||||
export _JAVA_AWT_WM_NONREPARENTING=1
|
||||
export XDG_CURRENT_DESKTOP=sway
|
||||
export XDG_SESSION_DESKTOP=sway
|
||||
export QTWEBENGINE_CHROMIUM_FLAGS="--no-sandbox";
|
||||
export ANKI_WAYLAND=1;
|
||||
export OBSIDIAN_USE_WAYLAND=1;
|
||||
'';
|
||||
export XDG_CURRENT_DESKTOP=sway;
|
||||
export XDG_SESSION_DESKTOP=sway;
|
||||
export _JAVA_AWT_WM_NONREPARENTING=1;
|
||||
'' + vars.waylandExports;
|
||||
# extraConfigEarly = "
|
||||
# exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK
|
||||
# exec hash dbus-update-activation-environment 2>/dev/null && dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK
|
||||
|
|
@ -391,36 +399,36 @@ in
|
|||
swayfxSettings = config.swarselsystems.swayfxConfig;
|
||||
in
|
||||
"
|
||||
exec_always autotiling
|
||||
set $exit \"exit: [s]leep, [l]ock, [p]oweroff, [r]eboot, [u]ser logout\"
|
||||
exec_always autotiling
|
||||
set $exit \"exit: [s]leep, [l]ock, [p]oweroff, [r]eboot, [u]ser logout\"
|
||||
|
||||
mode $exit {
|
||||
bindsym --to-code {
|
||||
s exec \"systemctl suspend\", mode \"default\"
|
||||
h exec \"systemctl hibernate\", mode \"default\"
|
||||
l exec \"swaylock --screenshots --clock --effect-blur 7x5 --effect-vignette 0.5:0.5 --fade-in 0.2 --daemonize\", mode \"default\
|
||||
p exec \"systemctl poweroff\"
|
||||
r exec \"systemctl reboot\"
|
||||
u exec \"swaymsg exit\"
|
||||
mode $exit {
|
||||
bindsym --to-code {
|
||||
s exec \"systemctl suspend\", mode \"default\"
|
||||
h exec \"systemctl hibernate\", mode \"default\"
|
||||
l exec \"swaylock --screenshots --clock --effect-blur 7x5 --effect-vignette 0.5:0.5 --fade-in 0.2 --daemonize\", mode \"default\
|
||||
p exec \"systemctl poweroff\"
|
||||
r exec \"systemctl reboot\"
|
||||
u exec \"swaymsg exit\"
|
||||
|
||||
Return mode \"default\"
|
||||
Escape mode \"default\"
|
||||
${modifier}+Escape mode \"default\"
|
||||
Return mode \"default\"
|
||||
Escape mode \"default\"
|
||||
${modifier}+Escape mode \"default\"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
exec systemctl --user import-environment
|
||||
exec swayidle -w
|
||||
exec systemctl --user import-environment
|
||||
exec swayidle -w
|
||||
|
||||
seat * hide_cursor 2000
|
||||
seat * hide_cursor 2000
|
||||
|
||||
exec_always kill -1 $(pidof kanshi)
|
||||
exec_always kill -1 $(pidof kanshi)
|
||||
|
||||
bindswitch --locked lid:on exec kanshictl switch lidclosed
|
||||
bindswitch --locked lid:off exec kanshictl switch lidopen
|
||||
bindswitch --locked lid:on exec kanshictl switch lidclosed
|
||||
bindswitch --locked lid:off exec kanshictl switch lidopen
|
||||
|
||||
${swayfxSettings}
|
||||
";
|
||||
${swayfxSettings}
|
||||
";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,11 +64,13 @@ in
|
|||
github-notifications-token = { path = "${xdgDir}/secrets/github-notifications-token"; };
|
||||
};
|
||||
|
||||
services.playerctld.enable = true;
|
||||
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
systemd = {
|
||||
enable = true;
|
||||
target = "sway-sessions.target";
|
||||
target = "sway-session.target";
|
||||
};
|
||||
settings = {
|
||||
mainBar = {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
{ config, lib, minimal, nixosConfig ? config, ... }:
|
||||
{ config, pkgs, lib, minimal, globals, nixosConfig ? config, ... }:
|
||||
let
|
||||
inherit (config.swarselsystems) flakePath;
|
||||
crocDomain = globals.services.croc.domain;
|
||||
in
|
||||
{
|
||||
options.swarselmodules.zsh = lib.mkEnableOption "zsh settings";
|
||||
|
|
@ -86,7 +87,7 @@ in
|
|||
# src = pkgs.zsh-fzf-tab;
|
||||
# }
|
||||
];
|
||||
initContent = lib.mkIf (!config.swarselsystems.isPublic) ''
|
||||
initContent = ''
|
||||
my-forward-word() {
|
||||
local WORDCHARS=$WORDCHARS
|
||||
WORDCHARS="''${WORDCHARS//:}"
|
||||
|
|
@ -125,10 +126,14 @@ in
|
|||
zle -N my-backward-delete-word
|
||||
# ctrl + del
|
||||
bindkey '^H' my-backward-delete-word
|
||||
|
||||
export CROC_PASS="$(cat ${nixosConfig.sops.secrets.croc-password.path})"
|
||||
export GITHUB_TOKEN="$(cat ${nixosConfig.sops.secrets.github-nixpkgs-review-token.path})"
|
||||
'';
|
||||
sessionVariables = lib.mkIf (!config.swarselsystems.isPublic) {
|
||||
CROC_RELAY = crocDomain;
|
||||
CROC_PASS = "$(cat ${nixosConfig.sops.secrets.croc-password.path})";
|
||||
GITHUB_TOKEN = "$(cat ${nixosConfig.sops.secrets.github-nixpkgs-review-token.path})";
|
||||
QT_QPA_PLATFORM_PLUGIN_PATH = "${pkgs.libsForQt5.qt5.qtbase.bin}/lib/qt-${pkgs.libsForQt5.qt5.qtbase.version}/plugins";
|
||||
# QTWEBENGINE_CHROMIUM_FLAGS = "--no-sandbox";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,8 +20,7 @@ in
|
|||
openstackclient
|
||||
];
|
||||
|
||||
home.sessionVariables = {
|
||||
DOCUMENT_DIR_PRIV = lib.mkForce "${homeDir}/Documents/Private";
|
||||
systemd.user.sessionVariables = {
|
||||
DOCUMENT_DIR_WORK = lib.mkForce "${homeDir}/Documents/Work";
|
||||
};
|
||||
|
||||
|
|
@ -136,6 +135,19 @@ in
|
|||
pr = "$HOME/Documents/Private";
|
||||
ac = path1;
|
||||
};
|
||||
|
||||
sessionVariables = {
|
||||
VSPHERE_USER = "$(cat ${nixosConfig.sops.secrets.vcuser.path})";
|
||||
VSPHERE_PW = "$(cat ${nixosConfig.sops.secrets.vcpw.path})";
|
||||
GOVC_USERNAME = "$(cat ${nixosConfig.sops.secrets.govcuser.path})";
|
||||
GOVC_PASSWORD = "$(cat ${nixosConfig.sops.secrets.govcpw.path})";
|
||||
GOVC_URL = "$(cat ${nixosConfig.sops.secrets.govcurl.path})";
|
||||
GOVC_DATACENTER = "$(cat ${nixosConfig.sops.secrets.govcdc.path})";
|
||||
GOVC_DATASTORE = "$(cat ${nixosConfig.sops.secrets.govcds.path})";
|
||||
GOVC_HOST = "$(cat ${nixosConfig.sops.secrets.govchost.path})";
|
||||
GOVC_RESOURCE_POOL = "$(cat ${nixosConfig.sops.secrets.govcpool.path})";
|
||||
GOVC_NETWORK = "$(cat ${nixosConfig.sops.secrets.govcnetwork.path})";
|
||||
};
|
||||
};
|
||||
|
||||
ssh = {
|
||||
|
|
@ -424,8 +436,8 @@ in
|
|||
# { command = "nextcloud --background"; }
|
||||
{ command = "vesktop --start-minimized --enable-speech-dispatcher --ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime"; }
|
||||
{ command = "element-desktop --hidden --enable-features=UseOzonePlatform --ozone-platform=wayland --disable-gpu-driver-bug-workarounds"; }
|
||||
{ command = "ANKI_WAYLAND=1 anki"; }
|
||||
{ command = "OBSIDIAN_USE_WAYLAND=1 obsidian"; }
|
||||
{ command = "anki"; }
|
||||
{ command = "obsidian"; }
|
||||
{ command = "nm-applet"; }
|
||||
# { command = "feishin"; }
|
||||
{ command = "teams-for-linux --disableGpu=true --minimized=true --trayIconEnabled=true"; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue