feat: migrate dev environment to dot013/environment

This commit is contained in:
Gustavo "Guz" L. de Mello
2024-06-14 19:44:21 -03:00
parent cd9e285236
commit d3be0f7480
9 changed files with 141 additions and 366 deletions

176
flake.lock generated
View File

@@ -16,6 +16,24 @@
"type": "github"
}
},
"dot013-environment": {
"inputs": {
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1718398180,
"narHash": "sha256-jru21A3VkuAZNMauZe8DrdiotIdu1SfUNtksI1PxwUk=",
"owner": "dot013",
"repo": "environment",
"rev": "7f4cfd9924d6abcc23fafe1d48fd1e849c6448a4",
"type": "github"
},
"original": {
"owner": "dot013",
"repo": "environment",
"type": "github"
}
},
"firefox-addons": {
"inputs": {
"flake-utils": "flake-utils",
@@ -25,11 +43,11 @@
},
"locked": {
"dir": "pkgs/firefox-addons",
"lastModified": 1717473801,
"narHash": "sha256-eNqvpnyv/T5zmzqGuOepnBCRk6mUBZHsga92N4BxrVg=",
"lastModified": 1718337800,
"narHash": "sha256-Azz2lg6WsfT4SDMTA3DtJ6hS7kox3e0buSrV4J+zMAQ=",
"owner": "rycee",
"repo": "nur-expressions",
"rev": "8d67da58ae93ef6867141eefc8d8cdc424d08903",
"rev": "aaf15fa3ed60109af8aad4cbb19c1fe28b4476ad",
"type": "gitlab"
},
"original": {
@@ -110,11 +128,11 @@
]
},
"locked": {
"lastModified": 1717525419,
"narHash": "sha256-5z2422pzWnPXHgq2ms8lcCfttM0dz+hg+x1pCcNkAws=",
"lastModified": 1718243258,
"narHash": "sha256-abBpj2VU8p6qlRzTU8o22q68MmOaZ4v8zZ4UlYl5YRU=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "a7117efb3725e6197dd95424136f79147aa35e5b",
"rev": "8d5e27b4807d25308dfe369d5a923d87e7dbfda3",
"type": "github"
},
"original": {
@@ -139,11 +157,11 @@
]
},
"locked": {
"lastModified": 1716576411,
"narHash": "sha256-FIN1wMoyePBTtibCbaeJaoKNLuAYIGwLCWAYC1DJanw=",
"lastModified": 1718368322,
"narHash": "sha256-VfMg3RsnRLQzbq0hFIh1dCM09b5C/F/qPFUOgU/CRi0=",
"owner": "hyprwm",
"repo": "hyprcursor",
"rev": "57298fc4f13c807e50ada2c986a3114b7fc2e621",
"rev": "dd3a853c8239d1c3f3f37de7d2b8ae4b4f3840df",
"type": "github"
},
"original": {
@@ -156,25 +174,26 @@
"inputs": {
"hyprcursor": "hyprcursor",
"hyprlang": "hyprlang",
"hyprutils": "hyprutils",
"hyprwayland-scanner": "hyprwayland-scanner",
"nixpkgs": "nixpkgs",
"nixpkgs": "nixpkgs_2",
"systems": "systems",
"xdph": "xdph"
},
"locked": {
"lastModified": 1717509465,
"narHash": "sha256-ObX7qHLYwCDrKVi6Log7Uh3powuyR4lL/4txOiENpgI=",
"lastModified": 1718395253,
"narHash": "sha256-kbXUz5Pg0ph9HD9wRO0w+kyCyX9n1YuED0WZGIH8GH4=",
"ref": "refs/heads/main",
"rev": "098ac916a6314a2b731532e0c85f357e3cf90d2f",
"revCount": 4762,
"rev": "cb63398f079b4b4324c04e2e41ba17983d66487c",
"revCount": 4829,
"submodules": true,
"type": "git",
"url": "https://github.com/hyprwm/Hyprland"
"url": "https://github.com/hyprwm/Hyprland?ref=v0.41.1"
},
"original": {
"submodules": true,
"type": "git",
"url": "https://github.com/hyprwm/Hyprland"
"url": "https://github.com/hyprwm/Hyprland?ref=v0.41.1"
}
},
"hyprland-protocols": {
@@ -231,6 +250,10 @@
},
"hyprlang": {
"inputs": {
"hyprutils": [
"hyprland",
"hyprutils"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
@@ -241,11 +264,11 @@
]
},
"locked": {
"lastModified": 1716473782,
"narHash": "sha256-+qLn4lsHU6iL3+HTo1gTQ1tWzet8K9h+IfVemzEQZj8=",
"lastModified": 1717881852,
"narHash": "sha256-XeeVoKHQgfKuXoP6q90sUqKyl7EYy3ol2dVZGM+Jj94=",
"owner": "hyprwm",
"repo": "hyprlang",
"rev": "87d5d984109c839482b88b4795db073eb9ed446f",
"rev": "ec6938c66253429192274d612912649a0cfe4d28",
"type": "github"
},
"original": {
@@ -276,6 +299,31 @@
"type": "github"
}
},
"hyprutils": {
"inputs": {
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1718271409,
"narHash": "sha256-8KvVqtApNt4FWTdn1TqVvw00rpqyG9UuUPA2ilPVD1U=",
"owner": "hyprwm",
"repo": "hyprutils",
"rev": "8e10e0626fb26a14b859b3811b6ed7932400c86e",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprutils",
"type": "github"
}
},
"hyprwayland-scanner": {
"inputs": {
"nixpkgs": [
@@ -288,11 +336,11 @@
]
},
"locked": {
"lastModified": 1716058375,
"narHash": "sha256-CwjWoVnBZE5SBpRx9dgSQGCr4Goxyfcyv3zZbOhVqzk=",
"lastModified": 1718119275,
"narHash": "sha256-nqDYXATNkyGXVmNMkT19fT4sjtSPBDS1LLOxa3Fueo4=",
"owner": "hyprwm",
"repo": "hyprwayland-scanner",
"rev": "3afed4364790aebe0426077631af1e164a9650cc",
"rev": "1419520d5f7f38d35e05504da5c1b38212a38525",
"type": "github"
},
"original": {
@@ -327,11 +375,11 @@
]
},
"locked": {
"lastModified": 1717297675,
"narHash": "sha256-43UmlS1Ifx17y93/Vc258U7bOlAAIZbu8dsGDHOIIr0=",
"lastModified": 1718011381,
"narHash": "sha256-sFXI+ZANp/OC+MwfJoZgPSf4xMdtzQMe1pS3FGti4C8=",
"owner": "Mic92",
"repo": "nix-index-database",
"rev": "972a52bee3991ae1f1899e6452e0d7c01ee566d9",
"rev": "88ad3d7501e22b2401dd72734b032b7baa794434",
"type": "github"
},
"original": {
@@ -344,14 +392,14 @@
"inputs": {
"flake-compat": "flake-compat",
"flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_2"
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1717550619,
"narHash": "sha256-QxJiKxuEunrpaHsl1UmeJo4+8Q/tWCVWyUa2MJSWkD8=",
"lastModified": 1718328291,
"narHash": "sha256-+T30dHQeG7DDOAx7JDVXmQ0VoxNhmH7sP7XSua4Ap84=",
"owner": "Infinidoge",
"repo": "nix-minecraft",
"rev": "a44d959812490bd772d64df2ba38725acb9aa46d",
"rev": "47148517641585988aac4d082c5c02c72ac77c49",
"type": "github"
},
"original": {
@@ -362,15 +410,15 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1716330097,
"narHash": "sha256-8BO3B7e3BiyIDsaKA0tY8O88rClYRTjvAp66y+VBUeU=",
"owner": "NixOS",
"lastModified": 1718318537,
"narHash": "sha256-4Zu0RYRcAY/VWuu6awwq4opuiD//ahpc2aFHg2CWqFY=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "5710852ba686cc1fd0d3b8e22b3117d43ba374c2",
"rev": "e9ee548d90ff586a6471b4ae80ae9cfcbceb3420",
"type": "github"
},
"original": {
"owner": "NixOS",
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
@@ -393,11 +441,11 @@
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1717265169,
"narHash": "sha256-IITcGd6xpNoyq9SZBigCkv4+qMHSqot0RDPR4xsZ2CA=",
"lastModified": 1717880976,
"narHash": "sha256-BRvSCsKtDUr83NEtbGfHLUOdDK0Cgbezj2PtcHnz+sQ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "3b1b4895b2c5f9f5544d02132896aeb9ceea77bc",
"rev": "4913a7c3d8b8d00cb9476a6bd730ff57777f740c",
"type": "github"
},
"original": {
@@ -408,6 +456,22 @@
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1718318537,
"narHash": "sha256-4Zu0RYRcAY/VWuu6awwq4opuiD//ahpc2aFHg2CWqFY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "e9ee548d90ff586a6471b4ae80ae9cfcbceb3420",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1715266358,
"narHash": "sha256-doPgfj+7FFe9rfzWo1siAV2mVCasW+Bh8I1cToAXEE4=",
@@ -423,13 +487,13 @@
"type": "github"
}
},
"nixpkgs_3": {
"nixpkgs_4": {
"locked": {
"lastModified": 1717196966,
"narHash": "sha256-yZKhxVIKd2lsbOqYd5iDoUIwsRZFqE87smE2Vzf6Ck0=",
"lastModified": 1718318537,
"narHash": "sha256-4Zu0RYRcAY/VWuu6awwq4opuiD//ahpc2aFHg2CWqFY=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "57610d2f8f0937f39dbd72251e9614b1561942d8",
"rev": "e9ee548d90ff586a6471b4ae80ae9cfcbceb3420",
"type": "github"
},
"original": {
@@ -439,7 +503,7 @@
"type": "github"
}
},
"nixpkgs_4": {
"nixpkgs_5": {
"locked": {
"lastModified": 1716769173,
"narHash": "sha256-7EXDb5WBw+d004Agt+JHC/Oyh/KTUglOaQ4MNjBbo5w=",
@@ -455,7 +519,7 @@
"type": "github"
}
},
"nixpkgs_5": {
"nixpkgs_6": {
"locked": {
"lastModified": 1712963716,
"narHash": "sha256-WKm9CvgCldeIVvRz87iOMi8CFVB1apJlkUT4GGvA0iM=",
@@ -473,7 +537,7 @@
},
"rec-sh": {
"inputs": {
"nixpkgs": "nixpkgs_4"
"nixpkgs": "nixpkgs_5"
},
"locked": {
"lastModified": 1717124269,
@@ -491,6 +555,7 @@
},
"root": {
"inputs": {
"dot013-environment": "dot013-environment",
"firefox-addons": "firefox-addons",
"flatpaks": "flatpaks",
"home-manager": "home-manager",
@@ -498,7 +563,7 @@
"nix-colors": "nix-colors",
"nix-index-database": "nix-index-database",
"nix-minecraft": "nix-minecraft",
"nixpkgs": "nixpkgs_3",
"nixpkgs": "nixpkgs_4",
"rec-sh": "rec-sh",
"sops-nix": "sops-nix",
"tmux-plugin-manager": "tmux-plugin-manager",
@@ -513,11 +578,11 @@
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1717455931,
"narHash": "sha256-8Q6mKSsto8gaGczXd4G0lvawdAYLa5Dlh3/g4hl5CaM=",
"lastModified": 1718137936,
"narHash": "sha256-psA+1Q5fPaK6yI3vzlLINNtb6EeXj111zQWnZYyJS9c=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "d4555e80d80d2fa77f0a44201ca299f9602492a0",
"rev": "c279dec105dd53df13a5e57525da97905cc0f0d6",
"type": "github"
},
"original": {
@@ -606,19 +671,20 @@
"inputs": {
"hyprland-protocols": "hyprland-protocols_2",
"hyprlang": "hyprlang_2",
"nixpkgs": "nixpkgs_5",
"nixpkgs": "nixpkgs_6",
"systems": "systems_4"
},
"locked": {
"lastModified": 1716290197,
"narHash": "sha256-1u9Exrc7yx9qtES2brDh7/DDZ8w8ap1nboIOAtCgeuM=",
"lastModified": 1718272114,
"narHash": "sha256-KsX7sAwkEFpXiwyjt0HGTnnrUU58wW1jlzj5IA/LRz8=",
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"rev": "91e48d6acd8a5a611d26f925e51559ab743bc438",
"rev": "24be4a26f0706e456fca1b61b8c79f7486a9e86d",
"type": "github"
},
"original": {
"owner": "hyprwm",
"ref": "v1.3.2",
"repo": "xdg-desktop-portal-hyprland",
"type": "github"
}
@@ -640,11 +706,11 @@
]
},
"locked": {
"lastModified": 1716290197,
"narHash": "sha256-1u9Exrc7yx9qtES2brDh7/DDZ8w8ap1nboIOAtCgeuM=",
"lastModified": 1718272114,
"narHash": "sha256-KsX7sAwkEFpXiwyjt0HGTnnrUU58wW1jlzj5IA/LRz8=",
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"rev": "91e48d6acd8a5a611d26f925e51559ab743bc438",
"rev": "24be4a26f0706e456fca1b61b8c79f7486a9e86d",
"type": "github"
},
"original": {

View File

@@ -39,13 +39,17 @@
rec-sh.url = "git+file:///home/guz/.projects/dot013/rec.sh";
# dot013-environment.url = "git+file:///home/guz/.projects/dot013/environment";
dot013-environment.url = "github:dot013/environment";
nix-minecraft.url = "github:Infinidoge/nix-minecraft";
# hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
# Temp version pin because of issue https://github.com/hyprwm/Hyprland/issues/6132
# hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1&rev=cba1ade848feac44b2eda677503900639581c3f4";
hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
xdg-desktop-portal-hyprland.url = "github:hyprwm/xdg-desktop-portal-hyprland";
hyprland = {
type = "git";
url = "https://github.com/hyprwm/Hyprland?ref=v0.41.1";
submodules = true;
};
xdg-desktop-portal-hyprland.url = "github:hyprwm/xdg-desktop-portal-hyprland/v1.3.2";
/*
Note to self:
The last commit with working screen share, as the time of writing this, was
@@ -79,8 +83,8 @@
in {
nixosConfigurations = create-host [
"battleship"
"cruiser"
"spacestation"
# "cruiser"
# "spacestation"
];
};
}

View File

@@ -6,12 +6,16 @@
...
}: {
imports = [
inputs.dot013-environment.nixosModules.default
../../modules/nixos
./secrets.nix
./gpu-configuration.nix
./hardware-configuration.nix
];
dot013.environment.enable = true;
dot013.environment.interception-tools.device = "/dev/input/by-id/usb-BY_Tech_Gaming_Keyboard-event-kbd";
programs.nh.enable = true;
programs.nh.flake = "/home/guz/nix";
@@ -98,10 +102,6 @@
extraGroups = ["wheel" "networkmanager" "plugdev"];
};
environment.sessionVariables = {
EDITOR = "nvim";
};
environment.systemPackages = with pkgs; [
git
libinput
@@ -112,24 +112,6 @@
services.blueman.enable = true;
# hardware.pulseaudio.enable = true;
services.interception-tools = let
device = "/dev/input/by-id/usb-BY_Tech_Gaming_Keyboard-event-kbd";
in {
enable = true;
plugins = [pkgs.interception-tools-plugins.caps2esc];
udevmonConfig = ''
- JOB: "${pkgs.interception-tools}/bin/intercept -g ${device} | ${pkgs.interception-tools-plugins.caps2esc}/bin/caps2esc -m 2 | ${pkgs.interception-tools}/bin/uinput -d ${device}"
DEVICE:
EVENTS:
EV_KEY: [[KEY_CAPSLOCK, KEY_ESC]]
LINK: ${device}
'';
};
environment.pathsToLink = [" /share/zsh "];
programs.zsh.enable = true;
nix.settings.experimental-features = ["nix-command" "flakes"];
nix.package = pkgs.nixVersions.nix_2_21;

View File

@@ -10,7 +10,7 @@
programs.hyprland.settings = let
cliphist = "${pkgs.cliphist}/bin/cliphist";
librewolf = "${pkgs.librewolf}/bin/librewolf";
terminal = "${config.profiles.gterminal.emulator.bin}";
terminal = "${config.programs.alacritty.package}/bin/alacritty";
mod = "SUPER";
rofi = "${pkgs.rofi}/bin/rofi";
grim = "${pkgs.grim}/bin/grim";

View File

@@ -6,8 +6,6 @@
../../modules/home-manager/programs-old/librewolf
];
profiles.gterminal.enable = true;
profiles.gterminal.sessionizer.paths = ["~/.projects"];
profiles.vault.enable = true;
profiles.gfonts.enable = true;

View File

@@ -2,15 +2,18 @@
config,
pkgs,
inputs,
lib,
...
}: {
imports = [
inputs.dot013-environment.homeManagerModule
inputs.rec-sh.homeManagerModules.rec-sh
];
programs.rec-sh.enable = true;
dot013.environment.enable = true;
dot013.environment.tmux.sessionizer.paths = ["~/.projects"];
programs.brave.enable = true;
programs.brave.extensions = [
{id = "cjpalhdlnbpafiamejdnhcphjbkeiagm";}

View File

@@ -1,7 +1,6 @@
{...}: {
imports = [
./gfonts.nix
./gterminal
./vault
];
options = {};

View File

@@ -1,248 +0,0 @@
{
config,
lib,
pkgs,
...
}: let
cfg = config.profiles.gterminal;
PATHS =
lib.strings.concatMapStringsSep " "
(p: (builtins.replaceStrings ["~/"] ["${config.home.homeDirectory}/"] p))
cfg.sessionizer.paths;
sessionizer = pkgs.writeShellScriptBin "sessionizer" ''
function tmux() { ${pkgs.tmux}/bin/tmux "$@"; }
function fzf() { ${pkgs.fzf}/bin/fzf "$@"; }
PATHS="${PATHS}"
${builtins.readFile ./sessionizer.sh}
'';
in {
imports = [
../../programs/wezterm.nix
../../programs/neovim.nix
];
options.profiles.gterminal = with lib;
with lib.types; {
enable = mkEnableOption "";
emulator = {
enable = mkOption {
type = bool;
default = true;
};
pkg = mkOption {
type = package;
default = pkgs.alacritty;
};
bin = mkOption {
type = str;
default = "${cfg.emulator.pkg}/bin/alacritty";
};
};
sessionizer = {
enable = mkOption {
type = bool;
default = true;
};
paths = mkOption {
type = listOf str;
default = [];
};
};
shell = {
pkg = mkOption {
type = package;
default = pkgs.zsh;
};
bin = mkOption {
type = str;
default = "${pkgs.zsh}/bin/zsh";
};
defaultArgs = mkOption {
type = listOf str;
default = ["--login"];
};
};
};
config = with lib;
mkIf cfg.enable {
home.packages = with pkgs; [
git
lazygit
gcc # Added temporally so my neovim config doesn't break
wget
nixpkgs-fmt
nixpkgs-lint
alejandra
shellharden
];
programs = {
direnv.enable = true;
direnv.enableZshIntegration = true;
direnv.nix-direnv.enable = true;
lf.enable = true;
lf.commands = {
dragon-out = ''%${pkgs.xdragon}/bin/xdragon -a -x "$fx"'';
editor-open = ''$$EDITOR $f'';
mkfile = ''
''${{
printf "Dirname: "
read DIR
if [[ $DIR = */ ]]; then
mkdir $DIR
else
touch $DIR
fi
}}'';
};
lf.extraConfig = let
previewer = pkgs.writeShellScriptBin "pv.sh" ''
file=$1
w=$2
h=$3
x=$4
y=$5
if [[ "$(${pkgs.file}/bin/file -Lb --mime-type "$file")" =~ ^image ]]; then
${pkgs.kitty}/bin/kitty +kitten icat --silent --stdin no --transfer-mode file --place "''${w}x''${h}@''${x}x''${y}" "$file" < /dev/null > /dev/tty
exit 1
fi
${pkgs.pistol}/bin/pistol "$file"
'';
cleaner = pkgs.writeShellScriptBin "clean.sh" ''
${pkgs.kitty}/bin/kitty +kitten icat --clear --stdin no --silent --transfer-mode file < /dev/null > /dev/tty
'';
in
mkDefault ''
set cleaner ${cleaner}/bin/clean.sh
set previewer ${previewer}/bin/pv.sh
'';
neovim.enable = true;
starship.enable = true;
starship.enableZshIntegration = true;
tmux.baseIndex = 1;
tmux.enable = true;
tmux.extraConfig = ''
set -sg terminal-overrides ",*:RGB"
set -g renumber-windows on
bind -T prefix / split-window -v -c "#''''{pane_current_path}"
bind -T prefix \\ split-window -h -c "#''''{pane_current_path}"
${
if cfg.sessionizer.enable
then "bind -T prefix g run-shell \"tmux neww ${sessionizer}/bin/sessionizer\""
else ""
}
'';
tmux.keyMode = "vi";
tmux.newSession = true;
tmux.mouse = true;
tmux.prefix = "C-Space";
tmux.plugins = with pkgs; [
{
plugin = tmuxPlugins.catppuccin.overrideAttrs (_: {
src = fetchFromGitHub {
owner = "guz013";
repo = "frappuccino-tmux";
rev = "4255b0a769cc6f35e12595fe5a33273a247630aa";
sha256 = "0k8yprhx5cd8v1ddpcr0dkssspc17lq2a51qniwafkkzxi3kz3i5";
};
});
extraConfig = ''
set -g @catppuccin_window_left_separator ""
set -g @catppuccin_window_right_separator " "
set -g @catppuccin_window_middle_separator " "
set -g @catppuccin_window_number_position "right"
set -g @catppuccin_window_default_fill "number"
set -g @catppuccin_window_default_text "#W"
set -g @catppuccin_window_current_fill "number"
set -g @catppuccin_window_current_text "#W"
set -g @catppuccin_status_modules_right "application directory session"
set -g @catppuccin_status_left_separator " "
set -g @catppuccin_status_right_separator ""
set -g @catppuccin_status_right_separator_inverse "no"
set -g @catppuccin_status_fill "icon"
set -g @catppuccin_status_connect_separator "no"
set -g @catppuccin_directory_text "#{pane_current_path}"
'';
}
{
plugin = tmuxPlugins.better-mouse-mode;
extraConfig = "set-option -g mouse on";
}
{
plugin = tmuxPlugins.mkTmuxPlugin {
pluginName = "tmux.nvim";
version = "unstable-2024-04-05";
src = fetchFromGitHub {
owner = "aserowy";
repo = "tmux.nvim";
rev = "63e9c5e054099dd30af306bd8ceaa2f1086e1b07";
sha256 = "0ynzljwq6hv7415p7pr0aqx8kycp84p3p3dy4jcx61dxfgdpgc4c";
};
};
extraConfig = '''';
}
{
plugin = tmuxPlugins.resurrect;
extraConfig = ''
set -g @resurrect-strategy-nvim 'session'
'';
}
{
plugin = tmuxPlugins.continuum;
extraConfig = ''
set -g @continuum-boot 'on'
'';
}
];
tmux.shell = cfg.shell.bin;
tmux.terminal = "screen-256color";
alacritty = {
enable = mkDefault true;
settings = {
shell.program = cfg.shell.bin;
shell.args = cfg.shell.defaultArgs;
window = {
padding.x = 5;
padding.y = 5;
};
font = {
normal = {
family = "FiraCode Nerd Font";
style = "Regular";
};
size = 10;
};
};
};
zsh.enable = true;
zsh.autosuggestion.enable = true;
zsh.enableCompletion = true;
zsh.initExtra = ''
export GPG_TTY=$(tty)
alias tmux="tmux -f ${config.xdg.configHome}/tmux/tmux.conf";
alias lg="${pkgs.lazygit}/bin/lazygit";
alias goto="${sessionizer}/bin/sessionizer"
alias gt="${sessionizer}/bin/sessionizer"
'';
};
};
}

View File

@@ -1,29 +0,0 @@
#!/usr/bin/env bash
# "Chat is MIT"
# Thank you ThePrimeagen ;)
# https://github.com/ThePrimeagen/.dotfiles/blob/master/bin/.local/scripts/tmux-sessionizer
if [[ $# -eq 1 ]]; then
selected="$1"
else
selected=$(find "$PATHS" -mindepth 1 -maxdepth 2 -type d | fzf)
fi
if [[ -z "$selected" ]]; then
exit 0
fi
selected_name="$(basename "$selected" | tr . _)"
tmux_running="$(pgrep tmux)"
if [[ -z "$TMUX" ]] && [[ -z "$tmux_running" ]]; then
tmux new-session -s "$selected_name" -c "$selected"
exit 0
fi
if ! tmux has-session -t="$selected_name" 2> /dev/null; then
tmux new-session -ds "$selected_name" -c "$selected"
fi
tmux switch-client -t "$selected_name"