diff options
| author | Mike Vink <mike1994vink@gmail.com> | 2023-10-07 01:33:26 +0200 |
|---|---|---|
| committer | Mike Vink <mike1994vink@gmail.com> | 2023-10-07 01:33:26 +0200 |
| commit | a2cbf737e78051c2cb10eeaf4a5dccc19d6348ba (patch) | |
| tree | f53ab92a0c94926e92117891eb87f19cafaa536c /profiles | |
| parent | cfaef26e8718916adcc68fbfb63b15f2389b2cd2 (diff) | |
first working
Diffstat (limited to 'profiles')
| -rw-r--r-- | profiles/core/git.nix | 20 | ||||
| -rw-r--r-- | profiles/core/hm.nix | 4 | ||||
| -rw-r--r-- | profiles/core/home.nix | 221 | ||||
| -rw-r--r-- | profiles/email/gmail.nix | 172 | ||||
| -rw-r--r-- | profiles/email/mailsync.nix | 32 | ||||
| -rw-r--r-- | profiles/email/neomutt.nix | 46 | ||||
| -rw-r--r-- | profiles/email/notmuch.nix | 10 | ||||
| -rw-r--r-- | profiles/station/codeium.nix | 24 | ||||
| -rw-r--r-- | profiles/station/kak-lsp.toml | 428 | ||||
| -rw-r--r-- | profiles/station/kakoune.nix | 33 | ||||
| -rw-r--r-- | profiles/station/meta.nix | 4 | ||||
| -rw-r--r-- | profiles/station/mpv.nix | 2 | ||||
| -rw-r--r-- | profiles/station/neovim.nix | 166 | ||||
| -rw-r--r-- | profiles/station/newsboat.nix | 50 | ||||
| -rw-r--r-- | profiles/station/packages.nix | 17 | ||||
| -rw-r--r-- | profiles/station/suckless.nix | 108 | ||||
| -rw-r--r-- | profiles/station/zathura.nix | 8 |
17 files changed, 452 insertions, 893 deletions
diff --git a/profiles/core/git.nix b/profiles/core/git.nix new file mode 100644 index 0000000..84b165a --- /dev/null +++ b/profiles/core/git.nix @@ -0,0 +1,20 @@ +{config, ...}: { + hm = { + programs.git = { + enable = true; + userName = "Mike Vink"; + userEmail = "mike1994vink@gmail.com"; + extraConfig = { + worktree.guessRemote = true; + mergetool.fugitive.cmd = "vim -f -c \"Gdiff\" \"$MERGED\""; + merge.tool = "fugitive"; + }; + ignores = [ + "/.direnv/" + "/.envrc" + "/.env" + ".vimsession.vim" + ]; + }; + }; +} diff --git a/profiles/core/hm.nix b/profiles/core/hm.nix index e1a29d6..5e56fed 100644 --- a/profiles/core/hm.nix +++ b/profiles/core/hm.nix @@ -1,7 +1,7 @@ -{inputs, config, lib, ...}: { +{inputs, config, lib, ...}: with lib; { imports = [ inputs.home-manager.nixosModules.default - (mkAliasOptionModule [ "hm" ] [ "home-manager" "users" my.username ]) + (mkAliasOptionModule [ "hm" ] [ "home-manager" "users" "mike" ]) ]; system.extraDependencies = collectFlakeInputs inputs.home-manager; diff --git a/profiles/core/home.nix b/profiles/core/home.nix index 5d57f76..4399fe9 100644 --- a/profiles/core/home.nix +++ b/profiles/core/home.nix @@ -1,41 +1,38 @@ -{ + { inputs, config, pkgs, ... }: { - programs.home-manager.enable = true; - home.homeDirectory = "/home/${username}"; - home.username = username; - home.stateVersion = "23.05"; - fonts.fontconfig.enable = true; - xdg = { - enable = true; - configFile = with config.lib.meta; { - "emacs/init.el".source = mkMutableSymlink ./emacs/init.el; - }; - mimeApps = { + hm = { + fonts.fontconfig.enable = true; + xdg = { + enable = true; + configFile = with config.lib.meta; { + "emacs/init.el".source = mkMutableSymlink ./emacs/init.el; + }; + mimeApps = { enable = true; defaultApplications = { - "text/x-shellscript" = ["text.desktop"]; - "x-scheme-handler/magnet" = ["torrent.desktop"]; - "application/x-bittorrent" = ["torrent.desktop"]; - "x-scheme-handler/mailto" = ["mail.desktop"]; - "text/plain" = ["text.desktop"]; - "application/postscript" = ["pdf.desktop"]; - "application/pdf" = ["pdf.desktop"]; - "image/png" = ["img.desktop"]; - "image/jpeg" = ["img.desktop"]; - "image/gif" = ["img.desktop"]; - "application/rss+xml" = ["rss.desktop"]; - "video/x-matroska" = ["video.desktop"]; - "video/mp4" = ["video.desktop"]; - "x-scheme-handler/lbry" = ["lbry.desktop"]; - "inode/directory" = ["file.desktop"]; + "text/x-shellscript" = ["text.desktop"]; + "x-scheme-handler/magnet" = ["torrent.desktop"]; + "application/x-bittorrent" = ["torrent.desktop"]; + "x-scheme-handler/mailto" = ["mail.desktop"]; + "text/plain" = ["text.desktop"]; + "application/postscript" = ["pdf.desktop"]; + "application/pdf" = ["pdf.desktop"]; + "image/png" = ["img.desktop"]; + "image/jpeg" = ["img.desktop"]; + "image/gif" = ["img.desktop"]; + "application/rss+xml" = ["rss.desktop"]; + "video/x-matroska" = ["video.desktop"]; + "video/mp4" = ["video.desktop"]; + "x-scheme-handler/lbry" = ["lbry.desktop"]; + "inode/directory" = ["file.desktop"]; }; - }; - mime.enable = true; - desktopEntries = { + }; + mime.enable = true; + desktopEntries = { text= { type = "Application"; name = "Text editor"; exec = "${pkgs.st}/bin/st -e kak %u"; }; file = { type = "Application"; name = "File Manager"; exec = "${pkgs.st}/bin/st -e lfub %u"; }; torrent = { type = "Application"; name = "Torrent"; exec = "${pkgs.coreutils}/bin/env transadd %U"; }; @@ -44,39 +41,39 @@ mail = { type = "Application"; name = "Mail"; exec = "${pkgs.st}/bin/st -e neomutt %u"; }; pdf = { type = "Application"; name = "PDF reader"; exec = "${pkgs.zathura}/bin/zathura %u"; }; rss = { type = "Application"; name = "RSS feed addition"; exec = "${pkgs.coreutils}/bin/env rssadd %u"; }; + }; }; - }; - programs.ssh = { - enable = true; - matchBlocks = { - "*" = { - identityFile = "${config.home.homeDirectory}/.ssh/id_ed25519"; + programs.ssh = { + enable = true; + matchBlocks = { + "*" = { + identityFile = "${config.users.users.mike.home}/.ssh/id_ed25519"; + }; }; }; - }; - home.sessionVariables = { - EDITOR = "kak"; - TERMINAL = "st"; - }; + home.sessionVariables = { + EDITOR = "kak"; + TERMINAL = "st"; + }; - home.sessionPath = [ - "${config.home.homeDirectory}/.krew/bin" - "${config.home.homeDirectory}/.cargo/bin" - "${pkgs.ncurses}/bin" - ]; + home.sessionPath = [ + "${config.users.users.mike.home}/.krew/bin" + "${config.users.users.mike.home}/.cargo/bin" + "${pkgs.ncurses}/bin" + ]; - programs.starship.enable = true; + programs.starship.enable = true; - programs.direnv = { - enable = true; - nix-direnv.enable = true; - }; + programs.direnv = { + enable = true; + nix-direnv.enable = true; + }; - programs.readline = { - enable = true; - extraConfig = '' + programs.readline = { + enable = true; + extraConfig = '' $if mode=vi set keymap vi-command @@ -88,16 +85,16 @@ Control-l: clear-screen $endif ''; - }; + }; - programs.emacs = { - enable = true; - package = pkgs.emacs29; - }; + programs.emacs = { + enable = true; + package = pkgs.emacs29; + }; - programs.tmux = { - enable = true; - extraConfig = '' + programs.tmux = { + enable = true; + extraConfig = '' set-option -g default-shell ${pkgs.bashInteractive}/bin/bash set -s set-clipboard on setw -g mouse on @@ -109,7 +106,7 @@ # set -g prefix C-space # bind C-space send-prefix - bind-key R source ${config.xdg.configHome}/tmux/tmux.conf; display-message "sourced ${config.xdg.configHome}/tmux/tmux.conf!" + bind-key R source ${config.hm.xdg.configHome}/tmux/tmux.conf; display-message "sourced ${config.hm.xdg.configHome}/tmux/tmux.conf!" set-window-option -g mode-keys vi bind-key -T copy-mode-vi v send -X begin-selection @@ -137,11 +134,11 @@ bind -n C-s run-shell tmux-normal-mode bind -n C-q run-shell 'tmux-normal-mode --quit' ''; - }; + }; - programs.bash = { - enable = true; - bashrcExtra = '' + programs.bash = { + enable = true; + bashrcExtra = '' export PATH=$PATH:$HOME/.local/bin [[ -f ~/.cache/wal/sequences ]] && (cat ~/.cache/wal/sequences &) unset LD_PRELOAD @@ -157,57 +154,38 @@ export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) gpgconf --launch gpg-agent ''; - shellAliases = { - e = "kakup "; - es = "kakup -f"; - k9s = "k9s"; - k = "kubectl "; - d = "docker "; - ls = "ls --color=auto"; - s = "sudo nixos-rebuild switch --flake ${config.home.homeDirectory}/flake#"; - b = "/run/current-system/bin/switch-to-configuration boot"; - h = "home-manager switch --flake ${config.home.homeDirectory}/flake --impure"; - fa = "azdo-switch-project"; - v = "nvim"; - V = "nvim -S .vimsession.vim"; - M = "xrandr --output HDMI1 --auto --output eDP1 --off"; - m = "xrandr --output eDP1 --auto --output HDMI1 --off"; - mM = "xrandr --output eDP1 --auto --output HDMI1 --off"; - newflake = "nix flake new -t ~/flake "; - ansible-flake = "nix flake new -t ~/flake#ansible "; - go-flake = "nix flake new -t ~/flake#go "; - lock-pass = "gpgconf --kill gpg-agent"; - }; - }; - - programs.nushell.enable = true; - - programs.git = { - enable = true; - userName = "Mike Vink"; - userEmail = email; - extraConfig = { - worktree.guessRemote = true; - mergetool.fugitive.cmd = "vim -f -c \"Gdiff\" \"$MERGED\""; - merge.tool = "fugitive"; + shellAliases = { + e = "kakup "; + es = "kakup -f"; + k9s = "k9s"; + k = "kubectl "; + d = "docker "; + ls = "ls --color=auto"; + s = "sudo nixos-rebuild switch --flake ${config.users.users.mike.home}/flake#"; + b = "/run/current-system/bin/switch-to-configuration boot"; + h = "home-manager switch --flake ${config.users.users.mike.home}/flake --impure"; + fa = "azdo-switch-project"; + v = "nvim"; + V = "nvim -S .vimsession.vim"; + M = "xrandr --output HDMI1 --auto --output eDP1 --off"; + m = "xrandr --output eDP1 --auto --output HDMI1 --off"; + mM = "xrandr --output eDP1 --auto --output HDMI1 --off"; + newflake = "nix flake new -t ~/flake "; + ansible-flake = "nix flake new -t ~/flake#ansible "; + go-flake = "nix flake new -t ~/flake#go "; + lock-pass = "gpgconf --kill gpg-agent"; + }; }; - ignores = [ - "/.direnv/" - "/.envrc" - "/.env" - ".vimsession.vim" - ]; - }; # https://github.com/drduh/config/blob/master/gpg.conf # https://www.gnupg.org/documentation/manuals/gnupg/GPG-Configuration-Options.html # https://www.gnupg.org/documentation/manuals/gnupg/GPG-Esoteric-Options.html - programs.gpg = { - enable = true; - scdaemonSettings = { + programs.gpg = { + enable = true; + scdaemonSettings = { disable-ccid = true; - }; - settings = { + }; + settings = { personal-cipher-preferences = "AES256 AES192 AES"; personal-digest-preferences = "SHA512 SHA384 SHA256"; personal-compress-preferences = "ZLIB BZIP2 ZIP Uncompressed"; @@ -228,15 +206,16 @@ no-symkey-cache = true; use-agent = true; throw-keyids = true; + }; + }; + services.gpg-agent = { + enable = true; + enableSshSupport = true; + defaultCacheTtl = 34550000; + maxCacheTtl = 34550000; + }; + programs.password-store = { + enable = true; }; - }; - services.gpg-agent = { - enable = true; - enableSshSupport = true; - defaultCacheTtl = 34550000; - maxCacheTtl = 34550000; - }; - programs.password-store = { - enable = true; }; } diff --git a/profiles/email/gmail.nix b/profiles/email/gmail.nix index fa5d44e..6f2f7df 100644 --- a/profiles/email/gmail.nix +++ b/profiles/email/gmail.nix @@ -4,112 +4,114 @@ pkgs, ... }: { - accounts.email = { - maildirBasePath = "${config.xdg.dataHome}/mail"; - accounts = { - gmail = { - primary = true; - realName = "Mike Vink"; - userName = "mike1994vink@gmail.com"; - address = "mike1994vink@gmail.com"; - passwordCommand = ["${pkgs.pass}/bin/pass" "personal/neomutt"]; - imap = { host = "imap.gmail.com"; port = 993; tls = { enable = true; }; }; - smtp = { host = "smtp.gmail.com"; port = 587; tls = { enable = true; useStartTls = true; }; }; - msmtp = { + hm = { + accounts.email = { + maildirBasePath = "${config.hm.xdg.dataHome}/mail"; + accounts = { + gmail = { + primary = true; + realName = "Mike Vink"; + userName = "mike1994vink@gmail.com"; + address = "mike1994vink@gmail.com"; + passwordCommand = ["${pkgs.pass}/bin/pass" "personal/neomutt"]; + imap = { host = "imap.gmail.com"; port = 993; tls = { enable = true; }; }; + smtp = { host = "smtp.gmail.com"; port = 587; tls = { enable = true; useStartTls = true; }; }; + msmtp = { enable = true; - }; - neomutt = { - enable = true; - sendMailCommand = "msmtp -a gmail"; - mailboxName = "=== mike1994vink ==="; - extraConfig = '' + }; + neomutt = { + enable = true; + sendMailCommand = "msmtp -a gmail"; + mailboxName = "=== mike1994vink ==="; + extraConfig = '' set spoolfile='Inbox' unvirtual-mailboxes * ''; - }; - mbsync = { - enable = true; - create = "both"; remove = "both"; expunge = "both"; - groups = { - gmail = { + }; + mbsync = { + enable = true; + create = "both"; remove = "both"; expunge = "both"; + groups = { + gmail = { channels = { - Inbox = { farPattern = "INBOX"; nearPattern = "INBOX"; extraConfig = { Create = "Near"; Expunge = "Both"; }; }; - Archive = { farPattern = "[Gmail]/All Mail"; nearPattern = "Archive"; extraConfig = { Create = "Near"; Expunge = "Both"; }; }; - Spam = { farPattern = "[Gmail]/Spam"; nearPattern = "Spam"; extraConfig = { Create = "Near"; Expunge = "Both"; }; }; - Trash = { farPattern = "[Gmail]/Bin"; nearPattern = "Trash"; extraConfig = { Create = "Near"; Expunge = "Both"; }; }; - Important = { farPattern = "[Gmail]/Important"; nearPattern = "Important"; extraConfig = { Create = "Near"; Expunge = "Both"; }; }; - Sent = { farPattern = "[Gmail]/Sent Mail"; nearPattern = "Sent"; extraConfig = { Create = "Near"; Expunge = "Both"; }; }; - FarDrafts = { farPattern = "[Gmail]/Drafts"; nearPattern = "FarDrafts"; extraConfig = { Create = "Near"; Expunge = "Both"; }; }; + Inbox = { farPattern = "INBOX"; nearPattern = "INBOX"; extraConfig = { Create = "Near"; Expunge = "Both"; }; }; + Archive = { farPattern = "[Gmail]/All Mail"; nearPattern = "Archive"; extraConfig = { Create = "Near"; Expunge = "Both"; }; }; + Spam = { farPattern = "[Gmail]/Spam"; nearPattern = "Spam"; extraConfig = { Create = "Near"; Expunge = "Both"; }; }; + Trash = { farPattern = "[Gmail]/Bin"; nearPattern = "Trash"; extraConfig = { Create = "Near"; Expunge = "Both"; }; }; + Important = { farPattern = "[Gmail]/Important"; nearPattern = "Important"; extraConfig = { Create = "Near"; Expunge = "Both"; }; }; + Sent = { farPattern = "[Gmail]/Sent Mail"; nearPattern = "Sent"; extraConfig = { Create = "Near"; Expunge = "Both"; }; }; + FarDrafts = { farPattern = "[Gmail]/Drafts"; nearPattern = "FarDrafts"; extraConfig = { Create = "Near"; Expunge = "Both"; }; }; }; + }; }; }; - }; - notmuch = { - enable = true; - neomutt = { + notmuch = { enable = true; - virtualMailboxes = [ - { name = "Inbox"; query = "folder:/gmail/ tag:inbox"; } - { name = "Archive"; query = "folder:/gmail/ tag:archive"; } - { name = "Sent"; query = "folder:/gmail/ tag:sent"; } - { name = "Spam"; query = "folder:/gmail/ tag:spam"; } - { name = "Trash"; query = "folder:/gmail/ tag:trash"; } - { name = "Jobs"; query = "folder:/gmail/ tag:jobs"; } - { name = "Houses"; query = "folder:/gmail/ tag:houses"; } - { name = "Development"; query = "folder:/gmail/ tag:dev"; } - ]; + neomutt = { + enable = true; + virtualMailboxes = [ + { name = "Inbox"; query = "folder:/gmail/ tag:inbox"; } + { name = "Archive"; query = "folder:/gmail/ tag:archive"; } + { name = "Sent"; query = "folder:/gmail/ tag:sent"; } + { name = "Spam"; query = "folder:/gmail/ tag:spam"; } + { name = "Trash"; query = "folder:/gmail/ tag:trash"; } + { name = "Jobs"; query = "folder:/gmail/ tag:jobs"; } + { name = "Houses"; query = "folder:/gmail/ tag:houses"; } + { name = "Development"; query = "folder:/gmail/ tag:dev"; } + ]; + }; }; }; - }; - family = { - primary = false; - realName = "Natalia & Mike Vink"; - userName = "natalia.mike.vink@gmail.com"; - address = "natalia.mike.vink@gmail.com"; - passwordCommand = ["${pkgs.pass}/bin/pass" "personal/neomutt-family"]; - imap = { host = "imap.gmail.com"; port = 993; tls = { enable = true; }; }; - smtp = { host = "smtp.gmail.com"; port = 587; tls = { enable = true; useStartTls = true; }; }; - msmtp = { + family = { + primary = false; + realName = "Natalia & Mike Vink"; + userName = "natalia.mike.vink@gmail.com"; + address = "natalia.mike.vink@gmail.com"; + passwordCommand = ["${pkgs.pass}/bin/pass" "personal/neomutt-family"]; + imap = { host = "imap.gmail.com"; port = 993; tls = { enable = true; }; }; + smtp = { host = "smtp.gmail.com"; port = 587; tls = { enable = true; useStartTls = true; }; }; + msmtp = { enable = true; - }; - neomutt = { - enable = true; - sendMailCommand = "msmtp -a gmail"; - mailboxName = "=== family ==="; - extraConfig = '' + }; + neomutt = { + enable = true; + sendMailCommand = "msmtp -a gmail"; + mailboxName = "=== family ==="; + extraConfig = '' set spoolfile='Inbox' unvirtual-mailboxes * ''; - }; + }; - mbsync = { - enable = true; - create = "both"; remove = "both"; expunge = "both"; - groups = { - family = { + mbsync = { + enable = true; + create = "both"; remove = "both"; expunge = "both"; + groups = { + family = { channels = { - Inbox = { farPattern = "INBOX"; nearPattern = "INBOX"; extraConfig = { Create = "Near"; Expunge = "Both"; }; }; - Archive = { farPattern = "[Gmail]/All Mail"; nearPattern = "Archive"; extraConfig = { Create = "Near"; Expunge = "Both"; }; }; - Spam = { farPattern = "[Gmail]/Spam"; nearPattern = "Spam"; extraConfig = { Create = "Near"; Expunge = "Both"; }; }; - Trash = { farPattern = "[Gmail]/Bin"; nearPattern = "Trash"; extraConfig = { Create = "Near"; Expunge = "Both"; }; }; - Important = { farPattern = "[Gmail]/Important"; nearPattern = "Important"; extraConfig = { Create = "Near"; Expunge = "Both"; }; }; - Sent = { farPattern = "[Gmail]/Sent Mail"; nearPattern = "Sent"; extraConfig = { Create = "Near"; Expunge = "Both"; }; }; - FarDrafts = { farPattern = "[Gmail]/Drafts"; nearPattern = "FarDrafts"; extraConfig = { Create = "Near"; Expunge = "Both"; }; }; + Inbox = { farPattern = "INBOX"; nearPattern = "INBOX"; extraConfig = { Create = "Near"; Expunge = "Both"; }; }; + Archive = { farPattern = "[Gmail]/All Mail"; nearPattern = "Archive"; extraConfig = { Create = "Near"; Expunge = "Both"; }; }; + Spam = { farPattern = "[Gmail]/Spam"; nearPattern = "Spam"; extraConfig = { Create = "Near"; Expunge = "Both"; }; }; + Trash = { farPattern = "[Gmail]/Bin"; nearPattern = "Trash"; extraConfig = { Create = "Near"; Expunge = "Both"; }; }; + Important = { farPattern = "[Gmail]/Important"; nearPattern = "Important"; extraConfig = { Create = "Near"; Expunge = "Both"; }; }; + Sent = { farPattern = "[Gmail]/Sent Mail"; nearPattern = "Sent"; extraConfig = { Create = "Near"; Expunge = "Both"; }; }; + FarDrafts = { farPattern = "[Gmail]/Drafts"; nearPattern = "FarDrafts"; extraConfig = { Create = "Near"; Expunge = "Both"; }; }; }; + }; }; }; - }; - notmuch = { - enable = true; - neomutt = { + notmuch = { enable = true; - virtualMailboxes = [ - { name = "Inbox"; query = "folder:/family/ tag:inbox"; } - { name = "Archive"; query = "folder:/family/ tag:archive"; } - { name = "Sent"; query = "folder:/family/ tag:sent"; } - { name = "Spam"; query = "folder:/family/ tag:spam"; } - { name = "Trash"; query = "folder:/family/ tag:trash"; } - ]; + neomutt = { + enable = true; + virtualMailboxes = [ + { name = "Inbox"; query = "folder:/family/ tag:inbox"; } + { name = "Archive"; query = "folder:/family/ tag:archive"; } + { name = "Sent"; query = "folder:/family/ tag:sent"; } + { name = "Spam"; query = "folder:/family/ tag:spam"; } + { name = "Trash"; query = "folder:/family/ tag:trash"; } + ]; + }; }; }; }; diff --git a/profiles/email/mailsync.nix b/profiles/email/mailsync.nix index 3fcb0c5..8504e39 100644 --- a/profiles/email/mailsync.nix +++ b/profiles/email/mailsync.nix @@ -4,31 +4,33 @@ pkgs, ... }: { - programs.mbsync = { + hm = { + programs.mbsync = { enable = true; - }; - systemd.user.timers.mailsync = { + }; + systemd.user.timers.mailsync = { Unit = { - Description = "daemon that syncs mail"; + Description = "daemon that syncs mail"; }; Timer = { - OnBootSec = "5m"; - OnUnitActiveSec = "5m"; - Unit = "mailsync.service"; + OnBootSec = "5m"; + OnUnitActiveSec = "5m"; + Unit = "mailsync.service"; }; Install = { - WantedBy = [ "timers.target" ]; + WantedBy = [ "timers.target" ]; }; - }; - systemd.user.services.mailsync = { + }; + systemd.user.services.mailsync = { Unit = { - Description = "daemon that syncs mail"; + Description = "daemon that syncs mail"; }; Service = { - Type = "oneshot"; - RemainAfterExit = "no"; - ExecSearchPath = "${config.home.profileDirectory}/bin:/run/current-system/sw/bin"; - ExecStart = "${pkgs.coreutils}/bin/env mailsync"; + Type = "oneshot"; + RemainAfterExit = "no"; + ExecSearchPath = "${config.hm.home.profileDirectory}/bin:/run/current-system/sw/bin"; + ExecStart = "${pkgs.coreutils}/bin/env mailsync"; }; + }; }; } diff --git a/profiles/email/neomutt.nix b/profiles/email/neomutt.nix index 384173f..4106f5b 100644 --- a/profiles/email/neomutt.nix +++ b/profiles/email/neomutt.nix @@ -4,11 +4,12 @@ pkgs, ... }: { - programs.msmtp = { + hm = { + programs.msmtp = { enable = true; - }; + }; - xdg.configFile."neomutt/mailcap" = { + xdg.configFile."neomutt/mailcap" = { text = '' text/plain; $EDITOR %s ; text/html; openfile %s ; nametemplate=%s.html @@ -21,15 +22,15 @@ application/pgp-keys; gpg --import '%s'; copiousoutput; application/x-subrip; $EDITOR %s ; ''; - }; + }; - programs.neomutt = { - enable = true; - sort = "reverse-date"; - sidebar = { + programs.neomutt = { enable = true; - }; - extraConfig = '' + sort = "reverse-date"; + sidebar = { + enable = true; + }; + extraConfig = '' set use_threads=yes set send_charset="us-ascii:utf-8" set mailcap_path = $HOME/.config/neomutt/mailcap @@ -145,7 +146,7 @@ mono body bold "^gpg: BAD signature from.*" color body red default "([a-z][a-z0-9+-]*://(((([a-z0-9_.!~*'();:&=+$,-]|%[0-9a-f][0-9a-f])*@)?((([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?|[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)(:[0-9]+)?)|([a-z0-9_.!~*'()$,;:@&=+-]|%[0-9a-f][0-9a-f])+)(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?(#([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?|(www|ftp)\\.(([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?(:[0-9]+)?(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?(#([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?)[^].,:;!)? \t\r\n<>\"]" ''; - binds = [ + binds = [ { map = ["index" "pager"]; key = "x"; action = "modify-labels"; } { map = ["index" "pager"]; key = "i"; action = "noop"; } { map = ["index" "pager"]; key = "g"; action = "noop"; } @@ -183,16 +184,17 @@ { map = ["pager"]; key = "\031"; action = "previous-line"; } { map = ["pager"]; key = "\005"; action = "next-line"; } { map = ["editor"]; key = "<Tab>"; action = "complete-query"; } - ]; - macros = [ - { map = ["index"]; key = "X"; action = "<save-message>=Spam<enter>y"; } - { map = ["index"]; key = "A"; action = "<modify-labels-then-hide>+archive -unread -inbox<enter><mark-message>z<enter><change-folder>^<enter>'z"; } - { map = ["index"]; key = "h"; action = "<mark-message>z<enter><change-folder>^<enter>'z"; } - { map = ["index"]; key = "D"; action = "<delete-message>"; } - { map = ["index" "pager"]; key = "S"; action = "<sync-mailbox>!notmuch-hook &<enter>"; } - { map = ["index"]; key = "c"; action = "<change-vfolder>?"; } - { map = ["index"]; key = "\\\\"; action = "<vfolder-from-query>"; } - { map = ["browser"]; key = "h"; action = "<change-dir><kill-line>..<enter>"; } - ]; + ]; + macros = [ + { map = ["index"]; key = "X"; action = "<save-message>=Spam<enter>y"; } + { map = ["index"]; key = "A"; action = "<modify-labels-then-hide>+archive -unread -inbox<enter><mark-message>z<enter><change-folder>^<enter>'z"; } + { map = ["index"]; key = "h"; action = "<mark-message>z<enter><change-folder>^<enter>'z"; } + { map = ["index"]; key = "D"; action = "<delete-message>"; } + { map = ["index" "pager"]; key = "S"; action = "<sync-mailbox>!notmuch-hook &<enter>"; } + { map = ["index"]; key = "c"; action = "<change-vfolder>?"; } + { map = ["index"]; key = "\\\\"; action = "<vfolder-from-query>"; } + { map = ["browser"]; key = "h"; action = "<change-dir><kill-line>..<enter>"; } + ]; + }; }; } diff --git a/profiles/email/notmuch.nix b/profiles/email/notmuch.nix index 3b182c7..e317616 100644 --- a/profiles/email/notmuch.nix +++ b/profiles/email/notmuch.nix @@ -4,19 +4,21 @@ pkgs, ... }: { - programs.notmuch = { + hm = { + programs.notmuch = { enable = true; new = { - tags = ["new"]; - ignore = [".mbsyncstate" ".uidvalidity"]; + tags = ["new"]; + ignore = [".mbsyncstate" ".uidvalidity"]; }; search.excludeTags = ["deleted" "spam"]; maildir.synchronizeFlags = true; extraConfig = { - database.path = "${config.xdg.dataHome}/mail"; + database.path = "${config.hm.xdg.dataHome}/mail"; user.name = "Mike Vink"; user.primary_email = "mike1994vink@gmail.com"; crypto.gpg_path="gpg"; }; + }; }; } diff --git a/profiles/station/codeium.nix b/profiles/station/codeium.nix index f3841b3..f63a9b3 100644 --- a/profiles/station/codeium.nix +++ b/profiles/station/codeium.nix @@ -43,16 +43,16 @@ }; }; in { - home.activation = { - # links codeium into place - codium-symlink = inputs.home-manager.lib.hm.dag.entryAfter ["writeBoundary"] '' - CODEIUM_TARGET="${config.home.homeDirectory}/.codeium/bin/c8fda9657259bb7f3d432c1b558db921db4257aa" - if [ -L $CODEIUM_TARGET ] && [ -e $CODEIUM_TARGET ]; then - $DRY_RUN_CMD echo "codeium linked" - else - mkdir -p $CODEIUM_TARGET - $DRY_RUN_CMD ln -sf ${codeium} "$CODEIUM_TARGET/language_server_linux_x64" - fi - ''; - }; + # home.activation = { + # # links codeium into place + # codium-symlink = inputs.home-manager.lib.hm.dag.entryAfter ["writeBoundary"] '' + # CODEIUM_TARGET="${config.home.homeDirectory}/.codeium/bin/c8fda9657259bb7f3d432c1b558db921db4257aa" + # if [ -L $CODEIUM_TARGET ] && [ -e $CODEIUM_TARGET ]; then + # $DRY_RUN_CMD echo "codeium linked" + # else + # mkdir -p $CODEIUM_TARGET + # $DRY_RUN_CMD ln -sf ${codeium} "$CODEIUM_TARGET/language_server_linux_x64" + # fi + # ''; + # }; } diff --git a/profiles/station/kak-lsp.toml b/profiles/station/kak-lsp.toml deleted file mode 100644 index b0592cf..0000000 --- a/profiles/station/kak-lsp.toml +++ /dev/null @@ -1,428 +0,0 @@ -snippet_support = true -verbosity = 2 - -[server] -# exit session if no requests were received during given period in seconds -# set to 0 to disable -timeout = 1800 # seconds = 30 minutes - -[language.bash] -filetypes = ["sh"] -roots = [".git", ".hg"] -command = "bash-language-server" -args = ["start"] - -[language.c_cpp] -filetypes = ["c", "cpp"] -roots = ["compile_commands.json", ".clangd", ".git", ".hg"] -command = "clangd" - -[language.clojure] -filetypes = ["clojure"] -roots = ["project.clj", ".git", ".hg"] -command = "clojure-lsp" -settings_section = "_" -[language.clojure.settings._] -# See https://clojure-lsp.io/settings/#all-settings -# source-paths-ignore-regex = ["resources.*", "target.*"] - -[language.cmake] -filetypes = ["cmake"] -roots = ["CMakeLists.txt", ".git", ".hg"] -command = "cmake-language-server" - -[language.crystal] -filetypes = ["crystal"] -roots = ["shard.yml"] -command = "crystalline" - -[language.css] -filetypes = ["css"] -roots = ["package.json", ".git", ".hg"] -command = "vscode-css-languageserver" -args = ["--stdio"] - -[language.less] -filetypes = ["less"] -roots = ["package.json", ".git", ".hg"] -command = "vscode-css-languageserver" -args = ["--stdio"] - -[language.scss] -filetypes = ["scss"] -roots = ["package.json", ".git", ".hg"] -command = "vscode-css-languageserver" -args = ["--stdio"] - -[language.d] -filetypes = ["d", "di"] -roots = [".git", "dub.sdl", "dub.json"] -command = "dls" - -[language.dart] -# start shell to find path to dart analysis server source -filetypes = ["dart"] -roots = ["pubspec.yaml", ".git", ".hg"] -command = "sh" -args = ["-c", "dart $(dirname $(command -v dart))/snapshots/analysis_server.dart.snapshot --lsp"] - -[language.elixir] -filetypes = ["elixir"] -roots = ["mix.exs"] -command = "elixir-ls" -settings_section = "elixirLS" -[language.elixir.settings.elixirLS] -# See https://github.com/elixir-lsp/elixir-ls/blob/master/apps/language_server/lib/language_server/server.ex -# dialyzerEnable = true - -[language.elm] -filetypes = ["elm"] -roots = ["elm.json"] -command = "elm-language-server" -args = ["--stdio"] -settings_section = "elmLS" -[language.elm.settings.elmLS] -# See https://github.com/elm-tooling/elm-language-server#server-settings -runtime = "node" -elmPath = "elm" -elmFormatPath = "elm-format" -elmTestPath = "elm-test" - -[language.elvish] -filetypes = ["elvish"] -roots = [".git", ".hg"] -command = "elvish" -args = ["-lsp"] - -[language.erlang] -filetypes = ["erlang"] -# See https://github.com/erlang-ls/erlang_ls.git for more information and -# how to configure. This default config should work in most cases though. -roots = ["rebar.config", "erlang.mk", ".git", ".hg"] -command = "erlang_ls" - -[language.go] -filetypes = ["go"] -roots = ["Gopkg.toml", "go.mod", ".git", ".hg"] -command = "gopls" -settings_section = "gopls" -[language.go.settings.gopls] -# See https://github.com/golang/tools/blob/master/gopls/doc/settings.md -# "build.buildFlags" = [] - -[language.haskell] -filetypes = ["haskell"] -roots = ["hie.yaml", "cabal.project", "Setup.hs", "stack.yaml", "*.cabal"] -command = "haskell-language-server-wrapper" -args = ["--lsp"] -settings_section = "_" -[language.haskell.settings._] -# See https://haskell-language-server.readthedocs.io/en/latest/configuration.html -# haskell.formattingProvider = "ormolu" - -[language.html] -filetypes = ["html"] -roots = ["package.json"] -command = "vscode-html-languageserver" -args = ["--stdio"] - -# # Commented out by default because you still need to set the paths in the JDT -# # Language Server arguments below before this can become a valid configuration. -# [language.java] -# filetypes = ["java"] -# roots = [".git", "mvnw", "gradlew"] -# command = "java" -# args = [ -# "-Declipse.application=org.eclipse.jdt.ls.core.id1", -# "-Dosgi.bundles.defaultStartLevel=4", -# "-Declipse.product=org.eclipse.jdt.ls.core.product", -# "-Dlog.level=ALL", -# "-Dfile.encoding=utf-8", -# "--add-modules=ALL-SYSTEM", -# "--add-opens", -# "java.base/java.util=ALL-UNNAMED", -# "--add-opens", -# "java.base/java.lang=ALL-UNNAMED", -# "-noverify", -# "-Xmx1G", -# "-jar", -# "/path/to/eclipse.jdt.ls/repository/plugins/org.eclipse.equinox.launcher_1.6.100.v20201223-0822.jar", -# "-configuration", -# "/path/to/eclipse.jdt.ls/repository/config_linux", -# "-data", -# "/path/to/eclipse-workspace", -# ] -# [language.java.settings] -# # See https://github.dev/eclipse/eclipse.jdt.ls -# # "java.format.insertSpaces" = true - -[language.jsx] # works for javascript as well -filetypes = ["javascript"] -roots = ["package.json", "tsconfig.json", ".git", ".hg"] -command = "typescript-language-server" -args = ["--stdio"] - -[language.json] -filetypes = ["json"] -roots = ["package.json"] -command = "vscode-json-languageserver" -args = ["--stdio"] - -# Requires Julia package "LanguageServer" -# Run: `julia --project=@kak-lsp -e 'import Pkg; Pkg.add("LanguageServer")'` to install it -# Configuration adapted from https://github.com/neovim/nvim-lspconfig/blob/bcebfac7429cd8234960197dca8de1767f3ef5d3/lua/lspconfig/julials.lua -[language.julia] -filetypes = ["julia"] -roots = ["Project.toml", ".git", ".hg"] -command = "julia" -args = [ - "--startup-file=no", - "--history-file=no", - "-e", - """ - ls_install_path = joinpath(get(DEPOT_PATH, 1, joinpath(homedir(), ".julia")), "environments", "kak-lsp"); - pushfirst!(LOAD_PATH, ls_install_path); - using LanguageServer; - popfirst!(LOAD_PATH); - depot_path = get(ENV, "JULIA_DEPOT_PATH", ""); - buffer_file = ENV["kak_buffile"]; - project_path = let - dirname(something( - # 1. Check if there is an explicitly set project - Base.load_path_expand(( - p = get(ENV, "JULIA_PROJECT", nothing); - p === nothing ? nothing : isempty(p) ? nothing : p - )), - # 2. Check for Project.toml in current working directory - Base.current_project(pwd()), - # 3. Check for Project.toml from buffer's full file path excluding the file name - Base.current_project(dirname(buffer_file)), - # 4. Fallback to global environment - Base.active_project() - )) - end - server = LanguageServer.LanguageServerInstance(stdin, stdout, project_path, depot_path); - server.runlinter = true; - run(server); - """, -] -[language.julia.settings] -# See https://github.com/julia-vscode/LanguageServer.jl/blob/master/src/requests/workspace.jl -# Format options. See https://github.com/julia-vscode/DocumentFormat.jl/blob/master/src/DocumentFormat.jl -# "julia.format.indent" = 4 -# Lint options. See https://github.com/julia-vscode/StaticLint.jl/blob/master/src/linting/checks.jl -# "julia.lint.call" = true -# Other options, see https://github.com/julia-vscode/LanguageServer.jl/blob/master/src/requests/workspace.jl -# "julia.lint.run" = "true" - -[language.latex] -filetypes = ["latex"] -roots = [".git", ".hg"] -command = "texlab" -settings_section = "texlab" -[language.latex.settings.texlab] -# See https://github.com/latex-lsp/texlab/wiki/Configuration -# -# Preview configuration for zathura with SyncTeX search. -# For other PDF viewers see https://github.com/latex-lsp/texlab/wiki/Previewing -forwardSearch.executable = "zathura" -forwardSearch.args = [ - "%p", - "--synctex-forward", # Support texlab-forward-search - "%l:1:%f", - "--synctex-editor-command", # Inverse search: use Control+Left-Mouse-Button to jump to source. - """ - sh -c ' - echo " - evaluate-commands -client %opt{texlab_client} %{ - evaluate-commands -try-client %opt{jumpclient} %{ - edit -- %{input} %{line} - } - } - " | kak -p $kak_session - ' - """, -] - -[language.lua] -filetypes = ["lua"] -roots = [".git", ".hg"] -command = "lua-language-server" -[language.lua.settings.Lua] -# See https://github.com/sumneko/vscode-lua/blob/master/setting/schema.json -# diagnostics.enable = true - -[language.nim] -filetypes = ["nim"] -roots = ["*.nimble", ".git", ".hg"] -command = "nimlsp" - -[language.nix] -filetypes = ["nix"] -roots = ["flake.nix", "shell.nix", ".git", ".hg"] -command = "rnix-lsp" - -[language.ocaml] -filetypes = ["ocaml"] -# Often useful to simply do a `touch dune-workspace` in your project root folder if you have problems with root detection -roots = ["dune-workspace", "dune-project", "Makefile", "opam", "*.opam", "esy.json", ".git", ".hg", "dune"] -command = "ocamllsp" - -[language.php] -filetypes = ["php"] -roots = [".htaccess", "composer.json"] -command = "intelephense" -args = ["--stdio"] -settings_section = "intelephense" -[language.php.settings] -intelephense.storagePath = "/tmp/intelephense" - -[language.proto] -filetypes = ["protobuf"] -roots = [".git", ".hg"] -command = "pls" # https://github.com/lasorda/protobuf-language-server - -[language.python] -filetypes = ["python"] -roots = ["requirements.txt", "setup.py", ".git", ".hg"] -command = "pyright-langserver" -args = ["--stdio"] -settings_section = "_" -[language.python.settings.python.analysis] -autoSearchPaths = true -diagnosticMode = "workspace" -useLibraryCodeForTypes = true - - -[language.r] -filetypes = ["r"] -roots = ["DESCRIPTION", ".git", ".hg"] -command = "R" -args = ["--slave", "-e", "languageserver::run()"] - -[language.racket] -filetypes = ["racket"] -roots = ["info.rkt"] -command = "racket" -args = ["-l", "racket-langserver"] - -[language.reason] -filetypes = ["reason"] -roots = ["package.json", "Makefile", ".git", ".hg"] -command = "ocamllsp" - -[language.ruby] -filetypes = ["ruby"] -roots = ["Gemfile"] -command = "solargraph" -args = ["stdio"] -settings_section = "_" -[language.ruby.settings._] -# See https://github.com/castwide/solargraph/blob/master/lib/solargraph/language_server/host.rb -# diagnostics = false - -# [language.rust] -# filetypes = ["rust"] -# roots = ["Cargo.toml"] -# command = "sh" -# args = [ -# "-c", -# """ -# if path=$(rustup which rls 2>/dev/null); then -# "$path" -# else -# rls -# fi -# """, -# ] -# [language.rust.settings.rust] -# # See https://github.com/rust-lang/rls#configuration -# # features = [] - -[language.rust] -filetypes = ["rust"] -roots = ["Cargo.toml"] -command = "sh" -args = [ - "-c", - """ - if path=$(rustup which rust-analyzer 2>/dev/null); then - "$path" - else - rust-analyzer - fi - """, -] -settings_section = "rust-analyzer" -[language.rust.settings.rust-analyzer] -# See https://rust-analyzer.github.io/manual.html#configuration -hoverActions.enable = false # kak-lsp doesn't support this at the moment -# cargo.features = [] - -[language.terraform] -filetypes = ["terraform"] -roots = ["*.tf"] -command = "terraform-ls" -args = ["serve"] -[language.terraform.settings.terraform-ls] -# See https://github.com/hashicorp/terraform-ls/blob/main/docs/SETTINGS.md -# rootModulePaths = [] - -[language.tsx] # works for typescript as well -filetypes = ["typescript"] -roots = ["package.json", "tsconfig.json", ".git", ".hg"] -command = "typescript-language-server" -args = ["--stdio"] - -# [language.typescript] -# filetypes = ["typescript"] -# roots = ["package.json", "tsconfig.json", ".git", ".hg"] -# command = "deno" -# args = ["lsp"] -# [language.typescript.settings.deno] -# enable = true -# lint = true - -[language.yaml] -filetypes = ["yaml"] -roots = [".git", ".hg"] -command = "yaml-language-server" -args = ["--stdio"] -[language.yaml.settings] -# See https://github.com/redhat-developer/yaml-language-server#language-server-settings -# Defaults are at https://github.com/redhat-developer/yaml-language-server/blob/master/src/yamlSettings.ts -# yaml.format.enable = true - -[language.zig] -filetypes = ["zig"] -roots = ["build.zig"] -command = "zls" - -[language.cs] -filetypes = ["cs"] -roots = [".git"] -command = "OmniSharp" -args = ["--encoding", "utf-8", "-z", "--languageserver", "DotNet:enablePackageRestore=false", "FormattingOptions:EnableEditorConfigSupport=true", "Sdk:IncludePrereleases=true"] - -# Semantic tokens support -# See https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_semanticTokens -# for the default list of tokens and modifiers. -# However, many language servers implement their own values. -# Make sure to check the output of `lsp-capabilities` and each server's documentation and source code as well. -# Examples: -# - TypeScript: https://github.com/microsoft/vscode-languageserver-node/blob/main/client/src/common/semanticTokens.ts -# - Rust Analyzer: https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/syntax_highlighting.rs -[semantic_tokens] -faces = [ - {face="documentation", token="comment", modifiers=["documentation"]}, - {face="comment", token="comment"}, - {face="function", token="function"}, - {face="keyword", token="keyword"}, - {face="module", token="namespace"}, - {face="operator", token="operator"}, - {face="string", token="string"}, - {face="type", token="type"}, - {face="default+d", token="variable", modifiers=["readonly"]}, - {face="default+d", token="variable", modifiers=["constant"]}, - {face="variable", token="variable"}, -] diff --git a/profiles/station/kakoune.nix b/profiles/station/kakoune.nix index 41caf9f..010e4c4 100644 --- a/profiles/station/kakoune.nix +++ b/profiles/station/kakoune.nix @@ -6,30 +6,13 @@ ... }: let - kakouneWithPlugins = pkgs.wrapKakoune pkgs.kakoune-unwrapped { configure = { plugins = with pkgs.kakounePlugins; [kak-lsp parinfer-rust]; }; }; + kakouneWithPlugins = pkgs.wrapKakoune pkgs.kakoune-unwrapped { + configure = { + plugins = with pkgs.kakounePlugins; [kak-lsp parinfer-rust]; + }; + }; in { - home.packages = [kakouneWithPlugins]; - home.activation = { - kakoune-symlink = inputs.home-manager.lib.hm.dag.entryAfter ["writeBoundary"] '' - KAK_CONFIG="${config.home.homeDirectory}/kakoune" - XDG_CONFIG_HOME_KAK="${config.xdg.configHome}/kak" - if [ -L $XDG_CONFIG_HOME_KAK ] && [ -e $XDG_CONFIG_HOME_KAK ]; then - $DRY_RUN_CMD echo "kakoune linked" - else - $DRY_RUN_CMD ln -s $KAK_CONFIG $XDG_CONFIG_HOME_KAK - fi - rm -rf $XDG_CONFIG_HOME_KAK/autoload/default - ln -sf ${kakouneWithPlugins}/share/kak/autoload $XDG_CONFIG_HOME_KAK/autoload/default - ''; - }; - home.file."${config.xdg.configHome}/kak-lsp/kak-lsp.toml" = { - source = ./kak-lsp.toml; - }; - - #set global windowing_modules "" - #require-module tmux - #require-module tmux-repl - #alias global terminal tmux-terminal-vertical - #alias global sp new - + hm = { + home.packages = [kakouneWithPlugins]; + }; } diff --git a/profiles/station/meta.nix b/profiles/station/meta.nix index e6f3a78..3f1d334 100644 --- a/profiles/station/meta.nix +++ b/profiles/station/meta.nix @@ -1,8 +1,8 @@ {inputs,lib,config, ...}: with lib; { lib.meta = { - configPath = "${config.home.homeDirectory}/flake"; + configPath = "${config.users.users.mike.home}/flake"; mkMutableSymlink = path: - config.lib.file.mkOutOfStoreSymlink + config.hm.lib.file.mkOutOfStoreSymlink (config.lib.meta.configPath + removePrefix (toString inputs.self) (toString path)); }; } diff --git a/profiles/station/mpv.nix b/profiles/station/mpv.nix index 1b673ab..b5a9fce 100644 --- a/profiles/station/mpv.nix +++ b/profiles/station/mpv.nix @@ -5,6 +5,7 @@ pkgs, ... }: { + hm = { programs.mpv = { enable = true; scripts = [ @@ -44,4 +45,5 @@ S="cycle sub"; }; }; + }; } diff --git a/profiles/station/neovim.nix b/profiles/station/neovim.nix index 8957c89..afe85dd 100644 --- a/profiles/station/neovim.nix +++ b/profiles/station/neovim.nix @@ -4,101 +4,93 @@ pkgs, ... }: { - home.activation = { - # fixes hotpot cannot be found error after updates - clearHotpotCache = inputs.home-manager.lib.hm.dag.entryAfter ["writeBoundary"] '' - HOTPOT_CACHE="${config.xdg.cacheHome}/nvim/hotpot" - if [[ -d "$HOTPOT_CACHE" ]]; then - $DRY_RUN_CMD rm -rf "$VERBOSE_ARG" "$HOTPOT_CACHE" - fi - ''; - }; - - xdg = { - configFile = with config.lib.meta; { - "nvim".source = mkMutableSymlink ../neovim; + hm = { + xdg = { + configFile = with config.lib.meta; { + "nvim".source = mkMutableSymlink ../neovim; + }; }; - }; - editorconfig = { - enable = true; - settings = { - "*" = { - trim_trailing_whitespace = true; - insert_final_newline = true; - }; - "*.yaml" = { - indent_style = "space"; - indent_size = 2; + editorconfig = { + enable = true; + settings = { + "*" = { + trim_trailing_whitespace = true; + insert_final_newline = true; + }; + "*.yaml" = { + indent_style = "space"; + indent_size = 2; + }; }; }; - }; - programs.neovim = { - enable = true; - package = pkgs.neovim-unwrapped; - viAlias = true; - vimAlias = true; - extraPackages = with pkgs; [ - bashInteractive - sumneko-lua-language-server - pyright - gopls - fennel - fnlfmt - alejandra - statix - ]; - plugins = with pkgs.vimPlugins; [ - # highlighting - nvim-treesitter.withAllGrammars - nvim-treesitter-context - playground - gruvbox-material - kanagawa-nvim - lsp_lines-nvim - heirline-nvim - gitsigns-nvim - noice-nvim - nui-nvim - vim-helm + programs.neovim = { + enable = true; + package = pkgs.neovim-unwrapped; + viAlias = true; + vimAlias = true; + extraPackages = with pkgs; [ + bashInteractive + sumneko-lua-language-server + pyright + gopls + fennel + fnlfmt + alejandra + statix + ]; + plugins = with pkgs.vimPlugins; [ + # highlighting + nvim-treesitter.withAllGrammars + nvim-treesitter-context + playground + gruvbox-material + kanagawa-nvim + lsp_lines-nvim + heirline-nvim + gitsigns-nvim + noice-nvim + nui-nvim + vim-helm - # external - git-worktree-nvim - vim-dirvish - vim-fugitive - vim-dispatch - vim-oscyank - venn-nvim - gv-vim + # external + git-worktree-nvim + vim-dirvish + vim-fugitive + vim-dispatch + vim-oscyank + venn-nvim + gv-vim - # Coding - plenary-nvim - telescope-nvim - nvim-lspconfig - null-ls-nvim - lsp_signature-nvim - omnisharp-extended-lsp-nvim - nvim-dap - nvim-dap-ui - luasnip - vim-test - vim-rest-console - harpoon + # Coding + plenary-nvim + telescope-nvim + nvim-lspconfig + null-ls-nvim + lsp_signature-nvim + omnisharp-extended-lsp-nvim + nvim-dap + nvim-dap-ui + luasnip + vim-test + vim-rest-console + harpoon - # cmp - nvim-cmp - cmp-cmdline - cmp-nvim-lsp - cmp-buffer - cmp-path - cmp_luasnip + # cmp + nvim-cmp + cmp-cmdline + cmp-nvim-lsp + cmp-buffer + cmp-path + cmp_luasnip - # trying out lisp - conjure - vim-racket - nvim-parinfer - hotpot-nvim - ]; + # trying out lisp + conjure + vim-racket + nvim-parinfer + hotpot-nvim + ]; + }; }; } diff --git a/profiles/station/newsboat.nix b/profiles/station/newsboat.nix index fc47060..e9ae445 100644 --- a/profiles/station/newsboat.nix +++ b/profiles/station/newsboat.nix @@ -1,28 +1,29 @@ {...}: { - programs.newsboat = { - enable = true; - autoReload = true; - urls = [ - {url = "https://github.com/neovim/neovim/releases.atom";} - {url = "https://github.com/rancher/rancher/releases.atom";} - {url = "https://github.com/istio/istio/releases.atom";} - {url = "https://github.com/argoproj/argo-cd/releases.atom";} - {url = "https://github.com/argoproj/argo-cd/releases.atom";} - {url = "https://github.com/kyverno/kyverno/releases.atom";} - {url = "https://github.com/hashicorp/terraform/releases.atom";} - {url = "https://github.com/ansible/ansible/releases.atom";} - {url = "https://github.com/ansible/awx/releases.atom";} - {url = "https://kubeshark.co/rss.xml";} - {url = "https://azurecomcdn.azureedge.net/en-us/updates/feed/?product=azure-devops";} - {url = "https://www.hashicorp.com/blog/categories/products-technology/feed.xml";} - {url = "https://kubernetes.io/feed.xml";} - {url = "https://www.cncf.io/rss";} - {url = "https://blog.alexellis.io/rss/";} - {url = "https://www.openfaas.com/feed";} - {url = "https://istio.io/latest/blog/feed.xml";} - {url = "https://www.youtube.com/feeds/videos.xml?channel_id=UCUyeluBRhGPCW4rPe_UvBZQ";} - ]; - extraConfig = '' + hm = { + programs.newsboat = { + enable = true; + autoReload = true; + urls = [ + {url = "https://github.com/neovim/neovim/releases.atom";} + {url = "https://github.com/rancher/rancher/releases.atom";} + {url = "https://github.com/istio/istio/releases.atom";} + {url = "https://github.com/argoproj/argo-cd/releases.atom";} + {url = "https://github.com/argoproj/argo-cd/releases.atom";} + {url = "https://github.com/kyverno/kyverno/releases.atom";} + {url = "https://github.com/hashicorp/terraform/releases.atom";} + {url = "https://github.com/ansible/ansible/releases.atom";} + {url = "https://github.com/ansible/awx/releases.atom";} + {url = "https://kubeshark.co/rss.xml";} + {url = "https://azurecomcdn.azureedge.net/en-us/updates/feed/?product=azure-devops";} + {url = "https://www.hashicorp.com/blog/categories/products-technology/feed.xml";} + {url = "https://kubernetes.io/feed.xml";} + {url = "https://www.cncf.io/rss";} + {url = "https://blog.alexellis.io/rss/";} + {url = "https://www.openfaas.com/feed";} + {url = "https://istio.io/latest/blog/feed.xml";} + {url = "https://www.youtube.com/feeds/videos.xml?channel_id=UCUyeluBRhGPCW4rPe_UvBZQ";} + ]; + extraConfig = '' #show-read-feeds no auto-reload yes @@ -79,5 +80,6 @@ highlight article ":.*\\(image\\)$" blue default highlight article ":.*\\(embedded flash\\)$" magenta default ''; + }; }; } diff --git a/profiles/station/packages.nix b/profiles/station/packages.nix index 02c5b8e..19e7ad1 100644 --- a/profiles/station/packages.nix +++ b/profiles/station/packages.nix @@ -2,7 +2,6 @@ flake, config, pkgs, - username, ... }: let core-packages = with pkgs; @@ -65,8 +64,7 @@ sxiv nushell sent - ] - ++ (import ../shell-scripts.nix {inherit pkgs config;}); + ]; mike-extra-packages = with pkgs; [ (nerdfonts.override {fonts = ["FiraCode"];}) noto-fonts @@ -80,11 +78,10 @@ libreoffice ]; in { - home.packages = - core-packages - ++ ( - if (username == "mike") - then mike-extra-packages - else [] - ); + hm = { + home.packages = + core-packages + ++ + mike-extra-packages; + }; } diff --git a/profiles/station/suckless.nix b/profiles/station/suckless.nix index d10414d..a7145d8 100644 --- a/profiles/station/suckless.nix +++ b/profiles/station/suckless.nix @@ -6,68 +6,70 @@ ... }: let in { - xsession = { - enable = true; - initExtra = '' + hm = { + xsession = { + enable = true; + initExtra = '' ${pkgs.xorg.xmodmap}/bin/xmodmap -e "remove mod1 = Alt_R" ${pkgs.xorg.xmodmap}/bin/xmodmap -e "add mod3 = Alt_R" wal -R dwm dwmblocks & ''; - }; - services.picom = { - enable = true; - activeOpacity = 0.99; - inactiveOpacity = 0.7; - opacityRules = [ - "100:class_g = 'dwm'" - "100:name *= 'Firefox'" - "100:name *= 'mpv'" - "100:name *= 'LibreWolf'" - ]; - settings = { - inactive-opacity-override = false; - frame-opacity = 1; }; - }; - services.dunst = { - enable = true; - settings = { - global = { - monitor = 0; - follow = "keyboard"; - width = 370; - height = 350; - offset = "0x19"; - padding = 2; - horizontal_padding = 2; - transparency = 25; - font = "Monospace 12"; - format = "<b>%s</b>\\n%b"; - }; - urgency_low = { - background = "#1d2021"; - foreground = "#928374"; - timeout = 3; + services.picom = { + enable = true; + activeOpacity = 0.99; + inactiveOpacity = 0.7; + opacityRules = [ + "100:class_g = 'dwm'" + "100:name *= 'Firefox'" + "100:name *= 'mpv'" + "100:name *= 'LibreWolf'" + ]; + settings = { + inactive-opacity-override = false; + frame-opacity = 1; }; - urgency_normal = { - foreground = "#ebdbb2"; - background = "#458588"; - timeout = 5; - }; - urgency_critical = { - background = "#1cc24d"; - foreground = "#ebdbb2"; - frame_color = "#fabd2f"; - timeout = 10; + }; + services.dunst = { + enable = true; + settings = { + global = { + monitor = 0; + follow = "keyboard"; + width = 370; + height = 350; + offset = "0x19"; + padding = 2; + horizontal_padding = 2; + transparency = 25; + font = "Monospace 12"; + format = "<b>%s</b>\\n%b"; + }; + urgency_low = { + background = "#1d2021"; + foreground = "#928374"; + timeout = 3; + }; + urgency_normal = { + foreground = "#ebdbb2"; + background = "#458588"; + timeout = 5; + }; + urgency_critical = { + background = "#1cc24d"; + foreground = "#ebdbb2"; + frame_color = "#fabd2f"; + timeout = 10; + }; }; }; + home.packages = with pkgs; [ + st + dwm + dwmblocks + libnotify + ]; }; - home.packages = with pkgs; [ - st - dwm - dwmblocks - libnotify - ]; } diff --git a/profiles/station/zathura.nix b/profiles/station/zathura.nix index 198f039..084214c 100644 --- a/profiles/station/zathura.nix +++ b/profiles/station/zathura.nix @@ -4,9 +4,10 @@ pkgs, ... }: { - programs.zathura = { - enable = true; - extraConfig = '' + hm = { + programs.zathura = { + enable = true; + extraConfig = '' set sandbox none set statusbar-h-padding 0 set statusbar-v-padding 0 @@ -23,5 +24,6 @@ map p print map g goto top ''; + }; }; } |
