mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-24 12:31:54 -05:00
home: added default apps module
This commit is contained in:
parent
f124c5080d
commit
437137b5ba
1
aly.nix
1
aly.nix
|
@ -39,6 +39,7 @@
|
||||||
alyraffauf = {
|
alyraffauf = {
|
||||||
services.syncthing.enable = false;
|
services.syncthing.enable = false;
|
||||||
desktop = {
|
desktop = {
|
||||||
|
defaultApps.enable = true;
|
||||||
hyprland = {
|
hyprland = {
|
||||||
enable = true;
|
enable = true;
|
||||||
hyprpaper.randomWallpaper = false;
|
hyprpaper.randomWallpaper = false;
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
|
|
||||||
alyraffauf = {
|
alyraffauf = {
|
||||||
desktop = {
|
desktop = {
|
||||||
|
defaultApps.enable = true;
|
||||||
hyprland = {
|
hyprland = {
|
||||||
enable = true;
|
enable = true;
|
||||||
hyprpaper.randomWallpaper = false;
|
hyprpaper.randomWallpaper = false;
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
nixConfig = {
|
nixConfig = {
|
||||||
extra-substituters = ["https://nixcache.raffauflabs.com" ];
|
extra-substituters = ["https://nixcache.raffauflabs.com"];
|
||||||
extra-trusted-public-keys = [
|
extra-trusted-public-keys = [
|
||||||
"nixcache.raffauflabs.com:yFIuJde/izA4aUDI3MZmBLzynEsqVCT1OfCUghOLlt8="
|
"nixcache.raffauflabs.com:yFIuJde/izA4aUDI3MZmBLzynEsqVCT1OfCUghOLlt8="
|
||||||
];
|
];
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
viAlias = true;
|
viAlias = true;
|
||||||
vimAlias = true;
|
vimAlias = true;
|
||||||
defaultEditor = true;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
"git.autofetch" = true;
|
"git.autofetch" = true;
|
||||||
"git.confirmSync" = false;
|
"git.confirmSync" = false;
|
||||||
"nix.formatterPath" = lib.getExe pkgs.alejandra;
|
"nix.formatterPath" = lib.getExe pkgs.alejandra;
|
||||||
"terminal.external.linuxExec" = lib.getExe pkgs.alacritty;
|
"terminal.external.linuxExec" = config.alyraffauf.desktop.defaultApps.terminal.exe;
|
||||||
"update.mode" = "none";
|
"update.mode" = "none";
|
||||||
"window.menuBarVisibility" = "hidden";
|
"window.menuBarVisibility" = "hidden";
|
||||||
"window.zoomPerWindow" = false;
|
"window.zoomPerWindow" = false;
|
||||||
|
|
|
@ -213,7 +213,7 @@
|
||||||
"tooltip-format-wifi" = "{essid} ({signalStrength}%) {icon}";
|
"tooltip-format-wifi" = "{essid} ({signalStrength}%) {icon}";
|
||||||
"tooltip-format-ethernet" = "{ifname} ";
|
"tooltip-format-ethernet" = "{ifname} ";
|
||||||
"tooltip-format-disconnected" = "Disconnected";
|
"tooltip-format-disconnected" = "Disconnected";
|
||||||
"on-click" = "${lib.getExe pkgs.alacritty} --class nmtui -e ${pkgs.networkmanager}/bin/nmtui";
|
"on-click" = "${config.alyraffauf.desktop.defaultApps.terminalEditor.exe} --class nmtui -e ${pkgs.networkmanager}/bin/nmtui";
|
||||||
};
|
};
|
||||||
"tray" = {"spacing" = 15;};
|
"tray" = {"spacing" = 15;};
|
||||||
"custom/logout" = {
|
"custom/logout" = {
|
||||||
|
|
|
@ -4,5 +4,5 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
imports = [./theme.nix ./gnome ./hypr ./sway ./river];
|
imports = [./defaultApps.nix ./theme.nix ./gnome ./hypr ./sway ./river];
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,10 +7,10 @@
|
||||||
options = {
|
options = {
|
||||||
alyraffauf.desktop.defaultApps.enable =
|
alyraffauf.desktop.defaultApps.enable =
|
||||||
lib.mkEnableOption "GTK and Qt themes.";
|
lib.mkEnableOption "GTK and Qt themes.";
|
||||||
alyraffauf.desktop.defaultApps.browser = {
|
alyraffauf.desktop.defaultApps.webBrowser = {
|
||||||
name = lib.mkOption {
|
exe = lib.mkOption {
|
||||||
description = "Default web browser executable name.";
|
description = "Default web browser executable name.";
|
||||||
default = "firefox";
|
default = lib.getExe config.alyraffauf.desktop.defaultApps.webBrowser.package;
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
};
|
};
|
||||||
desktop = lib.mkOption {
|
desktop = lib.mkOption {
|
||||||
|
@ -20,14 +20,14 @@
|
||||||
};
|
};
|
||||||
package = lib.mkOption {
|
package = lib.mkOption {
|
||||||
description = "Default web browser package.";
|
description = "Default web browser package.";
|
||||||
default = pkgs.firefox;
|
default = config.programs.firefox.package;
|
||||||
type = lib.types.package;
|
type = lib.types.package;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
alyraffauf.desktop.defaultApps.editor = {
|
alyraffauf.desktop.defaultApps.editor = {
|
||||||
name = lib.mkOption {
|
exe = lib.mkOption {
|
||||||
description = "Default editor executable name.";
|
description = "Default editor executable name.";
|
||||||
default = "codium";
|
default = lib.getExe config.alyraffauf.desktop.defaultApps.editor.package;
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
};
|
};
|
||||||
desktop = lib.mkOption {
|
desktop = lib.mkOption {
|
||||||
|
@ -37,28 +37,109 @@
|
||||||
};
|
};
|
||||||
package = lib.mkOption {
|
package = lib.mkOption {
|
||||||
description = "Default editor package.";
|
description = "Default editor package.";
|
||||||
default = pkgs.vsCodium;
|
default = config.programs.vscode.package;
|
||||||
|
type = lib.types.package;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
alyraffauf.desktop.defaultApps.terminalEditor = {
|
||||||
|
exe = lib.mkOption {
|
||||||
|
description = "Default terminal editor executable name.";
|
||||||
|
default = lib.getExe config.alyraffauf.desktop.defaultApps.terminalEditor.package;
|
||||||
|
type = lib.types.str;
|
||||||
|
};
|
||||||
|
desktop = lib.mkOption {
|
||||||
|
description = "Default terminal editor desktop file name.";
|
||||||
|
default = "nvim.desktop";
|
||||||
|
type = lib.types.str;
|
||||||
|
};
|
||||||
|
package = lib.mkOption {
|
||||||
|
description = "Default terminal editor package.";
|
||||||
|
default = config.programs.neovim.package;
|
||||||
|
type = lib.types.package;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
alyraffauf.desktop.defaultApps.terminal = {
|
||||||
|
exe = lib.mkOption {
|
||||||
|
description = "Default terminal executable name.";
|
||||||
|
default = lib.getExe config.alyraffauf.desktop.defaultApps.terminal.package;
|
||||||
|
type = lib.types.str;
|
||||||
|
};
|
||||||
|
desktop = lib.mkOption {
|
||||||
|
description = "Default terminal desktop file name.";
|
||||||
|
default = "alacritty.desktop";
|
||||||
|
type = lib.types.str;
|
||||||
|
};
|
||||||
|
package = lib.mkOption {
|
||||||
|
description = "Default terminal package.";
|
||||||
|
default = config.programs.alacritty.package;
|
||||||
|
type = lib.types.package;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
alyraffauf.desktop.defaultApps.imageViewer = {
|
||||||
|
exe = lib.mkOption {
|
||||||
|
description = "Default image viewer executable name.";
|
||||||
|
default = lib.getExe config.alyraffauf.desktop.defaultApps.imageViewer.package;
|
||||||
|
type = lib.types.str;
|
||||||
|
};
|
||||||
|
desktop = lib.mkOption {
|
||||||
|
description = "Default image viewer desktop file name.";
|
||||||
|
default = "org.gnome.eog.desktop";
|
||||||
|
type = lib.types.str;
|
||||||
|
};
|
||||||
|
package = lib.mkOption {
|
||||||
|
description = "Default image viewer package.";
|
||||||
|
default = pkgs.gnome.eog;
|
||||||
|
type = lib.types.package;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
alyraffauf.desktop.defaultApps.pdfEditor = {
|
||||||
|
exe = lib.mkOption {
|
||||||
|
description = "Default PDF editor executable name.";
|
||||||
|
default = lib.getExe config.alyraffauf.desktop.defaultApps.pdfEditor.package;
|
||||||
|
type = lib.types.str;
|
||||||
|
};
|
||||||
|
desktop = lib.mkOption {
|
||||||
|
description = "Default PDF Editor desktop file name.";
|
||||||
|
default = "org.gnome.Evince.desktop";
|
||||||
|
type = lib.types.str;
|
||||||
|
};
|
||||||
|
package = lib.mkOption {
|
||||||
|
description = "Default PDF Editor package.";
|
||||||
|
default = pkgs.evince;
|
||||||
type = lib.types.package;
|
type = lib.types.package;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf config.alyraffauf.desktop.theme.enable {
|
config = lib.mkIf config.alyraffauf.desktop.defaultApps.enable {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
config.alyraffauf.desktop.defaultApps.pdfEditor.package
|
||||||
|
config.alyraffauf.desktop.defaultApps.editor.package
|
||||||
|
config.alyraffauf.desktop.defaultApps.terminalEditor.package
|
||||||
|
config.alyraffauf.desktop.defaultApps.imageViewer.package
|
||||||
|
config.alyraffauf.desktop.defaultApps.webBrowser.package
|
||||||
|
];
|
||||||
xdg.mimeApps = {
|
xdg.mimeApps = {
|
||||||
enable = true;
|
enable = true;
|
||||||
defaultApplications = {
|
defaultApplications = {
|
||||||
"application/xhtml+xml" = "firefox.desktop";
|
"application/pdf" = config.alyraffauf.desktop.defaultApps.pdfEditor.desktop;
|
||||||
"text/html" = "firefox.desktop";
|
"application/x-shellscript" = config.alyraffauf.desktop.defaultApps.editor.desktop;
|
||||||
"text/xml" = "firefox.desktop";
|
"application/xhtml+xml" = config.alyraffauf.desktop.defaultApps.webBrowser.desktop;
|
||||||
"x-scheme-handler/ftp" = "firefox.desktop";
|
"image/jpeg" = config.alyraffauf.desktop.defaultApps.imageViewer.desktop;
|
||||||
"x-scheme-handler/http" = "firefox.desktop";
|
"image/png" = config.alyraffauf.desktop.defaultApps.imageViewer.desktop;
|
||||||
"x-scheme-handler/https" = "firefox.desktop";
|
"text/html" = config.alyraffauf.desktop.defaultApps.webBrowser.desktop;
|
||||||
|
"text/plain" = config.alyraffauf.desktop.defaultApps.editor.desktop;
|
||||||
|
"text/x-python" = config.alyraffauf.desktop.defaultApps.editor.desktop;
|
||||||
|
"text/xml" = config.alyraffauf.desktop.defaultApps.webBrowser.desktop;
|
||||||
|
"x-scheme-handler/ftp" = config.alyraffauf.desktop.defaultApps.webBrowser.desktop;
|
||||||
|
"x-scheme-handler/http" = config.alyraffauf.desktop.defaultApps.webBrowser.desktop;
|
||||||
|
"x-scheme-handler/https" = config.alyraffauf.desktop.defaultApps.webBrowser.desktop;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
EDITOR = "${lib.getExe pkgs.neovim}";
|
EDITOR = "${config.alyraffauf.desktop.defaultApps.terminalEditor.exe}";
|
||||||
BROWSER = "${lib.getExe pkgs.firefox}";
|
BROWSER = "${config.alyraffauf.desktop.defaultApps.webBrowser.exe}";
|
||||||
TERMINAL = "${lib.getExe pkgs.kitty}";
|
TERMINAL = "${config.alyraffauf.desktop.defaultApps.terminal.exe}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
hyprshade.enable = lib.mkDefault true;
|
hyprshade.enable = lib.mkDefault true;
|
||||||
};
|
};
|
||||||
theme.enable = lib.mkDefault true;
|
theme.enable = lib.mkDefault true;
|
||||||
|
defaultApps.enable = lib.mkDefault true;
|
||||||
};
|
};
|
||||||
apps = {
|
apps = {
|
||||||
# Basic apps needed to run a hyprland desktop.
|
# Basic apps needed to run a hyprland desktop.
|
||||||
|
@ -63,10 +64,10 @@
|
||||||
modifier = "SUPER";
|
modifier = "SUPER";
|
||||||
|
|
||||||
# Default apps
|
# Default apps
|
||||||
browser = lib.getExe pkgs.firefox;
|
browser = config.alyraffauf.desktop.defaultApps.webBrowser.exe;
|
||||||
fileManager = lib.getExe pkgs.xfce.thunar;
|
fileManager = lib.getExe pkgs.xfce.thunar;
|
||||||
editor = lib.getExe pkgs.vscodium;
|
editor = config.alyraffauf.desktop.defaultApps.editor.exe;
|
||||||
terminal = lib.getExe pkgs.alacritty;
|
terminal = config.alyraffauf.desktop.defaultApps.terminal.exe;
|
||||||
|
|
||||||
# Media/hardware commands
|
# Media/hardware commands
|
||||||
# brightness = "${lib.getExe pkgs.brightnessctl}";
|
# brightness = "${lib.getExe pkgs.brightnessctl}";
|
||||||
|
@ -114,7 +115,7 @@
|
||||||
hyprnome = lib.getExe pkgs.hyprnome;
|
hyprnome = lib.getExe pkgs.hyprnome;
|
||||||
hyprshade = lib.getExe pkgs.hyprshade;
|
hyprshade = lib.getExe pkgs.hyprshade;
|
||||||
|
|
||||||
screenshot = lib.getExe pkgs.hyprshot;
|
screenshot = lib.getExe pkgs.hyprshot;
|
||||||
screenshot_folder = "~/pics/screenshots";
|
screenshot_folder = "~/pics/screenshots";
|
||||||
screenshot_screen = "${screenshot} -m output -o ${screenshot_folder}";
|
screenshot_screen = "${screenshot} -m output -o ${screenshot_folder}";
|
||||||
screenshot_region = "${screenshot} -m region -o ${screenshot_folder}";
|
screenshot_region = "${screenshot} -m region -o ${screenshot_folder}";
|
||||||
|
|
|
@ -32,8 +32,11 @@
|
||||||
firefox.enable = lib.mkDefault true;
|
firefox.enable = lib.mkDefault true;
|
||||||
kanshi.enable = lib.mkDefault true;
|
kanshi.enable = lib.mkDefault true;
|
||||||
};
|
};
|
||||||
desktop.river.randomWallpaper = lib.mkDefault true;
|
desktop = {
|
||||||
desktop.theme.enable = lib.mkDefault true;
|
river.randomWallpaper = lib.mkDefault true;
|
||||||
|
theme.enable = lib.mkDefault true;
|
||||||
|
defaultApps.enable = lib.mkDefault true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.swaylock.enable = lib.mkDefault true;
|
programs.swaylock.enable = lib.mkDefault true;
|
||||||
|
@ -108,10 +111,10 @@
|
||||||
modifier = "Super";
|
modifier = "Super";
|
||||||
|
|
||||||
# Default apps
|
# Default apps
|
||||||
browser = pkgs.firefox + "/bin/firefox";
|
browser = config.alyraffauf.desktop.defaultApps.webBrowser.exe;
|
||||||
fileManager = pkgs.xfce.thunar + "/bin/thunar";
|
fileManager = lib.getExe pkgs.xfce.thunar;
|
||||||
editor = pkgs.vscodium + "/bin/codium";
|
editor = config.alyraffauf.desktop.defaultApps.editor.exe;
|
||||||
terminal = pkgs.alacritty + "/bin/alacritty";
|
terminal = config.alyraffauf.desktop.defaultApps.terminal.exe;
|
||||||
|
|
||||||
# River desktop utilities
|
# River desktop utilities
|
||||||
bar = pkgs.waybar + "/bin/waybar";
|
bar = pkgs.waybar + "/bin/waybar";
|
||||||
|
|
|
@ -27,7 +27,10 @@
|
||||||
waybar.enable = lib.mkDefault true;
|
waybar.enable = lib.mkDefault true;
|
||||||
wlogout.enable = lib.mkDefault true;
|
wlogout.enable = lib.mkDefault true;
|
||||||
};
|
};
|
||||||
desktop.theme.enable = lib.mkDefault true;
|
desktop = {
|
||||||
|
theme.enable = lib.mkDefault true;
|
||||||
|
defaultApps.enable = lib.mkDefault true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
services.cliphist.enable = lib.mkDefault true;
|
services.cliphist.enable = lib.mkDefault true;
|
||||||
|
@ -49,10 +52,10 @@
|
||||||
modifier = "Mod4";
|
modifier = "Mod4";
|
||||||
|
|
||||||
# Default apps
|
# Default apps
|
||||||
browser = lib.getExe pkgs.firefox;
|
browser = config.alyraffauf.desktop.defaultApps.webBrowser.exe;
|
||||||
fileManager = lib.getExe pkgs.xfce.thunar;
|
fileManager = lib.getExe pkgs.xfce.thunar;
|
||||||
editor = lib.getExe pkgs.vscodium;
|
editor = config.alyraffauf.desktop.defaultApps.editor.exe;
|
||||||
terminal = lib.getExe pkgs.alacritty;
|
terminal = config.alyraffauf.desktop.defaultApps.terminal.exe;
|
||||||
|
|
||||||
brightness = lib.getExe' pkgs.swayosd "swayosd-client";
|
brightness = lib.getExe' pkgs.swayosd "swayosd-client";
|
||||||
brightness_up = "${brightness} --brightness=raise";
|
brightness_up = "${brightness} --brightness=raise";
|
||||||
|
|
Loading…
Reference in a new issue