Revert firefox package to firefox-wayland, add electron config and tweak sway config to be more reusable
This commit is contained in:
parent
ee12877380
commit
0014961d3a
9 changed files with 92 additions and 13 deletions
3
.envrc
Normal file
3
.envrc
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
PASSWORD_STORE_DIR=${PWD}/secrets
|
||||||
|
|
||||||
|
export PASSWORD_STORE_DIR
|
12
flake.lock
12
flake.lock
|
@ -47,11 +47,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1637516270,
|
"lastModified": 1637649415,
|
||||||
"narHash": "sha256-qTffAQ0kWA2qXMJUVMDsgXVbzMNI0BfR78vB/4QFA+o=",
|
"narHash": "sha256-I82k+kFZuezkWPJypuqhqhChFbzDR4jpn89e2Fm2zRo=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "15ae861e1bfad90e0d14106551544e9e07cbcb10",
|
"rev": "c4c761ba554bc674b0d5a89eb7e9f7a488a8859d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -84,11 +84,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1637155076,
|
"lastModified": 1637595801,
|
||||||
"narHash": "sha256-26ZPNiuzlsnXpt55Q44+yzXvp385aNAfevzVEKbrU5Q=",
|
"narHash": "sha256-LkIMwVFKCuEqidaUdg8uxwpESAXjsPo4oCz3eJ7RaRw=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "715f63411952c86c8f57ab9e3e3cb866a015b5f2",
|
"rev": "263ef4cc4146c9fab808085487438c625d4426a9",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
21
home-manager/modules/electron/default.nix
Normal file
21
home-manager/modules/electron/default.nix
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
{ pkgs, config, lib, ... }:
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
cfg = config.eboskma.programs.electron;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.eboskma.programs.electron = {
|
||||||
|
enable = mkEnableOption "activate electron settings";
|
||||||
|
wayland = mkEnableOption "set Wayland compatibility settings";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf (cfg.enable) {
|
||||||
|
home.file.electron_conf = mkIf (cfg.wayland) {
|
||||||
|
target = ".config/electron-flags.conf";
|
||||||
|
text = ''
|
||||||
|
--enable-features=UseOzonePlatform
|
||||||
|
--ozone-platform=wayland
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -41,7 +41,7 @@ in
|
||||||
config = mkIf (cfg.enable) {
|
config = mkIf (cfg.enable) {
|
||||||
programs.firefox = {
|
programs.firefox = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.firefox-bin;
|
package = pkgs.firefox-wayland;
|
||||||
|
|
||||||
profiles = {
|
profiles = {
|
||||||
private = {
|
private = {
|
||||||
|
|
|
@ -23,10 +23,16 @@ in
|
||||||
'';
|
'';
|
||||||
description = "Reload Fish while keeping some context";
|
description = "Reload Fish while keeping some context";
|
||||||
};
|
};
|
||||||
|
update-env = {
|
||||||
|
body = ''
|
||||||
|
set -gx SWAYSOCK /run/user/(id -u)/sway-ipc.(id -u).(pgrep -x sway).sock
|
||||||
|
'';
|
||||||
|
description = "Update environment variables";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
code = "${pkgs.vscode}/bin/code --enable-features=UseOzonePlatform --ozone-platform=wayland";
|
# code = "${pkgs.vscode}/bin/code --enable-features=UseOzonePlatform --ozone-platform=wayland";
|
||||||
ls = "${pkgs.exa}/bin/exa -Fb";
|
ls = "${pkgs.exa}/bin/exa -Fb";
|
||||||
};
|
};
|
||||||
# interactiveShellInit = ''
|
# interactiveShellInit = ''
|
||||||
|
|
|
@ -180,11 +180,13 @@ in
|
||||||
for_window [class="^.*"] inhibit_idle fullscreen
|
for_window [class="^.*"] inhibit_idle fullscreen
|
||||||
for_window [app_id="gnome-calculator"] floating enable
|
for_window [app_id="gnome-calculator"] floating enable
|
||||||
|
|
||||||
exec_always --no-startup-id systemctl --user import-environment _JAVA_AWT_WM_NONREPARENTING MOZ_ENABLE_WAYLAND MOZ_DBUS_REMOTE QT_QPA_PLATFORM QT_WAYLAND_DISABLE_WINDOWDECORATION QT_QPA_PLATFORMTHEME SDL_VIDEODRIVER SSH_AUTH_SOCK
|
# exec_always --no-startup-id systemctl --user import-environment _JAVA_AWT_WM_NONREPARENTING MOZ_ENABLE_WAYLAND MOZ_DBUS_REMOTE QT_QPA_PLATFORM QT_WAYLAND_DISABLE_WINDOWDECORATION QT_QPA_PLATFORMTHEME SDL_VIDEODRIVER SSH_AUTH_SOCK
|
||||||
exec_always --no-startup-id dbus-update-activation-environment --systemd _JAVA_AWT_WM_NONREPARENTING MOZ_ENABLE_WAYLAND MOZ_DBUS_REMOTE QT_QPA_PLATFORM QT_WAYLAND_DISABLE_WINDOWDECORATION QT_QPA_PLATFORMTHEME SDL_VIDEODRIVER SSH_AUTH_SOCK
|
# exec_always --no-startup-id dbus-update-activation-environment --systemd _JAVA_AWT_WM_NONREPARENTING MOZ_ENABLE_WAYLAND MOZ_DBUS_REMOTE QT_QPA_PLATFORM QT_WAYLAND_DISABLE_WINDOWDECORATION QT_QPA_PLATFORMTHEME SDL_VIDEODRIVER SSH_AUTH_SOCK
|
||||||
exec --no-startup-id ${pkgs.networkmanagerapplet}/bin/nm-applet --indicator
|
exec --no-startup-id ${pkgs.networkmanagerapplet}/bin/nm-applet --indicator
|
||||||
exec --no-startup-id ${pkgs.swayidle}/bin/swayidle -w timeout 900 ${swaylockcmd};
|
exec --no-startup-id ${pkgs.swayidle}/bin/swayidle -w timeout 900 ${swaylockcmd};
|
||||||
exec --no-startup-id ${pkgs.swayidle}/bin/swayidle -w 1200 ${pkgs.sway}/bin/swaymsg 'output * dpms off' resume ${pkgs.sway}/bin/swaymsg 'output * dpms off';
|
exec --no-startup-id ${pkgs.swayidle}/bin/swayidle -w 1200 ${pkgs.sway}/bin/swaymsg 'output * dpms off' resume ${pkgs.sway}/bin/swaymsg 'output * dpms off';
|
||||||
|
|
||||||
|
include /etc/sway/config.d/*
|
||||||
'';
|
'';
|
||||||
|
|
||||||
extraSessionCommands =
|
extraSessionCommands =
|
||||||
|
|
36
krops.nix
36
krops.nix
|
@ -1 +1,35 @@
|
||||||
{ }
|
let
|
||||||
|
krops = builtins.fetchGit {
|
||||||
|
url = https://cgit.krebsco.de/krops/;
|
||||||
|
};
|
||||||
|
|
||||||
|
lib = import "${krops}/lib";
|
||||||
|
pkgs = import "${krops}/pkgs" { };
|
||||||
|
source = name:
|
||||||
|
lib.evalSource [{
|
||||||
|
machine-config.file = toString ./.;
|
||||||
|
}];
|
||||||
|
|
||||||
|
command = targetPath: ''
|
||||||
|
nix-shell -p git --run '
|
||||||
|
nix build -v '${targetPath}/machine-config#nixosConfigurations.$(hostname).config.system.build.toplevel' && \
|
||||||
|
nixos-rebuild switch -v --show-trace --flake ${targetPath}/machine-config
|
||||||
|
'
|
||||||
|
'';
|
||||||
|
|
||||||
|
createHost = name: target:
|
||||||
|
pkgs.krops.writeCommand "deploy-${name}" {
|
||||||
|
inherit command;
|
||||||
|
source = source name;
|
||||||
|
target = target;
|
||||||
|
};
|
||||||
|
|
||||||
|
in
|
||||||
|
rec {
|
||||||
|
# Deployments
|
||||||
|
|
||||||
|
# Run with:
|
||||||
|
# nix-build ./krops.nix -A loki && ./result
|
||||||
|
|
||||||
|
loki = createHost "loki" "root@loki";
|
||||||
|
}
|
||||||
|
|
|
@ -41,6 +41,10 @@ in
|
||||||
programs = {
|
programs = {
|
||||||
alacritty.enable = true;
|
alacritty.enable = true;
|
||||||
bat.enable = true;
|
bat.enable = true;
|
||||||
|
electron = {
|
||||||
|
enable = true;
|
||||||
|
wayland = true;
|
||||||
|
};
|
||||||
firefox = {
|
firefox = {
|
||||||
enable = true;
|
enable = true;
|
||||||
work = config.eboskma.base.work;
|
work = config.eboskma.base.work;
|
||||||
|
@ -69,6 +73,7 @@ in
|
||||||
jetbrains.clion
|
jetbrains.clion
|
||||||
neovim
|
neovim
|
||||||
nomachine-client
|
nomachine-client
|
||||||
|
pass
|
||||||
ripgrep
|
ripgrep
|
||||||
signal-desktop
|
signal-desktop
|
||||||
steam
|
steam
|
||||||
|
@ -89,8 +94,8 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
iconTheme = {
|
iconTheme = {
|
||||||
name = "Paper";
|
name = "Papirus-Dark";
|
||||||
package = pkgs.paper-icon-theme;
|
package = pkgs.papirus-icon-theme;
|
||||||
};
|
};
|
||||||
|
|
||||||
gtk3.extraConfig = {
|
gtk3.extraConfig = {
|
||||||
|
@ -108,6 +113,7 @@ in
|
||||||
}
|
}
|
||||||
../../home-manager/modules/alacritty
|
../../home-manager/modules/alacritty
|
||||||
../../home-manager/modules/bat
|
../../home-manager/modules/bat
|
||||||
|
../../home-manager/modules/electron
|
||||||
../../home-manager/modules/firefox
|
../../home-manager/modules/firefox
|
||||||
../../home-manager/modules/fish
|
../../home-manager/modules/fish
|
||||||
../../home-manager/modules/git
|
../../home-manager/modules/git
|
||||||
|
|
|
@ -31,6 +31,7 @@ in
|
||||||
-m 'What do you want to do?' \
|
-m 'What do you want to do?' \
|
||||||
-b 'Poweroff' 'systemctl poweroff' \
|
-b 'Poweroff' 'systemctl poweroff' \
|
||||||
-b 'Reboot' 'systemctl reboot'
|
-b 'Reboot' 'systemctl reboot'
|
||||||
|
include /etc/sway/config.d/*
|
||||||
'';
|
'';
|
||||||
user = "greeter";
|
user = "greeter";
|
||||||
group = "greeter";
|
group = "greeter";
|
||||||
|
@ -43,6 +44,12 @@ in
|
||||||
user = "greeter";
|
user = "greeter";
|
||||||
group = "greeter";
|
group = "greeter";
|
||||||
};
|
};
|
||||||
|
"sway/config.d/systemd-env.conf" = {
|
||||||
|
text = ''
|
||||||
|
exec_always --no-startup-id systemctl --user import-environment _JAVA_AWT_WM_NONREPARENTING MOZ_ENABLE_WAYLAND MOZ_DBUS_REMOTE QT_QPA_PLATFORM QT_WAYLAND_DISABLE_WINDOWDECORATION QT_QPA_PLATFORMTHEME SDL_VIDEODRIVER SSH_AUTH_SOCK
|
||||||
|
exec_always --no-startup-id dbus-update-activation-environment --systemd _JAVA_AWT_WM_NONREPARENTING MOZ_ENABLE_WAYLAND MOZ_DBUS_REMOTE QT_QPA_PLATFORM QT_WAYLAND_DISABLE_WINDOWDECORATION QT_QPA_PLATFORMTHEME SDL_VIDEODRIVER SSH_AUTH_SOCK
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue