[feat] Add ironbar & Format everything with nixfmt
This commit is contained in:
@@ -10,4 +10,4 @@ home:
|
|||||||
nix --extra-experimental-features "nix-command flakes" run home-manager/master -- switch --flake .
|
nix --extra-experimental-features "nix-command flakes" run home-manager/master -- switch --flake .
|
||||||
|
|
||||||
nixos:
|
nixos:
|
||||||
nixos-rebuild switch --flake .
|
sudo nixos-rebuild switch --flake .
|
||||||
|
|||||||
@@ -1,5 +1 @@
|
|||||||
{...}: {
|
{ ... }: { programs.firefox = { enable = true; }; }
|
||||||
programs.firefox = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,290 +1,235 @@
|
|||||||
{
|
{ config, pkgs, lib, device, ... }:
|
||||||
config,
|
let
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
device,
|
|
||||||
inputs,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
start-tmux = (import ../scripts/start-tmux.nix) pkgs;
|
start-tmux = (import ../scripts/start-tmux.nix) pkgs;
|
||||||
in
|
|
||||||
# https://mipmip.github.io/home-manager-option-search/
|
# https://mipmip.github.io/home-manager-option-search/
|
||||||
{
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
# Include the results of the hardware scan.
|
# Include the results of the hardware scan.
|
||||||
./tmux.nix
|
./tmux.nix
|
||||||
./wezterm.nix
|
./wezterm.nix
|
||||||
../linux/hyprland.nix
|
./firefox.nix
|
||||||
./firefox.nix
|
../linux/hyprland.nix
|
||||||
inputs.anyrun.nixosModules.home-manager
|
../linux/anyrun.nix
|
||||||
];
|
../linux/ironbar.nix
|
||||||
|
];
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
gtk = {
|
||||||
htop-vim
|
enable = true;
|
||||||
lsof
|
theme = {
|
||||||
wl-clipboard
|
name = "Catppuccin-Mocha-Normal-Dark";
|
||||||
qmk
|
package = pkgs.catppuccin-gtk.override {
|
||||||
nodejs
|
size = "standard";
|
||||||
nix-index
|
accents = [ "mauve" ];
|
||||||
yubikey-personalization
|
variant = "mocha";
|
||||||
macchina
|
tweaks = [ "normal" ];
|
||||||
ripgrep
|
|
||||||
fd
|
|
||||||
alejandra
|
|
||||||
dust
|
|
||||||
eza
|
|
||||||
cachix
|
|
||||||
rustup
|
|
||||||
cmake
|
|
||||||
fzf
|
|
||||||
clang
|
|
||||||
ncpamixer
|
|
||||||
neovim-nightly
|
|
||||||
yubikey-agent
|
|
||||||
(nerdfonts.override {fonts = ["Hasklig"];})
|
|
||||||
mpv
|
|
||||||
|
|
||||||
# # It is sometimes useful to fine-tune packages, for example, by applying
|
|
||||||
# # overrides. You can do that directly here, just don't forget the
|
|
||||||
# # parentheses. Maybe you want to install Nerd Fonts with a limited number of
|
|
||||||
# # fonts?
|
|
||||||
# (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
|
|
||||||
|
|
||||||
# # You can also create simple shell scripts directly inside your
|
|
||||||
# # configuration. For example, this adds a command 'my-hello' to your
|
|
||||||
# # environment:
|
|
||||||
# (pkgs.writeShellScriptBin "my-hello" ''
|
|
||||||
# echo "Hello, ${config.home.username}!"
|
|
||||||
# '')
|
|
||||||
];
|
|
||||||
|
|
||||||
xdg.enable = true;
|
|
||||||
|
|
||||||
programs = {
|
|
||||||
git = {
|
|
||||||
enable = true;
|
|
||||||
userName = "uttarayan21";
|
|
||||||
userEmail = "email@uttarayan.me";
|
|
||||||
};
|
|
||||||
nix-index.enableFishIntegration = true;
|
|
||||||
fish = {
|
|
||||||
enable = true;
|
|
||||||
shellAbbrs = {
|
|
||||||
vim = "nvim";
|
|
||||||
vi = "nvim";
|
|
||||||
nv = "nvim";
|
|
||||||
g = "git";
|
|
||||||
cd = "z";
|
|
||||||
ls = "exa";
|
|
||||||
t = "${start-tmux}";
|
|
||||||
};
|
|
||||||
shellInit = ''
|
|
||||||
set fish_greeting
|
|
||||||
'';
|
|
||||||
interactiveShellInit = ''
|
|
||||||
${pkgs.macchina.outPath}/bin/macchina
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
nushell = {
|
|
||||||
enable = true;
|
|
||||||
shellAliases = {
|
|
||||||
"cd" = "z";
|
|
||||||
};
|
|
||||||
package = pkgs.nushellFull;
|
|
||||||
configFile.text = ''
|
|
||||||
$env.config = {
|
|
||||||
show_banner: false,
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
zoxide = {
|
|
||||||
enable = true;
|
|
||||||
enableFishIntegration = true;
|
|
||||||
enableNushellIntegration = true;
|
|
||||||
};
|
|
||||||
starship = {
|
|
||||||
enable = true;
|
|
||||||
enableFishIntegration = true;
|
|
||||||
enableNushellIntegration = true;
|
|
||||||
};
|
|
||||||
eza = {
|
|
||||||
enable = true;
|
|
||||||
enableAliases = true;
|
|
||||||
git = true;
|
|
||||||
icons = true;
|
|
||||||
};
|
|
||||||
carapace = {
|
|
||||||
enable = true;
|
|
||||||
enableFishIntegration = true;
|
|
||||||
enableNushellIntegration = true;
|
|
||||||
};
|
|
||||||
fzf = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.fzf;
|
|
||||||
enableFishIntegration = true;
|
|
||||||
tmux.enableShellIntegration = true;
|
|
||||||
};
|
|
||||||
# keychain = {
|
|
||||||
# enable = pkgs.isLinux;
|
|
||||||
# keys = [ "id_ed25519" ];
|
|
||||||
# enableFishIntegration = true;
|
|
||||||
# enableNushellIntegration = true;
|
|
||||||
# };
|
|
||||||
yazi = {
|
|
||||||
enable = true;
|
|
||||||
enableFishIntegration = true;
|
|
||||||
enableNushellIntegration = true;
|
|
||||||
};
|
|
||||||
foot = {
|
|
||||||
enable = pkgs.stdenv.isLinux;
|
|
||||||
server.enable = true;
|
|
||||||
settings = {
|
|
||||||
main = {
|
|
||||||
shell = "${pkgs.fish.outPath}/bin/fish";
|
|
||||||
font = "Hasklug Nerd Font Mono: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";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
anyrun = {
|
|
||||||
enable = true;
|
|
||||||
config = {
|
|
||||||
plugins = with inputs.anyrun.packages.${pkgs.system}; [
|
|
||||||
inputs.anyrun-hyprwin.packages.${pkgs.system}.hyprwin
|
|
||||||
rink
|
|
||||||
applications
|
|
||||||
websearch
|
|
||||||
shell
|
|
||||||
translate
|
|
||||||
symbols
|
|
||||||
];
|
|
||||||
x = {fraction = 0.5;};
|
|
||||||
y = {fraction = 0.3;};
|
|
||||||
height = {absolute = 0;};
|
|
||||||
width = {absolute = 1000;};
|
|
||||||
showResultsImmediately = true;
|
|
||||||
layer = "overlay";
|
|
||||||
};
|
|
||||||
|
|
||||||
extraConfigFiles = {
|
|
||||||
"shell.ron".text = ''
|
|
||||||
Config(
|
|
||||||
prefix: "",
|
|
||||||
shell: None,
|
|
||||||
)
|
|
||||||
'';
|
|
||||||
"handlr.ron".text = ''
|
|
||||||
Config(
|
|
||||||
prefix: "",
|
|
||||||
log: None,
|
|
||||||
)
|
|
||||||
'';
|
|
||||||
"websearch.ron".text = ''
|
|
||||||
Config(
|
|
||||||
prefix: "?"
|
|
||||||
engines: [Google, DuckDuckGo]
|
|
||||||
)
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
# Let Home Manager install and manage itself.
|
|
||||||
home-manager = {
|
|
||||||
enable = true;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
fonts.fontconfig.enable = true;
|
iconTheme = {
|
||||||
home = {
|
name = "Papirus-Dark";
|
||||||
# Home Manager needs a bit of information about you and the paths it should
|
package = pkgs.catppuccin-papirus-folders.override {
|
||||||
# manage.
|
accent = "mauve";
|
||||||
username = device.user;
|
flavor = "mocha";
|
||||||
homeDirectory =
|
|
||||||
if device.isMac
|
|
||||||
then lib.mkForce "/Users/${device.user}"
|
|
||||||
else lib.mkForce "/home/${device.user}";
|
|
||||||
|
|
||||||
stateVersion = "23.11";
|
|
||||||
|
|
||||||
file = {
|
|
||||||
".config/tmux/sessions".source = ../../tmux/sessions;
|
|
||||||
".config/nvim/lua".source = ../../nvim/lua;
|
|
||||||
".config/nvim/init.lua".source = ../../nvim/init.lua;
|
|
||||||
".config/macchina".source = ../../macchina;
|
|
||||||
|
|
||||||
# # You can also set the file content immediately.
|
|
||||||
# ".gradle/gradle.properties".text = ''
|
|
||||||
# org.gradle.console=verbose
|
|
||||||
# org.gradle.daemon.idletimeout=3600000
|
|
||||||
# '';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
sessionVariables = {
|
|
||||||
EDITOR = "nvim";
|
|
||||||
SHELL = "${pkgs.nushellFull}/bin/nu";
|
|
||||||
CARGO_TARGET_DIR = "${config.xdg.cacheHome}/cargo/target";
|
|
||||||
};
|
|
||||||
sessionPath = [
|
|
||||||
"${config.home.homeDirectory}/.local/bin"
|
|
||||||
"${config.home.homeDirectory}/.nix-profile/bin"
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
gtk3.extraConfig = { gtk-application-prefer-dark-theme = 1; };
|
||||||
|
|
||||||
|
gtk4.extraConfig = { gtk-application-prefer-dark-theme = 1; };
|
||||||
|
};
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
gnome.nautilus
|
||||||
|
webcord-vencord
|
||||||
|
spotify
|
||||||
|
htop-vim
|
||||||
|
lsof
|
||||||
|
wl-clipboard
|
||||||
|
qmk
|
||||||
|
nodejs
|
||||||
|
nix-index
|
||||||
|
yubikey-personalization
|
||||||
|
macchina
|
||||||
|
ripgrep
|
||||||
|
fd
|
||||||
|
nixfmt
|
||||||
|
dust
|
||||||
|
eza
|
||||||
|
cachix
|
||||||
|
rustup
|
||||||
|
cmake
|
||||||
|
fzf
|
||||||
|
clang
|
||||||
|
ncpamixer
|
||||||
|
neovim-nightly
|
||||||
|
yubikey-agent
|
||||||
|
(nerdfonts.override { fonts = [ "Hasklig" ]; })
|
||||||
|
mpv
|
||||||
|
|
||||||
|
# # It is sometimes useful to fine-tune packages, for example, by applying
|
||||||
|
# # overrides. You can do that directly here, just don't forget the
|
||||||
|
# # parentheses. Maybe you want to install Nerd Fonts with a limited number of
|
||||||
|
# # fonts?
|
||||||
|
# (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
|
||||||
|
|
||||||
|
# # You can also create simple shell scripts directly inside your
|
||||||
|
# # configuration. For example, this adds a command 'my-hello' to your
|
||||||
|
# # environment:
|
||||||
|
# (pkgs.writeShellScriptBin "my-hello" ''
|
||||||
|
# echo "Hello, ${config.home.username}!"
|
||||||
|
# '')
|
||||||
|
];
|
||||||
|
|
||||||
|
xdg.enable = true;
|
||||||
|
|
||||||
|
programs = {
|
||||||
|
git = {
|
||||||
|
enable = true;
|
||||||
|
userName = "uttarayan21";
|
||||||
|
userEmail = "email@uttarayan.me";
|
||||||
|
};
|
||||||
|
nix-index.enableFishIntegration = true;
|
||||||
|
fish = {
|
||||||
|
enable = true;
|
||||||
|
shellAbbrs = {
|
||||||
|
vim = "nvim";
|
||||||
|
vi = "nvim";
|
||||||
|
nv = "nvim";
|
||||||
|
g = "git";
|
||||||
|
cd = "z";
|
||||||
|
ls = "exa";
|
||||||
|
t = "${start-tmux}";
|
||||||
|
};
|
||||||
|
shellInit = ''
|
||||||
|
set fish_greeting
|
||||||
|
'';
|
||||||
|
interactiveShellInit = ''
|
||||||
|
${pkgs.macchina.outPath}/bin/macchina
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
nushell = {
|
||||||
|
enable = true;
|
||||||
|
shellAliases = { "cd" = "z"; };
|
||||||
|
package = pkgs.nushellFull;
|
||||||
|
configFile.text = ''
|
||||||
|
$env.config = {
|
||||||
|
show_banner: false,
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
zoxide = {
|
||||||
|
enable = true;
|
||||||
|
enableFishIntegration = true;
|
||||||
|
enableNushellIntegration = true;
|
||||||
|
};
|
||||||
|
starship = {
|
||||||
|
enable = true;
|
||||||
|
enableFishIntegration = true;
|
||||||
|
enableNushellIntegration = true;
|
||||||
|
};
|
||||||
|
eza = {
|
||||||
|
enable = true;
|
||||||
|
enableAliases = true;
|
||||||
|
git = true;
|
||||||
|
icons = true;
|
||||||
|
};
|
||||||
|
carapace = {
|
||||||
|
enable = true;
|
||||||
|
enableFishIntegration = true;
|
||||||
|
enableNushellIntegration = true;
|
||||||
|
};
|
||||||
|
fzf = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.fzf;
|
||||||
|
enableFishIntegration = true;
|
||||||
|
tmux.enableShellIntegration = true;
|
||||||
|
};
|
||||||
|
# keychain = {
|
||||||
|
# enable = pkgs.isLinux;
|
||||||
|
# keys = [ "id_ed25519" ];
|
||||||
|
# enableFishIntegration = true;
|
||||||
|
# enableNushellIntegration = true;
|
||||||
|
# };
|
||||||
|
yazi = {
|
||||||
|
enable = true;
|
||||||
|
enableFishIntegration = true;
|
||||||
|
enableNushellIntegration = true;
|
||||||
|
};
|
||||||
|
foot = {
|
||||||
|
enable = pkgs.stdenv.isLinux;
|
||||||
|
server.enable = true;
|
||||||
|
settings = {
|
||||||
|
main = {
|
||||||
|
shell = "${pkgs.fish.outPath}/bin/fish";
|
||||||
|
font = "Hasklug Nerd Font Mono:size=13";
|
||||||
|
initial-window-size-pixels = "1440x800";
|
||||||
|
};
|
||||||
|
colors = {
|
||||||
|
foreground = "f8f8f2";
|
||||||
|
background = 0;
|
||||||
|
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";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Let Home Manager install and manage itself.
|
||||||
|
home-manager = { enable = true; };
|
||||||
|
};
|
||||||
|
|
||||||
|
fonts.fontconfig.enable = true;
|
||||||
|
home = {
|
||||||
|
# Home Manager needs a bit of information about you and the paths it should
|
||||||
|
# manage.
|
||||||
|
username = device.user;
|
||||||
|
homeDirectory = if device.isMac then
|
||||||
|
lib.mkForce "/Users/${device.user}"
|
||||||
|
else
|
||||||
|
lib.mkForce "/home/${device.user}";
|
||||||
|
|
||||||
|
stateVersion = "23.11";
|
||||||
|
|
||||||
|
file = {
|
||||||
|
".config/tmux/sessions".source = ../../tmux/sessions;
|
||||||
|
".config/nvim/lua".source = ../../nvim/lua;
|
||||||
|
".config/nvim/init.lua".source = ../../nvim/init.lua;
|
||||||
|
".config/macchina".source = ../../macchina;
|
||||||
|
|
||||||
|
# # You can also set the file content immediately.
|
||||||
|
# ".gradle/gradle.properties".text = ''
|
||||||
|
# org.gradle.console=verbose
|
||||||
|
# org.gradle.daemon.idletimeout=3600000
|
||||||
|
# '';
|
||||||
|
};
|
||||||
|
|
||||||
|
sessionVariables = {
|
||||||
|
EDITOR = "nvim";
|
||||||
|
SHELL = "${pkgs.nushellFull}/bin/nu";
|
||||||
|
CARGO_TARGET_DIR = "${config.xdg.cacheHome}/cargo/target";
|
||||||
|
};
|
||||||
|
sessionPath = [
|
||||||
|
"${config.home.homeDirectory}/.local/bin"
|
||||||
|
"${config.home.homeDirectory}/.nix-profile/bin"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,28 +1,25 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
let
|
let
|
||||||
tmux-super-fingers =
|
tmux-super-fingers = pkgs.tmuxPlugins.mkTmuxPlugin {
|
||||||
pkgs.tmuxPlugins.mkTmuxPlugin
|
pluginName = "tmux-super-fingers";
|
||||||
{
|
version = "v1-2024-02-14";
|
||||||
pluginName = "tmux-super-fingers";
|
src = pkgs.fetchFromGitHub {
|
||||||
version = "v1-2024-02-14";
|
owner = "artemave";
|
||||||
src = pkgs.fetchFromGitHub {
|
repo = "tmux_super_fingers";
|
||||||
owner = "artemave";
|
rev = "518044ef78efa1cf3c64f2e693fef569ae570ddd";
|
||||||
repo = "tmux_super_fingers";
|
sha256 = "sha256-iKfx9Ytk2vSuINvQTB6Kww8Vv7i51cFEnEBHLje+IJw=";
|
||||||
rev = "518044ef78efa1cf3c64f2e693fef569ae570ddd";
|
};
|
||||||
sha256 = "sha256-iKfx9Ytk2vSuINvQTB6Kww8Vv7i51cFEnEBHLje+IJw=";
|
};
|
||||||
};
|
|
||||||
};
|
|
||||||
scratchpad = pkgs.writeShellScript "scratchpad" ''
|
scratchpad = pkgs.writeShellScript "scratchpad" ''
|
||||||
width=''\${2:-95%}
|
width=''${2:-95%}
|
||||||
height=''\${2:-95%}
|
height=''${2:-95%}
|
||||||
if [ "$(tmux display-message -p -F "#{session_name}")" = "scratch" ];then
|
if [ "$(tmux display-message -p -F "#{session_name}")" = "scratch" ];then
|
||||||
tmux detach-client
|
tmux detach-client
|
||||||
else
|
else
|
||||||
tmux popup -d '#{pane_current_path}' -xC -yC -w$width -h$height -E "tmux attach -t scratch || tmux new -s scratch"
|
tmux popup -d '#{pane_current_path}' -xC -yC -w$width -h$height -E "tmux attach -t scratch || tmux new -s scratch"
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
programs.tmux = {
|
programs.tmux = {
|
||||||
enable = true;
|
enable = true;
|
||||||
shell = "${pkgs.nushellFull}/bin/nu";
|
shell = "${pkgs.nushellFull}/bin/nu";
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{pkgs, ...}: {
|
{ pkgs, ... }: {
|
||||||
programs.wezterm = {
|
programs.wezterm = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
|
|||||||
@@ -1,21 +1,12 @@
|
|||||||
{
|
{ pkgs, ... }: {
|
||||||
pkgs,
|
imports = [ ./yabai.nix ./skhd.nix ];
|
||||||
...
|
|
||||||
}: {
|
|
||||||
imports = [
|
|
||||||
./yabai.nix
|
|
||||||
./skhd.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [ nix neovim ];
|
||||||
nix
|
|
||||||
neovim
|
|
||||||
];
|
|
||||||
nix = {
|
nix = {
|
||||||
settings = {
|
settings = {
|
||||||
experimental-features = "nix-command flakes repl-flake";
|
experimental-features = "nix-command flakes repl-flake";
|
||||||
max-jobs = 8;
|
max-jobs = 8;
|
||||||
trusted-users = ["root" "fs0c131y"];
|
trusted-users = [ "root" "fs0c131y" ];
|
||||||
};
|
};
|
||||||
extraOptions = ''
|
extraOptions = ''
|
||||||
build-users-group = nixbld
|
build-users-group = nixbld
|
||||||
|
|||||||
@@ -1,34 +1,24 @@
|
|||||||
{
|
{ devices, inputs, overlays, home-manager, nix-darwin, ... }:
|
||||||
devices,
|
builtins.listToAttrs (builtins.map (device: {
|
||||||
inputs,
|
name = device.name;
|
||||||
overlays,
|
value = nix-darwin.lib.darwinSystem {
|
||||||
home-manager,
|
system = device.system;
|
||||||
nix-darwin,
|
modules = [
|
||||||
...
|
{ nixpkgs.overlays = overlays; }
|
||||||
}:
|
./configuration.nix
|
||||||
builtins.listToAttrs
|
home-manager.darwinModules.home-manager
|
||||||
(builtins.map
|
{
|
||||||
(device: {
|
nixpkgs.config.allowUnfree = true;
|
||||||
name = device.name;
|
home-manager = {
|
||||||
value = nix-darwin.lib.darwinSystem {
|
useGlobalPkgs = true;
|
||||||
system = device.system;
|
useUserPackages = true;
|
||||||
modules = [
|
extraSpecialArgs = {
|
||||||
{nixpkgs.overlays = overlays;}
|
inherit inputs;
|
||||||
./configuration.nix
|
inherit device;
|
||||||
home-manager.darwinModules.home-manager
|
|
||||||
{
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
home-manager = {
|
|
||||||
useGlobalPkgs = true;
|
|
||||||
useUserPackages = true;
|
|
||||||
extraSpecialArgs = {
|
|
||||||
inherit inputs;
|
|
||||||
inherit device;
|
|
||||||
};
|
|
||||||
users.${device.user}.imports = [../common/home.nix];
|
|
||||||
};
|
};
|
||||||
}
|
users.${device.user}.imports = [ ../common/home.nix ];
|
||||||
];
|
};
|
||||||
};
|
}
|
||||||
})
|
];
|
||||||
devices)
|
};
|
||||||
|
}) devices)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{...}: {
|
{ ... }: {
|
||||||
services = {
|
services = {
|
||||||
skhd = {
|
skhd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{...}: {
|
{ ... }: {
|
||||||
services = {
|
services = {
|
||||||
yabai = {
|
yabai = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
140
config/nix/flake.lock
generated
140
config/nix/flake.lock
generated
@@ -47,6 +47,27 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"crane": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"ironbar",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1706473964,
|
||||||
|
"narHash": "sha256-Fq6xleee/TsX6NbtoRuI96bBuDHMU57PrcK9z1QEKbk=",
|
||||||
|
"owner": "ipetkov",
|
||||||
|
"repo": "crane",
|
||||||
|
"rev": "c798790eabec3e3da48190ae3698ac227aab770c",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "ipetkov",
|
||||||
|
"repo": "crane",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"flake-compat": {
|
"flake-compat": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
@@ -165,6 +186,24 @@
|
|||||||
"inputs": {
|
"inputs": {
|
||||||
"systems": "systems_3"
|
"systems": "systems_3"
|
||||||
},
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1705309234,
|
||||||
|
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-utils_4": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems_4"
|
||||||
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1701680307,
|
"lastModified": 1701680307,
|
||||||
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
|
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
|
||||||
@@ -221,9 +260,50 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"ironbar": {
|
||||||
|
"inputs": {
|
||||||
|
"crane": "crane",
|
||||||
|
"naersk": "naersk",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"rust-overlay": "rust-overlay_2"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1708134405,
|
||||||
|
"narHash": "sha256-ktSi+D3lj7eStJVHCcmsizQlVvVW8GaCEYjKnPCGt7k=",
|
||||||
|
"owner": "JakeStanger",
|
||||||
|
"repo": "ironbar",
|
||||||
|
"rev": "31505c71400256af69b67039b44cb3ce9f0a953f",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "JakeStanger",
|
||||||
|
"repo": "ironbar",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"naersk": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs_2"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1698420672,
|
||||||
|
"narHash": "sha256-/TdeHMPRjjdJub7p7+w55vyABrsJlt5QkznPYy55vKA=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "naersk",
|
||||||
|
"rev": "aeb58d5e8faead8980a807c840232697982d47b9",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "naersk",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"neovim-flake": {
|
"neovim-flake": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils_3",
|
"flake-utils": "flake-utils_4",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"neovim-nightly-overlay",
|
"neovim-nightly-overlay",
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
@@ -251,7 +331,7 @@
|
|||||||
"flake-parts": "flake-parts_2",
|
"flake-parts": "flake-parts_2",
|
||||||
"hercules-ci-effects": "hercules-ci-effects",
|
"hercules-ci-effects": "hercules-ci-effects",
|
||||||
"neovim-flake": "neovim-flake",
|
"neovim-flake": "neovim-flake",
|
||||||
"nixpkgs": "nixpkgs_2"
|
"nixpkgs": "nixpkgs_3"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1708128234,
|
"lastModified": 1708128234,
|
||||||
@@ -304,6 +384,20 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1706683685,
|
||||||
|
"narHash": "sha256-FtPPshEpxH/ewBOsdKBNhlsL2MLEFv1hEnQ19f/bFsQ=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "5ad9903c16126a7d949101687af0aa589b1d7d3d",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"id": "nixpkgs",
|
||||||
|
"type": "indirect"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_3": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1708093448,
|
"lastModified": 1708093448,
|
||||||
"narHash": "sha256-gohEm3/NVyu7WINFhRf83yJH8UM2ie/KY9Iw3VN6fiE=",
|
"narHash": "sha256-gohEm3/NVyu7WINFhRf83yJH8UM2ie/KY9Iw3VN6fiE=",
|
||||||
@@ -319,7 +413,7 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_3": {
|
"nixpkgs_4": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1708118438,
|
"lastModified": 1708118438,
|
||||||
"narHash": "sha256-kk9/0nuVgA220FcqH/D2xaN6uGyHp/zoxPNUmPCMmEE=",
|
"narHash": "sha256-kk9/0nuVgA220FcqH/D2xaN6uGyHp/zoxPNUmPCMmEE=",
|
||||||
@@ -341,9 +435,10 @@
|
|||||||
"anyrun-hyprwin": "anyrun-hyprwin",
|
"anyrun-hyprwin": "anyrun-hyprwin",
|
||||||
"flake-utils": "flake-utils_2",
|
"flake-utils": "flake-utils_2",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
|
"ironbar": "ironbar",
|
||||||
"neovim-nightly-overlay": "neovim-nightly-overlay",
|
"neovim-nightly-overlay": "neovim-nightly-overlay",
|
||||||
"nix-darwin": "nix-darwin",
|
"nix-darwin": "nix-darwin",
|
||||||
"nixpkgs": "nixpkgs_3"
|
"nixpkgs": "nixpkgs_4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"rust-overlay": {
|
"rust-overlay": {
|
||||||
@@ -365,6 +460,28 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"rust-overlay_2": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils_3",
|
||||||
|
"nixpkgs": [
|
||||||
|
"ironbar",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1706667075,
|
||||||
|
"narHash": "sha256-KBI5jcOWh9nsOFWj2SRq7vj+fPDf8Do8ceL582kFA70=",
|
||||||
|
"owner": "oxalica",
|
||||||
|
"repo": "rust-overlay",
|
||||||
|
"rev": "2c993daf3136c6955fd13bfe215d0d4faf6090f1",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "oxalica",
|
||||||
|
"repo": "rust-overlay",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"systems": {
|
"systems": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1681028828,
|
"lastModified": 1681028828,
|
||||||
@@ -409,6 +526,21 @@
|
|||||||
"repo": "default",
|
"repo": "default",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"systems_4": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
|
|||||||
@@ -22,87 +22,82 @@
|
|||||||
url = "github:uttarayan21/anyrun-hyprwin";
|
url = "github:uttarayan21/anyrun-hyprwin";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
ironbar = {
|
||||||
|
url = "github:JakeStanger/ironbar";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = {
|
outputs = { nixpkgs,
|
||||||
nixpkgs,
|
|
||||||
# nixos,
|
# nixos,
|
||||||
home-manager,
|
home-manager, nix-darwin, flake-utils, anyrun, neovim-nightly-overlay, ...
|
||||||
nix-darwin,
|
}@inputs:
|
||||||
flake-utils,
|
let
|
||||||
anyrun,
|
config_devices = [
|
||||||
neovim-nightly-overlay,
|
{
|
||||||
...
|
name = "mirai";
|
||||||
} @ inputs: let
|
system = "x86_64-linux";
|
||||||
config_devices = [
|
user = "fs0c131y";
|
||||||
{
|
}
|
||||||
name = "mirai";
|
{
|
||||||
system = "x86_64-linux";
|
name = "ryu";
|
||||||
user = "fs0c131y";
|
system = "x86_64-linux";
|
||||||
}
|
user = "servius";
|
||||||
{
|
isNix = true;
|
||||||
name = "ryu";
|
}
|
||||||
system = "x86_64-linux";
|
{
|
||||||
user = "servius";
|
name = "genzai";
|
||||||
isNix = true;
|
system = "x86_64-linux";
|
||||||
}
|
user = "fs0c131y";
|
||||||
{
|
}
|
||||||
name = "genzai";
|
{
|
||||||
system = "x86_64-linux";
|
name = "Uttarayans-MacBook-Pro";
|
||||||
user = "fs0c131y";
|
system = "aarch64-darwin";
|
||||||
}
|
user = "fs0c131y";
|
||||||
{
|
}
|
||||||
name = "Uttarayans-MacBook-Pro";
|
{
|
||||||
system = "aarch64-darwin";
|
name = "SteamDeck";
|
||||||
user = "fs0c131y";
|
system = "x86_64-linux";
|
||||||
}
|
user = "deck";
|
||||||
{
|
}
|
||||||
name = "SteamDeck";
|
];
|
||||||
system = "x86_64-linux";
|
|
||||||
user = "deck";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
mkDevice = {device}: {
|
mkDevice = { device }: {
|
||||||
isLinux = !isNull (builtins.match ".*-linux" device.system);
|
isLinux = !isNull (builtins.match ".*-linux" device.system);
|
||||||
isNix =
|
isNix =
|
||||||
if (builtins.hasAttr "isNix" device)
|
if (builtins.hasAttr "isNix" device) then device.isNix else false;
|
||||||
then device.isNix
|
isMac = !isNull (builtins.match ".*-darwin" device.system);
|
||||||
else false;
|
system = device.system;
|
||||||
isMac = !isNull (builtins.match ".*-darwin" device.system);
|
name = device.name;
|
||||||
system = device.system;
|
user = device.user;
|
||||||
name = device.name;
|
};
|
||||||
user = device.user;
|
|
||||||
|
devices =
|
||||||
|
builtins.map (device: mkDevice { inherit device; }) config_devices;
|
||||||
|
|
||||||
|
nixos_devices = builtins.filter (x: x.isNix) devices;
|
||||||
|
linux_devices = builtins.filter (x: x.isLinux) devices;
|
||||||
|
darwin_devices = builtins.filter (x: x.isMac) devices;
|
||||||
|
|
||||||
|
anyrun-overlay = final: prev: {
|
||||||
|
anyrun = inputs.anyrun.packages.${prev.system}.anyrun;
|
||||||
|
hyprwin = inputs.anyrun-hyprwin.packages.${prev.system}.hyprwin;
|
||||||
|
};
|
||||||
|
overlays = [ inputs.neovim-nightly-overlay.overlay anyrun-overlay ];
|
||||||
|
in {
|
||||||
|
nixosConfigurations = let devices = nixos_devices;
|
||||||
|
in import ./nixos {
|
||||||
|
inherit devices inputs nixpkgs home-manager overlays;
|
||||||
|
};
|
||||||
|
|
||||||
|
darwinConfigurations = let devices = darwin_devices;
|
||||||
|
in import ./darwin {
|
||||||
|
inherit devices inputs nixpkgs home-manager overlays nix-darwin;
|
||||||
|
};
|
||||||
|
|
||||||
|
homeConfigurations = let devices = linux_devices;
|
||||||
|
in import ./linux {
|
||||||
|
inherit devices inputs nixpkgs home-manager overlays;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
devices = builtins.map (device: mkDevice {inherit device;}) config_devices;
|
|
||||||
|
|
||||||
nixos_devices = builtins.filter (x: x.isNix) devices;
|
|
||||||
linux_devices = builtins.filter (x: x.isLinux) devices;
|
|
||||||
darwin_devices = builtins.filter (x: x.isMac) devices;
|
|
||||||
|
|
||||||
anyrun-overlay = final: prev: {
|
|
||||||
anyrun = inputs.anyrun.packages.${prev.system}.anyrun;
|
|
||||||
hyprwin = inputs.anyrun-hyprwin.packages.${prev.system}.hyprwin;
|
|
||||||
};
|
|
||||||
overlays = [
|
|
||||||
inputs.neovim-nightly-overlay.overlay
|
|
||||||
anyrun-overlay
|
|
||||||
];
|
|
||||||
in {
|
|
||||||
nixosConfigurations = let
|
|
||||||
devices = nixos_devices;
|
|
||||||
in
|
|
||||||
import ./nixos {inherit devices inputs nixpkgs home-manager overlays;};
|
|
||||||
|
|
||||||
darwinConfigurations = let
|
|
||||||
devices = darwin_devices;
|
|
||||||
in
|
|
||||||
import ./darwin {inherit devices inputs nixpkgs home-manager overlays nix-darwin;};
|
|
||||||
|
|
||||||
homeConfigurations = let
|
|
||||||
devices = linux_devices;
|
|
||||||
in
|
|
||||||
import ./linux {inherit devices inputs nixpkgs home-manager overlays;};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
75
config/nix/linux/anyrun.nix
Normal file
75
config/nix/linux/anyrun.nix
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
{ inputs, pkgs, ... }: {
|
||||||
|
imports = [ inputs.anyrun.nixosModules.home-manager ];
|
||||||
|
programs.anyrun = {
|
||||||
|
enable = true;
|
||||||
|
config = {
|
||||||
|
plugins = with inputs.anyrun.packages.${pkgs.system}; [
|
||||||
|
inputs.anyrun-hyprwin.packages.${pkgs.system}.hyprwin
|
||||||
|
rink
|
||||||
|
applications
|
||||||
|
websearch
|
||||||
|
shell
|
||||||
|
translate
|
||||||
|
symbols
|
||||||
|
];
|
||||||
|
x = { fraction = 0.5; };
|
||||||
|
y = { fraction = 0.3; };
|
||||||
|
height = { absolute = 0; };
|
||||||
|
width = { absolute = 1000; };
|
||||||
|
showResultsImmediately = true;
|
||||||
|
layer = "overlay";
|
||||||
|
};
|
||||||
|
|
||||||
|
extraConfigFiles = {
|
||||||
|
"shell.ron".text = ''
|
||||||
|
Config(
|
||||||
|
prefix: "",
|
||||||
|
shell: None,
|
||||||
|
)
|
||||||
|
'';
|
||||||
|
"handlr.ron".text = ''
|
||||||
|
Config(
|
||||||
|
prefix: "",
|
||||||
|
log: None,
|
||||||
|
)
|
||||||
|
'';
|
||||||
|
"websearch.ron".text = ''
|
||||||
|
Config(
|
||||||
|
prefix: "?"
|
||||||
|
engines: [Google, DuckDuckGo]
|
||||||
|
)
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,28 +1,17 @@
|
|||||||
{
|
{ devices, inputs, overlays, home-manager, ... }:
|
||||||
devices,
|
builtins.listToAttrs (builtins.map (device: {
|
||||||
inputs,
|
name = device.user;
|
||||||
overlays,
|
value = let
|
||||||
home-manager,
|
pkgs = import inputs.nixpkgs {
|
||||||
...
|
inherit overlays;
|
||||||
}:
|
system = device.system;
|
||||||
builtins.listToAttrs (builtins.map
|
};
|
||||||
(device: {
|
in home-manager.lib.homeManagerConfiguration {
|
||||||
name = device.user;
|
inherit pkgs;
|
||||||
value = let
|
extraSpecialArgs = {
|
||||||
pkgs = import inputs.nixpkgs {
|
inherit inputs;
|
||||||
inherit overlays;
|
inherit device;
|
||||||
system = device.system;
|
};
|
||||||
};
|
modules = [ ../common/home.nix ];
|
||||||
in
|
};
|
||||||
home-manager.lib.homeManagerConfiguration {
|
}) devices)
|
||||||
inherit pkgs;
|
|
||||||
extraSpecialArgs = {
|
|
||||||
inherit inputs;
|
|
||||||
inherit device;
|
|
||||||
};
|
|
||||||
modules = [
|
|
||||||
../common/home.nix
|
|
||||||
];
|
|
||||||
};
|
|
||||||
})
|
|
||||||
devices)
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{pkgs, ...}: {
|
{ pkgs, ... }: {
|
||||||
wayland.windowManager.hyprland = {
|
wayland.windowManager.hyprland = {
|
||||||
enable = pkgs.stdenv.isLinux;
|
enable = pkgs.stdenv.isLinux;
|
||||||
settings = {
|
settings = {
|
||||||
@@ -68,7 +68,8 @@
|
|||||||
|
|
||||||
dwindle = {
|
dwindle = {
|
||||||
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
|
# 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
|
pseudotile =
|
||||||
|
true; # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
|
||||||
preserve_split = true; # you probably want this
|
preserve_split = true; # you probably want this
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -84,9 +85,7 @@
|
|||||||
|
|
||||||
# Example per-device config
|
# Example per-device config
|
||||||
# See https://wiki.hyprland.org/Configuring/Keywords/#executing for more
|
# See https://wiki.hyprland.org/Configuring/Keywords/#executing for more
|
||||||
"device:epic-mouse-v1" = {
|
"device:epic-mouse-v1" = { sensitivity = -0.5; };
|
||||||
sensitivity = -0.5;
|
|
||||||
};
|
|
||||||
|
|
||||||
# Example windowrule v1
|
# Example windowrule v1
|
||||||
# windowrule = float, ^(kitty)$
|
# windowrule = float, ^(kitty)$
|
||||||
@@ -94,10 +93,7 @@
|
|||||||
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
|
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
|
||||||
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
|
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
|
||||||
|
|
||||||
windowrule = [
|
windowrule = [ "float, title:^(Steam)$" "float, title:^(Archetype.*)$" ];
|
||||||
"float, title:^(Steam)$"
|
|
||||||
"float, title:^(Archetype.*)$"
|
|
||||||
];
|
|
||||||
|
|
||||||
"misc:vfr" = true;
|
"misc:vfr" = true;
|
||||||
|
|
||||||
|
|||||||
283
config/nix/linux/ironbar.nix
Normal file
283
config/nix/linux/ironbar.nix
Normal file
@@ -0,0 +1,283 @@
|
|||||||
|
{ inputs, ... }: {
|
||||||
|
imports = [ inputs.ironbar.homeManagerModules.default ];
|
||||||
|
programs.ironbar = {
|
||||||
|
enable = true;
|
||||||
|
config.monitors = {
|
||||||
|
HDMI-A-2 = {
|
||||||
|
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"; }
|
||||||
|
];
|
||||||
|
};
|
||||||
|
DP-1 = {
|
||||||
|
position = "bottom";
|
||||||
|
icon_theme = "Paper-Mono-Dark";
|
||||||
|
end = [
|
||||||
|
{
|
||||||
|
type = "sys_info";
|
||||||
|
format = [
|
||||||
|
" CPU {cpu_percent}% | {temp_c=coretemp-Package-id-0}°C"
|
||||||
|
" RAM {memory_percent}%"
|
||||||
|
# - {disk_used=/home} GiB / {disk_total:/home} GiB ({disk_percent:/home}%)
|
||||||
|
# - 猪 {load_average=1} | {load_average:5} | {load_average:15}
|
||||||
|
# - 李 {net_down=eno1} / {net_up:eno1} Mbps
|
||||||
|
# - {uptime}
|
||||||
|
];
|
||||||
|
interval = {
|
||||||
|
cpu = 1;
|
||||||
|
temps = 5;
|
||||||
|
memory = 30;
|
||||||
|
# disks= 300;
|
||||||
|
# networks= 3;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{ type = "tray"; }
|
||||||
|
];
|
||||||
|
start = [{
|
||||||
|
type = "workspaces";
|
||||||
|
name_map = {
|
||||||
|
"1" = "icon:code";
|
||||||
|
"2" = "";
|
||||||
|
"3" = "icon:chrome";
|
||||||
|
"4" = "icon:discord";
|
||||||
|
"5" = "icon:steam";
|
||||||
|
"6" = "icon:misc";
|
||||||
|
"7" = "icon:misc";
|
||||||
|
"8" = "icon:docky";
|
||||||
|
"9" = "icon:monodoc";
|
||||||
|
"10" = "icon:spotify";
|
||||||
|
};
|
||||||
|
favorites = [ "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" ];
|
||||||
|
all_monitors = true;
|
||||||
|
}];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
style = ''
|
||||||
|
@define-color color_bg #2d2d2d;
|
||||||
|
@define-color color_bg_dark #1c1c1c;
|
||||||
|
@define-color color_border #424242;
|
||||||
|
@define-color color_border_active #6699cc;
|
||||||
|
@define-color color_text #ffffff;
|
||||||
|
@define-color color_urgent #8f0a0a;
|
||||||
|
|
||||||
|
/* -- 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;
|
||||||
|
}
|
||||||
|
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
# Edit this configuration file to define what should be installed on
|
# Edit this configuration file to define what should be installed on
|
||||||
# your system. Help is available in the configuration.nix(5) man page
|
# your system. Help is available in the configuration.nix(5) man page
|
||||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||||
{pkgs, ...}: {
|
{ pkgs, ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
# Include the results of the hardware scan.
|
# Include the results of the hardware scan.
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
@@ -12,10 +12,11 @@
|
|||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
networking.hostName = "ryu"; # Define your hostname.
|
networking.hostName = "ryu"; # Define your hostname.
|
||||||
networking.nameservers = ["1.1.1.1" "8.8.8.8"];
|
networking.nameservers = [ "1.1.1.1" "8.8.8.8" ];
|
||||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||||
|
|
||||||
services.udev.packages = [pkgs.yubikey-personalization pkgs.yubikey-personalization-gui];
|
services.udev.packages =
|
||||||
|
[ pkgs.yubikey-personalization pkgs.yubikey-personalization-gui ];
|
||||||
services.yubikey-agent.enable = true;
|
services.yubikey-agent.enable = true;
|
||||||
|
|
||||||
# Configure network proxy if necessary
|
# Configure network proxy if necessary
|
||||||
@@ -28,9 +29,7 @@
|
|||||||
# Set your time zone.
|
# Set your time zone.
|
||||||
time.timeZone = "Asia/Kolkata";
|
time.timeZone = "Asia/Kolkata";
|
||||||
|
|
||||||
i18n.supportedLocales = [
|
i18n.supportedLocales = [ "en_US.UTF-8/UTF-8" ];
|
||||||
"en_US.UTF-8/UTF-8"
|
|
||||||
];
|
|
||||||
|
|
||||||
# Select internationalisation properties.
|
# Select internationalisation properties.
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
@@ -57,7 +56,7 @@
|
|||||||
users.users.servius = {
|
users.users.servius = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
description = "Uttarayan";
|
description = "Uttarayan";
|
||||||
extraGroups = ["networkmanager" "wheel"];
|
extraGroups = [ "networkmanager" "wheel" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
# Allow unfree packages
|
# Allow unfree packages
|
||||||
@@ -76,10 +75,11 @@
|
|||||||
git
|
git
|
||||||
fish
|
fish
|
||||||
nushellFull
|
nushellFull
|
||||||
(pkgs.wrapFirefox (pkgs.firefox-unwrapped.override {pipewireSupport = true;}) {})
|
(pkgs.wrapFirefox
|
||||||
|
(pkgs.firefox-unwrapped.override { pipewireSupport = true; }) { })
|
||||||
gnumake
|
gnumake
|
||||||
python3
|
python3
|
||||||
(nerdfonts.override {fonts = ["FiraCode" "Hasklig"];})
|
(nerdfonts.override { fonts = [ "FiraCode" "Hasklig" ]; })
|
||||||
];
|
];
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
@@ -123,4 +123,5 @@
|
|||||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||||
system.stateVersion = "23.11"; # Did you read the comment?
|
system.stateVersion = "23.11"; # Did you read the comment?
|
||||||
nix.settings.extra-experimental-features = "nix-command flakes";
|
nix.settings.extra-experimental-features = "nix-command flakes";
|
||||||
|
nix.settings.trusted-users = [ "root" "servius" ];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,35 +1,25 @@
|
|||||||
{
|
{ nixpkgs, devices, inputs, overlays, home-manager, ... }:
|
||||||
nixpkgs,
|
builtins.listToAttrs (builtins.map (device: {
|
||||||
devices,
|
name = device.name;
|
||||||
inputs,
|
value = nixpkgs.lib.nixosSystem {
|
||||||
overlays,
|
system = device.system;
|
||||||
home-manager,
|
specialArgs = { inherit device; };
|
||||||
...
|
modules = [
|
||||||
}:
|
{ nixpkgs.overlays = overlays; }
|
||||||
builtins.listToAttrs
|
./configuration.nix
|
||||||
(builtins.map
|
home-manager.nixosModules.home-manager
|
||||||
(device: {
|
{
|
||||||
name = device.name;
|
nixpkgs.config.allowUnfree = true;
|
||||||
value = nixpkgs.lib.nixosSystem {
|
home-manager = {
|
||||||
system = device.system;
|
useGlobalPkgs = true;
|
||||||
specialArgs = {inherit device;};
|
useUserPackages = true;
|
||||||
modules = [
|
extraSpecialArgs = {
|
||||||
{nixpkgs.overlays = overlays;}
|
inherit inputs;
|
||||||
./configuration.nix
|
inherit device;
|
||||||
home-manager.nixosModules.home-manager
|
|
||||||
{
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
home-manager = {
|
|
||||||
useGlobalPkgs = true;
|
|
||||||
useUserPackages = true;
|
|
||||||
extraSpecialArgs = {
|
|
||||||
inherit inputs;
|
|
||||||
inherit device;
|
|
||||||
};
|
|
||||||
users.${device.user}.imports = [../common/home.nix];
|
|
||||||
};
|
};
|
||||||
}
|
users.${device.user}.imports = [ ../common/home.nix ];
|
||||||
];
|
};
|
||||||
};
|
}
|
||||||
})
|
];
|
||||||
devices)
|
};
|
||||||
|
}) devices)
|
||||||
|
|||||||
@@ -4,24 +4,23 @@
|
|||||||
{ config, lib, pkgs, modulesPath, ... }:
|
{ config, lib, pkgs, modulesPath, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
|
||||||
];
|
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "vmd" "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
|
boot.initrd.availableKernelModules =
|
||||||
|
[ "vmd" "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
|
||||||
boot.initrd.kernelModules = [ ];
|
boot.initrd.kernelModules = [ ];
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" = {
|
||||||
{ device = "/dev/disk/by-uuid/bcaa8c53-6c04-43e0-bf2a-97d8c0f572d9";
|
device = "/dev/disk/by-uuid/bcaa8c53-6c04-43e0-bf2a-97d8c0f572d9";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" = {
|
||||||
{ device = "/dev/disk/by-uuid/4E27-DAC0";
|
device = "/dev/disk/by-uuid/4E27-DAC0";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [ ];
|
swapDevices = [ ];
|
||||||
|
|
||||||
@@ -34,5 +33,6 @@
|
|||||||
# networking.interfaces.wlp4s0.useDHCP = lib.mkDefault true;
|
# networking.interfaces.wlp4s0.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
hardware.cpu.intel.updateMicrocode =
|
||||||
|
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
{ pkgs
|
{ pkgs, ... }:
|
||||||
, ...
|
|
||||||
}:
|
|
||||||
pkgs.writeShellScript "start-tmux" ''
|
pkgs.writeShellScript "start-tmux" ''
|
||||||
live_sessions=$(${pkgs.tmux}/bin/tmux list-sessions 2>/dev/null)
|
live_sessions=$(${pkgs.tmux}/bin/tmux list-sessions 2>/dev/null)
|
||||||
all_sessions=$(${pkgs.findutils}/bin/find -L ~/.config/tmux/sessions -type f -executable -printf '%f\n'| sort)
|
all_sessions=$(${pkgs.findutils}/bin/find -L ~/.config/tmux/sessions -type f -executable -printf '%f\n'| sort)
|
||||||
@@ -16,18 +14,18 @@ pkgs.writeShellScript "start-tmux" ''
|
|||||||
for live_session in $live_sessions;
|
for live_session in $live_sessions;
|
||||||
do
|
do
|
||||||
live_session_name=$(echo $live_session | ${pkgs.coreutils}/bin/cut -d: -f1)
|
live_session_name=$(echo $live_session | ${pkgs.coreutils}/bin/cut -d: -f1)
|
||||||
if [ -z "''\${all_sessions##*$live_session_name*}" ];then # see https://stackoverflow.com/questions/229551/how-to-check-if-a-string-contains-a-substring-in-bash
|
if [ -z "''${all_sessions##*$live_session_name*}" ];then # see https://stackoverflow.com/questions/229551/how-to-check-if-a-string-contains-a-substring-in-bash
|
||||||
all_sessions="$(echo "$all_sessions" | sed "s/$live_session_name/$live_session/g")"
|
all_sessions="$(echo "$all_sessions" | sed "s/$live_session_name/$live_session/g")"
|
||||||
else
|
else
|
||||||
all_sessions="$(echo -e "$all_sessions\n$live_session")"
|
all_sessions="$(echo -e "$all_sessions\n$live_session")"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
session=$(echo "''\$all_sessions" | ${pkgs.fzf}/bin/fzf)
|
session=$(echo "$all_sessions" | ${pkgs.fzf}/bin/fzf)
|
||||||
session_name=$(echo $session | cut -d: -f1)
|
session_name=$(echo $session | cut -d: -f1)
|
||||||
if [ -z "$session" ];then
|
if [ -z "$session" ];then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
if ! [ -z "''\${session##*created*}" ];then
|
if ! [ -z "''${session##*created*}" ];then
|
||||||
if [ -x "$TMUX_SESSIONS/$session_name" ];then
|
if [ -x "$TMUX_SESSIONS/$session_name" ];then
|
||||||
source $TMUX_SESSIONS/$session_name
|
source $TMUX_SESSIONS/$session_name
|
||||||
else
|
else
|
||||||
@@ -35,7 +33,7 @@ pkgs.writeShellScript "start-tmux" ''
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [ -z "''\${session##*attached*}" ];then
|
if [ -z "''${session##*attached*}" ];then
|
||||||
read -r -p "The session is already attached somewhere else. Attach it here too ? (y/N): " choice
|
read -r -p "The session is already attached somewhere else. Attach it here too ? (y/N): " choice
|
||||||
if [ "$choice" == "y" ] || [ "$choice" == "Y" ];then
|
if [ "$choice" == "y" ] || [ "$choice" == "Y" ];then
|
||||||
${pkgs.tmux}/bin/tmux attach-session -t$session_name
|
${pkgs.tmux}/bin/tmux attach-session -t$session_name
|
||||||
@@ -44,6 +42,3 @@ pkgs.writeShellScript "start-tmux" ''
|
|||||||
${pkgs.tmux}/bin/tmux attach-session -t$session_name
|
${pkgs.tmux}/bin/tmux attach-session -t$session_name
|
||||||
fi
|
fi
|
||||||
''
|
''
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ require("mason-lspconfig").setup_handlers {
|
|||||||
settings = {
|
settings = {
|
||||||
['nil'] = {
|
['nil'] = {
|
||||||
formatting = {
|
formatting = {
|
||||||
command = { "alejandra" },
|
command = { "nixfmt" },
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user