From ba64b8a0b95636faabf2f79aa77924b849ec5dae Mon Sep 17 00:00:00 2001 From: Carsten Kragelund Date: Sat, 18 Feb 2023 22:51:43 +0100 Subject: [PATCH] Major rework --- hosts/eagle/default.nix | 7 -- hosts/eagle/pkgs.nix | 11 ---- hosts/falcon/default.nix | 10 +-- hosts/falcon/pkgs.nix | 11 ---- users/carsten/conf/default.nix | 2 +- users/carsten/conf/direnv.nix | 4 +- users/carsten/conf/doom/config.el | 10 ++- users/carsten/conf/doom/init.el | 4 +- users/carsten/conf/emacs.nix | 7 +- users/carsten/conf/mpd.nix | 8 +++ users/carsten/conf/ssh.nix | 7 +- users/carsten/conf/xdg.nix | 26 +++++--- users/carsten/default.nix | 3 +- users/carsten/pkgs/areon-pro/default.nix | 29 ++++++++ users/carsten/pkgs/default.nix | 84 +++++++++++++++++------- 15 files changed, 136 insertions(+), 87 deletions(-) create mode 100644 users/carsten/conf/mpd.nix create mode 100644 users/carsten/pkgs/areon-pro/default.nix diff --git a/hosts/eagle/default.nix b/hosts/eagle/default.nix index f2afd1f..52cf426 100644 --- a/hosts/eagle/default.nix +++ b/hosts/eagle/default.nix @@ -77,13 +77,6 @@ pulse.enable = true; }; - # Pinentry / GPG - programs.gnupg.agent = { - enable = true; - pinentryFlavor = "gtk2"; - enableSSHSupport = true; - }; - security.pam.loginLimits = [ # Unlimited amount of processes for root { diff --git a/hosts/eagle/pkgs.nix b/hosts/eagle/pkgs.nix index ed83a4d..d24b7ea 100644 --- a/hosts/eagle/pkgs.nix +++ b/hosts/eagle/pkgs.nix @@ -4,22 +4,11 @@ imports = [ ]; environment.systemPackages = with pkgs; [ - #(firefox-devedition-bin.override { wmClass = "firefox-aurora"; }) - dconf git - git-lfs - gnomeExtensions.color-picker - gnomeExtensions.just-perfection - gnomeExtensions.unite - gnupg home-manager ntfsprogs - pinentry-gtk2 pipewire pulseaudio - unzip - vim wget - wireplumber ]; } diff --git a/hosts/falcon/default.nix b/hosts/falcon/default.nix index 827994b..30fdb16 100644 --- a/hosts/falcon/default.nix +++ b/hosts/falcon/default.nix @@ -77,13 +77,6 @@ pulse.enable = true; }; - # Pinentry / GPG - programs.gnupg.agent = { - enable = true; - pinentryFlavor = "gtk2"; - enableSSHSupport = true; - }; - security.pam.loginLimits = [ # Unlimited amount of processes for root { @@ -103,6 +96,9 @@ networkmanager.enable = true; hostName = "falcon"; nameservers = [ "192.168.1.1" "87.62.97.64" ]; + extraHosts = '' + 127.0.0.3 local.pid1.sh + ''; }; services.xserver = { diff --git a/hosts/falcon/pkgs.nix b/hosts/falcon/pkgs.nix index ed83a4d..d24b7ea 100644 --- a/hosts/falcon/pkgs.nix +++ b/hosts/falcon/pkgs.nix @@ -4,22 +4,11 @@ imports = [ ]; environment.systemPackages = with pkgs; [ - #(firefox-devedition-bin.override { wmClass = "firefox-aurora"; }) - dconf git - git-lfs - gnomeExtensions.color-picker - gnomeExtensions.just-perfection - gnomeExtensions.unite - gnupg home-manager ntfsprogs - pinentry-gtk2 pipewire pulseaudio - unzip - vim wget - wireplumber ]; } diff --git a/users/carsten/conf/default.nix b/users/carsten/conf/default.nix index 1ff0fc7..60351d8 100644 --- a/users/carsten/conf/default.nix +++ b/users/carsten/conf/default.nix @@ -6,6 +6,6 @@ ./gnome.nix ./ssh.nix ./xdg.nix - ./boxxy.nix + ./mpd.nix ]; } diff --git a/users/carsten/conf/direnv.nix b/users/carsten/conf/direnv.nix index ad6ab1b..8bdb06a 100644 --- a/users/carsten/conf/direnv.nix +++ b/users/carsten/conf/direnv.nix @@ -1,7 +1,7 @@ { config, lib, pkgs, ... }: { - config.programs.bash.initExtra = '' - eval "$(direnv hook bash)" + config.programs.zsh.initExtra = '' + eval "$(direnv hook zsh)" ''; } diff --git a/users/carsten/conf/doom/config.el b/users/carsten/conf/doom/config.el index 6045262..67913dc 100644 --- a/users/carsten/conf/doom/config.el +++ b/users/carsten/conf/doom/config.el @@ -21,9 +21,10 @@ ;; See 'C-h v doom-font' for documentation and more examples of what they ;; accept. For example: ;; -;;(setq doom-font (font-spec :family "Fira Code" :size 12 :weight 'semi-light) -;; doom-variable-pitch-font (font-spec :family "Fira Sans" :size 13)) -;; +(setq doom-font (font-spec :family "Rec Mono Nyx" :size 20 :weight 'Regular) + doom-big-font (font-spec :family "Rec Mono Nyx" :size 36 :weight 'Regular) + doom-variable-pitch-font (font-spec :family "Recursive" :style "Sans Casual" :weight 'Regular) + doom-serif-font (font-spec :family "AreonPro" :weight 'Regular)) ;; If you or Emacs can't find your font, use 'M-x describe-font' to look them ;; up, `M-x eval-region' to execute elisp code, and 'M-x doom/reload-font' to ;; refresh your font settings. If Emacs still can't find your font, it likely @@ -43,6 +44,7 @@ ;; change `org-directory'. It must be set before org loads! + ;; Whenever you reconfigure a package, make sure to wrap your config in an ;; `after!' block, otherwise Doom's defaults may override your settings. E.g. ;; @@ -75,6 +77,8 @@ ;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how ;; they are implemented. +(add-to-list 'load-path "~/source/org-mode") + (defun ctp/org-heading-colors () (face-remap-add-relative 'org-level-1 (list :foreground (catppuccin-get-color 'blue))) (face-remap-add-relative 'org-level-2 (list :foreground (catppuccin-get-color 'red))) diff --git a/users/carsten/conf/doom/init.el b/users/carsten/conf/doom/init.el index cff601c..5d2905a 100644 --- a/users/carsten/conf/doom/init.el +++ b/users/carsten/conf/doom/init.el @@ -182,8 +182,8 @@ ;;(wanderlust +gmail) :app - ;;calendar - ;;emms + calendar + emms ;;everywhere ; *leave* Emacs!? You must be joking ;;irc ; how neckbeards socialize ;;(rss +org) ; emacs as an RSS reader diff --git a/users/carsten/conf/emacs.nix b/users/carsten/conf/emacs.nix index 416b816..dcfbd8c 100644 --- a/users/carsten/conf/emacs.nix +++ b/users/carsten/conf/emacs.nix @@ -1,5 +1,5 @@ { config, pkgs, lib, ... }: { - config.home = { + home = { sessionPath = [ "${config.xdg.configHome}/emacs/bin" ]; sessionVariables = { DOOMDIR = "${config.xdg.configHome}/doom"; @@ -7,8 +7,9 @@ DOOMPROFILELOADFILE = "${config.xdg.configHome}/doom-local/profiles.el"; }; }; + systemd.user.sessionVariables = config.home.sessionVariables; - config.xdg.configFile = { + xdg.configFile = { "doom" = { source = ./doom; onChange = "${pkgs.writeShellScript "doom-change" '' @@ -20,7 +21,6 @@ ${config.xdg.configHome}/emacs/bin/doom install else ${config.xdg.configHome}/emacs/bin/doom sync -u -e - ${config.xdg.configHome}/emacs/bin/doom env -a SSH_AUTH_SOCK fi ''}"; }; @@ -39,7 +39,6 @@ ${config.xdg.configHome}/emacs/bin/doom install else ${config.xdg.configHome}/emacs/bin/doom sync -u -e - ${config.xdg.configHome}/emacs/bin/doom env -a SSH_AUTH_SOCK fi ''}"; }; diff --git a/users/carsten/conf/mpd.nix b/users/carsten/conf/mpd.nix new file mode 100644 index 0000000..818f289 --- /dev/null +++ b/users/carsten/conf/mpd.nix @@ -0,0 +1,8 @@ +{ config, lib, pkgs, ... }: + +{ + services.mpd = { + enable = true; + network.startWhenNeeded = true; + }; +} diff --git a/users/carsten/conf/ssh.nix b/users/carsten/conf/ssh.nix index 6ccb87e..affd69a 100644 --- a/users/carsten/conf/ssh.nix +++ b/users/carsten/conf/ssh.nix @@ -3,12 +3,7 @@ , pkgs , ... } : { - config.services.gpg-agent = { - enable = true; - sshKeys = [ "64AB8617FA4EC63E93A4E1A94AE9B14AF64A86C6" ]; - }; - - config.programs.bash.initExtra = '' + config.programs.zsh.initExtra = '' SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) ''; } diff --git a/users/carsten/conf/xdg.nix b/users/carsten/conf/xdg.nix index 7e3e5b0..96618cc 100644 --- a/users/carsten/conf/xdg.nix +++ b/users/carsten/conf/xdg.nix @@ -3,28 +3,34 @@ , pkgs , ... }: { xdg = { + enable = true; + cacheHome = "${config.home.homeDirectory}/.cache"; + configHome = "${config.home.homeDirectory}/.config"; + dataHome = "${config.home.homeDirectory}/.local/share"; + stateHome = "${config.home.homeDirectory}/.local/state"; + + userDirs = { enable = true; createDirectories = true; # Improve the XDG dir locations so they dont clutter up $HOME - download = "$HOME/downloads"; - desktop = "$HOME/desktop"; - documents = "$HOME/desktop/documents"; + download = "${config.home.homeDirectory}/downloads"; + desktop = "${config.home.homeDirectory}/desktop"; + documents = "${config.home.homeDirectory}/desktop/documents"; - publicShare = "$HOME/.local/share/public"; - templates = "$HOME/.local/share/templates"; + publicShare = "${config.home.homeDirectory}/.local/share/public"; + templates = "${config.home.homeDirectory}/.local/share/templates"; - music = "$HOME/media/music"; - pictures = "$HOME/media/pictures"; - videos = "$HOME/media/videos"; + music = "${config.home.homeDirectory}/media/music"; + pictures = "${config.home.homeDirectory}/media/pictures"; + videos = "${config.home.homeDirectory}/media/videos"; }; }; home.sessionVariables = { CARGO_HOME = "${config.xdg.dataHome}/cargo"; - GNUPGHOME = "${config.xdg.dataHome}/gnupg"; - HISTFILE = "${config.xdg.dataHome}/bash/histfile"; WGETRC = "${config.xdg.dataHome}/wget/wgetrc"; + XCOMPOSECACHE = "${config.xdg.cacheHome}/X11/xcompose"; }; } diff --git a/users/carsten/default.nix b/users/carsten/default.nix index 53f51fa..99a7b2c 100644 --- a/users/carsten/default.nix +++ b/users/carsten/default.nix @@ -12,6 +12,7 @@ "networkmanager" # Use networks "wheel" # Sudoer ]; + shell = pkgs.zsh; packages = [ ]; }; @@ -27,4 +28,4 @@ homeDirectory = "/home/carsten"; }; }; -} \ No newline at end of file +} diff --git a/users/carsten/pkgs/areon-pro/default.nix b/users/carsten/pkgs/areon-pro/default.nix new file mode 100644 index 0000000..b3bcf7e --- /dev/null +++ b/users/carsten/pkgs/areon-pro/default.nix @@ -0,0 +1,29 @@ +{ pkgs +, lib +, stdenv +}: stdenv.mkDerivation rec { + pname = "areon-pro"; + version = "1.0.0"; + + src = ./fonts; + + outputs = [ "out" ]; + phases = [ "installPhase" ]; + + installPhase = '' + mkdir -p $out/share/fonts/truetype/ + cp ${src}/* $out/share/fonts/truetype/ + ''; + + meta = with lib; { + description = "Areon Pro Font"; + homepage = "https://morisawafonts.com/fonts/621/"; + license = { + fullName = "Unkown"; + url = "https://morisawafonts.com/fonts/621/"; + free = false; + }; + maintainers = with maintainers; [ nyxkrage ]; + platforms = platforms.all; + }; +} diff --git a/users/carsten/pkgs/default.nix b/users/carsten/pkgs/default.nix index 1822a39..94923f8 100644 --- a/users/carsten/pkgs/default.nix +++ b/users/carsten/pkgs/default.nix @@ -1,7 +1,18 @@ { pkgs, config, ... }: { imports = [ ]; - programs.bash.enable = true; + programs.zsh = { + enable = true; + dotDir = ".config/zsh"; + history = { + size = 10000; + path = "${config.xdg.dataHome}/zsh/zsh_history"; + }; + initExtra = '' + PROMPT='%n@%m %~ %# ' + ''; + }; + programs.emacs = { enable = true; package = pkgs.emacsGit; @@ -13,52 +24,81 @@ ]; }; + programs.gpg = { + enable = true; + homedir = "${config.xdg.dataHome}/gnupg"; + }; + + services.gpg-agent = { + enable = true; + pinentryFlavor = "gtk2"; + enableSshSupport = true; + sshKeys = [ "64AB8617FA4EC63E93A4E1A94AE9B14AF64A86C6" "C54678A60A531F2144EC2391CF888696261ED167" ]; + }; + services.lorri.enable = true; home.packages = with pkgs; [ - (let - boxedFirefox = writeShellScriptBin "firefox-devedition" '' - exec boxxy ${firefox-devedition-bin}/bin/firefox-devedition $@ - ''; - in - pkgs.symlinkJoin { - name = "firefox-devedition-bin"; - paths = [ - boxedFirefox - (firefox-devedition-bin.override { wmClass = "firefox-aurora"; }) - ]; - }) + # (let + # boxedFirefox = writeShellScriptBin "firefox-devedition" '' + # exec boxxy ${firefox-devedition-bin}/bin/firefox-devedition $@ + # ''; + # in + # pkgs.symlinkJoin { + # name = "firefox-devedition-bin"; + # paths = [ + # boxedFirefox + # (firefox-devedition-bin.override { wmClass = "firefox-aurora"; }) + # ]; + # }) - catppuccin-gtk - bat (discord.override { withOpenASAR = true; }) + (firefox-devedition-bin.override { wmClass = "firefox-aurora"; }) + (ripgrep.override { withPCRE2 = true; }) + bat + catppuccin-gtk + dconf direnv dogdns duf exa fd + git-lfs + gnomeExtensions.color-picker + gnomeExtensions.just-perfection + gnomeExtensions.unite + gnupg gparted jq mcfly + numberstation pavucontrol - (ripgrep.override { withPCRE2 = true; }) - yq + pinentry-gtk2 recursive - numberstation + unzip + wireplumber + yq # Local - (callPackage ./rec-mono-nyx.nix {}) + (callPackage ./areon-pro {}) (callPackage ./boxxy.nix {}) + (callPackage ./rec-mono-nyx.nix {}) # Rust + cargo + gcc llvmPackages_latest.lld llvmPackages_latest.llvm rustc - cargo - gcc + + # JS + nodejs + nodePackages.npm + + # Music + mpc-cli # language-servers rust-analyzer - nodePackages.javascript-typescript-langserver ]; }