move home configs to root
This commit is contained in:
423
home/common/default.nix
Normal file
423
home/common/default.nix
Normal file
@@ -0,0 +1,423 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
imports = [ ../gnome ../custom-programs ./neovim ];
|
||||
|
||||
# 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
|
||||
yubioath-flutter
|
||||
yubikey-manager
|
||||
gcc
|
||||
sqlite
|
||||
nerdfonts
|
||||
noto-fonts
|
||||
noto-fonts-cjk-sans
|
||||
noto-fonts-color-emoji
|
||||
google-fonts
|
||||
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
|
||||
];
|
||||
|
||||
programs = {
|
||||
nh = {
|
||||
enable = true;
|
||||
flake = "/etc/nixos";
|
||||
};
|
||||
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";
|
||||
};
|
||||
};
|
||||
fb-client = {
|
||||
enable = true;
|
||||
pastebin = "https://p.jokke.space";
|
||||
clipboard_cmd = "${pkgs.wl-copy-both}/bin/wl-copy";
|
||||
};
|
||||
kitty = {
|
||||
enable = true;
|
||||
font = {
|
||||
package = pkgs.nerdfonts;
|
||||
name = "IosevkaTerm NFM";
|
||||
size = 12;
|
||||
};
|
||||
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;
|
||||
};
|
||||
initExtra = ''
|
||||
. "${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 +{{line}} {{filename}}";
|
||||
editAtLineAndWait = "$EDITOR --remote-wait +{{line}} {{filename}}";
|
||||
};
|
||||
customCommands = [
|
||||
{
|
||||
key = "<c-p>";
|
||||
context = "global";
|
||||
command = ''
|
||||
git push --force-with-lease --set-upstream origin "{{.SelectedLocalBranch.Name}}" &&
|
||||
gh pr create --title "{{.SelectedLocalBranch.Name}}" --fill ||
|
||||
(git log --reverse --no-merges --pretty='- %s' master..HEAD | gh pr edit --body-file -);
|
||||
gh pr view --web
|
||||
'';
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
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 = "10.10.0.1";
|
||||
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;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
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" ];
|
||||
};
|
||||
};
|
||||
|
||||
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;
|
||||
pinentryPackage = pinentry-gnome3;
|
||||
};
|
||||
|
||||
programs.gpg.scdaemonSettings = {
|
||||
disable-ccid = 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;
|
||||
}
|
||||
Reference in New Issue
Block a user