Compare commits
7 Commits
fcdf59d9d0
...
06d474928f
| Author | SHA1 | Date | |
|---|---|---|---|
| 06d474928f | |||
| 0f13646636 | |||
| 6e2922589a | |||
| 380d692ea3 | |||
| 5a6a8eb149 | |||
| ab65bbe308 | |||
| 51913fd4c4 |
@ -1,7 +0,0 @@
|
|||||||
* {
|
|
||||||
bg-col-op: rgba(239, 241, 245, 100%);
|
|
||||||
bg-col: rgba(239, 241, 245, 60%);
|
|
||||||
fg-col: #4c4f69;
|
|
||||||
pink: #d20f39;
|
|
||||||
trans: rgba(255, 255, 255, 0);
|
|
||||||
}
|
|
||||||
@ -1,16 +0,0 @@
|
|||||||
* {
|
|
||||||
dark: #2A231C;
|
|
||||||
light: #EBEBE5;
|
|
||||||
accent-dark: #463A2E;
|
|
||||||
accent-light: #865E43;
|
|
||||||
|
|
||||||
pastel-a: #797D62;
|
|
||||||
pastel-b: #9B9B7A;
|
|
||||||
pastel-c: #D9AE94;
|
|
||||||
pastel-d: #E5C59E;
|
|
||||||
pastel-e: #F1DCA7;
|
|
||||||
pastel-f: #F8D488;
|
|
||||||
pastel-g: #E4B074;
|
|
||||||
pastel-h: #D08C60;
|
|
||||||
pastel-i: #997B66;
|
|
||||||
}
|
|
||||||
@ -1,100 +0,0 @@
|
|||||||
/*See https://github.com/davatorium/rofi/blob/1.7.3/doc/rofi-theme.5.markdown#basic-structure-1*/
|
|
||||||
|
|
||||||
configuration{
|
|
||||||
modi: "run,drun,ssh,filebrowser";
|
|
||||||
font: "JetBrainsMono Nerd Font Mono 14";
|
|
||||||
show-icons: true;
|
|
||||||
icon-theme: "Papirus";
|
|
||||||
/*terminal: "alacritty -o font.size=12";*/
|
|
||||||
terminal: "kitty";
|
|
||||||
drun-display-format: "{icon} {name}";
|
|
||||||
disable-history: false;
|
|
||||||
hide-scrollbar: true;
|
|
||||||
display-drun: " apps ";
|
|
||||||
display-run: " run ";
|
|
||||||
display-filebrowser: " file ";
|
|
||||||
display-ssh: " ssh ";
|
|
||||||
sidebar-mode: false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@theme "colors.rasi"
|
|
||||||
|
|
||||||
element-text,
|
|
||||||
element-icon,
|
|
||||||
mode-switcher {
|
|
||||||
background-color: inherit;
|
|
||||||
text-color: inherit;
|
|
||||||
}
|
|
||||||
|
|
||||||
window {
|
|
||||||
height: 500px;
|
|
||||||
width: 700px;
|
|
||||||
border-radius: 0px;
|
|
||||||
background-color: @bg-col;
|
|
||||||
}
|
|
||||||
|
|
||||||
mainbox {
|
|
||||||
background-color: @trans;
|
|
||||||
}
|
|
||||||
|
|
||||||
message {
|
|
||||||
background-color: @trans;
|
|
||||||
}
|
|
||||||
|
|
||||||
error-message {
|
|
||||||
background-color: @trans;
|
|
||||||
margin: 0px 0px 20px 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
textbox {
|
|
||||||
background-color: @trans;
|
|
||||||
padding: 6px;
|
|
||||||
margin: 20px 20px 0px 20px;
|
|
||||||
border-radius: 3;
|
|
||||||
}
|
|
||||||
|
|
||||||
inputbar {
|
|
||||||
children: [prompt,entry];
|
|
||||||
background-color: @trans;
|
|
||||||
}
|
|
||||||
|
|
||||||
prompt {
|
|
||||||
background-color: @pink;
|
|
||||||
padding: 6px;
|
|
||||||
text-color: @bg-col-op;
|
|
||||||
border-radius: 3px;
|
|
||||||
margin: 20px 0px 0px 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
entry {
|
|
||||||
padding: 6px;
|
|
||||||
margin: 20px 20px 0px 10px;
|
|
||||||
text-color: @fg-col;
|
|
||||||
background-color: @trans;
|
|
||||||
border-radius: 3px;
|
|
||||||
}
|
|
||||||
|
|
||||||
listview {
|
|
||||||
border: 0px 0px 0px;
|
|
||||||
padding: 6px 0px 0px;
|
|
||||||
margin: 10px 0px 0px 20px;
|
|
||||||
columns: 1;
|
|
||||||
background-color: @trans;
|
|
||||||
}
|
|
||||||
|
|
||||||
element {
|
|
||||||
padding: 5px;
|
|
||||||
margin: 0px 20px 0px 0px;
|
|
||||||
background-color: @trans;
|
|
||||||
text-color: @pink;
|
|
||||||
border-radius: 3px;
|
|
||||||
}
|
|
||||||
|
|
||||||
element-icon {
|
|
||||||
size: 25px;
|
|
||||||
}
|
|
||||||
|
|
||||||
element selected {
|
|
||||||
background-color: @pink;
|
|
||||||
text-color: @bg-col-op;
|
|
||||||
}
|
|
||||||
@ -1,14 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# NOTE: This script is used in conjunction with the rocm/python docker image
|
|
||||||
|
|
||||||
# Install if necessary
|
|
||||||
if [[ ! -f "/webui-data/stable-diffusion-webui/launch.py" ]]; then
|
|
||||||
cd /webui-data
|
|
||||||
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui
|
|
||||||
cd stable-diffusion-webui
|
|
||||||
python -m pip install --upgrade pip wheel
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd /webui-data/stable-diffusion-webui
|
|
||||||
REQS_FILE='requirements.txt' python launch.py --precision full --no-half
|
|
||||||
@ -5,12 +5,10 @@
|
|||||||
mylib,
|
mylib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (config.modules) TEMPLATE;
|
||||||
with mylib.modules; let
|
|
||||||
cfg = config.modules.TEMPLATE;
|
|
||||||
in {
|
in {
|
||||||
options.modules.TEMPLATE = import ./options.nix {inherit lib mylib;};
|
options.modules.TEMPLATE = import ./options.nix {inherit lib mylib;};
|
||||||
|
|
||||||
config = mkIf cfg.enable {};
|
config = lib.mkIf TEMPLATE.enable {};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,14 +4,12 @@
|
|||||||
mylib,
|
mylib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (config.modules) ags;
|
||||||
with mylib.modules; let
|
|
||||||
cfg = config.modules.ags;
|
|
||||||
in {
|
in {
|
||||||
options.modules.ags = import ./options.nix {inherit lib mylib;};
|
options.modules.ags = import ./options.nix {inherit lib mylib;};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = lib.mkIf ags.enable {
|
||||||
programs.ags = {
|
programs.ags = {
|
||||||
enable = true;
|
enable = true;
|
||||||
systemd.enable = true;
|
systemd.enable = true;
|
||||||
|
|||||||
@ -1,19 +1,15 @@
|
|||||||
# TODO: Expose some settings
|
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
nixosConfig,
|
|
||||||
lib,
|
lib,
|
||||||
mylib,
|
mylib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (config.modules) chromium;
|
||||||
with mylib.modules; let
|
|
||||||
cfg = config.modules.chromium;
|
|
||||||
in {
|
in {
|
||||||
options.modules.chromium = import ./options.nix {inherit lib mylib;};
|
options.modules.chromium = import ./options.nix {inherit lib mylib;};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = lib.mkIf chromium.enable {
|
||||||
home.packages = with pkgs;
|
home.packages = with pkgs;
|
||||||
builtins.concatLists [
|
builtins.concatLists [
|
||||||
(optionals cfg.google [
|
(optionals cfg.google [
|
||||||
|
|||||||
@ -3,10 +3,8 @@
|
|||||||
lib,
|
lib,
|
||||||
mylib,
|
mylib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (config.modules) color;
|
||||||
with mylib.modules; let
|
|
||||||
cfg = config.modules.color;
|
|
||||||
|
|
||||||
# Options and assignments will be generated from those keys
|
# Options and assignments will be generated from those keys
|
||||||
colorKeys = [
|
colorKeys = [
|
||||||
@ -44,13 +42,13 @@ in {
|
|||||||
options.modules.color = import ./options.nix {inherit lib mylib colorKeys;};
|
options.modules.color = import ./options.nix {inherit lib mylib colorKeys;};
|
||||||
|
|
||||||
config = let
|
config = let
|
||||||
lightDefs = import ./${cfg.lightScheme}.nix;
|
lightDefs = import ./schemes/${color.lightScheme}.nix;
|
||||||
darkDefs = import ./${cfg.darkScheme}.nix;
|
darkDefs = import ./schemes/${color.darkScheme}.nix;
|
||||||
|
|
||||||
mkLightColorAssignment = key: {${key} = lightDefs.${key};};
|
mkLightColorAssignment = key: {${key} = lightDefs.${key};};
|
||||||
mkDarkColorAssignment = key: {${key} = darkDefs.${key};};
|
mkDarkColorAssignment = key: {${key} = darkDefs.${key};};
|
||||||
in
|
in
|
||||||
mkIf cfg.enable {
|
lib.mkIf color.enable {
|
||||||
# This module sets its own options
|
# This module sets its own options
|
||||||
# to the values specified in a colorscheme file.
|
# to the values specified in a colorscheme file.
|
||||||
modules.color.light = lib.pipe colorKeys [
|
modules.color.light = lib.pipe colorKeys [
|
||||||
|
|||||||
@ -6,14 +6,12 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
hostname,
|
hostname,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (config.modules) firefox;
|
||||||
with mylib.modules; let
|
|
||||||
cfg = config.modules.firefox;
|
|
||||||
in {
|
in {
|
||||||
options.modules.firefox = import ./options.nix {inherit lib mylib;};
|
options.modules.firefox = import ./options.nix {inherit lib mylib;};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = lib.mkIf firefox.enable {
|
||||||
home.packages = with pkgs;
|
home.packages = with pkgs;
|
||||||
builtins.concatLists [
|
builtins.concatLists [
|
||||||
# TODO: I don't think vaapi works yet
|
# TODO: I don't think vaapi works yet
|
||||||
@ -27,18 +25,18 @@ in {
|
|||||||
# (optionals cfg.gnomeTheme [firefox-gnome-theme])
|
# (optionals cfg.gnomeTheme [firefox-gnome-theme])
|
||||||
];
|
];
|
||||||
|
|
||||||
home.sessionVariables = mkMerge [
|
home.sessionVariables = lib.mkMerge [
|
||||||
{
|
{
|
||||||
MOZ_USE_XINPUT2 = 1;
|
MOZ_USE_XINPUT2 = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
(optionalAttrs cfg.wayland {
|
(lib.optionalAttrs firefox.wayland {
|
||||||
MOZ_ENABLE_WAYLAND = 1;
|
MOZ_ENABLE_WAYLAND = 1;
|
||||||
EGL_PLATFORM = "wayland";
|
EGL_PLATFORM = "wayland";
|
||||||
# XDG_CURRENT_DESKTOP = "Hyprland"; # TODO: Or "sway"? # Already set by hyprland
|
# XDG_CURRENT_DESKTOP = "Hyprland"; # TODO: Or "sway"? # Already set by hyprland
|
||||||
})
|
})
|
||||||
|
|
||||||
(optionalAttrs cfg.vaapi {
|
(lib.optionalAttrs firefox.vaapi {
|
||||||
# LIBVA_DRIVER_NAME = "radeonsi"; # "nvidia" for Nvidia card
|
# LIBVA_DRIVER_NAME = "radeonsi"; # "nvidia" for Nvidia card
|
||||||
# LIBVA_DRIVER_NAME = "nvidia"; # Specified in hardware-configuration
|
# LIBVA_DRIVER_NAME = "nvidia"; # Specified in hardware-configuration
|
||||||
MOZ_DISABLE_RDD_SANDBOX = 1;
|
MOZ_DISABLE_RDD_SANDBOX = 1;
|
||||||
@ -72,7 +70,7 @@ in {
|
|||||||
# not strictly necessary
|
# not strictly necessary
|
||||||
extraPolicies = {
|
extraPolicies = {
|
||||||
# TODO: Make library function to allow easy bookmark creation and add my default bookmarks/folders
|
# TODO: Make library function to allow easy bookmark creation and add my default bookmarks/folders
|
||||||
Bookmarks = optionalAttrs cfg.defaultBookmarks {};
|
Bookmarks = lib.optionalAttrs firefox.defaultBookmarks {};
|
||||||
CaptivePortal = false;
|
CaptivePortal = false;
|
||||||
DisableFirefoxAccounts = true;
|
DisableFirefoxAccounts = true;
|
||||||
DisableFirefoxStudies = true;
|
DisableFirefoxStudies = true;
|
||||||
@ -98,13 +96,13 @@ in {
|
|||||||
default = {
|
default = {
|
||||||
id = 0; # 0 is default profile
|
id = 0; # 0 is default profile
|
||||||
|
|
||||||
userChrome = concatStringsSep "\n" [
|
userChrome = lib.concatStringsSep "\n" [
|
||||||
# TODO: Borked after standalone HM
|
# TODO: Borked after standalone HM
|
||||||
# (optionalString cfg.gnomeTheme ''
|
# (optionalString cfg.gnomeTheme ''
|
||||||
# @import "${pkgs.firefox-gnome-theme}/share/firefox-gnome-theme/gnome-theme.css";
|
# @import "${pkgs.firefox-gnome-theme}/share/firefox-gnome-theme/gnome-theme.css";
|
||||||
# '')
|
# '')
|
||||||
|
|
||||||
(optionalString cfg.disableTabBar ''
|
(lib.optionalString firefox.disableTabBar ''
|
||||||
#TabsToolbar { display: none; }
|
#TabsToolbar { display: none; }
|
||||||
'')
|
'')
|
||||||
];
|
];
|
||||||
@ -153,8 +151,8 @@ in {
|
|||||||
youtube-shorts-block
|
youtube-shorts-block
|
||||||
];
|
];
|
||||||
|
|
||||||
settings = mkMerge [
|
settings = lib.mkMerge [
|
||||||
(optionalAttrs cfg.vaapi {
|
(lib.optionalAttrs firefox.vaapi {
|
||||||
# Firefox wayland hardware video acceleration
|
# Firefox wayland hardware video acceleration
|
||||||
# https://github.com/elFarto/nvidia-vaapi-driver/#firefox=
|
# https://github.com/elFarto/nvidia-vaapi-driver/#firefox=
|
||||||
# TODO: Disable and check if it works by default
|
# TODO: Disable and check if it works by default
|
||||||
@ -255,7 +253,6 @@ in {
|
|||||||
|
|
||||||
"identity.fxaccounts.account.device.name" = hostname;
|
"identity.fxaccounts.account.device.name" = hostname;
|
||||||
|
|
||||||
|
|
||||||
"media.hardwaremediakeys.enabled" = false; # Do not interfere with spotify
|
"media.hardwaremediakeys.enabled" = false; # Do not interfere with spotify
|
||||||
"media.videocontrols.picture-in-picture.video-toggle.enabled" = true;
|
"media.videocontrols.picture-in-picture.video-toggle.enabled" = true;
|
||||||
|
|
||||||
@ -278,7 +275,7 @@ in {
|
|||||||
|
|
||||||
"toolkit.coverage.opt-out" = true;
|
"toolkit.coverage.opt-out" = true;
|
||||||
"toolkit.coverage.endpoint.base" = "";
|
"toolkit.coverage.endpoint.base" = "";
|
||||||
"toolkit.legacyUserProfileCustomizations.stylesheets" = cfg.gnomeTheme || cfg.disableTabBar;
|
"toolkit.legacyUserProfileCustomizations.stylesheets" = firefox.gnomeTheme || firefox.disableTabBar;
|
||||||
"toolkit.telemetry.unified" = false;
|
"toolkit.telemetry.unified" = false;
|
||||||
"toolkit.telemetry.enabled" = false;
|
"toolkit.telemetry.enabled" = false;
|
||||||
"toolkit.telemetry.server" = "data:,";
|
"toolkit.telemetry.server" = "data:,";
|
||||||
|
|||||||
@ -4,14 +4,12 @@
|
|||||||
mylib,
|
mylib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (config.modules) fish;
|
||||||
with mylib.modules; let
|
|
||||||
cfg = config.modules.fish;
|
|
||||||
in {
|
in {
|
||||||
options.modules.fish = import ./options.nix {inherit lib mylib;};
|
options.modules.fish = import ./options.nix {inherit lib mylib;};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = lib.mkIf fish.enable {
|
||||||
home.file.".config/fish/themes/catppuccin-latte.theme".text = ''
|
home.file.".config/fish/themes/catppuccin-latte.theme".text = ''
|
||||||
# name: 'Catppuccin Latte'
|
# name: 'Catppuccin Latte'
|
||||||
# url: 'https://github.com/catppuccin/fish'
|
# url: 'https://github.com/catppuccin/fish'
|
||||||
@ -109,19 +107,19 @@ in {
|
|||||||
|
|
||||||
shellAbbrs = let
|
shellAbbrs = let
|
||||||
# Only add " | bat" if bat is installed
|
# Only add " | bat" if bat is installed
|
||||||
batify = command: command + (optionalString config.programs.bat.enable " | bat");
|
batify = command: command + (lib.optionalString config.programs.bat.enable " | bat");
|
||||||
|
|
||||||
# Same as above but with args for bat
|
# Same as above but with args for bat
|
||||||
batifyWithArgs = command: args: command + (optionalString config.programs.bat.enable (" | bat " + args));
|
batifyWithArgs = command: args: command + (lib.optionalString config.programs.bat.enable (" | bat " + args));
|
||||||
|
|
||||||
# These can be used for my config.modules and for HM config.programs,
|
# These can be used for my config.modules and for HM config.programs,
|
||||||
# as both of these add the package to home.packages
|
# as both of these add the package to home.packages
|
||||||
hasHomePackage = package: (contains config.home.packages package);
|
hasHomePackage = package: (mylib.contains config.home.packages package);
|
||||||
|
|
||||||
# Only add fish abbr if package is installed
|
# Only add fish abbr if package is installed
|
||||||
abbrify = package: abbr: (optionalAttrs (hasHomePackage package) abbr);
|
abbrify = package: abbr: (lib.optionalAttrs (hasHomePackage package) abbr);
|
||||||
in
|
in
|
||||||
mkMerge [
|
lib.mkMerge [
|
||||||
# Abbrs that are always available are defined here.
|
# Abbrs that are always available are defined here.
|
||||||
{
|
{
|
||||||
# Shell basics
|
# Shell basics
|
||||||
|
|||||||
@ -10,8 +10,7 @@
|
|||||||
nixosConfig,
|
nixosConfig,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
cfg = config.modules.hyprland;
|
inherit (config.modules) hyprland color;
|
||||||
color = config.modules.color;
|
|
||||||
|
|
||||||
# This function is mapped to the "cfg.monitors" attrSet.
|
# This function is mapped to the "cfg.monitors" attrSet.
|
||||||
# For each key-value entry in "cfg.monitors",
|
# For each key-value entry in "cfg.monitors",
|
||||||
@ -29,22 +28,22 @@
|
|||||||
+ (lib.optionalString (builtins.hasAttr "class" attrs) ", class:^(${attrs.class})$")
|
+ (lib.optionalString (builtins.hasAttr "class" attrs) ", class:^(${attrs.class})$")
|
||||||
+ (lib.optionalString (builtins.hasAttr "title" attrs) ", title:^(${attrs.title})$");
|
+ (lib.optionalString (builtins.hasAttr "title" attrs) ", title:^(${attrs.title})$");
|
||||||
|
|
||||||
mkTranslucentRule = class: "opacity ${cfg.transparent-opacity} ${cfg.transparent-opacity}, class:^(${class})$";
|
mkTranslucentRule = class: "opacity ${hyprland.transparent-opacity} ${hyprland.transparent-opacity}, class:^(${class})$";
|
||||||
|
|
||||||
mkBind = key: action: "${key}, ${action}";
|
mkBind = key: action: "${key}, ${action}";
|
||||||
mkBinds = key: actions: builtins.map (mkBind key) actions;
|
mkBinds = key: actions: builtins.map (mkBind key) actions;
|
||||||
|
|
||||||
# These functions are used to generate the keybindings.info file for Rofi
|
# These functions are used to generate the keybindings.info file for Rofi
|
||||||
fixupNoMod = key: ''${builtins.replaceStrings ["<-"] ["<"] key}'';
|
fixupNoMod = key: ''${builtins.replaceStrings ["<-"] ["<"] key}'';
|
||||||
mkBindHelpKey = key: ''${builtins.replaceStrings ["$mainMod" " " ","] ["${cfg.keybindings.main-mod}" "-" ""] key}'';
|
mkBindHelpKey = key: ''${builtins.replaceStrings ["$mainMod" " " ","] ["${hyprland.keybindings.main-mod}" "-" ""] key}'';
|
||||||
mkBindHelpAction = action: ''${builtins.replaceStrings [","] [""] action}'';
|
mkBindHelpAction = action: ''${builtins.replaceStrings [","] [""] action}'';
|
||||||
mkBindHelp = key: action: "<${mkBindHelpKey key}>: ${mkBindHelpAction action}";
|
mkBindHelp = key: action: "<${mkBindHelpKey key}>: ${mkBindHelpAction action}";
|
||||||
mkBindsHelp = key: actions: builtins.map fixupNoMod (builtins.map (mkBindHelp key) actions);
|
mkBindsHelp = key: actions: builtins.map fixupNoMod (builtins.map (mkBindHelp key) actions);
|
||||||
|
|
||||||
mkWallpaper = monitor: "${monitor}, ${config.home.homeDirectory}/NixFlake/wallpapers/${cfg.theme}.png";
|
mkWallpaper = monitor: "${monitor}, ${config.home.homeDirectory}/NixFlake/wallpapers/${hyprland.theme}.png";
|
||||||
|
|
||||||
mkDelayedStart = str: "hyprctl dispatch exec \"sleep 5s && ${str}\"";
|
mkDelayedStart = str: "hyprctl dispatch exec \"sleep 5s && ${str}\"";
|
||||||
delayed-exec = builtins.map mkDelayedStart cfg.autostart.delayed;
|
delayed-exec = builtins.map mkDelayedStart hyprland.autostart.delayed;
|
||||||
mkExec = prog: "${prog}";
|
mkExec = prog: "${prog}";
|
||||||
|
|
||||||
always-bind = {
|
always-bind = {
|
||||||
@ -71,13 +70,7 @@
|
|||||||
"$mainMod CTRL, k" = ["movewindow, u"];
|
"$mainMod CTRL, k" = ["movewindow, u"];
|
||||||
"$mainMod CTRL, d" = ["movewindow, d"];
|
"$mainMod CTRL, d" = ["movewindow, d"];
|
||||||
|
|
||||||
# Rofi
|
# TODO: Somehow write this more compact? Try to use workspace 0 instead of 10...
|
||||||
"$mainMod, D" = ["exec, ~/NixFlake/config/rofi/menus/systemd-podman.fish"];
|
|
||||||
"$mainMod, O" = ["exec, ~/NixFlake/config/rofi/menus/lectures.fish"];
|
|
||||||
"$mainMod, M" = ["exec, ~/NixFlake/config/rofi/menus/keybinds.fish"];
|
|
||||||
"$mainMod, U" = ["exec, ~/NixFlake/config/rofi/menus/vpn.fish"];
|
|
||||||
|
|
||||||
# TODO: Somehow write this more compact?
|
|
||||||
"$mainMod, 1" = ["workspace, 1"];
|
"$mainMod, 1" = ["workspace, 1"];
|
||||||
"$mainMod, 2" = ["workspace, 2"];
|
"$mainMod, 2" = ["workspace, 2"];
|
||||||
"$mainMod, 3" = ["workspace, 3"];
|
"$mainMod, 3" = ["workspace, 3"];
|
||||||
@ -132,7 +125,7 @@
|
|||||||
in {
|
in {
|
||||||
options.modules.hyprland = import ./options.nix {inherit lib mylib;};
|
options.modules.hyprland = import ./options.nix {inherit lib mylib;};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf hyprland.enable {
|
||||||
# Some assertion is not possible if HM is used standalone,
|
# Some assertion is not possible if HM is used standalone,
|
||||||
# because nixosConfig won't be available.
|
# because nixosConfig won't be available.
|
||||||
assertions = [
|
assertions = [
|
||||||
@ -180,7 +173,7 @@ in {
|
|||||||
];
|
];
|
||||||
|
|
||||||
file = {
|
file = {
|
||||||
".config/hypr/keybindings.info".text = lib.pipe (cfg.keybindings.bindings
|
".config/hypr/keybindings.info".text = lib.pipe (hyprland.keybindings.bindings
|
||||||
// always-bind) [
|
// always-bind) [
|
||||||
(builtins.mapAttrs mkBindsHelp)
|
(builtins.mapAttrs mkBindsHelp)
|
||||||
builtins.attrValues
|
builtins.attrValues
|
||||||
@ -219,7 +212,7 @@ in {
|
|||||||
|
|
||||||
background = [
|
background = [
|
||||||
{
|
{
|
||||||
path = "~/NixFlake/wallpapers/${cfg.theme}.png";
|
path = "~/NixFlake/wallpapers/${hyprland.theme}.png";
|
||||||
blur_passes = 3;
|
blur_passes = 3;
|
||||||
blur_size = 10;
|
blur_size = 10;
|
||||||
monitor = "";
|
monitor = "";
|
||||||
@ -285,8 +278,8 @@ in {
|
|||||||
splash = false;
|
splash = false;
|
||||||
splash_offset = 2.0;
|
splash_offset = 2.0;
|
||||||
|
|
||||||
preload = "~/NixFlake/wallpapers/${cfg.theme}.png";
|
preload = "~/NixFlake/wallpapers/${hyprland.theme}.png";
|
||||||
wallpaper = lib.pipe cfg.monitors [
|
wallpaper = lib.pipe hyprland.monitors [
|
||||||
builtins.attrNames
|
builtins.attrNames
|
||||||
(builtins.map mkWallpaper)
|
(builtins.map mkWallpaper)
|
||||||
];
|
];
|
||||||
@ -359,7 +352,7 @@ in {
|
|||||||
xwayland.enable = true;
|
xwayland.enable = true;
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
"$mainMod" = "${cfg.keybindings.main-mod}";
|
"$mainMod" = "${hyprland.keybindings.main-mod}";
|
||||||
|
|
||||||
general = {
|
general = {
|
||||||
gaps_in = 5;
|
gaps_in = 5;
|
||||||
@ -386,8 +379,8 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
input = {
|
input = {
|
||||||
kb_layout = "${cfg.kb-layout}";
|
kb_layout = "${hyprland.kb-layout}";
|
||||||
kb_variant = "${cfg.kb-variant}";
|
kb_variant = "${hyprland.kb-variant}";
|
||||||
kb_model = "pc104";
|
kb_model = "pc104";
|
||||||
kb_options = "";
|
kb_options = "";
|
||||||
kb_rules = "";
|
kb_rules = "";
|
||||||
@ -401,18 +394,18 @@ in {
|
|||||||
sensitivity = 0; # -1.0 - 1.0, 0 means no modification.
|
sensitivity = 0; # -1.0 - 1.0, 0 means no modification.
|
||||||
};
|
};
|
||||||
|
|
||||||
monitor = lib.pipe cfg.monitors [
|
monitor = lib.pipe hyprland.monitors [
|
||||||
(builtins.mapAttrs mkMonitor)
|
(builtins.mapAttrs mkMonitor)
|
||||||
builtins.attrValues
|
builtins.attrValues
|
||||||
];
|
];
|
||||||
|
|
||||||
workspace = lib.pipe cfg.workspaces [
|
workspace = lib.pipe hyprland.workspaces [
|
||||||
(builtins.mapAttrs mkWorkspaces)
|
(builtins.mapAttrs mkWorkspaces)
|
||||||
builtins.attrValues
|
builtins.attrValues
|
||||||
builtins.concatLists
|
builtins.concatLists
|
||||||
];
|
];
|
||||||
|
|
||||||
bind = lib.pipe (cfg.keybindings.bindings
|
bind = lib.pipe (hyprland.keybindings.bindings
|
||||||
// always-bind) [
|
// always-bind) [
|
||||||
(builtins.mapAttrs mkBinds)
|
(builtins.mapAttrs mkBinds)
|
||||||
builtins.attrValues
|
builtins.attrValues
|
||||||
@ -425,20 +418,20 @@ in {
|
|||||||
builtins.concatLists
|
builtins.concatLists
|
||||||
];
|
];
|
||||||
|
|
||||||
exec-once = lib.pipe (always-exec ++ cfg.autostart.immediate ++ delayed-exec) [
|
exec-once = lib.pipe (always-exec ++ hyprland.autostart.immediate ++ delayed-exec) [
|
||||||
(builtins.map mkExec)
|
(builtins.map mkExec)
|
||||||
];
|
];
|
||||||
|
|
||||||
windowrulev2 =
|
windowrulev2 =
|
||||||
lib.pipe cfg.workspacerules [
|
lib.pipe hyprland.workspacerules [
|
||||||
(builtins.mapAttrs mkWorkspaceRules)
|
(builtins.mapAttrs mkWorkspaceRules)
|
||||||
builtins.attrValues
|
builtins.attrValues
|
||||||
builtins.concatLists
|
builtins.concatLists
|
||||||
]
|
]
|
||||||
++ lib.pipe cfg.floating [
|
++ lib.pipe hyprland.floating [
|
||||||
(builtins.map mkFloatingRule)
|
(builtins.map mkFloatingRule)
|
||||||
]
|
]
|
||||||
++ lib.pipe cfg.transparent [
|
++ lib.pipe hyprland.transparent [
|
||||||
(builtins.map mkTranslucentRule)
|
(builtins.map mkTranslucentRule)
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -468,6 +461,9 @@ in {
|
|||||||
# we have to blur them explicitly
|
# we have to blur them explicitly
|
||||||
layerrule = [
|
layerrule = [
|
||||||
"blur,rofi"
|
"blur,rofi"
|
||||||
|
"ignorealpha 0.001,rofi"
|
||||||
|
# "dimaround,rofi"
|
||||||
|
|
||||||
"blur,waybar"
|
"blur,waybar"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@ -4,16 +4,12 @@
|
|||||||
lib,
|
lib,
|
||||||
mylib,
|
mylib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (config.modules) kitty color;
|
||||||
with mylib.modules; let
|
|
||||||
cfg = config.modules.kitty;
|
|
||||||
color = config.modules.color;
|
|
||||||
# cfgnv = config.modules.neovim;
|
|
||||||
in {
|
in {
|
||||||
options.modules.kitty = import ./options.nix {inherit lib mylib;};
|
options.modules.kitty = import ./options.nix {inherit lib mylib;};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = lib.mkIf kitty.enable {
|
||||||
programs.kitty = {
|
programs.kitty = {
|
||||||
enable = true;
|
enable = true;
|
||||||
shellIntegration.enableFishIntegration = true;
|
shellIntegration.enableFishIntegration = true;
|
||||||
|
|||||||
@ -4,14 +4,12 @@
|
|||||||
mylib,
|
mylib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (config.modules) latex;
|
||||||
with mylib.modules; let
|
|
||||||
cfg = config.modules.latex;
|
|
||||||
in {
|
in {
|
||||||
options.modules.latex = import ./options.nix {inherit lib mylib;};
|
options.modules.latex = import ./options.nix {inherit lib mylib;};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = lib.mkIf latex.enable {
|
||||||
home = {
|
home = {
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
texliveFull
|
texliveFull
|
||||||
|
|||||||
@ -6,15 +6,12 @@
|
|||||||
mylib,
|
mylib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (config.modules) neovim color;
|
||||||
with mylib.modules; let
|
|
||||||
cfg = config.modules.neovim;
|
|
||||||
color = config.modules.color;
|
|
||||||
in {
|
in {
|
||||||
options.modules.neovim = import ./options.nix {inherit lib mylib;};
|
options.modules.neovim = import ./options.nix {inherit lib mylib;};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = lib.mkIf neovim.enable {
|
||||||
home = {
|
home = {
|
||||||
file.".config/neovide/config.toml".source = ./neovide_config.ini;
|
file.".config/neovide/config.toml".source = ./neovide_config.ini;
|
||||||
file.".config/vale/.vale.ini".source = ./vale_config.ini;
|
file.".config/vale/.vale.ini".source = ./vale_config.ini;
|
||||||
@ -80,8 +77,8 @@ in {
|
|||||||
defaultEditor = true;
|
defaultEditor = true;
|
||||||
enableMan = false; # Nixvim man pages
|
enableMan = false; # Nixvim man pages
|
||||||
luaLoader.enable = true; # NOTE: Experimental
|
luaLoader.enable = true; # NOTE: Experimental
|
||||||
viAlias = cfg.alias;
|
viAlias = neovim.alias;
|
||||||
vimAlias = cfg.alias;
|
vimAlias = neovim.alias;
|
||||||
|
|
||||||
# Configured using plugin
|
# Configured using plugin
|
||||||
# colorschemes.catppuccin = {
|
# colorschemes.catppuccin = {
|
||||||
@ -1578,7 +1575,7 @@ in {
|
|||||||
return {
|
return {
|
||||||
-- Head
|
-- Head
|
||||||
{
|
{
|
||||||
{ " NEOVIM ", hl = { fg = "#${color.dark.base}", bg = "#${color.dark.lavender}" } },
|
{ " NEOVIM ", hl = { fg = "#${color.dark.base}", bg = "#${color.dark.lavender}", style = "bold" } },
|
||||||
|
|
||||||
-- The separator gets a foreground and background fill (each have fg + bg).
|
-- The separator gets a foreground and background fill (each have fg + bg).
|
||||||
-- line.sep("", lavender, lavender),
|
-- line.sep("", lavender, lavender),
|
||||||
|
|||||||
@ -1,19 +1,16 @@
|
|||||||
# TODO: Expose some settings
|
# TODO: Expose some settings
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
nixosConfig,
|
|
||||||
lib,
|
lib,
|
||||||
mylib,
|
mylib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (config.modules) nnn;
|
||||||
with mylib.modules; let
|
|
||||||
cfg = config.modules.nnn;
|
|
||||||
in {
|
in {
|
||||||
options.modules.nnn = import ./options.nix {inherit lib mylib;};
|
options.modules.nnn = import ./options.nix {inherit lib mylib;};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = lib.mkIf nnn.enable {
|
||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
# NNN_TERMINAL = "alacritty";
|
# NNN_TERMINAL = "alacritty";
|
||||||
# NNN_FIFO = "/tmp/nnn.fifo"; # For nnn preview
|
# NNN_FIFO = "/tmp/nnn.fifo"; # For nnn preview
|
||||||
|
|||||||
@ -7,14 +7,133 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
cfg = config.modules.rofi;
|
inherit (config.modules) rofi color;
|
||||||
in {
|
in {
|
||||||
options.modules.rofi = import ./options.nix {inherit lib mylib;};
|
options.modules.rofi = import ./options.nix {inherit lib mylib;};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf rofi.enable {
|
||||||
home.packages = with pkgs; [
|
programs.rofi = {
|
||||||
rofi-wayland
|
enable = true;
|
||||||
];
|
package = pkgs.rofi-wayland;
|
||||||
|
terminal = "kitty";
|
||||||
|
font = "${color.font} 14";
|
||||||
|
location = "center";
|
||||||
|
cycle = true;
|
||||||
|
|
||||||
|
extraConfig = {
|
||||||
|
modi = "run,drun,ssh,filebrowser";
|
||||||
|
show-icons = true;
|
||||||
|
icon-theme = "Papirus";
|
||||||
|
drun-display-format = "{icon} {name}";
|
||||||
|
disable-history = false;
|
||||||
|
hide-scrollbar = true;
|
||||||
|
display-drun = " apps ";
|
||||||
|
display-run = " run ";
|
||||||
|
display-filebrowser = " file ";
|
||||||
|
display-ssh = " ssh ";
|
||||||
|
sidebar-mode = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
# bg-col: rgba(239, 241, 245, 60%);
|
||||||
|
theme = let
|
||||||
|
inherit (config.lib.formats.rasi) mkLiteral;
|
||||||
|
|
||||||
|
mkColor = color: mkLiteral "#{color}";
|
||||||
|
in {
|
||||||
|
"*" = {
|
||||||
|
bg = mkLiteral "rgba(239, 241, 245, 0.3)";
|
||||||
|
hl = mkLiteral "#${color.dark.lavender}";
|
||||||
|
text = mkLiteral "#${color.dark.base}";
|
||||||
|
trans = mkLiteral "rgba(255, 255, 255, 0)";
|
||||||
|
};
|
||||||
|
|
||||||
|
"element-text,element-icon,mode-switcher" = {
|
||||||
|
background-color = mkLiteral "inherit";
|
||||||
|
text-color = mkLiteral "inherit";
|
||||||
|
};
|
||||||
|
|
||||||
|
"window" = {
|
||||||
|
height = 480;
|
||||||
|
width = 700;
|
||||||
|
# border-style = mkLiteral "solid";
|
||||||
|
border = mkLiteral "2 solid 2 solid 2 solid 2 solid";
|
||||||
|
border-radius = 6;
|
||||||
|
border-color = mkLiteral "@hl";
|
||||||
|
background-color = mkLiteral "@bg";
|
||||||
|
};
|
||||||
|
|
||||||
|
"mainbox" = {
|
||||||
|
background-color = mkLiteral "@trans";
|
||||||
|
};
|
||||||
|
|
||||||
|
"message" = {
|
||||||
|
background-color = mkLiteral "@trans";
|
||||||
|
};
|
||||||
|
|
||||||
|
"error-message" = {
|
||||||
|
background-color = mkLiteral "@trans";
|
||||||
|
margin = mkLiteral "0px 0px 20px 0px";
|
||||||
|
};
|
||||||
|
|
||||||
|
"textbox" = {
|
||||||
|
background-color = mkLiteral "@trans";
|
||||||
|
padding = 6;
|
||||||
|
margin = mkLiteral "20px 20px 0px 20px";
|
||||||
|
border-radius = 3;
|
||||||
|
};
|
||||||
|
|
||||||
|
"inputbar" = {
|
||||||
|
children = builtins.map mkLiteral ["prompt" "entry"];
|
||||||
|
background-color = mkLiteral "@trans";
|
||||||
|
};
|
||||||
|
|
||||||
|
"prompt" = {
|
||||||
|
background-color = mkLiteral "@hl";
|
||||||
|
padding = 6;
|
||||||
|
text-color = mkLiteral "@text";
|
||||||
|
border-radius = 3;
|
||||||
|
margin = mkLiteral "20px 0px 0px 20px";
|
||||||
|
};
|
||||||
|
|
||||||
|
"entry" = {
|
||||||
|
padding = 6;
|
||||||
|
margin = mkLiteral "20px 20px 0px 10px";
|
||||||
|
text-color = mkLiteral "@text";
|
||||||
|
background-color = mkLiteral "@trans";
|
||||||
|
border = mkLiteral "2 solid 2 solid 2 solid 2 solid";
|
||||||
|
border-radius = 3;
|
||||||
|
border-color = mkLiteral "@hl";
|
||||||
|
};
|
||||||
|
|
||||||
|
"listview" = {
|
||||||
|
# border = mkLiteral "0px 0px 0px";
|
||||||
|
padding = 0;
|
||||||
|
margin = mkLiteral "10px 20px 20px 20px";
|
||||||
|
columns = 1;
|
||||||
|
background-color = mkLiteral "@trans";
|
||||||
|
border = mkLiteral "2 solid 2 solid 2 solid 2 solid";
|
||||||
|
border-radius = 3;
|
||||||
|
border-color = mkLiteral "@hl";
|
||||||
|
};
|
||||||
|
|
||||||
|
"element" = {
|
||||||
|
padding = 5;
|
||||||
|
margin = 0;
|
||||||
|
background-color = mkLiteral "@trans";
|
||||||
|
text-color = mkLiteral "@text";
|
||||||
|
border-radius = 3;
|
||||||
|
};
|
||||||
|
|
||||||
|
"element-icon" = {
|
||||||
|
size = 25;
|
||||||
|
};
|
||||||
|
|
||||||
|
"element selected" = {
|
||||||
|
background-color = mkLiteral "@hl";
|
||||||
|
text-color = mkLiteral "@text";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
modules.hyprland.keybindings = let
|
modules.hyprland.keybindings = let
|
||||||
power-menu =
|
power-menu =
|
||||||
@ -23,18 +142,23 @@ in {
|
|||||||
{
|
{
|
||||||
"Poweroff" = "poweroff";
|
"Poweroff" = "poweroff";
|
||||||
"Reboot" = "reboot";
|
"Reboot" = "reboot";
|
||||||
|
"Lock" = "loginctl lock-session";
|
||||||
"Reload Hyprland" = "hyprctl reload";
|
"Reload Hyprland" = "hyprctl reload";
|
||||||
"Exit Hyprland" = "hyprctl dispatch exit";
|
"Exit Hyprland" = "hyprctl dispatch exit";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
vpn-menu = pkgs.writeScript "rofi-menu-vpn" (builtins.readFile ./menus/vpn.fish);
|
||||||
|
keybinds-menu = pkgs.writeScript "rofi-menu-keybinds" (builtins.readFile ./menus/keybinds.fish);
|
||||||
|
|
||||||
|
# TODO: Expand on that
|
||||||
|
lectures-menu = pkgs.writeScript "rofi-menu-lectures" (builtins.readFile ./menus/lectures.fish);
|
||||||
in {
|
in {
|
||||||
bindings = {
|
bindings = {
|
||||||
"$mainMod, escape" = ["exec, \"${power-menu}\""];
|
"$mainMod, escape" = ["exec, \"${power-menu}\""];
|
||||||
|
"$mainMod, O" = ["exec, \"${lectures-menu}\""];
|
||||||
|
"$mainMod, M" = ["exec, \"${keybinds-menu}\""];
|
||||||
|
"$mainMod, U" = ["exec, \"${vpn-menu}\""];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
home.file = {
|
|
||||||
".config/rofi/config.rasi".source = ../../../config/rofi/rofi.rasi;
|
|
||||||
".config/rofi/colors.rasi".source = ../../../config/rofi/colors/${cfg.theme}.rasi;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,4 +12,6 @@ if test -z $DECK
|
|||||||
exit
|
exit
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# TODO: $LECTURE and $DECK seem fine, but nothing opens:
|
||||||
|
# error: Could not determine file type.
|
||||||
xdg-open ~/Notes/TU/$LECTURE/Lecture/$DECK
|
xdg-open ~/Notes/TU/$LECTURE/Lecture/$DECK
|
||||||
@ -85,7 +85,7 @@ in {
|
|||||||
style = ''
|
style = ''
|
||||||
/*Order is Top-Right-Bottom-Left for combined properties*/
|
/*Order is Top-Right-Bottom-Left for combined properties*/
|
||||||
* {
|
* {
|
||||||
color: #${color.light.text};
|
color: #${color.dark.base};
|
||||||
font-family: ${color.font};
|
font-family: ${color.font};
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,17 +3,17 @@
|
|||||||
lib,
|
lib,
|
||||||
mylib,
|
mylib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (config.modules) zathura;
|
||||||
with mylib.modules; let
|
|
||||||
cfg = config.modules.zathura;
|
|
||||||
in {
|
in {
|
||||||
options.modules.zathura = import ./options.nix {inherit lib mylib;};
|
options.modules.zathura = import ./options.nix {inherit lib mylib;};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = lib.mkIf zathura.enable {
|
||||||
programs.zathura = {
|
programs.zathura = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
# TODO: Set database backend
|
||||||
|
# TODO: Use color module
|
||||||
options = {
|
options = {
|
||||||
# Catppuccin Latte
|
# Catppuccin Latte
|
||||||
default-fg = "#4C4F69";
|
default-fg = "#4C4F69";
|
||||||
|
|||||||
Reference in New Issue
Block a user