Compare commits
4 commits
3ebb38d6d4
...
47576195ac
Author | SHA1 | Date | |
---|---|---|---|
47576195ac | |||
ae4392bec9 | |||
b3cdb3916f | |||
cdd15c4304 |
15 changed files with 111 additions and 122 deletions
|
@ -51,12 +51,11 @@
|
||||||
overlays = [ nixgl.overlay ];
|
overlays = [ nixgl.overlay ];
|
||||||
};
|
};
|
||||||
extraSpecialArgs = {
|
extraSpecialArgs = {
|
||||||
inherit stateVersion inputs nixgl;
|
inherit stateVersion inputs;
|
||||||
hostname = hostname;
|
hostname = hostname;
|
||||||
username = username;
|
username = username;
|
||||||
};
|
};
|
||||||
modules = [
|
modules = [
|
||||||
{ nixpkgs.overlays = [ nixgl.overlay ];}
|
|
||||||
./home-manager/default.nix
|
./home-manager/default.nix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ inputs, lib, stateVersion, username, hostname, nixgl, ... }:
|
{ inputs, lib, stateVersion, username, hostname, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
inputs.sops-nix.homeManagerModules.sops
|
inputs.sops-nix.homeManagerModules.sops
|
||||||
|
@ -12,9 +12,7 @@
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
fonts.fontconfig.enable = true;
|
fonts.fontconfig.enable = true;
|
||||||
nixGL.packages = nixgl.packages;
|
|
||||||
nixGL.defaultWrapper = "mesa";
|
|
||||||
nixGL.installScripts = ["mesa"];
|
|
||||||
home = {
|
home = {
|
||||||
inherit stateVersion username;
|
inherit stateVersion username;
|
||||||
homeDirectory = "/home/${username}";
|
homeDirectory = "/home/${username}";
|
||||||
|
|
|
@ -24,8 +24,14 @@
|
||||||
kdenlive.enable = false;
|
kdenlive.enable = false;
|
||||||
mpv.enable = false;
|
mpv.enable = false;
|
||||||
};
|
};
|
||||||
web.firefox.enable = true;
|
web.firefox = {
|
||||||
web.qutebrowser.enable = true;
|
enable = true;
|
||||||
|
enableNixGL = true;
|
||||||
|
};
|
||||||
|
web.qutebrowser = {
|
||||||
|
enable = true;
|
||||||
|
enableNixGL = true;
|
||||||
|
};
|
||||||
web.webcord.enable = false;
|
web.webcord.enable = false;
|
||||||
gaming.lutris.enable = false;
|
gaming.lutris.enable = false;
|
||||||
desktop.sway = {
|
desktop.sway = {
|
||||||
|
|
|
@ -2,7 +2,10 @@
|
||||||
config.modules = {
|
config.modules = {
|
||||||
application = {
|
application = {
|
||||||
zathura.enable = true;
|
zathura.enable = true;
|
||||||
foot.enable = true;
|
foot = {
|
||||||
|
enable = true;
|
||||||
|
font-size = "10.5";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
audio.cmus.enable = true;
|
audio.cmus.enable = true;
|
||||||
cli = {
|
cli = {
|
||||||
|
@ -30,22 +33,9 @@
|
||||||
zellij.enable = true;
|
zellij.enable = true;
|
||||||
zsh.enable = true;
|
zsh.enable = true;
|
||||||
};
|
};
|
||||||
desktop.sway = {
|
|
||||||
enable = true;
|
|
||||||
kanshi = true;
|
|
||||||
swaylock.useNullPackage = true;
|
|
||||||
waybar = {
|
|
||||||
laptop = true;
|
|
||||||
gpuThermal.enable = false;
|
|
||||||
cpuThermal = {
|
|
||||||
hwmonPathAbs = "/sys/devices/platform/coretemp.0/hwmon/";
|
|
||||||
inputFilename = "temp1_input";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
xdg.useDistributionPortals = true;
|
|
||||||
};
|
|
||||||
web.firefox = {
|
web.firefox = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
enableNixGL = true;
|
||||||
optionalExtensions = with pkgs.nur.repos.rycee.firefox-addons; [
|
optionalExtensions = with pkgs.nur.repos.rycee.firefox-addons; [
|
||||||
okta-browser-plugin
|
okta-browser-plugin
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, config, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
dejavu_fonts
|
dejavu_fonts
|
||||||
|
@ -13,23 +13,7 @@
|
||||||
noto-fonts-cjk-sans
|
noto-fonts-cjk-sans
|
||||||
slurp
|
slurp
|
||||||
wl-clipboard
|
wl-clipboard
|
||||||
(config.lib.nixGL.wrap ungoogled-chromium)
|
|
||||||
(config.lib.nixGL.wrap slack)
|
|
||||||
];
|
];
|
||||||
targets.genericLinux.enable = true;
|
targets.genericLinux.enable = true;
|
||||||
xdg.mime.enable = true;
|
xdg.mime.enable = true;
|
||||||
wayland.windowManager.sway.config.input = {
|
|
||||||
"1:1:AT_Translated_Set_2_keyboard" = {
|
|
||||||
xkb_layout = "us";
|
|
||||||
xkb_variant = "altgr-intl";
|
|
||||||
};
|
|
||||||
"65261:8800:KBDFans_DZ60" = {
|
|
||||||
xkb_layout = "us";
|
|
||||||
xkb_variant = "altgr-intl";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
home.sessionVariables = {
|
|
||||||
SSH_AUTH_SOCK = ''$XDG_RUNTIME_DIR/gnupg/S.gpg-agent.ssh'';
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,7 @@ let
|
||||||
"vim.lsp.enable('${lib.removeSuffix ".lua" k}')"
|
"vim.lsp.enable('${lib.removeSuffix ".lua" k}')"
|
||||||
) (builtins.readDir ./files/lsp);
|
) (builtins.readDir ./files/lsp);
|
||||||
|
|
||||||
## Tony plugins to have a proper helm linting.
|
## Tony plugins to chave a proper helm linting.
|
||||||
nvim-k8s-lsp = pkgs.vimUtils.buildVimPlugin {
|
nvim-k8s-lsp = pkgs.vimUtils.buildVimPlugin {
|
||||||
pname = "nvim-k8s-lsp";
|
pname = "nvim-k8s-lsp";
|
||||||
version = "main";
|
version = "main";
|
||||||
|
|
|
@ -13,26 +13,6 @@ in
|
||||||
description = "configure laptop mode";
|
description = "configure laptop mode";
|
||||||
};
|
};
|
||||||
|
|
||||||
swaylock.useNullPackage = mkOption {
|
|
||||||
type = types.bool;
|
|
||||||
default = false;
|
|
||||||
description = ''
|
|
||||||
Use null package to not install swaylock with Nix
|
|
||||||
Useful when using Home-Manager on third-party distribution to avoid
|
|
||||||
problem with PAM
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
xdg.useDistributionPortals = mkOption {
|
|
||||||
type = types.bool;
|
|
||||||
default = false;
|
|
||||||
description = ''
|
|
||||||
This prevent installing xdg-desktop-portal from nixpkgs. These
|
|
||||||
Useful when using Home-Manager on third-party distribution with old
|
|
||||||
version of portals (coucou Ubuntu LTS)
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
wallpapers = {
|
wallpapers = {
|
||||||
lockscreen = mkOption {
|
lockscreen = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
|
@ -153,10 +133,8 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
home.sessionVariables = {
|
|
||||||
# Use wayland for chrom{e|ium} based crap
|
|
||||||
NIXOS_OZONE_WL = "1";
|
|
||||||
# Avoid pixelated effect for QT application with fractionnal scaling
|
# Avoid pixelated effect for QT application with fractionnal scaling
|
||||||
|
home.sessionVariables = {
|
||||||
QT_SCALE_FACTOR_ROUNDING_POLICY = "RoundPreferFloor";
|
QT_SCALE_FACTOR_ROUNDING_POLICY = "RoundPreferFloor";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -180,32 +158,6 @@ in
|
||||||
desktop = "${config.home.homeDirectory}/documents";
|
desktop = "${config.home.homeDirectory}/documents";
|
||||||
publicShare = "${config.home.homeDirectory}/tmp/public";
|
publicShare = "${config.home.homeDirectory}/tmp/public";
|
||||||
};
|
};
|
||||||
portal = mkIf (cfg.xdg.useDistributionPortals == false) {
|
|
||||||
enable = true;
|
|
||||||
extraPortals = with pkgs; [
|
|
||||||
xdg-desktop-portal-wlr
|
|
||||||
xdg-desktop-portal-gtk
|
|
||||||
];
|
|
||||||
xdgOpenUsePortal = true;
|
|
||||||
config = {
|
|
||||||
sway = {
|
|
||||||
default = [
|
|
||||||
"wlr"
|
|
||||||
"gtk"
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# When using `useDistributionPackage`, create wlr configuration to let user
|
|
||||||
# choose the right screen. This is a workarount to not have to configure
|
|
||||||
# it manually.
|
|
||||||
home.file."${config.xdg.configHome}/xdg-desktop-portal-wlr/config".text = mkIf cfg.xdg.useDistributionPortals ''
|
|
||||||
[screencast]
|
|
||||||
max_fps=30
|
|
||||||
chooser_type=simple
|
|
||||||
chooser_cmd=${pkgs.slurp}/bin/slurp -f %o -or
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,16 +42,18 @@ with lib;
|
||||||
profile.name = "work";
|
profile.name = "work";
|
||||||
profile.outputs = [
|
profile.outputs = [
|
||||||
{
|
{
|
||||||
criteria = "Iiyama North America PL2792QN 1179214201663";
|
criteria = "Iiyama North America PL2480H 11183M2807013";
|
||||||
mode = "2560x1440";
|
|
||||||
position = "1450,0";
|
|
||||||
scale = 1.15;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
criteria = "BOE 0x0A95 Unknown";
|
|
||||||
mode = "1920x1080";
|
mode = "1920x1080";
|
||||||
position = "0,0";
|
position = "0,0";
|
||||||
scale = 1.325;
|
}
|
||||||
|
{
|
||||||
|
criteria = "Iiyama North America PL2480H 11183M2807016";
|
||||||
|
mode = "1920x1080";
|
||||||
|
position = "1920,0";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
criteria = "eDP-1";
|
||||||
|
status = "disable";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,6 @@ in
|
||||||
{
|
{
|
||||||
config = mkIf config.modules.desktop.sway.enable {
|
config = mkIf config.modules.desktop.sway.enable {
|
||||||
wayland.windowManager.sway = {
|
wayland.windowManager.sway = {
|
||||||
package = config.lib.nixGL.wrap pkgs.sway;
|
|
||||||
enable = true;
|
enable = true;
|
||||||
wrapperFeatures.gtk = true;
|
wrapperFeatures.gtk = true;
|
||||||
systemd.enable = true;
|
systemd.enable = true;
|
||||||
|
@ -76,7 +75,7 @@ in
|
||||||
"${mod}+Alt+k" = "kill";
|
"${mod}+Alt+k" = "kill";
|
||||||
"${mod}+Alt+c" = "reload";
|
"${mod}+Alt+c" = "reload";
|
||||||
"${mod}+Alt+Backspace" = "exec swaynag -t warning -m 'Exit sway?' -B 'Yes' 'swaymsg exit'";
|
"${mod}+Alt+Backspace" = "exec swaynag -t warning -m 'Exit sway?' -B 'Yes' 'swaymsg exit'";
|
||||||
"${mod}+Alt+l" = if cfg.swaylock.useNullPackage then "exec swaylock" else "exec ${pkgs.swaylock}/bin/swaylock";
|
"${mod}+Alt+l" = "exec ${pkgs.swaylock}/bin/swaylock";
|
||||||
# Manage windows placement
|
# Manage windows placement
|
||||||
"${mod}+b" = "splith";
|
"${mod}+b" = "splith";
|
||||||
"${mod}+v" = "splitv";
|
"${mod}+v" = "splitv";
|
||||||
|
|
|
@ -10,7 +10,7 @@ in
|
||||||
timeouts = [
|
timeouts = [
|
||||||
{
|
{
|
||||||
timeout = 300;
|
timeout = 300;
|
||||||
command = if cfg.swaylock.useNullPackage then ''/usr/bin/swaylock -f'' else ''${pkgs.swaylock}/bin/swaylock -f'';
|
command = "${pkgs.swaylock}/bin/swaylock -f";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
timeout = 600;
|
timeout = 600;
|
||||||
|
@ -21,11 +21,11 @@ in
|
||||||
events = [
|
events = [
|
||||||
{
|
{
|
||||||
event = "before-sleep";
|
event = "before-sleep";
|
||||||
command = if cfg.swaylock.useNullPackage then ''/usr/bin/swaylock -f'' else ''${pkgs.swaylock}/bin/swaylock -f'';
|
command = "${pkgs.swaylock}/bin/swaylock -f";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
event = "lock";
|
event = "lock";
|
||||||
command = if cfg.swaylock.useNullPackage then ''usr/bin/swaylock -f'' else ''${pkgs.swaylock}/bin/swaylock -f'';
|
command = "${pkgs.swaylock}/bin/swaylock -f";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
|
@ -6,10 +6,9 @@ in
|
||||||
{
|
{
|
||||||
config = mkIf config.modules.desktop.sway.enable {
|
config = mkIf config.modules.desktop.sway.enable {
|
||||||
programs.swaylock = {
|
programs.swaylock = {
|
||||||
package = if cfg.swaylock.useNullPackage then null else pkgs.swaylock;
|
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
image = if cfg.wallpapers.lockscreen != "" then "${cfg.wallpapers.lockscreen}" else false;
|
image = "${cfg.wallpapers.lockscreen}";
|
||||||
scaling = "center";
|
scaling = "center";
|
||||||
color = "000000";
|
color = "000000";
|
||||||
indicator-radius = 70;
|
indicator-radius = 70;
|
||||||
|
|
|
@ -101,8 +101,8 @@ in
|
||||||
"format-icons" = {
|
"format-icons" = {
|
||||||
"car" = "";
|
"car" = "";
|
||||||
"default" = "";
|
"default" = "";
|
||||||
"hands-free" = "";
|
"handsfree" = "";
|
||||||
"headphone" = "";
|
"headphones" = "";
|
||||||
"headset" = "";
|
"headset" = "";
|
||||||
"phone" = "";
|
"phone" = "";
|
||||||
"portable" = "";
|
"portable" = "";
|
||||||
|
|
|
@ -29,6 +29,11 @@ in
|
||||||
description = "Optional Firefox Plugins to install";
|
description = "Optional Firefox Plugins to install";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enableNixGL = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = "Use NixGL to start Firefox";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
programs.browserpass = {
|
programs.browserpass = {
|
||||||
|
@ -42,6 +47,24 @@ in
|
||||||
"x-scheme-handler/about" = "firefox.desktop";
|
"x-scheme-handler/about" = "firefox.desktop";
|
||||||
"x-scheme-handler/unknown" = "firefox.desktop";
|
"x-scheme-handler/unknown" = "firefox.desktop";
|
||||||
};
|
};
|
||||||
|
xdg.desktopEntries."firefox" = mkIf cfg.enableNixGL {
|
||||||
|
name = "Firefox NixGL Powered";
|
||||||
|
exec = "${pkgs.nixgl.nixGLMesa}/bin/nixGLMesa firefox %U";
|
||||||
|
icon = "firefox";
|
||||||
|
terminal = false;
|
||||||
|
type = "Application";
|
||||||
|
startupNotify = true;
|
||||||
|
actions = {
|
||||||
|
"new-private-window" = {
|
||||||
|
exec = "${pkgs.nixgl.nixGLMesa}/bin/nixGLMesa firefox --private-window %U";
|
||||||
|
name = "New Private Window";
|
||||||
|
};
|
||||||
|
"new-window" = {
|
||||||
|
exec = "${pkgs.nixgl.nixGLMesa}/bin/nixGLMesa firefox --new-window %U";
|
||||||
|
name = "New Window";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
xdg.configFile."tridactyl/tridactylrc".text = ''
|
xdg.configFile."tridactyl/tridactylrc".text = ''
|
||||||
sanitize tridactyllocal tridactylsync
|
sanitize tridactyllocal tridactylsync
|
||||||
|
@ -70,13 +93,13 @@ in
|
||||||
allExtensions = cfg.baseExtensions ++ cfg.optionalExtensions;
|
allExtensions = cfg.baseExtensions ++ cfg.optionalExtensions;
|
||||||
in {
|
in {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = config.lib.nixGL.wrap ( pkgs.wrapFirefox pkgs.firefox-unwrapped {
|
package = pkgs.wrapFirefox pkgs.firefox-unwrapped {
|
||||||
nativeMessagingHosts = [
|
nativeMessagingHosts = [
|
||||||
# Tridactyl native connector
|
# Tridactyl native connector
|
||||||
pkgs.tridactyl-native
|
pkgs.tridactyl-native
|
||||||
pkgs.browserpass
|
pkgs.browserpass
|
||||||
];
|
];
|
||||||
});
|
};
|
||||||
profiles.ephase = {
|
profiles.ephase = {
|
||||||
id = 0;
|
id = 0;
|
||||||
name = "ephase";
|
name = "ephase";
|
||||||
|
|
|
@ -6,13 +6,35 @@ in
|
||||||
{
|
{
|
||||||
options.modules.web.qutebrowser = {
|
options.modules.web.qutebrowser = {
|
||||||
enable = mkEnableOption "enable Qutebrowser web browser";
|
enable = mkEnableOption "enable Qutebrowser web browser";
|
||||||
|
|
||||||
|
enableNixGL = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = "Use NixGL to start Qutebrowser";
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
xdg.desktopEntries."org.qutebrowser.qutebrowser" = mkIf cfg.enableNixGL {
|
||||||
|
name = "QuteBrowser NixGL Powered";
|
||||||
|
|
||||||
|
exec = "${pkgs.nixgl.nixGLMesa}/bin/nixGLMesa qutebrowser %u";
|
||||||
|
icon = "qutebrowser";
|
||||||
|
terminal = false;
|
||||||
|
type = "Application";
|
||||||
|
startupNotify = true;
|
||||||
|
actions = {
|
||||||
|
"preference" = {
|
||||||
|
exec = "${pkgs.nixgl.nixGLMesa}/bin/nixGLMesa qutebrowser \"qute://settings\"";
|
||||||
|
name = "Preferences";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
programs.qutebrowser = {
|
programs.qutebrowser = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = config.lib.nixGL.wrap pkgs.qutebrowser;
|
|
||||||
loadAutoconfig = true;
|
loadAutoconfig = true;
|
||||||
settings = {
|
settings = {
|
||||||
|
|
||||||
qt.args = [
|
qt.args = [
|
||||||
"autoplay-policy=user-gesture-required"
|
"autoplay-policy=user-gesture-required"
|
||||||
"ignore-gpu-blocklist"
|
"ignore-gpu-blocklist"
|
||||||
|
|
|
@ -16,5 +16,20 @@ in
|
||||||
alsa.support32Bit = true;
|
alsa.support32Bit = true;
|
||||||
pulse.enable = true;
|
pulse.enable = true;
|
||||||
};
|
};
|
||||||
|
xdg.portal = {
|
||||||
|
enable = true;
|
||||||
|
wlr.enable = true;
|
||||||
|
# gtk portal needed to make gtk apps happy
|
||||||
|
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
||||||
|
config = {
|
||||||
|
common = {
|
||||||
|
default = [
|
||||||
|
"gtk"
|
||||||
|
];
|
||||||
|
"org.freedesktop.impl.portal.ScreenCast" = "wlr";
|
||||||
|
"org.freedesktop.impl.portal.Screenshot" = "wlr";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue