581 lines
14 KiB
Nix
581 lines
14 KiB
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
pkgs-unstable,
|
|
inputs,
|
|
self,
|
|
...
|
|
}:
|
|
{
|
|
imports = [
|
|
../gnome
|
|
./dnote.nix
|
|
../modules/zed
|
|
inputs.hastebin.nixosModules.hm
|
|
];
|
|
|
|
# This value determines the Home Manager release that your configuration is
|
|
# compatible with. This helps avoid breakage when a new Home Manager release
|
|
# introduces backwards incompatible changes.
|
|
#
|
|
# You should not change this value, even if you update Home Manager. If you do
|
|
# want to update the value, then make sure to first check the Home Manager
|
|
# release notes.
|
|
home.stateVersion = "23.11"; # Please read the comment before changing.
|
|
|
|
home.packages = with pkgs; [
|
|
htop
|
|
gnupg
|
|
pkgs-unstable.yubioath-flutter
|
|
pkgs-unstable.yubikey-manager
|
|
gcc
|
|
sqlite
|
|
noto-fonts
|
|
noto-fonts-cjk-sans
|
|
noto-fonts-color-emoji
|
|
source-sans-pro
|
|
mosh
|
|
docker-compose
|
|
signal-desktop
|
|
cargo
|
|
blanket
|
|
wl-clipboard
|
|
gnumeric
|
|
gh
|
|
neovim-remote
|
|
flameshot
|
|
supersonic
|
|
crystal
|
|
shards
|
|
moreutils
|
|
keymapp
|
|
gnumake
|
|
tig
|
|
jq
|
|
yt-dlp
|
|
ffmpeg
|
|
otp
|
|
manix
|
|
(writeShellScriptBin "fd" ''
|
|
${fd}/bin/fd -H "$@"
|
|
'')
|
|
rpi-imager
|
|
picocom
|
|
imagemagick
|
|
ghostscript
|
|
inkscape
|
|
jless
|
|
qmapshack
|
|
scribus
|
|
dnscontrol
|
|
protonmail-bridge
|
|
hydroxide
|
|
protonmail-desktop
|
|
tutanota-desktop
|
|
imapsync
|
|
nixfmt-rfc-style
|
|
tree
|
|
virt-manager
|
|
pkgs-unstable.ncspot
|
|
devbox
|
|
pkgs-unstable.feishin
|
|
openscad
|
|
bambu-studio
|
|
pkgs-unstable.walker
|
|
(writeShellScriptBin "pw" ''
|
|
${lib.getExe rbw} ls --fields 'id,folder,name' | \
|
|
${lib.getExe gawk} -F '\t' '{print $1 "\t" ($2 == "" ? "" : $2 "/") $3}' | \
|
|
${lib.getExe pkgs-unstable.walker} -d -l 2 | \
|
|
xargs ${lib.getExe rbw} get "$@" | ${lib.getExe' wl-clipboard "wl-copy"}
|
|
'')
|
|
];
|
|
|
|
programs = {
|
|
nh = {
|
|
enable = true;
|
|
flake = self;
|
|
};
|
|
dnote.enable = true;
|
|
home-manager.enable = true;
|
|
bat = {
|
|
enable = true;
|
|
extraPackages = with pkgs.bat-extras; [
|
|
batdiff
|
|
batwatch
|
|
];
|
|
config = {
|
|
pager = "less -FR";
|
|
};
|
|
};
|
|
direnv = {
|
|
enable = true;
|
|
nix-direnv.enable = true;
|
|
enableZshIntegration = true;
|
|
};
|
|
mpv = {
|
|
enable = true;
|
|
config = {
|
|
hwdec = "auto-safe";
|
|
vo = "gpu";
|
|
profile = "gpu-hq";
|
|
gpu-context = "wayland";
|
|
};
|
|
};
|
|
kitty = {
|
|
enable = true;
|
|
font = {
|
|
name = "IosevkaTerm NFM";
|
|
size = 14;
|
|
};
|
|
shellIntegration.enableZshIntegration = true;
|
|
themeFile = "Tomorrow_Night";
|
|
settings = {
|
|
hide_window_decorations = true;
|
|
enabled_layouts = "splits,stack";
|
|
};
|
|
keybindings = {
|
|
"kitty_mod+q" = "";
|
|
"kitty_mod+w" = "";
|
|
"kitty_mod+t" = "new_tab_with_cwd";
|
|
"kitty_mod+tab" = "next_tab";
|
|
"kitty_mod+enter" = "launch --location=hsplit --cwd=current";
|
|
"kitty_mod+space" = "launch --location=vsplit --cwd=current";
|
|
"kitty_mod+h" = "neighboring_window left";
|
|
"kitty_mod+l" = "neighboring_window right";
|
|
"kitty_mod+k" = "neighboring_window up";
|
|
"kitty_mod+j" = "neighboring_window down";
|
|
"kitty_mod+1" = "goto_tab 1";
|
|
"kitty_mod+2" = "goto_tab 2";
|
|
"kitty_mod+3" = "goto_tab 3";
|
|
"kitty_mod+4" = "goto_tab 4";
|
|
"kitty_mod+5" = "goto_tab 5";
|
|
"kitty_mod+6" = "goto_tab 6";
|
|
"kitty_mod+7" = "goto_tab 7";
|
|
"kitty_mod+8" = "goto_tab 8";
|
|
"kitty_mod+9" = "goto_tab 9";
|
|
"kitty_mod+0" = "goto_tab 10";
|
|
"kitty_mod+f" = "toggle_layout stack";
|
|
"kitty_mod+/" = "show_scrollback";
|
|
"ctrl+alt+h" = "move_window left";
|
|
"ctrl+alt+l" = "move_window right";
|
|
"ctrl+alt+k" = "move_window up";
|
|
"ctrl+alt+j" = "move_window down";
|
|
"ctrl+alt+enter" = "layout_action rotate";
|
|
};
|
|
};
|
|
vivaldi.enable = true;
|
|
git = {
|
|
enable = true;
|
|
aliases = {
|
|
st = "status";
|
|
co = "checkout";
|
|
b = "branch";
|
|
};
|
|
extraConfig = {
|
|
pull = {
|
|
rebase = "true";
|
|
};
|
|
push = {
|
|
autoSetupRemote = true;
|
|
};
|
|
init = {
|
|
defaultBranch = "main";
|
|
};
|
|
user = {
|
|
name = "Joakim Repomaa";
|
|
signingKey = "F0AF1CE34733B22317A8937D05557F53CD3C6458";
|
|
};
|
|
commit.gpgSign = true;
|
|
};
|
|
};
|
|
gpg = {
|
|
enable = true;
|
|
};
|
|
zsh = {
|
|
enable = true;
|
|
enableVteIntegration = true;
|
|
cdpath = [
|
|
"${config.xdg.configHome}/home-manager"
|
|
];
|
|
defaultKeymap = "viins";
|
|
dirHashes = {
|
|
hm = "${config.xdg.configHome}/home-manager";
|
|
};
|
|
history = {
|
|
path = "${config.home.homeDirectory}/.cache/zsh/history";
|
|
save = 100000;
|
|
size = 100000;
|
|
};
|
|
initContent = ''
|
|
. "${config.xdg.configHome}/zsh/init"
|
|
'';
|
|
};
|
|
lazygit = {
|
|
enable = true;
|
|
settings = {
|
|
gui = {
|
|
nerdFontsVersion = "3";
|
|
};
|
|
git = {
|
|
showUntrackedFiles = "all";
|
|
branchLogCmd = "git log {{branchName}} --first-parent --color=always --pretty=format:'%Cgreen%h%Creset %Cblue%aN%Creset %C(cyan)%<(14)%ar%Creset %s' --abbrev-commit";
|
|
};
|
|
os = {
|
|
edit = "\${EDITOR} -- {{filename}}";
|
|
editAtLine = "\${EDITOR} -- {{filename}}:{{line}}";
|
|
editAtLineAndWait = "\${EDITOR} --wait -- {{filename}}:{{line}}";
|
|
openDirInEditor = "\${EDITOR} -- {{dir}}";
|
|
};
|
|
promptToReturnFromSubprocess = false;
|
|
keybinding = {
|
|
universal = {
|
|
nextItem = "<disabled>";
|
|
prevItem = "<disabled>";
|
|
};
|
|
commits = {
|
|
moveDownCommit = "<down>";
|
|
moveUpCommit = "<up>";
|
|
};
|
|
};
|
|
customCommands = [
|
|
{
|
|
key = "<c-p>";
|
|
context = "global";
|
|
command = ''
|
|
git push --force-with-lease --set-upstream origin "{{.SelectedLocalBranch.Name}}" &&
|
|
gh pr create --title "{{.SelectedLocalBranch.Name}}" -B "$(git config get init.defaultBranch)" --fill ||
|
|
(git log --reverse --no-merges --pretty='- %s' master..HEAD | gh pr edit --body-file -);
|
|
gh pr view --web
|
|
'';
|
|
}
|
|
{
|
|
key = "N";
|
|
context = "localBranches";
|
|
prompts = [
|
|
{
|
|
type = "input";
|
|
title = "New Branch Name:";
|
|
key = "BranchName";
|
|
initialValue = "{{.SelectedLocalBranch.Name}}_review";
|
|
}
|
|
];
|
|
command = ''
|
|
git checkout -b {{.Form.BranchName | quote}}
|
|
'';
|
|
}
|
|
];
|
|
};
|
|
};
|
|
obs-studio.enable = true;
|
|
ssh = {
|
|
enable = true;
|
|
controlMaster = "auto";
|
|
controlPersist = "1h";
|
|
matchBlocks = {
|
|
"*" = {
|
|
extraOptions = {
|
|
ControlPath = "${config.home.homeDirectory}/.ssh/masters-control/%r@%h:%p";
|
|
};
|
|
setEnv = {
|
|
TERM = "screen-256color";
|
|
};
|
|
};
|
|
"apu" = {
|
|
hostname = "apu.tempel-vibes.ts.net";
|
|
user = "root";
|
|
};
|
|
};
|
|
};
|
|
spotify-player = {
|
|
enable = true;
|
|
settings = {
|
|
enable_streaming = "Always";
|
|
theme = "tomorrow_night";
|
|
copy_command = "wl-copy";
|
|
};
|
|
themes = [
|
|
{
|
|
name = "tomorrow_night";
|
|
palette = {
|
|
background = "#1d1f21";
|
|
foreground = "#c5c8c6";
|
|
black = "#000000";
|
|
red = "#cc6666";
|
|
green = "#b5bd68";
|
|
yellow = "#f0c674";
|
|
blue = "#81a2be";
|
|
magenta = "#b294bb";
|
|
cyan = "#8abeb7";
|
|
white = "#ffffff";
|
|
bright_black = "#000000";
|
|
bright_red = "#cc6666";
|
|
bright_green = "#b5bd68";
|
|
bright_yellow = "#f0c674";
|
|
bright_blue = "#81a2be";
|
|
bright_magenta = "#b294bb";
|
|
bright_cyan = "#8abeb7";
|
|
bright_white = "#ffffff";
|
|
};
|
|
component_style = {
|
|
playback_metadata = {
|
|
fg = "#8abeb7";
|
|
};
|
|
playback_progress_bar = {
|
|
bg = "#1d1f21";
|
|
fg = "#c5c8c6";
|
|
};
|
|
};
|
|
}
|
|
];
|
|
};
|
|
neovide = {
|
|
enable = true;
|
|
settings = {
|
|
font = {
|
|
normal = [ "IosevkaTerm NFM" ];
|
|
size = 12.0;
|
|
};
|
|
fork = true;
|
|
};
|
|
};
|
|
hastebin = {
|
|
enable = true;
|
|
settings = {
|
|
host = "https://bin.freun.dev";
|
|
auth_token_file = "${config.xdg.configHome}/hastebin/auth_token";
|
|
clipboard_command = "${pkgs.wl-copy-both}/bin/wl-copy";
|
|
default_renderers =
|
|
let
|
|
code = [
|
|
"js"
|
|
"ts"
|
|
"jsx"
|
|
"tsx"
|
|
"rs"
|
|
"nix"
|
|
"cr"
|
|
"ecr"
|
|
"rb"
|
|
"erb"
|
|
"yaml"
|
|
"yml"
|
|
"json"
|
|
"toml"
|
|
"html"
|
|
"xml"
|
|
"css"
|
|
"scss"
|
|
"sass"
|
|
"less"
|
|
"sql"
|
|
"sh"
|
|
];
|
|
in
|
|
lib.listToAttrs (
|
|
lib.map (name: {
|
|
inherit name;
|
|
value = "hl";
|
|
}) code
|
|
);
|
|
};
|
|
};
|
|
zed-editor = {
|
|
enable = true;
|
|
defaultEditor = true;
|
|
};
|
|
};
|
|
|
|
gnome = {
|
|
keyboard.sources = [ "us+altgr-intl" ];
|
|
keybindings = {
|
|
builtin = {
|
|
screenshot-window = [ ];
|
|
show-screenshot-ui = [ ];
|
|
};
|
|
custom = [
|
|
{
|
|
binding = "Print";
|
|
command = "flameshot gui";
|
|
name = "Flameshot";
|
|
}
|
|
{
|
|
binding = "<Alt>Print";
|
|
command = "kooha";
|
|
name = "Kooha";
|
|
}
|
|
];
|
|
};
|
|
power = {
|
|
powerButton = "hibernate";
|
|
};
|
|
extensions = {
|
|
paperwm = {
|
|
enable = true;
|
|
winprops = [
|
|
{
|
|
wm_class = "vivaldi-stable";
|
|
preferredWidth = "67%";
|
|
}
|
|
{
|
|
wm_class = "yubioath-flutter";
|
|
scratch_layer = true;
|
|
}
|
|
{
|
|
wm_class = "signal";
|
|
scratch_layer = true;
|
|
}
|
|
{
|
|
wm_class = "Slack";
|
|
scratch_layer = true;
|
|
}
|
|
{
|
|
wm_class = "Supersonic";
|
|
scratch_layer = true;
|
|
}
|
|
{
|
|
wm_class = "io.github.seadve.Kooha";
|
|
scratch_layer = true;
|
|
}
|
|
{
|
|
wm_class = "/.*/";
|
|
preferredWidth = "33";
|
|
}
|
|
];
|
|
keybindings = {
|
|
move-down = [
|
|
"<Control><Super>Down"
|
|
"<Shift><Super>j"
|
|
];
|
|
move-left = [
|
|
"<Control><Super>Left"
|
|
"<Shift><Super>h"
|
|
];
|
|
move-right = [
|
|
"<Control><Super>Right"
|
|
"<Shift><Super>l"
|
|
];
|
|
move-up = [
|
|
"<Control><Super>Up"
|
|
"<Shift><Super>k"
|
|
];
|
|
switch-down = [
|
|
"<Super>Down"
|
|
"<Super>j"
|
|
];
|
|
switch-left = [
|
|
"<Super>Left"
|
|
"<Super>h"
|
|
];
|
|
switch-right = [
|
|
"<Super>Right"
|
|
"<Super>l"
|
|
];
|
|
switch-up = [
|
|
"<Super>Up"
|
|
"<Super>k"
|
|
];
|
|
};
|
|
};
|
|
freon = {
|
|
enable = true;
|
|
};
|
|
};
|
|
nightLight.enable = true;
|
|
};
|
|
|
|
fonts.fontconfig = {
|
|
enable = true;
|
|
defaultFonts = {
|
|
emoji = [ "Noto Color Emoji" ];
|
|
monospace = [ "IosevkaTerm NFM" ];
|
|
sansSerif = [ "Source Sans Pro" ];
|
|
};
|
|
};
|
|
|
|
targets.genericLinux.enable = true;
|
|
xdg.mime.enable = true;
|
|
|
|
xdg = {
|
|
enable = true;
|
|
configFile = {
|
|
tmux.source = dotfiles/tmux;
|
|
zsh.source = dotfiles/zsh;
|
|
"fd/ignore".text = ''
|
|
/.git/
|
|
'';
|
|
"vivaldi/NativeMessagingHosts/ff2mpv.json".text = builtins.toJSON {
|
|
name = "ff2mpv";
|
|
description = "ff2mpv's external manifest";
|
|
path = "${pkgs.ff2mpv-rust}/bin/ff2mpv-rust";
|
|
type = "stdio";
|
|
allowed_origins = [
|
|
"chrome-extension://ephjcajbkgplkjmelpglennepbpmdpjg/"
|
|
];
|
|
};
|
|
};
|
|
};
|
|
|
|
# Home Manager can also manage your environment variables through
|
|
# 'home.sessionVariables'. If you don't want to manage your shell through Home
|
|
# Manager then you have to manually source 'hm-session-vars.sh' located at
|
|
# either
|
|
#
|
|
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
|
|
#
|
|
# or
|
|
#
|
|
# ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh
|
|
#
|
|
# or
|
|
#
|
|
# /etc/profiles/per-user/jokke/etc/profile.d/hm-session-vars.sh
|
|
#
|
|
systemd.user.sessionVariables = {
|
|
NIXOS_OZONE_WL = 1;
|
|
NVIM_LISTEN_ADDRESS = "$XDG_RUNTIME_DIR/nvimsocket";
|
|
PAGER = "bat --paging=always --style=plain";
|
|
MANPAGER = "sh -c 'col -bx | bat -l man -p'";
|
|
MANROFFOPT = "-c";
|
|
DO_NOT_TRACK = 1;
|
|
};
|
|
|
|
home.shellAliases = {
|
|
_ = "sudo";
|
|
icr = "crystal i";
|
|
hm = "home-manager";
|
|
chat = "ssh root@ipv4.jokke.space pkill mosh; mosh weechat@ipv4.jokke.space";
|
|
wget = " wget --content-disposition";
|
|
pj = "jq | bat -l json";
|
|
ls = "ls --color=auto";
|
|
};
|
|
|
|
services.gpg-agent = with pkgs; {
|
|
enable = true;
|
|
enableSshSupport = true;
|
|
pinentry.package = pinentry-gnome3;
|
|
};
|
|
|
|
programs.gpg.scdaemonSettings = {
|
|
disable-ccid = true;
|
|
};
|
|
|
|
programs.rbw.enable = true;
|
|
programs.rclone.enable = true;
|
|
|
|
xdg.configFile."autostart/gnome-keyring-ssh.desktop".text = lib.strings.concatLines [
|
|
(builtins.readFile "${pkgs.gnome-keyring}/etc/xdg/autostart/gnome-keyring-ssh.desktop")
|
|
"X-GNOME-Autostart-enabled=false"
|
|
];
|
|
|
|
gnome.automaticTimeZone = true;
|
|
gtk.enable = true;
|
|
|
|
home.pointerCursor = {
|
|
enable = true;
|
|
name = "BreezeX-RosePine-Linux";
|
|
package = pkgs.rose-pine-cursor;
|
|
gtk.enable = true;
|
|
};
|
|
}
|