feat: restructure and move apps into their own configs (#2)
This commit is contained in:
18
home/auth.nix
Normal file
18
home/auth.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
device,
|
||||
...
|
||||
}: {
|
||||
# import the home-manager module
|
||||
imports = [inputs.onepassword-shell-plugins.hmModules.default];
|
||||
programs = {
|
||||
_1password-shell-plugins = {
|
||||
# enable 1Password shell plugins for bash, zsh, and fish shell
|
||||
enable = device.hasGui;
|
||||
# the specified packages as well as 1Password CLI will be
|
||||
# automatically installed and configured to use shell plugins
|
||||
# plugins = with pkgs; [awscli2 cachix cargo];
|
||||
};
|
||||
};
|
||||
}
|
||||
79
home/default.nix
Normal file
79
home/default.nix
Normal file
@@ -0,0 +1,79 @@
|
||||
{
|
||||
inputs,
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
device,
|
||||
...
|
||||
}: {
|
||||
imports =
|
||||
[
|
||||
inputs.nix-index-database.hmModules.nix-index
|
||||
../modules
|
||||
./auth.nix
|
||||
./gui-programs
|
||||
./programs
|
||||
./scripts.nix
|
||||
]
|
||||
++ lib.optionals device.isLinux [./linux];
|
||||
# ++ lib.optionals.device.isMac [./macos];
|
||||
|
||||
xdg.enable = true;
|
||||
xdg.userDirs = {
|
||||
enable = device.isLinux;
|
||||
music = "${config.home.homeDirectory}/Nextcloud/Music";
|
||||
};
|
||||
|
||||
programs = {
|
||||
home-manager = {enable = true;};
|
||||
};
|
||||
|
||||
fonts.fontconfig.enable = true;
|
||||
|
||||
home = {
|
||||
username = device.user;
|
||||
homeDirectory =
|
||||
if device.isMac
|
||||
then lib.mkForce "/Users/${device.user}"
|
||||
else lib.mkForce "/home/${device.user}";
|
||||
|
||||
file = {
|
||||
".config/fish/themes".source = pkgs.catppuccinThemes.fish + "/themes";
|
||||
".cargo/config.toml".text =
|
||||
/*
|
||||
toml
|
||||
*/
|
||||
''
|
||||
[alias]
|
||||
lldb = ["with", "rust-lldb", "--"]
|
||||
t = ["nextest", "run"]
|
||||
|
||||
[net]
|
||||
git-fetch-with-cli = true
|
||||
|
||||
# [target.aarch64-apple-darwin]
|
||||
# linker = "clang"
|
||||
# rustflags = ["-C", "link-arg=-fuse-ld=${pkgs.mold}/bin/mold"]
|
||||
|
||||
[registries.catscii]
|
||||
index = "https://git.shipyard.rs/catscii/crate-index.git"
|
||||
|
||||
[http]
|
||||
user-agent = "shipyard J0/QFq2Sa5y6nTxJQAb8t+e/3qLSub1/sa3zn0leZv6LKG/zmQcoikT9U3xPwbzp8hQ="
|
||||
'';
|
||||
};
|
||||
|
||||
sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
SHELL = "${pkgs.bash}/bin/bash";
|
||||
CARGO_TARGET_DIR = "${config.xdg.cacheHome}/cargo/target";
|
||||
BROWSER =
|
||||
if device.isMac
|
||||
then "open"
|
||||
else "xdg-open";
|
||||
};
|
||||
sessionPath = ["${config.home.homeDirectory}/.cargo/bin"];
|
||||
|
||||
stateVersion = "23.11";
|
||||
};
|
||||
}
|
||||
3
home/gui-programs/cursor.nix
Normal file
3
home/gui-programs/cursor.nix
Normal file
@@ -0,0 +1,3 @@
|
||||
{pkgs, ...}: {
|
||||
home.packages = [pkgs.code-cursor];
|
||||
}
|
||||
16
home/gui-programs/default.nix
Normal file
16
home/gui-programs/default.nix
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
lib,
|
||||
device,
|
||||
...
|
||||
}: {
|
||||
imports =
|
||||
[]
|
||||
++ (lib.optionals device.hasGui [
|
||||
./cursor.nix
|
||||
./firefox.nix
|
||||
./ghostty.nix
|
||||
./kitty.nix
|
||||
./vscodium.nix
|
||||
./wezterm.nix
|
||||
]);
|
||||
}
|
||||
64
home/gui-programs/firefox.nix
Normal file
64
home/gui-programs/firefox.nix
Normal file
@@ -0,0 +1,64 @@
|
||||
{
|
||||
device,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
programs.firefox = {
|
||||
enable = pkgs.stdenv.isLinux;
|
||||
profiles.default = {
|
||||
# userChrome =
|
||||
# /*
|
||||
# css
|
||||
# */
|
||||
# ''
|
||||
# @import url(${pkgs.csshacks}/chrome/toolbars_below_content.css);
|
||||
# @import url(${pkgs.csshacks}/chrome/scrollable_menupopups.css);
|
||||
# @import url(${pkgs.csshacks}/chrome/linux_gtk_window_control_patch.css);
|
||||
# @import url(${pkgs.csshacks}/chrome/window_control_placeholder_support.css);
|
||||
# '';
|
||||
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
|
||||
privacy-badger
|
||||
violentmonkey
|
||||
tridactyl
|
||||
clearurls
|
||||
onepassword-password-manager
|
||||
ublock-origin
|
||||
i-dont-care-about-cookies
|
||||
keepa
|
||||
sponsorblock
|
||||
];
|
||||
};
|
||||
nativeMessagingHosts = [pkgs.tridactyl-native];
|
||||
policies = {
|
||||
DisableFirefoxStudies = true;
|
||||
DisablePocket = true;
|
||||
DisableTelemetry = true;
|
||||
FeatureRecommendations = false;
|
||||
SkipOnboarding = true;
|
||||
Preferences = {
|
||||
"toolkit.legacyUserProfileCustomizations.stylesheets" = {
|
||||
Value = true;
|
||||
Status = "default";
|
||||
};
|
||||
"browser.urlbar.suggest.calculator" = {
|
||||
Value = true;
|
||||
Status = "default";
|
||||
};
|
||||
"extensions.quarantinedDomains.enabled" = {
|
||||
Value = false;
|
||||
Status = "default";
|
||||
};
|
||||
};
|
||||
FirefoxHome = {
|
||||
"Search" = true;
|
||||
"TopSites" = false;
|
||||
"SponsoredTopSites" = false;
|
||||
"Highlights" = false;
|
||||
"Pocket" = false;
|
||||
"SponsoredPocket" = false;
|
||||
"Snippets" = false;
|
||||
"Locked" = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
23
home/gui-programs/ghostty.nix
Normal file
23
home/gui-programs/ghostty.nix
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
pkgs,
|
||||
device,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
programs.ghostty = {
|
||||
enable = pkgs.stdenv.isLinux;
|
||||
installBatSyntax = false;
|
||||
settings = {
|
||||
theme = "catppuccin-mocha";
|
||||
# font-family = [
|
||||
# ""
|
||||
# "Hasklug Nerd Font Mono"
|
||||
# ];
|
||||
window-decoration = false;
|
||||
title = "";
|
||||
command = "fish";
|
||||
background-opacity = 0.8;
|
||||
};
|
||||
package = pkgs.ghostty;
|
||||
};
|
||||
}
|
||||
29
home/gui-programs/kitty.nix
Normal file
29
home/gui-programs/kitty.nix
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
pkgs,
|
||||
device,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
# enable = false;
|
||||
font = {
|
||||
# name = "FiraCode Nerd Font Mono";
|
||||
# name = "Hasklug Nerd Font Mono";
|
||||
name = "Monaspace Krypton Var Light";
|
||||
size = 13;
|
||||
};
|
||||
settings = {
|
||||
background_opacity = "0.8";
|
||||
background = "#000000";
|
||||
shell = "${pkgs.fish}/bin/fish";
|
||||
hide_window_decorations = "yes";
|
||||
};
|
||||
shellIntegration.enableFishIntegration = true;
|
||||
darwinLaunchOptions = [
|
||||
"--single-instance"
|
||||
];
|
||||
themeFile = "Catppuccin-Mocha";
|
||||
package = inputs.nixpkgs-master.legacyPackages.${device.system}.kitty;
|
||||
};
|
||||
}
|
||||
13
home/gui-programs/vscodium.nix
Normal file
13
home/gui-programs/vscodium.nix
Normal file
@@ -0,0 +1,13 @@
|
||||
{pkgs, ...}: {
|
||||
programs = {
|
||||
# Only for checking markdown previews
|
||||
vscode = {
|
||||
enable = true;
|
||||
package = pkgs.vscodium;
|
||||
extensions = with pkgs.vscode-extensions; [
|
||||
shd101wyy.markdown-preview-enhanced
|
||||
asvetliakov.vscode-neovim
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
39
home/gui-programs/wezterm.nix
Normal file
39
home/gui-programs/wezterm.nix
Normal file
@@ -0,0 +1,39 @@
|
||||
{
|
||||
pkgs,
|
||||
device,
|
||||
...
|
||||
}: {
|
||||
programs.wezterm = {
|
||||
enable = true;
|
||||
extraConfig =
|
||||
/*
|
||||
lua
|
||||
*/
|
||||
''
|
||||
local wezterm = require 'wezterm';
|
||||
return {
|
||||
term = "wezterm",
|
||||
font = wezterm.font_with_fallback({
|
||||
"Hasklug Nerd Font Mono",
|
||||
"Symbols Nerd Font Mono"
|
||||
}),
|
||||
color_scheme = "Catppuccin Mocha",
|
||||
font_size = 16,
|
||||
initial_cols = 200,
|
||||
hide_tab_bar_if_only_one_tab = true,
|
||||
window_background_opacity = 0.8,
|
||||
cursor_blink_rate = 8,
|
||||
# default_cursor_style = "BlinkingBlock",
|
||||
default_prog = { "${pkgs.fish}/bin/fish", "-l" },
|
||||
window_padding = {
|
||||
left = 2,
|
||||
right = 0,
|
||||
top = 2,
|
||||
bottom = 0,
|
||||
},
|
||||
window_decorations = "RESIZE",
|
||||
use_ime = false,
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
143
home/linux/anyrun.nix
Normal file
143
home/linux/anyrun.nix
Normal file
@@ -0,0 +1,143 @@
|
||||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
device,
|
||||
# osConfig,
|
||||
...
|
||||
}: {
|
||||
imports = [inputs.anyrun.homeManagerModules.default];
|
||||
programs.anyrun = {
|
||||
enable = device.hasGui;
|
||||
config = {
|
||||
plugins = with inputs.anyrun.packages.${pkgs.system}; [
|
||||
inputs.anyrun-nixos-options.packages.${pkgs.system}.default
|
||||
inputs.anyrun-hyprwin.packages.${pkgs.system}.default
|
||||
inputs.anyrun-rink.packages.${pkgs.system}.default
|
||||
applications
|
||||
websearch
|
||||
shell
|
||||
translate
|
||||
symbols
|
||||
kidex
|
||||
];
|
||||
x = {fraction = 0.5;};
|
||||
y = {fraction = 0.3;};
|
||||
height = {absolute = 0;};
|
||||
width = {absolute = 1000;};
|
||||
showResultsImmediately = true;
|
||||
maxEntries = 10;
|
||||
layer = "overlay";
|
||||
};
|
||||
|
||||
extraConfigFiles = {
|
||||
"nixos-options.ron".text = let
|
||||
# nixos-options =
|
||||
# pkgs.lib.optionalString device.isNix
|
||||
# osConfig.system.build.manual.optionsJSON
|
||||
# + "/share/doc/nixos/options.json";
|
||||
hm-options =
|
||||
inputs.home-manager.packages.${pkgs.system}.docs-json
|
||||
+ "/share/doc/home-manager/options.json";
|
||||
# or alternatively if you wish to read any other documentation options, such as home-manager
|
||||
# get the docs-json package from the home-manager flake
|
||||
# hm-options = inputs.home-manager.packages.${pkgs.system}.docs-json + "/share/doc/home-manager/options.json";
|
||||
# options = builtins.toJSON {
|
||||
# ":nix" = [nixos-options];
|
||||
# ":hm" = [hm-options];
|
||||
# ":something-else" = [some-other-option];
|
||||
# ":nall" = [nixos-options hm-options some-other-option];
|
||||
# };
|
||||
options = builtins.toJSON {
|
||||
":hm" = [hm-options];
|
||||
};
|
||||
# // (
|
||||
# if device.isNix
|
||||
# then {":nix" = [nixos-options];}
|
||||
# else {}
|
||||
# ));
|
||||
in ''
|
||||
Config(
|
||||
options: ${options},
|
||||
max_entries: Some(10),
|
||||
)
|
||||
'';
|
||||
"shell.ron".text = ''
|
||||
Config(
|
||||
prefix: "!",
|
||||
shell: None,
|
||||
)
|
||||
'';
|
||||
"websearch.ron".text =
|
||||
/*
|
||||
ron
|
||||
*/
|
||||
''
|
||||
Config(
|
||||
prefix: "?",
|
||||
engines: [
|
||||
Google,
|
||||
Custom (
|
||||
name: "Nix Packages",
|
||||
url: "search.nixos.org/packages?query={}&channel=unstable"
|
||||
),
|
||||
Custom (
|
||||
name: "GitHub",
|
||||
url: "github.com/search?q={}"
|
||||
),
|
||||
Custom (
|
||||
name: "docs.rs",
|
||||
url: "docs.rs/releases/search?query={}"
|
||||
),
|
||||
Custom (
|
||||
name: "NixOS options",
|
||||
url: "search.nixos.org/options?query={}"
|
||||
),
|
||||
DuckDuckGo,
|
||||
]
|
||||
)
|
||||
'';
|
||||
"rink.ron".text = ''
|
||||
Config(
|
||||
currency: Some("${
|
||||
builtins.toFile "currency.units" ''
|
||||
!category currencies "Currencies"
|
||||
usd USD
|
||||
inr INR
|
||||
''
|
||||
}"),
|
||||
)
|
||||
'';
|
||||
};
|
||||
|
||||
extraCss = ''
|
||||
window {
|
||||
color: #ffffff;
|
||||
background-color: rgba(15, 15, 15, .2);
|
||||
border-color: #000000;
|
||||
}
|
||||
|
||||
entry {
|
||||
color: #ffffff;
|
||||
background-color: rgba(40, 40, 40, .98);
|
||||
padding: 14px;
|
||||
font-size: 30px;
|
||||
border-color: #000000;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
#plugin {
|
||||
color: #efefef;
|
||||
border-color: #000000;
|
||||
border-color: #000000;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
#main {
|
||||
color: #efefef;
|
||||
border-color: #000000;
|
||||
border-color: #000000;
|
||||
border-radius: 5px;
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
25
home/linux/default.nix
Normal file
25
home/linux/default.nix
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
lib,
|
||||
device,
|
||||
...
|
||||
}: {
|
||||
imports =
|
||||
[]
|
||||
++ (lib.optionals device.hasGui [
|
||||
./hyprland.nix
|
||||
./gtk.nix
|
||||
./anyrun.nix
|
||||
./ironbar
|
||||
./foot.nix
|
||||
./mpd.nix
|
||||
]);
|
||||
|
||||
services.kdeconnect.enable = device.hasGui;
|
||||
services.kdeconnect.indicator = device.hasGui;
|
||||
services.swayosd.enable = device.hasGui;
|
||||
services.swaync.enable = device.hasGui;
|
||||
services.nextcloud-client = {
|
||||
enable = device.hasGui;
|
||||
startInBackground = true;
|
||||
};
|
||||
}
|
||||
25
home/linux/device.nix
Normal file
25
home/linux/device.nix
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
devices,
|
||||
inputs,
|
||||
overlays,
|
||||
home-manager,
|
||||
...
|
||||
}:
|
||||
builtins.listToAttrs (builtins.map (device: {
|
||||
name = device.name;
|
||||
value = let
|
||||
pkgs = import inputs.nixpkgs {
|
||||
inherit overlays;
|
||||
system = device.system;
|
||||
};
|
||||
in
|
||||
home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
extraSpecialArgs = {
|
||||
inherit inputs;
|
||||
inherit device;
|
||||
};
|
||||
modules = [{nixpkgs.config.allowUnfree = true;} ../common/home.nix];
|
||||
};
|
||||
})
|
||||
devices)
|
||||
43
home/linux/foot.nix
Normal file
43
home/linux/foot.nix
Normal file
@@ -0,0 +1,43 @@
|
||||
{
|
||||
pkgs,
|
||||
device,
|
||||
...
|
||||
}: {
|
||||
programs.foot = {
|
||||
enable = device.hasGui;
|
||||
server.enable = true;
|
||||
settings = {
|
||||
main = {
|
||||
shell = "${pkgs.fish.outPath}/bin/fish";
|
||||
# font = "Hasklug Nerd Font Mono:size=13";
|
||||
font = "Monaspace Krypton:size=13";
|
||||
initial-window-size-pixels = "1440x800";
|
||||
};
|
||||
colors = {
|
||||
foreground = "f8f8f2";
|
||||
background = "000000";
|
||||
alpha = 0.8;
|
||||
|
||||
"136" = "af8700";
|
||||
|
||||
regular0 = "21222c";
|
||||
regular1 = "ff5555";
|
||||
regular2 = "50fa7b";
|
||||
regular3 = "f1fa8c";
|
||||
regular4 = "bd93f9";
|
||||
regular5 = "ff79c6";
|
||||
regular6 = "8be9fd";
|
||||
regular7 = "f8f8f2";
|
||||
|
||||
bright0 = "6272a4";
|
||||
bright1 = "ff6e6e";
|
||||
bright2 = "69ff94";
|
||||
bright3 = "ffffa5";
|
||||
bright4 = "d6acff";
|
||||
bright5 = "ff92df";
|
||||
bright6 = "a4ffff";
|
||||
bright7 = "ffffff";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
35
home/linux/gtk.nix
Normal file
35
home/linux/gtk.nix
Normal file
@@ -0,0 +1,35 @@
|
||||
{
|
||||
pkgs,
|
||||
device,
|
||||
...
|
||||
}: {
|
||||
gtk = {
|
||||
enable = device.hasGui;
|
||||
theme = {
|
||||
name = "catppuccin-mocha-mauve-standard+normal";
|
||||
package = pkgs.adwaita-icon-theme;
|
||||
# package = pkgs.catppuccin-gtk.override {
|
||||
# variant = "mocha";
|
||||
# size = "standard";
|
||||
# accents = ["mauve"];
|
||||
# tweaks = ["normal"];
|
||||
# };
|
||||
};
|
||||
|
||||
iconTheme = {
|
||||
name = "Papirus-Dark";
|
||||
package = pkgs.catppuccin-papirus-folders.override {
|
||||
accent = "mauve";
|
||||
flavor = "mocha";
|
||||
};
|
||||
};
|
||||
|
||||
cursorTheme = {
|
||||
name = "Vanillay-DMZ";
|
||||
package = pkgs.vanilla-dmz;
|
||||
};
|
||||
|
||||
gtk3.extraConfig = {gtk-application-prefer-dark-theme = 1;};
|
||||
gtk4.extraConfig = {gtk-application-prefer-dark-theme = 1;};
|
||||
};
|
||||
}
|
||||
248
home/linux/hyprland.nix
Normal file
248
home/linux/hyprland.nix
Normal file
@@ -0,0 +1,248 @@
|
||||
{
|
||||
pkgs,
|
||||
device,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
../../modules/hyprpaper.nix
|
||||
];
|
||||
|
||||
programs.hyprpaper = let
|
||||
wallpapers = import ../../utils/wallhaven.nix {inherit pkgs;};
|
||||
in {
|
||||
enable = device.hasGui;
|
||||
# enable = true;
|
||||
systemd.enable = true;
|
||||
systemd.target = "hyprland-session.target";
|
||||
settings.preload = wallpapers.all;
|
||||
settings.wallpapers = {
|
||||
"${device.monitors.primary}" = wallpapers.skull;
|
||||
"${device.monitors.secondary}" = wallpapers.frieren_3;
|
||||
"${device.monitors.tertiary}" = wallpapers.cloud;
|
||||
};
|
||||
};
|
||||
programs.hyprlock = {
|
||||
enable = device.hasGui;
|
||||
};
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = device.hasGui;
|
||||
|
||||
settings = {
|
||||
source = "${pkgs.catppuccinThemes.hyprland}/themes/mocha.conf";
|
||||
"render:explicit_sync" = true;
|
||||
monitor = [
|
||||
"${device.monitors.primary}, 2560x1440@360, 0x0, 1, transform, 0"
|
||||
"${device.monitors.secondary}, 2560x1440@170, -1440x-1120, 1, transform, 1"
|
||||
"${device.monitors.tertiary}, 2560x1440@170, 2560x-1120, 1, transform, 3"
|
||||
];
|
||||
|
||||
input = {
|
||||
kb_layout = "us";
|
||||
# kb_variant = "";
|
||||
# kb_model = "";
|
||||
kb_options = "ctrl:nocaps";
|
||||
# kb_rules = "";
|
||||
|
||||
follow_mouse = 2;
|
||||
|
||||
touchpad = {
|
||||
natural_scroll = true;
|
||||
tap-to-click = true;
|
||||
disable_while_typing = true;
|
||||
};
|
||||
};
|
||||
|
||||
general = {
|
||||
gaps_in = 5;
|
||||
gaps_out = 20;
|
||||
border_size = 2;
|
||||
"col.active_border" = "$mauve $mauve 45deg";
|
||||
"col.inactive_border" = "$crust";
|
||||
};
|
||||
|
||||
decoration = {
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
|
||||
rounding = 10;
|
||||
# drop_shadow = true;
|
||||
# shadow_range = 4;
|
||||
# shadow_render_power = 3;
|
||||
# col.shadow = "rgba(1a1a1aee)";
|
||||
|
||||
blur = {
|
||||
enabled = true;
|
||||
size = 3;
|
||||
passes = 1;
|
||||
};
|
||||
};
|
||||
|
||||
animations = {
|
||||
enabled = true;
|
||||
|
||||
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
|
||||
|
||||
bezier = "myBezier, 0.05, 0.9, 0.1, 1.05";
|
||||
|
||||
animation = [
|
||||
"windows, 1, 7, myBezier"
|
||||
"windowsOut, 1, 7, default, popin 80%"
|
||||
"border, 1, 10, default"
|
||||
"borderangle, 1, 8, default"
|
||||
"fade, 1, 7, default"
|
||||
"workspaces, 1, 6, default"
|
||||
];
|
||||
};
|
||||
|
||||
dwindle = {
|
||||
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
|
||||
pseudotile =
|
||||
true; # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
|
||||
preserve_split = true; # you probably want this
|
||||
};
|
||||
|
||||
master = {
|
||||
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
|
||||
new_status = "master";
|
||||
};
|
||||
|
||||
gestures = {
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
workspace_swipe = false;
|
||||
};
|
||||
|
||||
# Example per-device config
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/#executing for more
|
||||
# "device:epic-mouse-v1" = { sensitivity = -0.5; };
|
||||
|
||||
# Example windowrule v1
|
||||
# windowrule = float, ^(kitty)$
|
||||
# Example windowrule v2
|
||||
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
|
||||
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
|
||||
|
||||
windowrulev2 = [
|
||||
# "float, title:^(Steam)$"
|
||||
"float, title:^(Archetype.*)$"
|
||||
"float, class:(.*nextcloud.*)"
|
||||
"float, class:org.kde.kdeconnect.app"
|
||||
];
|
||||
|
||||
# "misc:vfr" = true;
|
||||
|
||||
env = [
|
||||
"XCURSOR_SIZE,24"
|
||||
"XDG_SESSION_TYPE,wayland"
|
||||
"MOZ_ENABLE_WAYLAND,1"
|
||||
"QT_QPA_PLATFORM,wayland"
|
||||
];
|
||||
exec-once = [
|
||||
# "${pkgs.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1"
|
||||
"${pkgs.mate.mate-polkit}/libexec/polkit-mate-authentication-agent-1"
|
||||
# "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"
|
||||
# "${pkgs.swww}/bin/swww init; swww img ~/.local/share/dotfiles/images/wallpaper.jpg"
|
||||
"${pkgs.ironbar}/bin/ironbar"
|
||||
# "${pkgs.swayosd}/bin/swayosd-server"
|
||||
"${pkgs.nextcloud-client}/bin/nextcloud --background"
|
||||
];
|
||||
|
||||
"$mainMod" = "SUPER";
|
||||
"$mainModShift" = "SUPER_SHIFT";
|
||||
|
||||
binde = [
|
||||
",xf86audioraisevolume, exec, ${pkgs.swayosd}/bin/swayosd-client --output-volume raise"
|
||||
",xf86audiolowervolume, exec, ${pkgs.swayosd}/bin/swayosd-client --output-volume lower"
|
||||
];
|
||||
bind = [
|
||||
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
|
||||
"$mainMod, Return, exec, ${pkgs.kitty}/bin/kitty"
|
||||
"$mainModShift, Return, exec, ${pkgs.foot}/bin/foot"
|
||||
"$mainModShift, Q, killactive,"
|
||||
"$mainModShift, s, exec, ${pkgs.hyprshot}/bin/hyprshot -m region"
|
||||
# "$mainMod, M, exit,"
|
||||
"$mainMod, t, togglefloating,"
|
||||
"$mainMod, f, fullscreen,"
|
||||
"$mainMod, d, exec, ${pkgs.anyrun}/bin/anyrun"
|
||||
"$mainMod, Space, exec, ${pkgs.anyrun}/bin/anyrun"
|
||||
"$mainMod, p, pseudo, # dwindle"
|
||||
"$mainMod, v, togglesplit,"
|
||||
# "$mainMod, a, exec, swaync-client -t"
|
||||
"$mainMod, Tab, cyclenext"
|
||||
# Audio
|
||||
",xf86audiomute, exec, ${pkgs.swayosd}/bin/swayosd-client --output-volume mute-toggle"
|
||||
# ",xf86audioprev, exec, /home/fs0c131y/.cargo/bin/mctl prev"
|
||||
# ",xf86audionext, exec, /home/fs0c131y/.cargo/bin/mctl next"
|
||||
# ",xf86audioplay, exec, /home/fs0c131y/.cargo/bin/mctl toggle"
|
||||
|
||||
# Screenshot
|
||||
# "$mainMod,Print, exec, grim"
|
||||
# "$mainModShift,Print, exec, grim -g "$(slurp)""
|
||||
"$mainModShift,s, exec, ${pkgs.watershot}/bin/watershot"
|
||||
|
||||
# Move focus with mainMod + arrow keys
|
||||
"$mainMod, left, movefocus, l"
|
||||
"$mainMod, right, movefocus, r"
|
||||
"$mainMod, up, movefocus, u"
|
||||
"$mainMod, down, movefocus, d"
|
||||
|
||||
"$mainMod, h, movefocus, l"
|
||||
"$mainMod, j, movefocus, d"
|
||||
"$mainMod, k, movefocus, u"
|
||||
"$mainMod, l, movefocus, r"
|
||||
|
||||
"$mainModShift, h, movewindow, l"
|
||||
"$mainModShift, j, movewindow, d"
|
||||
"$mainModShift, k, movewindow, u"
|
||||
"$mainModShift, l, movewindow, r"
|
||||
|
||||
# Switch workspaces with mainMod + [0-9]
|
||||
"$mainMod, 1, workspace, 1"
|
||||
"$mainMod, 2, workspace, 2"
|
||||
"$mainMod, 3, workspace, 3"
|
||||
"$mainMod, 4, workspace, 4"
|
||||
"$mainMod, 5, workspace, 5"
|
||||
"$mainMod, 6, workspace, 6"
|
||||
"$mainMod, 7, workspace, 7"
|
||||
"$mainMod, 8, workspace, 8"
|
||||
"$mainMod, 9, workspace, 9"
|
||||
"$mainMod, 0, workspace, 10"
|
||||
|
||||
# Move active window to a workspace with mainMod + SHIFT + [0-9]
|
||||
"$mainMod SHIFT, 1, movetoworkspace, 1"
|
||||
"$mainMod SHIFT, 2, movetoworkspace, 2"
|
||||
"$mainMod SHIFT, 3, movetoworkspace, 3"
|
||||
"$mainMod SHIFT, 4, movetoworkspace, 4"
|
||||
"$mainMod SHIFT, 5, movetoworkspace, 5"
|
||||
"$mainMod SHIFT, 6, movetoworkspace, 6"
|
||||
"$mainMod SHIFT, 7, movetoworkspace, 7"
|
||||
"$mainMod SHIFT, 8, movetoworkspace, 8"
|
||||
"$mainMod SHIFT, 9, movetoworkspace, 9"
|
||||
"$mainMod SHIFT, 0, movetoworkspace, 10"
|
||||
|
||||
# Scroll through existing workspaces with mainMod + scroll
|
||||
"$mainMod, mouse_down, workspace, e+1"
|
||||
"$mainMod, mouse_up, workspace, e-1"
|
||||
|
||||
"$mainMod, Tab, cyclenext, bind = ALT, Tab, bringactivetotop,"
|
||||
];
|
||||
|
||||
# Move/resize windows with mainMod + LMB/RMB and dragging
|
||||
|
||||
bindm = [
|
||||
"$mainMod, mouse:272, movewindow"
|
||||
"$mainMod, mouse:273, resizewindow"
|
||||
];
|
||||
workspace = [
|
||||
"1, monitor:${device.monitors.primary}"
|
||||
"2, monitor:${device.monitors.primary}"
|
||||
"3, monitor:${device.monitors.primary}"
|
||||
"4, monitor:${device.monitors.primary}"
|
||||
"5, monitor:${device.monitors.secondary}"
|
||||
"6, monitor:${device.monitors.secondary}"
|
||||
"7, monitor:${device.monitors.secondary}"
|
||||
"8, monitor:${device.monitors.tertiary}"
|
||||
"9, monitor:${device.monitors.tertiary}"
|
||||
"10, monitor:${device.monitors.tertiary}"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
103
home/linux/ironbar/default.nix
Normal file
103
home/linux/ironbar/default.nix
Normal file
@@ -0,0 +1,103 @@
|
||||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
device,
|
||||
...
|
||||
}: {
|
||||
imports = [inputs.ironbar.homeManagerModules.default];
|
||||
programs.ironbar = {
|
||||
enable = device.hasGui;
|
||||
config.monitors = {
|
||||
"${device.monitors.secondary}" = {
|
||||
position = "bottom";
|
||||
start = [
|
||||
{
|
||||
type = "launcher";
|
||||
favourites = ["firefox" "discord"];
|
||||
show_names = false;
|
||||
show_icons = true;
|
||||
}
|
||||
{type = "focused";}
|
||||
];
|
||||
end = [
|
||||
{
|
||||
type = "clipboard";
|
||||
max_items = 3;
|
||||
truncate.length = 50;
|
||||
truncate.mode = "end";
|
||||
}
|
||||
{
|
||||
type = "music";
|
||||
player_type = "mpris";
|
||||
}
|
||||
{type = "clock";}
|
||||
];
|
||||
};
|
||||
"${device.monitors.primary}" = {
|
||||
position = "bottom";
|
||||
icon_theme = "Papirus-Dark";
|
||||
end = [
|
||||
{
|
||||
type = "sys_info";
|
||||
format = [
|
||||
" CPU {cpu_percent}% | {temp_c:coretemp-Package-id-0}°C"
|
||||
" RAM {memory_used}GB/{memory_total}GB"
|
||||
];
|
||||
interval = {
|
||||
cpu = 1;
|
||||
temps = 5;
|
||||
memory = 30;
|
||||
# disks= 300;
|
||||
# networks= 3;
|
||||
};
|
||||
}
|
||||
{type = "tray";}
|
||||
];
|
||||
start = [
|
||||
{
|
||||
type = "workspaces";
|
||||
name_map = {
|
||||
"1" = "icon:foot";
|
||||
"2" = "icon:code";
|
||||
"3" = "icon:firefox";
|
||||
"4" = "icon:slack";
|
||||
"5" = "icon:steam";
|
||||
"6" = "icon:misc";
|
||||
"7" = "icon:misc";
|
||||
"8" = "icon:firefox";
|
||||
"9" = "icon:discord";
|
||||
"10" = "icon:spotify";
|
||||
};
|
||||
favorites = ["1" "2" "3" "4" "5" "6" "7" "8" "9" "10"];
|
||||
all_monitors = true;
|
||||
}
|
||||
];
|
||||
};
|
||||
"${device.monitors.tertiary}" = {
|
||||
position = "bottom";
|
||||
icon_theme = "Papirus-Dark";
|
||||
start = [
|
||||
{
|
||||
type = "launcher";
|
||||
show_names = false;
|
||||
show_icons = true;
|
||||
}
|
||||
{type = "focused";}
|
||||
];
|
||||
end = [
|
||||
{type = "clock";}
|
||||
];
|
||||
};
|
||||
};
|
||||
style = let
|
||||
catppuccin = pkgs.fetchFromGitHub {
|
||||
owner = "catppuccin";
|
||||
repo = "waybar";
|
||||
rev = "v1.0";
|
||||
sha256 = "sha256-vfwfBE3iqIN1cGoItSssR7h0z6tuJAhNarkziGFlNBw";
|
||||
};
|
||||
mocha = builtins.readFile "${catppuccin}/mocha.css";
|
||||
in
|
||||
mocha + builtins.readFile ./ironbar.css;
|
||||
};
|
||||
}
|
||||
207
home/linux/ironbar/ironbar.css
Normal file
207
home/linux/ironbar/ironbar.css
Normal file
@@ -0,0 +1,207 @@
|
||||
@define-color color_bg @base;
|
||||
@define-color color_bg_dark @mantle;
|
||||
@define-color color_border @crust;
|
||||
@define-color color_border_active @mauve;
|
||||
@define-color color_text #ffffff;
|
||||
@define-color color_urgent @lavender;
|
||||
|
||||
/* -- base styles -- */
|
||||
|
||||
* {
|
||||
font-family: Noto Sans Nerd Font, sans-serif;
|
||||
font-size: 16px;
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
box, menubar, button {
|
||||
background-color: @color_bg;
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
button, label {
|
||||
color: @color_text;
|
||||
}
|
||||
|
||||
button:hover {
|
||||
background-color: @color_bg_dark;
|
||||
}
|
||||
|
||||
#bar {
|
||||
border-top: 1px solid @color_border;
|
||||
}
|
||||
|
||||
.popup {
|
||||
border: 1px solid @color_border;
|
||||
padding: 1em;
|
||||
}
|
||||
|
||||
|
||||
/* -- clipboard -- */
|
||||
|
||||
.clipboard {
|
||||
margin-left: 5px;
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
.popup-clipboard .item {
|
||||
padding-bottom: 0.3em;
|
||||
border-bottom: 1px solid @color_border;
|
||||
}
|
||||
|
||||
|
||||
/* -- clock -- */
|
||||
|
||||
.clock {
|
||||
font-weight: bold;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.popup-clock .calendar-clock {
|
||||
color: @color_text;
|
||||
font-size: 2.5em;
|
||||
padding-bottom: 0.1em;
|
||||
}
|
||||
|
||||
.popup-clock .calendar {
|
||||
background-color: @color_bg;
|
||||
color: @color_text;
|
||||
}
|
||||
|
||||
.popup-clock .calendar .header {
|
||||
padding-top: 1em;
|
||||
border-top: 1px solid @color_border;
|
||||
font-size: 1.5em;
|
||||
}
|
||||
|
||||
.popup-clock .calendar:selected {
|
||||
background-color: @color_border_active;
|
||||
}
|
||||
|
||||
|
||||
/* -- launcher -- */
|
||||
|
||||
.launcher .item {
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.launcher .item:not(.focused):hover {
|
||||
background-color: @color_bg_dark;
|
||||
}
|
||||
|
||||
.launcher .open {
|
||||
border-bottom: 1px solid @color_text;
|
||||
}
|
||||
|
||||
.launcher .focused {
|
||||
border-bottom: 2px solid @color_border_active;
|
||||
}
|
||||
|
||||
.launcher .urgent {
|
||||
border-bottom-color: @color_urgent;
|
||||
}
|
||||
|
||||
.popup-launcher {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.popup-launcher .popup-item:not(:first-child) {
|
||||
border-top: 1px solid @color_border;
|
||||
}
|
||||
|
||||
|
||||
/* -- music -- */
|
||||
|
||||
.music:hover * {
|
||||
background-color: @color_bg_dark;
|
||||
}
|
||||
|
||||
.popup-music .album-art {
|
||||
margin-right: 1em;
|
||||
}
|
||||
|
||||
.popup-music .icon-box {
|
||||
margin-right: 0.4em;
|
||||
}
|
||||
|
||||
.popup-music .title .icon, .popup-music .title .label {
|
||||
font-size: 1.7em;
|
||||
}
|
||||
|
||||
.popup-music .controls *:disabled {
|
||||
color: @color_border;
|
||||
}
|
||||
|
||||
.slider slider {
|
||||
color: @color_urgent;
|
||||
background-color: @color_urgent;
|
||||
}
|
||||
|
||||
.popup-music .volume .slider slider {
|
||||
border-radius: 100%;
|
||||
}
|
||||
|
||||
.popup-music .volume .icon {
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
||||
.popup-music .progress .slider slider {
|
||||
border-radius: 100%;
|
||||
}
|
||||
|
||||
/* -- script -- */
|
||||
|
||||
.script {
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
|
||||
/* -- sys_info -- */
|
||||
|
||||
.sysinfo {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.sysinfo .item {
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
|
||||
/* -- tray -- */
|
||||
|
||||
.tray {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
|
||||
/* -- workspaces -- */
|
||||
|
||||
.workspaces .item.focused {
|
||||
box-shadow: inset 0 -3px;
|
||||
background-color: @color_bg_dark;
|
||||
}
|
||||
|
||||
.workspaces .item:hover {
|
||||
box-shadow: inset 0 -3px;
|
||||
}
|
||||
|
||||
|
||||
/* -- custom: power menu -- */
|
||||
|
||||
.popup-power-menu #header {
|
||||
font-size: 1.4em;
|
||||
padding-bottom: 0.4em;
|
||||
margin-bottom: 0.6em;
|
||||
border-bottom: 1px solid @color_border;
|
||||
}
|
||||
|
||||
.popup-power-menu .power-btn {
|
||||
border: 1px solid @color_border;
|
||||
padding: 0.6em 1em;
|
||||
}
|
||||
|
||||
.popup-power-menu #buttons > *:nth-child(1) .power-btn {
|
||||
margin-right: 1em;
|
||||
}
|
||||
|
||||
|
||||
5
home/linux/mpd.nix
Normal file
5
home/linux/mpd.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
{...}: {
|
||||
services.mpd = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
62
home/programs/aichat.nix
Normal file
62
home/programs/aichat.nix
Normal file
@@ -0,0 +1,62 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
device,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
programs.
|
||||
aichat = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
enableNushellIntegration = false;
|
||||
settings = {
|
||||
save_session = true;
|
||||
model = "openai:gpt-4o";
|
||||
rag_embedding_model = "ollama:RobinBially/nomic-embed-text-8k";
|
||||
clients = [
|
||||
{
|
||||
type = "openai-compatible";
|
||||
name = "llama";
|
||||
api_base = "https://llama.darksailor.dev/api/v1";
|
||||
api_key_cmd = "cat ${config.sops.secrets."llama/api_key".path}";
|
||||
models = [
|
||||
{
|
||||
name = "qwen_2_5_1";
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
type = "openai-compatible";
|
||||
name = "ollama";
|
||||
api_base = "https://llama.darksailor.dev/api/ollama/v1";
|
||||
api_key_cmd = "cat ${config.sops.secrets."llama/api_key".path}";
|
||||
models = [
|
||||
{
|
||||
name = "RobinBially/nomic-embed-text-8k";
|
||||
type = "embedding";
|
||||
default_chunk_size = 8000;
|
||||
}
|
||||
{
|
||||
name = "mistral";
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
type = "openai";
|
||||
name = "openai";
|
||||
api_base = "https://api.openai.com/v1";
|
||||
api_key_cmd = "cat ${config.sops.secrets."openai/api_key".path}";
|
||||
models = [
|
||||
{
|
||||
name = "gpt-3.5-turbo";
|
||||
}
|
||||
{
|
||||
name = "gpt-4o";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
17
home/programs/atuin.nix
Normal file
17
home/programs/atuin.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
device,
|
||||
...
|
||||
}: {
|
||||
programs.atuin = {
|
||||
settings = {
|
||||
auto_sync = true;
|
||||
sync_frequency = "1m";
|
||||
sync_address = "https://atuin.darksailor.dev";
|
||||
};
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
enableNushellIntegration = true;
|
||||
};
|
||||
}
|
||||
19
home/programs/bat.nix
Normal file
19
home/programs/bat.nix
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
device,
|
||||
...
|
||||
}: {
|
||||
programs.
|
||||
bat = {
|
||||
enable = true;
|
||||
config = {theme = "catppuccin";};
|
||||
themes = {
|
||||
catppuccin = {
|
||||
src = "${pkgs.catppuccinThemes.bat}/themes";
|
||||
file = "Catppuccin Mocha.tmTheme";
|
||||
};
|
||||
};
|
||||
# extraPackages = with pkgs.bat-extras; [batman batgrep batwatch];
|
||||
};
|
||||
}
|
||||
13
home/programs/carapace.nix
Normal file
13
home/programs/carapace.nix
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
device,
|
||||
...
|
||||
}: {
|
||||
programs.
|
||||
carapace = {
|
||||
enable = false;
|
||||
enableFishIntegration = true;
|
||||
enableNushellIntegration = true;
|
||||
};
|
||||
}
|
||||
94
home/programs/default.nix
Normal file
94
home/programs/default.nix
Normal file
@@ -0,0 +1,94 @@
|
||||
{
|
||||
pkgs,
|
||||
device,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
../../modules
|
||||
./aichat.nix
|
||||
./atuin.nix
|
||||
./bat.nix
|
||||
./carapace.nix
|
||||
./direnv.nix
|
||||
./eza.nix
|
||||
./fish.nix
|
||||
./fzf.nix
|
||||
./gh.nix
|
||||
./git.nix
|
||||
./goread.nix
|
||||
./helix.nix
|
||||
./ncmpcpp.nix
|
||||
./neomutt.nix
|
||||
./newsboat.nix
|
||||
./nix-index.nix
|
||||
./nushell.nix
|
||||
./sops.nix
|
||||
./ssh.nix
|
||||
./starship.nix
|
||||
./tmux.nix
|
||||
./tuifeed.nix
|
||||
./yazi.nix
|
||||
./zellij.nix
|
||||
./zoxide.nix
|
||||
#./template.nix
|
||||
];
|
||||
home.packages = with pkgs;
|
||||
[
|
||||
(nixvim.makeNixvim (import ../../neovim))
|
||||
_1password-cli
|
||||
alejandra
|
||||
ast-grep
|
||||
bottom
|
||||
btop
|
||||
cachix
|
||||
deploy-rs
|
||||
dust
|
||||
fd
|
||||
file
|
||||
fzf
|
||||
gnupg
|
||||
gpg-tui
|
||||
jq
|
||||
just
|
||||
macchina
|
||||
p7zip
|
||||
pandoc
|
||||
pfetch-rs
|
||||
pkg-config
|
||||
ripgrep
|
||||
sd
|
||||
tldr
|
||||
vcpkg-tool
|
||||
yt-dlp
|
||||
]
|
||||
++ lib.optionals (!device.isServer) [
|
||||
clang
|
||||
cmake
|
||||
d2
|
||||
devenv
|
||||
go
|
||||
hasklig
|
||||
jujutsu
|
||||
monaspace
|
||||
nerd-fonts.fira-code
|
||||
nerd-fonts.hasklug
|
||||
nerd-fonts.symbols-only
|
||||
qmk
|
||||
ttyper
|
||||
yarn
|
||||
zed-editor
|
||||
]
|
||||
++ lib.optionals device.isLinux [
|
||||
dig
|
||||
gptfdisk
|
||||
handlr-regex
|
||||
handlr-xdg
|
||||
lsof
|
||||
ncpamixer
|
||||
rr
|
||||
sbctl
|
||||
usbutils
|
||||
ddcbacklight
|
||||
]
|
||||
++ lib.optionals device.isMac [];
|
||||
}
|
||||
13
home/programs/direnv.nix
Normal file
13
home/programs/direnv.nix
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
device,
|
||||
...
|
||||
}: {
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
# enableFishIntegration = lib.mkForce true; # Auto enabled
|
||||
enableNushellIntegration = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
}
|
||||
14
home/programs/eza.nix
Normal file
14
home/programs/eza.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
device,
|
||||
...
|
||||
}: {
|
||||
programs.
|
||||
eza = {
|
||||
enable = true;
|
||||
# enableAliases = true;
|
||||
git = true;
|
||||
icons = "auto";
|
||||
};
|
||||
}
|
||||
40
home/programs/fish.nix
Normal file
40
home/programs/fish.nix
Normal file
@@ -0,0 +1,40 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
device,
|
||||
...
|
||||
}: {
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
shellAbbrs = {
|
||||
vim = "nvim";
|
||||
vi = "nvim";
|
||||
nv = "neovide";
|
||||
g = "git";
|
||||
yy = "yazi";
|
||||
cd = "z";
|
||||
ls = "eza";
|
||||
cat = "bat";
|
||||
j = "just --choose";
|
||||
# t = "zellij a -c --index 0";
|
||||
t = "tmux";
|
||||
};
|
||||
shellAliases =
|
||||
{
|
||||
g = "git";
|
||||
}
|
||||
// lib.optionalAttrs pkgs.stdenv.isLinux {
|
||||
kmpv = "mpv --vo-kitty-use-shm=yes --vo=kitty --really-quiet";
|
||||
smpv = "mpv --vo-sixel-buffered=yes --vo=sixel --profile=sw-fast";
|
||||
};
|
||||
shellInit = ''
|
||||
set fish_greeting
|
||||
yes | fish_config theme save "Catppuccin Mocha"
|
||||
'';
|
||||
# ${pkgs.spotify-player}/bin/spotify_player generate fish | source
|
||||
interactiveShellInit = ''
|
||||
${pkgs.pfetch-rs}/bin/pfetch
|
||||
${lib.optionalString (device.isLinux && !device.isNix) "source /etc/profile.d/nix-daemon.fish"}
|
||||
'';
|
||||
};
|
||||
}
|
||||
14
home/programs/fzf.nix
Normal file
14
home/programs/fzf.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
device,
|
||||
...
|
||||
}: {
|
||||
programs.
|
||||
fzf = {
|
||||
enable = true;
|
||||
package = pkgs.fzf;
|
||||
enableFishIntegration = true;
|
||||
tmux.enableShellIntegration = true;
|
||||
};
|
||||
}
|
||||
11
home/programs/gh.nix
Normal file
11
home/programs/gh.nix
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
device,
|
||||
...
|
||||
}: {
|
||||
programs = {
|
||||
gh.enable = true;
|
||||
gh-dash.enable = true;
|
||||
};
|
||||
}
|
||||
33
home/programs/git.nix
Normal file
33
home/programs/git.nix
Normal file
@@ -0,0 +1,33 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
device,
|
||||
...
|
||||
}: {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
lfs.enable = true;
|
||||
userName = "uttarayan21";
|
||||
userEmail = "email@uttarayan.me";
|
||||
extraConfig = {
|
||||
color.ui = true;
|
||||
core.editor = "nvim";
|
||||
core.pager = "${pkgs.delta}/bin/delta";
|
||||
interactive.diffFilter = "${pkgs.delta}/bin/delta --color-only";
|
||||
delta.navigate = true;
|
||||
merge.conflictStyle = "diff3";
|
||||
diff.colorMoved = "default";
|
||||
push.autoSetupRemote = true;
|
||||
user.signingkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJfKKrX8yeIHUUury0aPwMY6Ha+BJyUR7P0Gqid90ik/";
|
||||
gpg.format = "ssh";
|
||||
commit.gpgsign = true;
|
||||
pull = {
|
||||
rebase = true;
|
||||
};
|
||||
"gpg \"ssh\"".program =
|
||||
if pkgs.stdenv.isDarwin
|
||||
then "/Applications/1Password.app/Contents/MacOS/op-ssh-sign"
|
||||
else "${pkgs._1password-gui}/share/1password/op-ssh-sign";
|
||||
};
|
||||
};
|
||||
}
|
||||
43
home/programs/goread.nix
Normal file
43
home/programs/goread.nix
Normal file
@@ -0,0 +1,43 @@
|
||||
{...}: {
|
||||
programs.goread = {
|
||||
enable = true;
|
||||
config = {
|
||||
urls = {
|
||||
categories = [
|
||||
{
|
||||
name = "Rust";
|
||||
desc = "Stuff related to the rust programming language";
|
||||
subscriptions = [
|
||||
{
|
||||
name = "r/rust";
|
||||
desc = "The rust subreddit";
|
||||
url = "https://old.reddit.com/r/rust/.rss";
|
||||
}
|
||||
{
|
||||
name = "thesquareplanet";
|
||||
desc = "jonhoo's blog";
|
||||
url = "https://thesquareplanet.com/feed.xml";
|
||||
}
|
||||
{
|
||||
name = "Jon Gjengset's Youtube";
|
||||
desc = "jonhoo's youtube channel";
|
||||
url = "https://www.youtube.com/feeds/videos.xml?channel_id=UC_iD0xppBwwsrM9DegC5cQQ";
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
name = "Nix";
|
||||
desc = "Stuff related to the nix / nixos / nixlang";
|
||||
subscriptions = [
|
||||
{
|
||||
name = "r/nixos";
|
||||
desc = "The nixos subreddit";
|
||||
url = "https://old.reddit.com/r/nixos/.rss";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
23
home/programs/helix.nix
Normal file
23
home/programs/helix.nix
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
device,
|
||||
...
|
||||
}: {
|
||||
programs.helix = {
|
||||
enable = true;
|
||||
settings = {
|
||||
theme = "catppuccin_mocha";
|
||||
editor = {
|
||||
line-number = "relative";
|
||||
lsp.display-messages = true;
|
||||
};
|
||||
keys.normal = {
|
||||
space.space = "file_picker";
|
||||
space.w = ":w";
|
||||
space.q = ":q";
|
||||
esc = ["collapse_selection" "keep_primary_selection"];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
16
home/programs/ncmpcpp.nix
Normal file
16
home/programs/ncmpcpp.nix
Normal file
@@ -0,0 +1,16 @@
|
||||
{pkgs, ...}: {
|
||||
programs.ncmpcpp = {
|
||||
enable = true;
|
||||
bindings =
|
||||
pkgs.lib.attrsets.mapAttrsToList (key: value: {
|
||||
key = key;
|
||||
command = value;
|
||||
}) {
|
||||
j = "scroll_down";
|
||||
k = "scroll_up";
|
||||
J = ["select_item" "scroll_down"];
|
||||
K = ["select_item" "scroll_up"];
|
||||
};
|
||||
package = pkgs.ncmpcpp;
|
||||
};
|
||||
}
|
||||
9
home/programs/neomutt.nix
Normal file
9
home/programs/neomutt.nix
Normal file
@@ -0,0 +1,9 @@
|
||||
{pkgs, ...}: {
|
||||
programs.neomutt = {
|
||||
enable = true;
|
||||
vimKeys = true;
|
||||
editor = "nvim";
|
||||
# sidebar = {
|
||||
# };
|
||||
};
|
||||
}
|
||||
47
home/programs/newsboat.nix
Normal file
47
home/programs/newsboat.nix
Normal file
@@ -0,0 +1,47 @@
|
||||
{pkgs, ...}: {
|
||||
programs.newsboat = {
|
||||
enable = false;
|
||||
urls = [
|
||||
{
|
||||
title = "r/rust";
|
||||
url = "https://www.reddit.com/r/rust/.rss";
|
||||
tags = ["rust"];
|
||||
}
|
||||
{
|
||||
title = "the square planet";
|
||||
url = "https://thesquareplanet.com/feed.xml";
|
||||
tags = ["rust"];
|
||||
}
|
||||
{
|
||||
title = "Jon Gjengset's YouTube";
|
||||
url = "https://www.youtube.com/feeds/videos.xml?channel_id=UC_iD0xppBwwsrM9DegC5cQQ";
|
||||
tags = ["rust" "youtube"];
|
||||
}
|
||||
];
|
||||
extraConfig = let
|
||||
dracula = builtins.fetchurl {
|
||||
url = "https://raw.githubusercontent.com/dracula/newsboat/main/newsboat";
|
||||
sha256 = "sha256:08b00ilc5zk5fkzqqd6aghcpya3d00s9kvv65b8c50rg7ikm88xr";
|
||||
};
|
||||
in ''
|
||||
include ${dracula}
|
||||
unbind-key g
|
||||
bind-key g home
|
||||
unbind-key G
|
||||
bind-key G end
|
||||
|
||||
unbind-key h
|
||||
unbind-key j
|
||||
unbind-key k
|
||||
unbind-key l
|
||||
|
||||
bind-key h quit
|
||||
bind-key j down
|
||||
bind-key k up
|
||||
bind-key l open
|
||||
'';
|
||||
browser = "${pkgs.handlr-xdg}/bin/xdg-open";
|
||||
maxItems = 50;
|
||||
autoReload = true;
|
||||
};
|
||||
}
|
||||
14
home/programs/nix-index.nix
Normal file
14
home/programs/nix-index.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
device,
|
||||
...
|
||||
}: {
|
||||
programs = {
|
||||
nix-index-database.comma.enable = true;
|
||||
nix-index = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
24
home/programs/nushell.nix
Normal file
24
home/programs/nushell.nix
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
device,
|
||||
...
|
||||
}: {
|
||||
programs.nushell = {
|
||||
enable = true;
|
||||
shellAliases = {
|
||||
cd = "z";
|
||||
yy = "yazi";
|
||||
cat = "bat";
|
||||
};
|
||||
extraConfig = ''
|
||||
${pkgs.pfetch-rs}/bin/pfetch
|
||||
'';
|
||||
package = pkgs.nushell;
|
||||
configFile.text = ''
|
||||
$env.config = {
|
||||
show_banner: false,
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
17
home/programs/sops.nix
Normal file
17
home/programs/sops.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
inputs.sops-nix.homeManagerModules.sops
|
||||
];
|
||||
sops = {
|
||||
defaultSopsFile = ../../secrets/secrets.yaml;
|
||||
defaultSopsFormat = "yaml";
|
||||
age.keyFile = "${config.home.homeDirectory}/.config/sops/age/keys.txt";
|
||||
secrets."llama/api_key" = {};
|
||||
secrets."openai/api_key" = {};
|
||||
};
|
||||
}
|
||||
40
home/programs/ssh.nix
Normal file
40
home/programs/ssh.nix
Normal file
@@ -0,0 +1,40 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
device,
|
||||
...
|
||||
}: {
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
matchBlocks = {
|
||||
github = {
|
||||
user = "git";
|
||||
host = "github.com";
|
||||
};
|
||||
deoxys = {
|
||||
user = "servius";
|
||||
hostname = "deoxys";
|
||||
forwardAgent = true;
|
||||
};
|
||||
mirai = {
|
||||
user = "fs0c131y";
|
||||
hostname = "sh.darksailor.dev";
|
||||
forwardAgent = true;
|
||||
};
|
||||
ryu = {
|
||||
user = "servius";
|
||||
hostname = "ryu";
|
||||
forwardAgent = false;
|
||||
};
|
||||
};
|
||||
serverAliveInterval = 120;
|
||||
extraConfig =
|
||||
lib.strings.optionalString pkgs.stdenv.isDarwin
|
||||
''
|
||||
IdentityAgent "~/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock"
|
||||
''
|
||||
+ lib.strings.optionalString (pkgs.stdenv.isLinux && !device.isServer) ''
|
||||
IdentityAgent ~/.1password/agent.sock
|
||||
'';
|
||||
};
|
||||
}
|
||||
31
home/programs/starship.nix
Normal file
31
home/programs/starship.nix
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
device,
|
||||
...
|
||||
}: {
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
enableNushellIntegration = true;
|
||||
settings = let
|
||||
flavour = "mocha"; # Replace with your preferred palette
|
||||
in
|
||||
{
|
||||
# Check https://starship.rs/config/#prompt
|
||||
format = "$all$character";
|
||||
palette = "catppuccin_${flavour}";
|
||||
character = {
|
||||
success_symbol = "[[OK](bold green) ❯](maroon)";
|
||||
error_symbol = "[❯](red)";
|
||||
vimcmd_symbol = "[❮](green)";
|
||||
};
|
||||
directory = {
|
||||
truncation_length = 4;
|
||||
style = "bold lavender";
|
||||
};
|
||||
}
|
||||
// builtins.fromTOML (builtins.readFile
|
||||
(pkgs.catppuccinThemes.starship + /palettes/${flavour}.toml));
|
||||
};
|
||||
}
|
||||
9
home/programs/template.nix
Normal file
9
home/programs/template.nix
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
device,
|
||||
...
|
||||
}: {
|
||||
programs = {
|
||||
};
|
||||
}
|
||||
91
home/programs/tmux.nix
Normal file
91
home/programs/tmux.nix
Normal file
@@ -0,0 +1,91 @@
|
||||
{pkgs, ...}: let
|
||||
scratchpad = pkgs.writeShellScript "scratchpad" ''
|
||||
width=''${2:-95%}
|
||||
height=''${2:-95%}
|
||||
if [ "$(tmux display-message -p -F "#{session_name}")" = "scratch" ];then
|
||||
tmux detach-client
|
||||
else
|
||||
tmux popup -d '#{pane_current_path}' -xC -yC -w$width -h$height -E "tmux new -A -s scratch -d -c ''$(pwd)"
|
||||
fi
|
||||
'';
|
||||
in {
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
terminal = "tmux-256color";
|
||||
prefix = "C-q";
|
||||
historyLimit = 100000;
|
||||
keyMode = "vi";
|
||||
plugins = with pkgs; [
|
||||
tmuxPlugins.better-mouse-mode
|
||||
tmuxPlugins.tmux-fzf
|
||||
tmuxPlugins.fzf-tmux-url
|
||||
{
|
||||
plugin = tmuxPlugins.tmux-thumbs;
|
||||
extraConfig =
|
||||
if pkgs.stdenv.isDarwin
|
||||
then
|
||||
#tmux
|
||||
''
|
||||
set -g @thumbs-command 'echo -n {} | pbcopy'
|
||||
''
|
||||
else
|
||||
#tmux
|
||||
''
|
||||
set -g @thumbs-command 'echo -n {} | wl-copy'
|
||||
'';
|
||||
}
|
||||
# {
|
||||
# plugin = tmuxPlugins.tmux-super-fingers;
|
||||
# extraConfig = "set -g @super-fingers-key i";
|
||||
# }
|
||||
{
|
||||
plugin = tmuxPlugins.catppuccin;
|
||||
extraConfig =
|
||||
# tmux
|
||||
''
|
||||
set -g @catppuccin_flavour 'mocha'
|
||||
set -g @catppuccin_window_default_text ''''''
|
||||
'';
|
||||
}
|
||||
{
|
||||
plugin = tmuxPlugins.battery;
|
||||
extraConfig =
|
||||
# tmux
|
||||
''
|
||||
set -g @catppuccin_status_modules_right "battery application session date_time"
|
||||
'';
|
||||
}
|
||||
];
|
||||
extraConfig =
|
||||
# tmux
|
||||
''
|
||||
set -gw mode-keys vi
|
||||
set -g status-keys vi
|
||||
set -g allow-passthrough on
|
||||
set -g visual-activity off
|
||||
set -ga update-environment TERM
|
||||
set -ga update-environment TERM_PROGRAM
|
||||
set -sg escape-time 10
|
||||
set -sa terminal-features ',wezterm:RGB'
|
||||
set -g default-command "${pkgs.fish}/bin/fish";
|
||||
set -g default-shell "${pkgs.fish}/bin/fish";
|
||||
|
||||
|
||||
|
||||
bind h select-pane -L
|
||||
bind j select-pane -D
|
||||
bind k select-pane -U
|
||||
bind l select-pane -R
|
||||
|
||||
bind-key -n C-\\ run-shell "${pkgs.tmux-float}/bin/tmux-float toggle"
|
||||
|
||||
bind o set status
|
||||
bind C-n next-window
|
||||
bind C-p previous-window
|
||||
bind C-q last-window
|
||||
|
||||
if-shell 'uname | grep -q "Darwin"' { set -s copy-command "pbcopy" }
|
||||
if-shell 'uname | grep -q "Linux"' { set -s copy-command "wl-copy" }
|
||||
'';
|
||||
};
|
||||
}
|
||||
12
home/programs/tuifeed.nix
Normal file
12
home/programs/tuifeed.nix
Normal file
@@ -0,0 +1,12 @@
|
||||
{...}: {
|
||||
programs.tuifeed = {
|
||||
enable = false;
|
||||
config = {
|
||||
sources = {
|
||||
"r/rust" = "https://www.reddit.com/r/rust/.rss";
|
||||
"thesquareplanet" = "https://thesquareplanet.com/feed.xml";
|
||||
"Jon Gjengset (YouTube)" = "https://www.youtube.com/feeds/videos.xml?channel_id=UC_iD0xppBwwsrM9DegC5cQQ";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
14
home/programs/yazi.nix
Normal file
14
home/programs/yazi.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
device,
|
||||
...
|
||||
}: {
|
||||
programs.
|
||||
yazi = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
enableNushellIntegration = true;
|
||||
theme = builtins.fromTOML (builtins.readFile "${pkgs.catppuccinThemes.yazi}/themes/mocha.toml");
|
||||
};
|
||||
}
|
||||
138
home/programs/zellij.nix
Normal file
138
home/programs/zellij.nix
Normal file
@@ -0,0 +1,138 @@
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
home.sessionVariables = {
|
||||
# "ZELLIJ_AUTO_ATTACH" = "true";
|
||||
# "ZELLIJ_AUTO_EXIT" = "true";
|
||||
};
|
||||
programs.zellij = let
|
||||
mkBind = key: action:
|
||||
if builtins.isString action
|
||||
then "bind \"" + key + "\" {" + action + ";}"
|
||||
else "bind \"" + key + "\" {" + (lib.concatStringsSep ";" action) + ";}";
|
||||
|
||||
mkBinds = binds: (lib.attrsets.mapAttrs' (key: action: lib.attrsets.nameValuePair (mkBind key action) []) binds);
|
||||
|
||||
mkCommand = command: (mode: "${command} \"" + mode + "\"");
|
||||
# SwitchToMode = mode: "SwitchToMode \"" + mode + "\"";
|
||||
SwitchToMode = mkCommand "SwitchToMode";
|
||||
GoToTab = tab: "GoToTab ${toString tab}";
|
||||
ToggleTab = "ToggleTab";
|
||||
|
||||
mkKeybinds = {
|
||||
normal ? null,
|
||||
locked ? null,
|
||||
resize ? null,
|
||||
pane ? null,
|
||||
move ? null,
|
||||
tab ? null,
|
||||
scroll ? null,
|
||||
search ? null,
|
||||
entersearch ? null,
|
||||
renametab ? null,
|
||||
renamepane ? null,
|
||||
session ? null,
|
||||
tmux ? null,
|
||||
# unbind ? null,
|
||||
} @ b:
|
||||
lib.attrsets.mapAttrs' (
|
||||
mode: keymaps:
|
||||
lib.attrsets.nameValuePair (
|
||||
if builtins.hasAttr "clear-defaults" keymaps && keymaps.clear-defaults == true
|
||||
then mode + " " + "clear-defaults=true"
|
||||
else mode
|
||||
) (
|
||||
mkBinds (removeAttrs keymaps ["clear-defaults"])
|
||||
)
|
||||
)
|
||||
(lib.attrsets.filterAttrs (mode: keymaps: keymaps != {}) b);
|
||||
# mkUnbinds = bindings:
|
||||
# if builtins.hasAttr "unbind" bindings
|
||||
# then mkUnbind bindings.unbind
|
||||
# else "";
|
||||
#
|
||||
# mkUnbind = key:
|
||||
# if key.isString
|
||||
# then "unbind \"" + key + "\""
|
||||
# else lib.concatStringsSep " " (builtins.map ("\"" + key + "\"") key);
|
||||
in {
|
||||
enable = true;
|
||||
settings = {
|
||||
default_shell = "fish";
|
||||
pane_frames = false;
|
||||
theme = "catppuccin-mocha";
|
||||
# default_layout = "compact";
|
||||
keybinds = mkKeybinds {
|
||||
normal = {
|
||||
clear-defaults = true;
|
||||
"Ctrl q" = SwitchToMode "Tmux";
|
||||
};
|
||||
tmux = {
|
||||
"0" = [(GoToTab 10) (SwitchToMode "Normal")];
|
||||
"1" = [(GoToTab 1) (SwitchToMode "Normal")];
|
||||
"2" = [(GoToTab 2) (SwitchToMode "Normal")];
|
||||
"3" = [(GoToTab 3) (SwitchToMode "Normal")];
|
||||
"4" = [(GoToTab 4) (SwitchToMode "Normal")];
|
||||
"5" = [(GoToTab 5) (SwitchToMode "Normal")];
|
||||
"6" = [(GoToTab 6) (SwitchToMode "Normal")];
|
||||
"7" = [(GoToTab 7) (SwitchToMode "Normal")];
|
||||
"8" = [(GoToTab 8) (SwitchToMode "Normal")];
|
||||
"9" = [(GoToTab 9) (SwitchToMode "Normal")];
|
||||
"Ctrl q" = [ToggleTab (SwitchToMode "Normal")];
|
||||
"*" = SwitchToMode "Normal";
|
||||
};
|
||||
scroll = {
|
||||
"g" = "ScrollToTop";
|
||||
"G" = "ScrollToBottom";
|
||||
"/" = "Search \"down\"";
|
||||
"?" = "Search \"up\"";
|
||||
"Ctrl u" = "HalfPageScrollUp";
|
||||
"Ctrl d" = "HalfPageScrollDown";
|
||||
"Ctrl f" = "PageScrollUp";
|
||||
"Ctrl b" = "PageScrollDown";
|
||||
};
|
||||
};
|
||||
};
|
||||
# enableFishIntegration = true;
|
||||
};
|
||||
xdg.configFile."zellij/layouts/default.kdl" = {
|
||||
text =
|
||||
/*
|
||||
kdl
|
||||
*/
|
||||
''
|
||||
layout {
|
||||
pane split_direction="vertical" {
|
||||
pane
|
||||
}
|
||||
|
||||
pane size=1 borderless=true {
|
||||
plugin location="file:${pkgs.zellijPlugins.zjstatus}/bin/zjstatus.wasm" {
|
||||
hide_frame_for_single_pane "true"
|
||||
|
||||
format_left "{mode}#[fg=#89B4FA,bg=#181825,bold] {tabs}"
|
||||
format_right "#[fg=#424554,bg=#181825]{session} on {datetime}"
|
||||
format_space "#[bg=#181825]"
|
||||
|
||||
mode_normal "#[fg=black,bg=#89B4FA] NORMAL #[fg=#87B4FA,bg=#181825]"
|
||||
mode_tmux "#[fg=black,bg=#FFC387] TMUX #[fg=#FFC387,bg=#181825]"
|
||||
// mode_default_to_mode "tmux"
|
||||
|
||||
tab_normal "#[fg=#181825,bg=#4C4C59] #[fg=#000000,bg=#4C4C59]{index} {name} #[fg=#4C4C59,bg=#181825]"
|
||||
tab_normal_fullscreen "#[fg=#6C7086,bg=#181825] {index} {name} [] "
|
||||
tab_normal_sync "#[fg=#6C7086,bg=#181825] {index} {name} <> "
|
||||
tab_active "#[fg=#181825,bg=#ffffff,bold,italic] {index} {name} #[fg=#ffffff,bg=#181825]"
|
||||
tab_active_fullscreen "#[fg=#9399B2,bg=#181825,bold,italic] {index} {name} [] "
|
||||
tab_active_sync "#[fg=#9399B2,bg=#181825,bold,italic] {index} {name} <> "
|
||||
|
||||
datetime "#[fg=#9399B2,bg=#181825] {format}"
|
||||
datetime_format "%A, %d %b %Y %H:%M"
|
||||
datetime_timezone "Asia/Kolkata"
|
||||
}
|
||||
}
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
12
home/programs/zoxide.nix
Normal file
12
home/programs/zoxide.nix
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
device,
|
||||
...
|
||||
}: {
|
||||
programs.zoxide = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
enableNushellIntegration = true;
|
||||
};
|
||||
}
|
||||
30
home/scripts.nix
Normal file
30
home/scripts.nix
Normal file
@@ -0,0 +1,30 @@
|
||||
{pkgs, ...}: {
|
||||
home.packages = [
|
||||
(pkgs.writeShellApplication
|
||||
{
|
||||
name = "hotedit";
|
||||
# description = "Edit files from nix store by replacing them with a local copy";
|
||||
text = ''
|
||||
if [ "$#" -eq 0 ]; then
|
||||
echo "No arguments provided."
|
||||
exit 1
|
||||
elif [ "$#" -gt 1 ]; then
|
||||
echo "More than 1 argument provided."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
if [ -L "$1" ]; then
|
||||
echo "The file is a symbolic link."
|
||||
mv "$1" "$1.bak"
|
||||
cp "$1.bak" "$1"
|
||||
chmod +rw "$1"
|
||||
else
|
||||
echo "The file is not a symbolic link."
|
||||
exit 1
|
||||
fi
|
||||
exec $EDITOR "$1"
|
||||
'';
|
||||
})
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user