feat: restructure and move apps into their own configs (#2)

This commit is contained in:
Uttarayan
2025-02-05 17:09:33 +05:30
committed by GitHub
parent e25f478315
commit 0a26d94f77
52 changed files with 662 additions and 482 deletions

View File

@@ -1,440 +0,0 @@
{
inputs,
config,
pkgs,
lib,
device,
...
}: let
hotedit = 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"
'';
};
in {
imports =
[
inputs.nix-index-database.hmModules.nix-index
# ./wezterm.nix
# ./goread.nix
# ./zellij.nix
../modules
./auth.nix
./gui.nix
./kitty.nix
./ncmpcpp.nix
./sops.nix
./tmux.nix
# ../neovim
]
++ lib.optionals device.isLinux [../linux]
# ++ lib.optionals.device.isMac [../macos]
# ++ lib.optionals device.isServer [../server];
;
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
hotedit
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 [];
xdg.enable = true;
xdg.userDirs = {
enable = device.isLinux;
music = "${config.home.homeDirectory}/Nextcloud/Music";
};
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
'';
};
gh.enable = true;
gh-dash.enable = true;
atuin = {
settings = {
auto_sync = true;
sync_frequency = "1m";
sync_address = "https://atuin.darksailor.dev";
};
enable = true;
enableFishIntegration = true;
enableNushellIntegration = true;
};
direnv = {
enable = true;
# enableFishIntegration = true; // Auto enabled
enableNushellIntegration = true;
nix-direnv.enable = true;
};
nix-index-database.comma.enable = true;
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"];
};
};
};
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";
};
};
nix-index = {
enable = true;
enableFishIntegration = true;
};
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"}
'';
};
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,
}
'';
};
zoxide = {
enable = true;
enableFishIntegration = true;
enableNushellIntegration = true;
};
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));
};
eza = {
enable = true;
# enableAliases = true;
git = true;
icons = "auto";
};
# carapace = {
# # enable = true;
# # enableFishIntegration = true;
# enableNushellIntegration = true;
# };
fzf = {
enable = true;
package = pkgs.fzf;
enableFishIntegration = true;
tmux.enableShellIntegration = true;
};
yazi = {
enable = true;
enableFishIntegration = true;
enableNushellIntegration = true;
theme = builtins.fromTOML (builtins.readFile "${pkgs.catppuccinThemes.yazi}/themes/mocha.toml");
};
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];
};
home-manager = {enable = true;};
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";
}
];
}
];
};
};
};
fonts.fontconfig.enable = true;
home = {
username = device.user;
homeDirectory =
if device.isMac
then lib.mkForce "/Users/${device.user}"
else lib.mkForce "/home/${device.user}";
stateVersion = "23.11";
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.fish}/bin/fish";
CARGO_TARGET_DIR = "${config.xdg.cacheHome}/cargo/target";
BROWSER =
if device.isMac
then "open"
else "xdg-open";
};
sessionPath = ["${config.home.homeDirectory}/.cargo/bin"];
};
}

79
home/default.nix Normal file
View 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";
};
}

View File

@@ -0,0 +1,3 @@
{pkgs, ...}: {
home.packages = [pkgs.code-cursor];
}

View File

@@ -0,0 +1,16 @@
{
lib,
device,
...
}: {
imports =
[]
++ (lib.optionals device.hasGui [
./cursor.nix
./firefox.nix
./ghostty.nix
./kitty.nix
./vscodium.nix
./wezterm.nix
]);
}

View File

@@ -4,7 +4,7 @@
... ...
}: { }: {
programs.firefox = { programs.firefox = {
enable = device.hasGui; enable = pkgs.stdenv.isLinux;
profiles.default = { profiles.default = {
# userChrome = # userChrome =
# /* # /*

View File

@@ -5,7 +5,7 @@
... ...
}: { }: {
programs.kitty = { programs.kitty = {
enable = device.hasGui; enable = true;
# enable = false; # enable = false;
font = { font = {
# name = "FiraCode Nerd Font Mono"; # name = "FiraCode Nerd Font Mono";

View 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
];
};
};
}

View File

@@ -4,7 +4,7 @@
... ...
}: { }: {
programs.wezterm = { programs.wezterm = {
enable = device.hasGui; enable = true;
extraConfig = extraConfig =
/* /*
lua lua

View File

@@ -1,5 +1,4 @@
{ {
pkgs,
lib, lib,
device, device,
... ...
@@ -7,13 +6,12 @@
imports = imports =
[] []
++ (lib.optionals device.hasGui [ ++ (lib.optionals device.hasGui [
../common/firefox.nix ./hyprland.nix
../linux/hyprland.nix ./gtk.nix
../linux/gtk.nix ./anyrun.nix
../linux/anyrun.nix ./ironbar
../linux/ironbar ./foot.nix
../linux/foot.nix ./mpd.nix
../linux/mpd.nix
]); ]);
services.kdeconnect.enable = device.hasGui; services.kdeconnect.enable = device.hasGui;

View File

@@ -4,11 +4,11 @@
... ...
}: { }: {
imports = [ imports = [
../modules/hyprpaper.nix ../../modules/hyprpaper.nix
]; ];
programs.hyprpaper = let programs.hyprpaper = let
wallpapers = import ../utils/wallhaven.nix {inherit pkgs;}; wallpapers = import ../../utils/wallhaven.nix {inherit pkgs;};
in { in {
enable = device.hasGui; enable = device.hasGui;
# enable = true; # enable = true;
@@ -157,6 +157,7 @@
"$mainMod, Return, exec, ${pkgs.kitty}/bin/kitty" "$mainMod, Return, exec, ${pkgs.kitty}/bin/kitty"
"$mainModShift, Return, exec, ${pkgs.foot}/bin/foot" "$mainModShift, Return, exec, ${pkgs.foot}/bin/foot"
"$mainModShift, Q, killactive," "$mainModShift, Q, killactive,"
"$mainModShift, s, exec, ${pkgs.hyprshot}/bin/hyprshot -m region"
# "$mainMod, M, exit," # "$mainMod, M, exit,"
"$mainMod, t, togglefloating," "$mainMod, t, togglefloating,"
"$mainMod, f, fullscreen," "$mainMod, f, fullscreen,"

62
home/programs/aichat.nix Normal file
View 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
View 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
View 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];
};
}

View File

@@ -0,0 +1,13 @@
{
pkgs,
lib,
device,
...
}: {
programs.
carapace = {
enable = false;
enableFishIntegration = true;
enableNushellIntegration = true;
};
}

94
home/programs/default.nix Normal file
View 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
View 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
View 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
View 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
View 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
View File

@@ -0,0 +1,11 @@
{
pkgs,
lib,
device,
...
}: {
programs = {
gh.enable = true;
gh-dash.enable = true;
};
}

33
home/programs/git.nix Normal file
View 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";
};
};
}

23
home/programs/helix.nix Normal file
View 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"];
};
};
};
}

View 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
View 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,
}
'';
};
}

View File

@@ -8,7 +8,7 @@
inputs.sops-nix.homeManagerModules.sops inputs.sops-nix.homeManagerModules.sops
]; ];
sops = { sops = {
defaultSopsFile = ../secrets/secrets.yaml; defaultSopsFile = ../../secrets/secrets.yaml;
defaultSopsFormat = "yaml"; defaultSopsFormat = "yaml";
age.keyFile = "${config.home.homeDirectory}/.config/sops/age/keys.txt"; age.keyFile = "${config.home.homeDirectory}/.config/sops/age/keys.txt";
secrets."llama/api_key" = {}; secrets."llama/api_key" = {};

40
home/programs/ssh.nix Normal file
View 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
'';
};
}

View 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));
};
}

View File

@@ -0,0 +1,9 @@
{
pkgs,
lib,
device,
...
}: {
programs = {
};
}

View File

@@ -1,5 +1,4 @@
{...}: { {...}: {
imports = [../modules/tuifeed.nix];
programs.tuifeed = { programs.tuifeed = {
enable = false; enable = false;
config = { config = {

14
home/programs/yazi.nix Normal file
View 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");
};
}

12
home/programs/zoxide.nix Normal file
View File

@@ -0,0 +1,12 @@
{
pkgs,
lib,
device,
...
}: {
programs.zoxide = {
enable = true;
enableFishIntegration = true;
enableNushellIntegration = true;
};
}

30
home/scripts.nix Normal file
View 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"
'';
})
];
}

View File

@@ -20,23 +20,18 @@ lib.attrsets.optionalAttrs device.hasGui {
WantedBy = ["graphical-session.target"]; WantedBy = ["graphical-session.target"];
}; };
}; };
imports = [./kitty.nix ./ghostty.nix]; imports = [
./kitty.nix
programs = { ./firefox.nix
# Only for checking markdown previews ./ghostty.nix
vscode = { ./cursor.nix
enable = true; ./vscodium.nix
package = pkgs.vscodium; ./wezterm.nix
extensions = with pkgs.vscode-extensions; [
shd101wyy.markdown-preview-enhanced
asvetliakov.vscode-neovim
]; ];
};
};
home.packages = with pkgs; home.packages = with pkgs;
[] []
++ lib.optionals pkgs.stdenv.isLinux [ ++ lib.optionals pkgs.stdenv.isLinux [
ghostty
discord discord
(mpv-unwrapped.wrapper {mpv = mpv-unwrapped.override {sixelSupport = true;};}) (mpv-unwrapped.wrapper {mpv = mpv-unwrapped.override {sixelSupport = true;};})
abaddon abaddon
@@ -59,6 +54,7 @@ lib.attrsets.optionalAttrs device.hasGui {
steam-run steam-run
via via
wl-clipboard wl-clipboard
zed-editor
] ]
++ lib.optionals pkgs.stdenv.isDarwin [ ++ lib.optionals pkgs.stdenv.isDarwin [
]; ];

View File

@@ -1,9 +0,0 @@
{
pkgs,
device,
...
}: {
# imports = [
# # ./sketchybar.nix
# ];
}

View File

@@ -1,4 +0,0 @@
{pkgs, ...}: {
programs.sketchybar = {
};
}

View File

@@ -7,6 +7,7 @@
./goread.nix ./goread.nix
./hyprpaper.nix ./hyprpaper.nix
./aichat.nix ./aichat.nix
./tuifeed.nix
#./ghostty.nix #./ghostty.nix
# ./sketchybar.nix # ./sketchybar.nix
]; ];

View File

@@ -34,7 +34,7 @@ builtins.listToAttrs (builtins.map (device: {
inherit inputs; inherit inputs;
inherit device; inherit device;
}; };
users.${device.user}.imports = [../common/home.nix]; users.${device.user}.imports = [../home];
}; };
} }
]; ];