added anyrun config
This commit is contained in:
parent
2ef8078e6e
commit
0022cf7d50
13 changed files with 242 additions and 122 deletions
17
flake.lock
generated
17
flake.lock
generated
|
@ -178,6 +178,22 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"doomemacs": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1713464448,
|
||||||
|
"narHash": "sha256-Fhir4WlcfEh70V8+oNS1LVAGBftiqtD2qaHzOC8BJUI=",
|
||||||
|
"owner": "doomemacs",
|
||||||
|
"repo": "doomemacs",
|
||||||
|
"rev": "9620bb45ac4cd7b0274c497b2d9d93c4ad9364ee",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "doomemacs",
|
||||||
|
"repo": "doomemacs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"fenix": {
|
"fenix": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
@ -962,6 +978,7 @@
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"agenix": "agenix",
|
"agenix": "agenix",
|
||||||
"anyrun": "anyrun",
|
"anyrun": "anyrun",
|
||||||
|
"doomemacs": "doomemacs",
|
||||||
"fenix": "fenix",
|
"fenix": "fenix",
|
||||||
"home-manager": "home-manager_2",
|
"home-manager": "home-manager_2",
|
||||||
"hyprland": "hyprland",
|
"hyprland": "hyprland",
|
||||||
|
|
|
@ -13,7 +13,10 @@
|
||||||
url = "github:hyprwm/hyprland-plugins";
|
url = "github:hyprwm/hyprland-plugins";
|
||||||
inputs.hyprland.follows = "hyprland";
|
inputs.hyprland.follows = "hyprland";
|
||||||
};
|
};
|
||||||
|
doomemacs = {
|
||||||
|
url = "github:doomemacs/doomemacs";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
nixpkgs-wayland.url = "github:nix-community/nixpkgs-wayland";
|
nixpkgs-wayland.url = "github:nix-community/nixpkgs-wayland";
|
||||||
split-monitor-workspaces = {
|
split-monitor-workspaces = {
|
||||||
url = "github:Duckonaut/split-monitor-workspaces";
|
url = "github:Duckonaut/split-monitor-workspaces";
|
||||||
|
|
|
@ -137,8 +137,8 @@ in {
|
||||||
enabled = true;
|
enabled = true;
|
||||||
animation = [
|
animation = [
|
||||||
"windows, 1, 4, dupa, popin"
|
"windows, 1, 4, dupa, popin"
|
||||||
"windowsIn, 1, 4, fast, popin"
|
"windowsIn, 1, 4, dupa, popin"
|
||||||
"windowsOut, 1, 4, fast, popin"
|
"windowsOut, 1, 4, dupa, popin"
|
||||||
"border, 1, 15, default"
|
"border, 1, 15, default"
|
||||||
"fade, 1, 10, default"
|
"fade, 1, 10, default"
|
||||||
"workspaces, 1, 5, dupa, slidefadevert"
|
"workspaces, 1, 5, dupa, slidefadevert"
|
||||||
|
|
|
@ -55,7 +55,7 @@ in {
|
||||||
cd = "z";
|
cd = "z";
|
||||||
v = "nvim";
|
v = "nvim";
|
||||||
e = "emacs";
|
e = "emacs";
|
||||||
update = "sudo nixos-rebuild switch --flake \"${gitPath}#${hostname}\" --log-format internal-json |& nom --json";
|
update = "sudo nixos-rebuild switch --flake \"${gitPath}#${hostname}\"";
|
||||||
flake = "cd '${gitPath}'";
|
flake = "cd '${gitPath}'";
|
||||||
} // cfg.extraAliases;
|
} // cfg.extraAliases;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,97 +0,0 @@
|
||||||
{ config, pkgs, lib, inputs, ... }:
|
|
||||||
|
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
username = config.modules.other.system.username;
|
|
||||||
cfg = config.modules.programs.anyrun;
|
|
||||||
in {
|
|
||||||
options.modules.programs.anyrun.enable = mkEnableOption "anyrun";
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
home-manager.users.${username} = {
|
|
||||||
imports = [ inputs.anyrun.homeManagerModules.default ];
|
|
||||||
|
|
||||||
programs.anyrun = {
|
|
||||||
enable = true;
|
|
||||||
config = {
|
|
||||||
plugins = with inputs.anyrun.packages.${pkgs.system}; [
|
|
||||||
applications
|
|
||||||
dictionary
|
|
||||||
kidex
|
|
||||||
rink
|
|
||||||
symbols
|
|
||||||
translate
|
|
||||||
];
|
|
||||||
hideIcons = false;
|
|
||||||
ignoreExclusiveZones = false;
|
|
||||||
layer = "overlay";
|
|
||||||
hidePluginInfo = true;
|
|
||||||
closeOnClick = true;
|
|
||||||
showResultsImmediately = true;
|
|
||||||
maxEntries = 50;
|
|
||||||
width.fraction = 0.5;
|
|
||||||
y.absolute = 15;
|
|
||||||
};
|
|
||||||
|
|
||||||
extraCss = ''
|
|
||||||
@define-color bg-col rgba(30, 30, 46, 0.7);
|
|
||||||
@define-color bg-col-light rgba(150, 220, 235, 0.7);
|
|
||||||
@define-color border-col rgba(30, 30, 46, 0.7);
|
|
||||||
@define-color selected-col rgba(150, 205, 251, 0.7);
|
|
||||||
@define-color fg-col #D9E0EE;
|
|
||||||
@define-color fg-col2 #F28FAD;
|
|
||||||
|
|
||||||
* {
|
|
||||||
transition: 200ms ease;
|
|
||||||
font-family: "JetBrainsMono Nerd Font";
|
|
||||||
font-size: 1.0rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
#window {
|
|
||||||
background: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
#plugin,
|
|
||||||
#main {
|
|
||||||
border: 3px solid @border-col;
|
|
||||||
color: @fg-col;
|
|
||||||
background-color: @bg-col;
|
|
||||||
}
|
|
||||||
/* anyrun's input window - Text */
|
|
||||||
#entry {
|
|
||||||
color: @fg-col;
|
|
||||||
background-color: @bg-col;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* anyrun's ouput matches entries - Base */
|
|
||||||
#match {
|
|
||||||
color: @fg-col;
|
|
||||||
background: @bg-col;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* anyrun's selected entry - Red */
|
|
||||||
#match:selected {
|
|
||||||
color: @fg-col2;
|
|
||||||
background: @selected-col;
|
|
||||||
}
|
|
||||||
|
|
||||||
#match {
|
|
||||||
padding: 3px;
|
|
||||||
border-radius: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#entry, #plugin:hover {
|
|
||||||
border-radius: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
box#main {
|
|
||||||
background: rgba(30, 30, 46, 0.7);
|
|
||||||
border: 1px solid @border-col;
|
|
||||||
border-radius: 15px;
|
|
||||||
padding: 5px;
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
48
modules/gui/anyrun/anyrun.nix
Normal file
48
modules/gui/anyrun/anyrun.nix
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
{ config, pkgs, lib, inputs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
username = config.modules.other.system.username;
|
||||||
|
cfg = config.modules.programs.anyrun;
|
||||||
|
in {
|
||||||
|
options.modules.programs.anyrun.enable = mkEnableOption "anyrun";
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
home-manager.users.${username} = {
|
||||||
|
imports = [ inputs.anyrun.homeManagerModules.default ];
|
||||||
|
|
||||||
|
programs.anyrun = {
|
||||||
|
enable = true;
|
||||||
|
config = {
|
||||||
|
plugins = with inputs.anyrun.packages.${pkgs.system}; [
|
||||||
|
applications
|
||||||
|
dictionary
|
||||||
|
kidex
|
||||||
|
rink
|
||||||
|
shell
|
||||||
|
symbols
|
||||||
|
translate
|
||||||
|
];
|
||||||
|
hideIcons = false;
|
||||||
|
ignoreExclusiveZones = false;
|
||||||
|
layer = "overlay";
|
||||||
|
hidePluginInfo = true;
|
||||||
|
closeOnClick = true;
|
||||||
|
showResultsImmediately = true;
|
||||||
|
maxEntries = 50;
|
||||||
|
width.fraction = 0.3;
|
||||||
|
y.absolute = 15;
|
||||||
|
};
|
||||||
|
extraCss = builtins.readFile (./. + "/style.css");
|
||||||
|
|
||||||
|
extraConfigFiles."applications.ron".text = ''
|
||||||
|
Config(
|
||||||
|
desktop_actions: false,
|
||||||
|
max_entries: 5,
|
||||||
|
terminal: Some("kitty"),
|
||||||
|
)
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
3
modules/gui/anyrun/default.nix
Normal file
3
modules/gui/anyrun/default.nix
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
_: {
|
||||||
|
imports = [./anyrun.nix];
|
||||||
|
}
|
69
modules/gui/anyrun/style.css
Normal file
69
modules/gui/anyrun/style.css
Normal file
|
@ -0,0 +1,69 @@
|
||||||
|
* {
|
||||||
|
all: unset;
|
||||||
|
font-size: 1.3rem;
|
||||||
|
font-family: "JetBrains Mono"
|
||||||
|
}
|
||||||
|
|
||||||
|
#window,
|
||||||
|
#match,
|
||||||
|
#entry,
|
||||||
|
#plugin,
|
||||||
|
#main {
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
#match.activatable {
|
||||||
|
border-radius: 16px;
|
||||||
|
padding: 0.3rem 0.9rem;
|
||||||
|
margin-top: 0.01rem;
|
||||||
|
}
|
||||||
|
#match.activatable:first-child {
|
||||||
|
margin-top: 0.7rem;
|
||||||
|
}
|
||||||
|
#match.activatable:last-child {
|
||||||
|
margin-bottom: 0.6rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
#plugin:hover #match.activatable {
|
||||||
|
border-radius: 10px;
|
||||||
|
padding: 0.3rem;
|
||||||
|
margin-top: 0.01rem;
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#match:selected,
|
||||||
|
#match:hover,
|
||||||
|
#plugin:hover {
|
||||||
|
background: rgba(255, 255, 255, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
#entry {
|
||||||
|
background: rgba(255, 255, 255, 0.05);
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||||
|
border-radius: 16px;
|
||||||
|
margin: 0.5rem;
|
||||||
|
padding: 0.3rem 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
list > #plugin {
|
||||||
|
border-radius: 16px;
|
||||||
|
margin: 0 0.3rem;
|
||||||
|
}
|
||||||
|
list > #plugin:first-child {
|
||||||
|
margin-top: 0.3rem;
|
||||||
|
}
|
||||||
|
list > #plugin:last-child {
|
||||||
|
margin-bottom: 0.3rem;
|
||||||
|
}
|
||||||
|
list > #plugin:hover {
|
||||||
|
padding: 0.6rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
box#main {
|
||||||
|
background: rgba(0, 0, 0, 0.5);
|
||||||
|
box-shadow:
|
||||||
|
inset 0 0 0 1px rgba(255, 255, 255, 0.1),
|
||||||
|
0 0 0 1px rgba(0, 0, 0, 0.5);
|
||||||
|
border-radius: 24px;
|
||||||
|
padding: 0.3rem;
|
||||||
|
}
|
|
@ -7,7 +7,7 @@ _: {
|
||||||
./qt.nix
|
./qt.nix
|
||||||
./zathura.nix
|
./zathura.nix
|
||||||
./stylix.nix
|
./stylix.nix
|
||||||
./anyrun.nix
|
./anyrun
|
||||||
./rofi.nix
|
./rofi.nix
|
||||||
./kitty.nix
|
./kitty.nix
|
||||||
./vivado.nix
|
./vivado.nix
|
||||||
|
|
90
modules/gui/emacs/default.nix
Normal file
90
modules/gui/emacs/default.nix
Normal file
|
@ -0,0 +1,90 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.modules.programs.emacs;
|
||||||
|
envExtra = ''
|
||||||
|
export PATH="${config.xdg.configHome}/emacs/bin:$PATH"
|
||||||
|
'';
|
||||||
|
shellAliases = {
|
||||||
|
e = "emacsclient --create-frame"; # gui
|
||||||
|
et = "emacsclient --create-frame --tty"; # termimal
|
||||||
|
};
|
||||||
|
librime-dir = "${config.xdg.dataHome}/emacs/librime";
|
||||||
|
parinfer-rust-lib-dir = "${config.xdg.dataHome}/emacs/parinfer-rust";
|
||||||
|
myEmacsPackagesFor = emacs: ((pkgs.emacsPackagesFor emacs).emacsWithPackages (epkgs: [
|
||||||
|
epkgs.vterm
|
||||||
|
]));
|
||||||
|
in {
|
||||||
|
options.modules.editors.emacs = {
|
||||||
|
enable = mkEnableOption "Emacs Editor";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable (mkMerge [
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
## Doom dependencies
|
||||||
|
git
|
||||||
|
(ripgrep.override {withPCRE2 = true;})
|
||||||
|
gnutls # for TLS connectivity
|
||||||
|
|
||||||
|
## Optional dependencies
|
||||||
|
fd # faster projectile indexing
|
||||||
|
imagemagick # for image-dired
|
||||||
|
fd # faster projectile indexing
|
||||||
|
zstd # for undo-fu-session/undo-tree compression
|
||||||
|
|
||||||
|
# go-mode
|
||||||
|
# gocode # project archived, use gopls instead
|
||||||
|
|
||||||
|
## Module dependencies
|
||||||
|
# :checkers spell
|
||||||
|
(aspellWithDicts (ds: with ds; [en en-computers en-science]))
|
||||||
|
# :tools editorconfig
|
||||||
|
editorconfig-core-c # per-project style config
|
||||||
|
# :tools lookup & :lang org +roam
|
||||||
|
sqlite
|
||||||
|
# :lang latex & :lang org (latex previews)
|
||||||
|
# texlive.combined.scheme-medium
|
||||||
|
];
|
||||||
|
|
||||||
|
programs.bash.bashrcExtra = envExtra;
|
||||||
|
programs.zsh.envExtra = envExtra;
|
||||||
|
home.shellAliases = shellAliases;
|
||||||
|
programs.nushell.shellAliases = shellAliases;
|
||||||
|
|
||||||
|
xdg.configFile."doom" = {
|
||||||
|
source = ./doom;
|
||||||
|
force = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
home.activation.installDoomEmacs = lib.hm.dag.entryAfter ["writeBoundary"] ''
|
||||||
|
${pkgs.rsync}/bin/rsync -avz --chmod=D2755,F744 ${doomemacs}/ ${config.xdg.configHome}/emacs/
|
||||||
|
|
||||||
|
# librime for emacs-rime
|
||||||
|
mkdir -p ${librime-dir}
|
||||||
|
${pkgs.rsync}/bin/rsync -avz --chmod=D2755,F744 ${pkgs.librime}/ ${librime-dir}/
|
||||||
|
|
||||||
|
# libparinfer_rust for emacs' parinfer-rust-mode
|
||||||
|
mkdir -p ${parinfer-rust-lib-dir}
|
||||||
|
${pkgs.rsync}/bin/rsync -avz --chmod=D2755,F744 ${pkgs.vimPlugins.parinfer-rust}/lib/libparinfer_rust.* ${parinfer-rust-lib-dir}/parinfer-rust.so
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
|
||||||
|
let
|
||||||
|
# Do not use emacs-nox here, which makes the mouse wheel work abnormally in terminal mode.
|
||||||
|
# pgtk (pure gtk) build add native support for wayland.
|
||||||
|
# https://www.gnu.org/savannah-checkouts/gnu/emacs/emacs.html#Releases
|
||||||
|
emacsPkg = myEmacsPackagesFor pkgs.emacs29-pgtk;
|
||||||
|
in {
|
||||||
|
home.packages = [emacsPkg];
|
||||||
|
services.emacs = {
|
||||||
|
enable = true;
|
||||||
|
package = emacsPkg;
|
||||||
|
client = {
|
||||||
|
enable = true;
|
||||||
|
arguments = [" --create-frame"];
|
||||||
|
};
|
||||||
|
startWithUserSession = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
]);
|
||||||
|
}
|
|
@ -46,18 +46,13 @@ in {
|
||||||
popups = 14;
|
popups = 14;
|
||||||
|
|
||||||
};
|
};
|
||||||
sansSerif = {
|
sansSerif = config.stylix.fonts.monospace;
|
||||||
package = pkgs.dejavu_fonts;
|
serif = config.stylix.fonts.monospace;
|
||||||
name = "DejaVu Sans";
|
emoji = config.stylix.fonts.monospace;
|
||||||
};
|
|
||||||
monospace = {
|
monospace = {
|
||||||
package = (pkgs.nerdfonts.override {fonts = ["JetBrainsMono"];});
|
package = (pkgs.nerdfonts.override {fonts = ["JetBrainsMono"];});
|
||||||
name = "JetBrainsMono";
|
name = "JetBrainsMono";
|
||||||
};
|
};
|
||||||
emoji = {
|
|
||||||
package = pkgs.noto-fonts-emoji;
|
|
||||||
name = "Noto Color Emoji";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -12,21 +12,16 @@ let
|
||||||
terminal = "kitty.desktop";
|
terminal = "kitty.desktop";
|
||||||
in {
|
in {
|
||||||
|
|
||||||
# xdg.portal = {
|
|
||||||
# enable = true;
|
|
||||||
# extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
|
||||||
# config.common.default = "gtk";
|
|
||||||
# };
|
|
||||||
environment.sessionVariables = {
|
environment.sessionVariables = {
|
||||||
TERMINAL = "${terminal}";
|
TERMINAL = "${terminal}";
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager.users.${username} = {
|
home-manager.users.${username} = {
|
||||||
xdg = {
|
xdg = {
|
||||||
# cacheHome = "${hmCfg.home.homeDirectory}/.cache";
|
cacheHome = "${hmCfg.home.homeDirectory}/.cache";
|
||||||
# configHome = "${hmCfg.home.homeDirectory}/.config";
|
configHome = "${hmCfg.home.homeDirectory}/.config";
|
||||||
# dataHome = "${hmCfg.home.homeDirectory}/.local/share";
|
dataHome = "${hmCfg.home.homeDirectory}/.local/share";
|
||||||
# stateHome = "${hmCfg.home.homeDirectory}/.local/state";
|
stateHome = "${hmCfg.home.homeDirectory}/.local/state";
|
||||||
mimeApps = {
|
mimeApps = {
|
||||||
enable = true;
|
enable = true;
|
||||||
defaultApplications = {
|
defaultApplications = {
|
||||||
|
|
|
@ -8,10 +8,7 @@ in {
|
||||||
hardware.pulseaudio.enable = false;
|
hardware.pulseaudio.enable = false;
|
||||||
services.pipewire = {
|
services.pipewire = {
|
||||||
enable = true;
|
enable = true;
|
||||||
alsa.enable = true;
|
|
||||||
alsa.support32Bit = true;
|
|
||||||
pulse.enable = true;
|
pulse.enable = true;
|
||||||
wireplumber.enable = true;
|
|
||||||
};
|
};
|
||||||
security.rtkit.enable = true;
|
security.rtkit.enable = true;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue