add my pesterchum flake!

This commit is contained in:
mehbark 2023-11-03 23:41:31 -04:00
parent 3d3275ce8e
commit 1e8414cf73
4 changed files with 131 additions and 35 deletions

View file

@ -52,6 +52,19 @@
"url": "https://flakehub.com/f/edolstra/flake-compat/1.0.1.tar.gz"
}
},
"flake-schemas": {
"locked": {
"narHash": "sha256-j8SR19V1SRysyJwpOBF4TLuAvAjF5t+gMiboN4gYQDU=",
"rev": "764932025c817d4e500a8d2a4d8c565563923d29",
"revCount": 29,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/DeterminateSystems/flake-schemas/0.1.2/018b3da8-4cc3-7fbb-8ff7-1588413c53e2/source.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://flakehub.com/f/DeterminateSystems/flake-schemas/%2A.tar.gz"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
@ -239,6 +252,27 @@
"type": "github"
}
},
"pesterchum": {
"inputs": {
"flake-schemas": "flake-schemas",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1699062698,
"narHash": "sha256-ten2EKAXp9vE6vL0MmirduxJGZvTBhIVe6xDoGt0LEY=",
"ref": "refs/heads/main",
"rev": "bbc1d9e69ea77ceb1163bf20a3d5991397779bd9",
"revCount": 1164,
"type": "git",
"url": "https://g.pyrope.net/pesterchum"
},
"original": {
"type": "git",
"url": "https://g.pyrope.net/pesterchum"
}
},
"root": {
"inputs": {
"fh": "fh",
@ -246,7 +280,8 @@
"home-manager": "home-manager",
"hyprland": "hyprland",
"nixos-generators": "nixos-generators",
"nixpkgs": "nixpkgs_3"
"nixpkgs": "nixpkgs_3",
"pesterchum": "pesterchum"
}
},
"rust-analyzer-src": {

View file

@ -16,12 +16,24 @@
hyprland.url = "github:hyprwm/Hyprland";
pesterchum.url = "git+https://g.pyrope.net/pesterchum";
pesterchum.inputs.nixpkgs.follows = "nixpkgs";
# for l8r :::;)
#homeage.url = "github:jordanisaacs/homeage";
#homeage.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = inputs@{ self, nixpkgs, home-manager, flake-utils, nixos-generators, hyprland, fh, ... }:
outputs = inputs@{
self,
nixpkgs,
home-manager,
flake-utils,
nixos-generators,
hyprland,
fh,
pesterchum,
... }:
let
# :(
# could do like nix-i3, nix-hyprland but that would be LAME
@ -32,7 +44,12 @@
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.mbk = (import ./home.nix) conf;
home-manager.users.mbk = (import ./home.nix) {
inherit conf;
more-packages = [
pesterchum.packages.x86_64-linux.default
];
};
}
{
environment.systemPackages = [ fh.packages.x86_64-linux.default ];

View file

@ -1,7 +1,6 @@
build-conf:
{ conf, more-packages ? [] }:
{ config, pkgs, ... }:
let
conf = build-conf;
wm = conf.wm;
in
{
@ -47,7 +46,7 @@ in
idris2
# emacs like this
# emacs likes this
semgrep
discord
@ -79,7 +78,7 @@ in
# i only need one font :[
nerdfonts
# glow and gum are a good example of something that should really be in a flake.nix or whatever
];
] ++ more-packages;
programs.fish = {
enable = true;
@ -272,11 +271,52 @@ in
enable = true;
};
services.emacs.client.enable = true;
# services.emacs.client.enable = true;
programs.emacs = {
enable = true;
# apparently errors in the config matter?
# extraConfig = builtins.readFile ./init.el;
package = pkgs.emacs29;
extraPackages = epkgs: with epkgs; [
which-key
emacs
all-the-icons-ivy
counsel
gruvbox-theme
lsp-mode
avy
consult
embark
embark-consult
vertico
#vertico-directory
marginalia
corfu
#corfu-popupinfo
corfu-terminal
kind-icon
#eshell
orderless
magit
markdown-mode
yaml-mode
json-mode
eglot
org
org
org-roam
paredit
rainbow-delimiters
geiser-chez
macrostep-geiser
evil
evil-leader
evil-goggles
evil-surround
evil-commentary
evil-org
erc-hl-nicks
];
# apparently errors in the config matter? nvm?
extraConfig = builtins.readFile ./init.el;
};
programs.direnv.enable = true;

54
init.el
View file

@ -860,13 +860,13 @@ If the new path's directories does not exist, create them."
(defun open-init.el ()
(interactive)
(find-file "~/.emacs.d/init.el"))
(defun open-vim-like.el ()
(interactive)
(find-file "~/.emacs.d/extras/vim-like.el"))
(defun open-scheme.el ()
(interactive)
(find-file "~/.emacs.d/extras/scheme.el"))
(find-file "/etc/nixos/init.el"))
;; (defun open-vim-like.el ()
;; (interactive)
;; (find-file "~/.emacs.d/extras/vim-like.el"))
;; (defun open-scheme.el ()
;; (interactive)
;; (find-file "~/.emacs.d/extras/scheme.el"))
; emacs lisp really is a pain, but even this makes me appreciate the POWA
(defun scheme-set-up-two-panels-with-repl-and-editor ()
(interactive)
@ -897,56 +897,60 @@ If the new path's directories does not exist, create them."
(evil-global-set-key 'visual " ssr" 'geiser-eval-region)
)
(defun use-new-config ()
(shell-command "sudo nixos-rebuild switch")
(restart-emacs))
(use-package evil-leader
:ensure t
:config
(global-evil-leader-mode)
(setq evil-leader/leader "<SPC>")
(evil-leader/set-key
; very general
; very general
"w" 'evil-save
; u => unicode
; u => unicode
"u" 'insert-char
"g" 'magit
; mgmt of modes i want to toggle more often
; mgmt of modes i want to toggle more often
"mp" 'paredit-mode
"ms" 'text-scale-adjust
; buffers
; buffers
"be" 'counsel-switch-buffer
;; gonna try to stick to C-w commands
;; "bn" 'evil-buffer
;; "bs" 'evil-split-buffer
;; "bv" 'evil-window
; config mgmt
; config mgmt
"ce" 'open-init.el
; "cev" 'open-vim-like.el
; "ces" 'open-scheme.el
"cr" 'restart-emacs
; "cev" 'open-vim-like.el
; "ces" 'open-scheme.el
"cr" 'use-new-config
; scheme
; si => scheme inferior (avoids conflicts)
; scheme
; si => scheme inferior (avoids conflicts)
"sir" 'geiser-chez
"sil" 'geiser-load-file
"sii" 'scheme-set-up-two-panels-with-repl-and-editor
; ss => scheme send
; ss => scheme send
"sss" 'geiser-eval-last-sexp
;; "ssr" 'geiser-eval-region
"ssd" 'geiser-eval-definition
; ssa => scheme send all
; ssa => scheme send all
"ssa" 'geiser-eval-buffer
; scheme/lispy-editing
; scheme/lispy-editing
"swp" 'paredit-wrap-round
"swb" 'paredit-wrap-square
"swc" 'paredit-wrap-curly
"swa" 'paredit-wrap-angled
; gonna just port most of my vscode stuff even though i don't hate the C-<left> stuff
; gonna just port most of my vscode stuff even though i don't hate the C-<left> stuff
"sh" 'paredit-backward-slurp-sexp
"sl" 'paredit-forward-slurp-sexp
"bh" 'paredit-backward-barf-sexp
@ -958,17 +962,17 @@ If the new path's directories does not exist, create them."
"sH" 'backward-sexp
"sL" 'forward-sexp
; sort of out-of-place feeling
; sort of out-of-place feeling
"sb" 'geiser-squarify
"sd" 'geiser-doc-symbol-at-point
; killing is common enough to be worth its own prefix
; non-lisp killing is more than covered by normal vim stuff lol
; killing is common enough to be worth its own prefix
; non-lisp killing is more than covered by normal vim stuff lol
"kh" 'backward-kill-sexp
"kl" 'kill-sexp
; irc
; irc
"il" 'erc-tls
"ij" 'erc-join-channel
"ic" 'erc-switch-to-buffer