Compare commits

...

116 Commits
lufta ... main

Author SHA1 Message Date
Cadey Ratio 4f07dc21cd le bump 2023-07-09 12:21:06 -04:00
Cadey Ratio 379905b00b update ip addresses
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-07-09 09:19:39 -04:00
Cadey Ratio 98d72b1a88 unfuck
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-07-06 16:38:39 -04:00
Cadey Ratio 3084a56163 update flake lock
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-07-06 14:12:26 -04:00
Cadey Ratio ae7c1d4c95 enable postgres configs
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-06-20 11:21:11 -04:00
Cadey Ratio 05c345c09e xe-chatgpt: add ability to ask chatgpt something about a given code snippet
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-06-20 10:11:33 -04:00
Cadey Ratio dc78767751 use nix-community nixos-vscode-server
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-06-16 14:36:19 -04:00
Cadey Ratio e9caa0bc05 update
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-06-15 14:10:06 -04:00
Cadey Ratio 91be7a4d79 set goimports location
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-06-15 14:03:33 -04:00
Cadey Ratio 57bd0b8161 fix
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-06-10 10:31:35 -04:00
Cadey Ratio 589b2f8e72 change emacs package name
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-06-10 10:30:44 -04:00
Cadey Ratio 7f931a0680 nixos updates
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-06-10 10:28:56 -04:00
Cadey Ratio ca42edfd3d add README
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-05-30 10:17:21 -04:00
Cadey Ratio 1cdc759405 fix node 14 😭
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-05-26 07:03:35 -04:00
Cadey Ratio 086a48bdd7 fix vscode server 😭
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-05-26 07:02:18 -04:00
Cadey Ratio b38e17977c node 18
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-05-26 07:00:50 -04:00
Cadey Ratio 05c822cf9b fix gist gem 😭
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-05-26 06:59:20 -04:00
Cadey Ratio ecf4e6b66b nixos updates
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-05-26 06:53:28 -04:00
Cadey Ratio e041fcddea joker IP
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-05-16 10:51:25 -04:00
Cadey Ratio 2e742daeb9 update itsuki ip
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-05-15 12:48:59 -04:00
Cadey Ratio 1b2f31a28e chrysalis: update IP
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-05-15 11:59:42 -04:00
Cadey Ratio 3bb2e73a4b common: fix cleanTmpOnBoot name
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-05-15 11:43:25 -04:00
Cadey Ratio 508fb2f0d2 fix
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-05-15 11:40:26 -04:00
Cadey Ratio 659ec16519 clean up flake.nix
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-05-15 11:36:50 -04:00
Cadey Ratio f7a7995d8e emacs: add typst mode
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-05-15 11:20:06 -04:00
Cadey Ratio 85bfdb86ce updates
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-05-15 11:19:53 -04:00
Cadey Ratio 5d0d7f59c0 vest-pit-near: update module
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-04-05 09:30:04 -04:00
Cadey Ratio dc80e1c0de vest-pit-near
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-04-05 08:55:43 -04:00
Cadey Ratio 388c1c6b65 disable zrepl
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-04-02 11:27:03 -04:00
Cadey Ratio a01318d8d4 fix joker
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-04-01 12:36:04 -04:00
Cadey Ratio f80b53e3a2 fix
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-03-30 08:18:43 -04:00
Cadey Ratio a15d0cc905 bump flake lock
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-03-30 08:16:19 -04:00
Cadey Ratio 8c57d24ce7 oh my god i fixed it
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-03-04 12:43:16 -05:00
Cadey Ratio fc2d46c246 fix??????????????
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-03-04 12:40:55 -05:00
Cadey Ratio 6120fada74 fix?????????????
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-03-04 12:40:08 -05:00
Cadey Ratio 0b155f2338 fix????????????
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-03-04 12:36:53 -05:00
Cadey Ratio 26f53c75c7 fix???????????
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-03-04 12:09:26 -05:00
Cadey Ratio ec02112996 fix??????????
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-03-04 12:08:56 -05:00
Cadey Ratio e85914dca4 fix?????????
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-03-04 12:05:54 -05:00
Cadey Ratio 246a35a7c4 fix????????
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-03-04 12:03:07 -05:00
Cadey Ratio 49259120d1 fix???????
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-03-04 12:01:37 -05:00
Cadey Ratio e6dece72e2 fix??????
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-03-04 11:52:26 -05:00
Cadey Ratio 2bc3efc065 fix?????
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-03-04 11:50:05 -05:00
Cadey Ratio aee21c49f6 fix????
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-03-04 11:48:28 -05:00
Cadey Ratio 0217aad673 fix???
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-03-04 11:15:47 -05:00
Cadey Ratio 577cc10640 fix nix-ld on pneuma
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-03-04 11:02:43 -05:00
Cadey Ratio 524801da32 disable nix-ld on pneuma
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-03-04 10:59:49 -05:00
Cadey Ratio 1512c0cfe1 it's the flatpak
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-03-03 20:25:46 -05:00
Cadey Ratio 27532f79c8 xe-chatgpt: add more newlines
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-03-03 08:19:02 -05:00
Cadey Ratio adacfba6df fix emacs build
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-03-03 08:09:51 -05:00
Cadey Ratio b1664eab8e give xe-chatgpt more powers
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-03-02 21:45:16 -05:00
Cadey Ratio e78a5032dc xe-chatgpt
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-03-02 20:37:32 -05:00
Cadey Ratio 56306b095e ban mostr.pub
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-03-01 18:15:54 -05:00
Cadey Ratio d91ea02bec updates???
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-02-25 11:54:32 -05:00
Cadey Ratio 04bb88b101 haskell mode
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-02-25 08:12:38 -05:00
Cadey Ratio 2044bda99f curse twi with power
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-02-25 08:05:11 -05:00
Cadey Ratio b01d2f5052 ms. sparkle
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-02-25 08:00:22 -05:00
Cadey Ratio fc3072d775 port over old emacs config
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-02-21 21:56:03 -05:00
Cadey Ratio e1e627a259 hosts/logos: config.hardware.opengl.driSupport32Bit = true
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-02-19 19:37:00 -05:00
Cadey Ratio fb87dd1a04 hosts/ontos: config.hardware.opengl.driSupport32Bit = true
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-02-19 18:59:40 -05:00
Cadey Ratio be1a202c1b hosts/ontos: enable nvidia
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-02-19 18:56:08 -05:00
Cadey Ratio ddba13dbdc hardware/alrest: enable Docker
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-02-19 18:42:25 -05:00
Cadey Ratio e43174b69d hardware/alrest: enable Docker
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-02-19 18:41:31 -05:00
Cadey Ratio f684384b4b updates
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-02-18 14:13:49 -05:00
Cadey Ratio 0f3e44774d it's update time!
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-02-05 08:57:52 -05:00
Cadey Ratio e4c645f5f8 common/home-manager/emacs: gofmt-before-save
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-02-05 08:57:43 -05:00
Cadey Ratio 709a618a2d common/home-manager/emacs: make xe/tabnew-shell open projectile shells if it can
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-02-04 13:50:35 -05:00
Cadey Ratio 9c960a866a common/home-manager: make fish and emacs play nicer
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-02-04 13:12:58 -05:00
Cadey Ratio 28f17b91b4 common/home-manager: make fish and emacs play nice
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-02-04 13:05:52 -05:00
Cadey Ratio 89f1760f55 common/home-manager/emacs: disable agenda for now
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-02-04 12:17:16 -05:00
Cadey Ratio aba3fcae70 hardware/alrest: switch to emacs from spacemacs
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-02-04 12:09:53 -05:00
Cadey Ratio afff3eb5a5 hosts/logos: kill minecraft
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-02-04 11:04:25 -05:00
Cadey Ratio 339dc0b5ab hosts/pneuma: add tor client service
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-02-03 21:13:55 -05:00
Cadey Ratio a43c76c560 hosts/pneuma: add weechat
Signed-off-by: Xe Iaso <me@xeiaso.net>
2023-02-03 21:11:43 -05:00
Cadey Ratio 9b820a180f vterm
Signed-off-by: Xe <me@christine.website>
2023-02-03 11:05:26 -05:00
Cadey Ratio 3162411a5b hosts/akko: fix upload limit
Signed-off-by: Xe <me@christine.website>
2023-02-02 14:10:11 -05:00
Cadey Ratio 115b387ccf home-manager/emacs: make e exec emacsclient
Signed-off-by: Xe <me@christine.website>
2023-02-02 14:00:12 -05:00
Cadey Ratio 354c335576 updates
Signed-off-by: Xe <me@christine.website>
2023-01-28 13:23:16 -05:00
Cadey Ratio 1cb5489db5 add prettier support
Signed-off-by: Xe <me@christine.website>
2023-01-25 10:47:14 -05:00
Cadey Ratio b67eb916d9 update my name lol
Signed-off-by: Xe <me@christine.website>
2023-01-24 22:15:46 -05:00
Cadey Ratio 1934a7b853 disable emacs if spacemacs is enabled
Signed-off-by: Xe <me@christine.website>
2023-01-24 22:09:06 -05:00
Cadey Ratio 3cd8d0e454 hosts/itsuki: delete nginx in place of tailscale serve
Signed-off-by: Xe <me@christine.website>
2023-01-24 22:05:06 -05:00
Cadey Ratio 5fcd164ef3 fix spacemacs
Signed-off-by: Xe <me@christine.website>
2023-01-24 22:00:24 -05:00
Cadey Ratio 075f5d6426 add more packages
Signed-off-by: Xe <me@christine.website>
2023-01-24 21:35:17 -05:00
Cadey Ratio d183b5596d look of disapproval
Signed-off-by: Xe <me@christine.website>
2023-01-23 12:59:47 -05:00
Cadey Ratio 026f90b4fe improve typescript ux
Signed-off-by: Xe <me@christine.website>
2023-01-23 12:57:03 -05:00
Cadey Ratio 9dc8a5c8de add mdx support
Signed-off-by: Xe <me@christine.website>
2023-01-23 12:47:41 -05:00
Cadey Ratio 0c8ff8494e add xe-tools emacs module
Signed-off-by: Xe <me@christine.website>
2023-01-23 11:30:18 -05:00
Cadey Ratio 5c06ae218a fix tree-sitter
Signed-off-by: Xe <me@christine.website>
2023-01-19 14:23:28 -05:00
Cadey Ratio 361f59ab28 fix tsx-mode
Signed-off-by: Xe <me@christine.website>
2023-01-19 12:52:22 -05:00
Cadey Ratio b3d4c1e4de update time
Signed-off-by: Xe <me@christine.website>
2023-01-19 11:16:36 -05:00
Cadey Ratio 514c5e90ef tsx-mode
Signed-off-by: Xe <me@christine.website>
2023-01-19 11:08:48 -05:00
Cadey Ratio e815b4faad gruvbox-dark-soft
Signed-off-by: Xe <me@christine.website>
2023-01-16 10:06:36 -05:00
Cadey Ratio b5a8d195d2 try to make things a little nicer
Signed-off-by: Xe <me@christine.website>
2023-01-14 22:51:12 -05:00
Cadey Ratio 245aa77ee3 Revert "update emacs-init.nix"
This reverts commit 808bf84e9c.
2023-01-14 22:45:06 -05:00
Cadey Ratio dbe9ab45d9 Revert "fix emacs build"
This reverts commit 8e2ef1948a.
2023-01-14 22:45:00 -05:00
Cadey Ratio 3cf2341163 Revert "move general config to the general block?"
This reverts commit e1ae60aac1.
2023-01-14 22:44:55 -05:00
Cadey Ratio e1ae60aac1 move general config to the general block?
Signed-off-by: Xe <me@christine.website>
2023-01-14 22:40:23 -05:00
Cadey Ratio 8e2ef1948a fix emacs build
Signed-off-by: Xe <me@christine.website>
2023-01-13 16:48:31 -05:00
Cadey Ratio 0cff49b8a4 add rainbow-delimiters-mode
Signed-off-by: Xe <me@christine.website>
2023-01-13 16:40:10 -05:00
Cadey Ratio 808bf84e9c update emacs-init.nix
Signed-off-by: Xe <me@christine.website>
2023-01-13 16:38:58 -05:00
Cadey Ratio b4421048ff disable emacs service i guess
Signed-off-by: Xe <me@christine.website>
2023-01-12 16:24:21 -05:00
Cadey Ratio 1dc7c1b6cc enable emacs unstable
Signed-off-by: Xe <me@christine.website>
2023-01-12 15:58:35 -05:00
Cadey Ratio 9710c104de update emacs
Signed-off-by: Xe <me@christine.website>
2023-01-12 15:57:35 -05:00
Cadey Ratio e75468ac3f updates
Signed-off-by: Xe <me@christine.website>
2023-01-07 01:08:54 -05:00
Cadey Ratio 0a0a511676 try to enable akko's prometheus endpoint again
Signed-off-by: Xe <me@christine.website>
2023-01-07 00:46:06 -05:00
Cadey Ratio b92e572c94 scape joker
Signed-off-by: Xe <me@christine.website>
2023-01-03 20:28:58 -05:00
Cadey Ratio 8b32680160 common: add module to disable RSA ssh hostkeys
Signed-off-by: Xe <me@christine.website>
2023-01-03 20:18:29 -05:00
Cadey Ratio 2d9390142a hosts/joker: allow prometheus-node-exporter through the firewall
Signed-off-by: Xe <me@christine.website>
2023-01-03 20:18:04 -05:00
Cadey Ratio b6687330ad kill dead hosts
Signed-off-by: Xe <me@christine.website>
2023-01-03 20:17:38 -05:00
Cadey Ratio 97b8d00a3f Revert "no firewall for joker"
This reverts commit 6411cf5e6f.
2023-01-03 12:48:59 -05:00
Cadey Ratio 6411cf5e6f no firewall for joker
Signed-off-by: Xe <me@christine.website>
2023-01-03 12:17:25 -05:00
Cadey Ratio c79bfc8716 joker
Signed-off-by: Xe <me@christine.website>
2023-01-02 19:09:09 -05:00
Cadey Ratio 99c7dcd36e joker
Signed-off-by: Xe <me@christine.website>
2023-01-02 18:38:34 -05:00
Cadey Ratio 0f4b55b1d0 remove this for now
Signed-off-by: Xe <me@christine.website>
2023-01-02 11:39:09 -05:00
Cadey Ratio cf54a22e23 enable nix-ld
Signed-off-by: Xe <me@christine.website>
2023-01-02 11:35:16 -05:00
46 changed files with 1767 additions and 627 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
result
.direnv
hosts/lufta/secret

4
README.md Normal file
View File

@ -0,0 +1,4 @@
# nixos-configs
My new nixos configs repo for flakes. Will eventually be at
Xe/nixos-configs on GitHub.

View File

@ -1,7 +1,7 @@
{ config, lib, pkgs, ... }: {
imports = [ ./users ./microcode.nix ];
imports = [ ./users ./microcode.nix ./no-rsa-ssh-hostkey.nix ];
boot.cleanTmpDir = true;
boot.tmp.cleanOnBoot = true;
boot.kernelModules = [ "wireguard" ];
environment.systemPackages = with pkgs; [
@ -13,12 +13,27 @@
git
mosh
wasmer
nodejs-16_x
wasmtime
nodejs-18_x
];
security.polkit.enable = true;
programs.nix-ld.enable = true;
boot.binfmt.emulatedSystems = [ "wasm32-wasi" "aarch64-linux" ];
programs.zsh.enable = true;
programs.fish.enable = true;
programs.fish.useBabelfish = true;
programs.fish.loginShellInit = ''
## XXX(Xe): unfuck nix-ld
eval (cat /etc/set-environment | grep NIX_LD)
'';
# fix gist gem 😭
nixpkgs.config.permittedInsecurePackages = [ "openssl-1.1.1t" "openssl-1.1.1u" "nodejs-16.20.0" "nodejs-14.21.3" "nodejs-16.20.1" ];
boot.binfmt.emulatedSystems =
[ "wasm32-wasi" "aarch64-linux" "riscv64-linux" ];
nix = {
package = pkgs.nixVersions.stable;

View File

@ -32,5 +32,8 @@
systemd.user.startServices = true;
# hack to fix vscode
services.vscode-server.enable = true;
home.stateVersion = "21.11";
}

View File

@ -4,21 +4,22 @@ with lib;
let cfg = config.within.emacs;
in {
options.within.emacs.enable = mkEnableOption "emacs without spacemacs support";
imports = [ ./emacs-init.nix ];
options.within.emacs.enable =
mkEnableOption "emacs without spacemacs support";
imports = [ ./emacs-init.nix ./emacs-init-defaults.nix ];
config = mkIf cfg.enable {
home.file."bin/e" = {
text = ''
#!/bin/sh
emacsclient $@
exec emacsclient -a "" -nc $@
'';
executable = true;
};
services.emacs.enable = true;
programs.emacs = {
enable = true;
package = pkgs.emacs-unstable-nox;
init = {
enable = true;
@ -31,6 +32,7 @@ in {
(setq inhibit-startup-screen t)
(menu-bar-mode -1)
(tab-bar-mode 1)
(electric-pair-mode)
@ -69,7 +71,7 @@ in {
str)
(setq str (replace-match "" t t str)))
str)
(setq gofmt-command "goimports")
(defun eshell/e (arg)
"opens a given file in emacs from eshell"
(find-file arg))
@ -86,15 +88,34 @@ in {
(other-window 1)
(find-file arg))
(set-frame-parameter (selected-frame) 'alpha '(85 . 85))
(add-to-list 'default-frame-alist '(alpha . (85 . 85)))
;;;; Mouse scrolling in terminal emacs
(unless (display-graphic-p)
;; activate mouse-based scrolling
(xterm-mouse-mode 1)
(global-set-key (kbd "<mouse-4>") 'scroll-down-line)
(global-set-key (kbd "<mouse-5>") 'scroll-up-line))
(xterm-mouse-mode)
;; git gutter with tramp
(defun git-gutter+-remote-default-directory (dir file)
(let* ((vec (tramp-dissect-file-name file))
(method (tramp-file-name-method vec))
(user (tramp-file-name-user vec))
(domain (tramp-file-name-domain vec))
(host (tramp-file-name-host vec))
(port (tramp-file-name-port vec)))
(tramp-make-tramp-file-name method user domain host port dir)))
(defun git-gutter+-remote-file-path (dir file)
(let ((file (tramp-file-name-localname (tramp-dissect-file-name file))))
(replace-regexp-in-string (concat "\\`" dir) "" file)))
'';
usePackageVerbose = true;
usePackage = {
# core packages
better-defaults.enable = true;
company = {
enable = true;
diminish = [ "company-mode" ];
@ -103,8 +124,6 @@ in {
'';
};
dockerfile-mode = { enable = true; };
counsel = {
enable = true;
@ -129,7 +148,25 @@ in {
'';
};
cython-mode = { enable = true; };
crontab-mode = {
enable = true;
mode = [
''("\\.cron\\(tab\\)?\\'" . crontab-mode)''
''("cron\\(tab\\)?\\." . crontab-mode)''
''("/cron.d/" . crontab-mode)''
];
};
dashboard = {
enable = true;
config = ''
(dashboard-setup-startup-hook)
(setq initial-buffer-choice (lambda () (get-buffer-create "*dashboard*")))
(setq dashboard-banner-logo-title "Have you ever been far even as decided to use even go want to do look more like?")
;(add-to-list 'dashboard-items '(agenda) t)
;(setq dashboard-week-agenda t)
'';
};
direnv = {
enable = true;
@ -138,12 +175,11 @@ in {
'';
};
better-defaults.enable = true;
evil = {
enable = true;
init = ''
(setq evil-want-C-i-jump nil)
(setq evil-want-keybinding nil)
'';
config = ''
(evil-mode 1)
@ -152,6 +188,7 @@ in {
evil-surround = {
enable = true;
after = [ "evil" ];
config = ''
(global-evil-surround-mode 1)
'';
@ -164,7 +201,7 @@ in {
evil-magit = {
enable = true;
after = [ "magit" ];
after = [ "evil" "magit" ];
};
flycheck = {
@ -175,10 +212,9 @@ in {
'';
};
go-mode.enable = true;
lsp-mode = {
enable = true;
after = [ "go-mode" "rust-mode" ];
command = [ "lsp" ];
hook = [
"(go-mode . lsp)"
@ -187,6 +223,7 @@ in {
];
config = ''
(setq lsp-rust-server 'rust-analyzer)
(add-hook 'go-mode-hook 'lsp-deferred)
'';
};
@ -202,13 +239,10 @@ in {
command = [ "lsp-ivy-workspace-symbol" ];
};
nlinum-relative = {
git-gutter = {
enable = true;
after = [ "evil" ];
config = ''
(nlinum-relative-setup-evil)
(add-hook 'prog-mode-hook 'nlinum-relative-mode)
(add-hook 'org-mode-hook 'nlinum-relative-mode)
(global-git-gutter-mode +1)
'';
};
@ -254,6 +288,11 @@ in {
'';
};
fountain-mode = {
enable = true;
mode = [ ''("\\.fountain\\'" . fountain-mode)'' ];
};
ivy = {
enable = true;
demand = true;
@ -290,30 +329,11 @@ in {
mode = [
''("README\\.md\\'" . gfm-mode)''
''("\\.md\\'" . markdown-mode)''
''("\\.mdx\\'" . markdown-mode)''
''("\\.markdown\\'" . markdown-mode)''
];
};
nix = { enable = true; };
nix-mode = {
enable = true;
mode = [ ''"\\.nix\\'"'' ];
bindLocal = { nix-mode-map = { "C-i" = "nix-indent-line"; }; };
};
nix-prettify-mode = {
enable = true;
config = ''
(nix-prettify-global-mode)
'';
};
nix-drv-mode = {
enable = true;
mode = [ ''"\\.drv\\'"'' ];
};
projectile = {
enable = true;
after = [ "ivy" ];
@ -335,7 +355,12 @@ in {
'';
};
protobuf-mode = { enable = true; };
rainbow-delimiters = {
enable = true;
config = ''
(add-hook 'prog-mode-hook #'rainbow-delimiters-mode)
'';
};
swiper = {
enable = true;
@ -349,6 +374,8 @@ in {
'';
};
vterm.enable = true;
which-key = {
enable = true;
diminish = [ "which-key-mode" ];
@ -365,10 +392,169 @@ in {
enable = true;
config = ''
(setq custom-safe-themes t)
(add-hook 'after-init-hook (lambda () (load-theme 'gruvbox t)))
(add-hook 'after-init-hook (lambda () (load-theme 'gruvbox-dark-soft t)))
'';
};
nov = {
enable = true;
mode = [ ''"\\.epub\\'"'' ];
};
web-mode = {
enable = true;
mode = [ ''"\\.html\\'"'' ''"\\.tmpl\\'"'' ];
config = ''
(define-derived-mode typescript-tsx-mode web-mode "TypeScript-tsx")
(add-to-list 'auto-mode-alist '("\\.tsx\\'" . typescript-tsx-mode))
'';
};
# org-mode
org = {
enable = true;
config = ''
(setq org-agenda-files '("~/org/daily/" "~/org/"))
(setq org-capture-templates '(("c" "Contacts" entry (file "~/org/contacts.org")
"* %(org-contacts-template-name)\n:PROPERTIES:\n:EMAIL: %(org-contacts-template-email)\n:END:")))
'';
};
org-journal = {
enable = true;
config = ''
(setq org-journal-dir "~/org/daily/")
(setq org-journal-date-prefix "#+startup: logdrawer\n#+options: d:t\n#+TITLE: ")
(setq org-journal-file-format "%Y%m%d.org")
(setq org-journal-time-prefix "* ")
(setq org-journal-time-format "TODO ")
(setq org-journal-enable-agenda-integration t)
'';
};
org-roam = {
enable = true;
config = ''
(setq org-roam-directory "~/org/roam")
'';
};
ob.enable = true;
org-download.enable = true;
org-mime.enable = true;
org-pomodoro.enable = true;
org-projectile.enable = true;
org-contacts.enable = true;
ox-epub.enable = true;
org-roam-ui.enable = true;
org-roam-protocol.enable = true;
systemd.enable = true;
gemini-mode.enable = true;
"0x0".enable = true;
request.enable = true;
# programming languages
cython-mode.enable = true;
dockerfile-mode.enable = true;
nix.enable = true;
protobuf-mode.enable = true;
terraform-mode.enable = true;
## typescript
js2-mode.enable = true;
#rjsx-mode.enable = true;
tide.enable = true;
typescript-mode = {
enable = true;
config = ''
(setq typescript-indent-level 2)
'';
};
add-node-modules-path = {
enable = true;
config = ''
(eval-after-load 'js2-mode
'(add-hook 'js2-mode-hook #'add-node-modules-path))
(eval-after-load 'typescript-mode
'(add-hook 'typescript-mode-hook #'add-node-modules-path))
(eval-after-load 'web-mode
'(add-hook 'web-mode-hook #'add-node-modules-path))
'';
};
prettier-js = {
enable = true;
after = [ "xe-tools" ];
config = ''
(add-hook 'js2-mode-hook 'prettier-js-mode)
(add-hook 'web-mode-hook 'prettier-js-mode)
(add-hook 'web-mode-hook #'(lambda ()
(xe/enable-minor-mode
'("\\.jsx?\\'" . prettier-js-mode))))
(add-hook 'web-mode-hook #'(lambda ()
(xe/enable-minor-mode
'("\\.tsx?\\'" . prettier-js-mode))))
'';
};
deno-fmt = {
enable = true;
config = ''
(add-hook 'typescript-mode-hook 'deno-fmt-mode)
(add-hook 'js2-mode-hook 'deno-fmt-mode)
'';
};
go-mode = {
enable = true;
config = ''
(setq gofmt-command "${pkgs.gotools}/bin/goimports")
(add-hook 'before-save-hook #'gofmt-before-save)
'';
};
highlight-indent-guides = {
enable = true;
config = ''
(add-hook 'prog-mode-hook 'highlight-indent-guides-mode)
'';
};
nix-mode = {
enable = true;
mode = [ ''"\\.nix\\'"'' ];
bindLocal = { nix-mode-map = { "C-i" = "nix-indent-line"; }; };
};
nixpkgs-fmt = {
enable = true;
config = ''
(add-hook 'nix-mode-hook 'nixpkgs-fmt-on-save-mode)
'';
};
nix-prettify-mode = {
enable = true;
config = ''
(nix-prettify-global-mode)
'';
};
nix-drv-mode = {
enable = true;
mode = [ ''"\\.drv\\'"'' ];
};
haskell-mode = {
enable = true;
mode = [ ''"\\.hs\\'"'' ];
};
dhall-mode = {
enable = true;
mode = [ ''"\\.dhall\\'"'' ];
@ -389,44 +575,68 @@ in {
mode = [ ''"\\.toml\\'"'' ];
};
typst-mode = {
enable = true;
mode = [ ''"\\.typ\\'"'' ];
};
zig-mode = {
enable = true;
mode = [ ''"\\.zig\\'"'' ];
};
nov = {
shell-maker.enable = true;
## custom shit
change-case = {
enable = true;
mode = [ ''"\\.epub\\'"'' ];
package = (epkgs:
epkgs.trivialBuild {
pname = "change-case";
src = ./packages/change-case.el;
});
};
web-mode = {
tclip = {
enable = true;
mode = [ ''"\\.html\\'"'' ''"\\.tmpl\\'"'' ];
after = [ "request" ];
package = (epkgs:
epkgs.trivialBuild {
pname = "tclip";
src = ./packages/tclip.el;
packageRequires = [ epkgs.request ];
});
};
ob.enable = true;
org-download.enable = true;
org.enable = true;
org-mime.enable = true;
org-pomodoro.enable = true;
org-projectile.enable = true;
weechat.enable = true;
systemd.enable = true;
terraform-mode.enable = true;
gemini-mode.enable = true;
highlight-indent-guides.enable = true;
"0x0".enable = true;
typescript-mode.enable = true;
tide.enable = true;
deno-fmt = {
xe-chatgpt = {
enable = true;
after = [ "request" ];
package = (epkgs:
epkgs.trivialBuild {
pname = "xe-chatgpt";
src = ./packages/xe-chatgpt.el;
packageRequires = [ epkgs.request ];
});
};
xe-tools = {
enable = true;
package = (epkgs:
epkgs.trivialBuild {
pname = "xe-tools";
src = ./packages/xe-tools.el;
});
config = ''
(add-hook 'typescript-mode-hook 'deno-fmt-mode)
(add-hook 'js2-mode-hook 'deno-fmt-mode)
(setq linum-format 'xe/linum-format-func)
(global-linum-mode)
'';
bindStar = {
"C-a c" = "xe/tabnew-shell";
"C-a h" = "split-window-vertically";
"C-a v" = "split-window-horizontally";
};
};
};
};

View File

@ -0,0 +1,144 @@
# A collection of "uncontroversial" configurations for selected packages.
{ pkgs, lib, config, ... }:
{
programs.emacs.init.usePackage = {
cmake-mode.mode = [
''"\\.cmake\\'"'' # \
''"CMakeLists.txt\\'"''
];
csharp-mode.mode = [ ''"\\.cs\\'"'' ];
cue-mode = {
package = epkgs:
epkgs.trivialBuild {
pname = "cue-mode.el";
src = pkgs.fetchurl {
url =
"https://raw.githubusercontent.com/russell/cue-mode/9c803ee8fa4a6e99c7dc9ae373c6178569583b7a/cue-mode.el";
sha256 = "0swhpknkg1vwbchblzrwynixf5grg95jy1bkc8w92yfpb1jch7m7";
};
preferLocalBuild = true;
allowSubstitutes = true;
};
command = [ "cue-mode" ];
mode = [ ''"\\.cue\\'"'' ];
hook = [ "(cue-mode . subword-mode)" ];
};
dap-lldb = {
config = ''
(setq dap-lldb-debug-program "${pkgs.lldb}/bin/lldb-vscode")
'';
};
deadgrep = {
config = ''
(setq deadgrep-executable "${pkgs.ripgrep}/bin/rg")
'';
};
dhall-mode.mode = [ ''"\\.dhall\\'"'' ];
dockerfile-mode.mode = [ ''"Dockerfile\\'"'' ];
elm-mode.mode = [ ''"\\.elm\\'"'' ];
emacsql-sqlite3 = {
enable =
lib.mkDefault config.programs.emacs.init.usePackage.org-roam.enable;
defer = lib.mkDefault true;
config = ''
(setq emacsql-sqlite3-executable "${pkgs.sqlite}/bin/sqlite3")
'';
};
ggtags = {
config = ''
(setq ggtags-executable-directory "${pkgs.global}/bin")
'';
};
idris-mode = {
mode = [ ''"\\.idr\\'"'' ];
config = ''
(setq idris-interpreter-path "${pkgs.idris}/bin/idris")
'';
};
kotlin-mode = {
mode = [ ''"\\.kts?\\'"'' ];
hook = [ "(kotlin-mode . subword-mode)" ];
};
latex.mode = [ ''("\\.tex\\'" . latex-mode)'' ];
lsp-eslint = {
config = ''
(setq lsp-eslint-server-command '("node" "${pkgs.vscode-extensions.dbaeumer.vscode-eslint}/share/vscode/extensions/dbaeumer.vscode-eslint/server/out/eslintServer.js" "--stdio"))
'';
};
markdown-mode = {
mode = [ ''"\\.mdwn\\'"'' ''"\\.markdown\\'"'' ''"\\.md\\'"'' ];
};
nix-mode.mode = [ ''"\\.nix\\'"'' ];
notmuch = {
package = epkgs: lib.getOutput "emacs" pkgs.notmuch;
config = ''
(setq notmuch-command "${pkgs.notmuch}/bin/notmuch")
'';
};
octave.mode = [ ''("\\.m\\'" . octave-mode)'' ];
ob-plantuml = {
config = ''
(setq org-plantuml-jar-path "${pkgs.plantuml}/lib/plantuml.jar")
'';
};
org-roam = {
defines = [ "org-roam-graph-executable" ];
config = ''
(setq org-roam-graph-executable "${pkgs.graphviz}/bin/dot")
'';
};
pandoc-mode = {
config = ''
(setq pandoc-binary "${pkgs.pandoc}/bin/pandoc")
'';
};
php-mode.mode = [ ''"\\.php\\'"'' ];
plantuml-mode = {
mode = [ ''"\\.puml\\'"'' ];
config = ''
(setq plantuml-default-exec-mode 'executable
plantuml-executable-path "${pkgs.plantuml}/bin/plantuml")
'';
};
protobuf-mode.mode = [ ''"\\.proto\\'"'' ];
purescript-mode.mode = [ ''"\\.purs\\'"'' ];
ripgrep = {
config = ''
(setq ripgrep-executable "${pkgs.ripgrep}/bin/rg")
'';
};
rust-mode.mode = [ ''"\\.rs\\'"'' ];
terraform-mode.mode = [ ''"\\.tf\\'"'' ];
yaml-mode.mode = [ ''"\\.\\(e?ya?\\|ra\\)ml\\'"'' ];
};
}

View File

@ -57,6 +57,14 @@ let
'';
};
defines = mkOption {
type = types.listOf types.str;
default = [ ];
description = ''
The entries to use for <option>:defines</option>.
'';
};
demand = mkOption {
type = types.bool;
default = false;
@ -210,6 +218,7 @@ let
mkAfter = vs: optional (vs != [ ]) ":after (${toString vs})";
mkCommand = vs: optional (vs != [ ]) ":commands (${toString vs})";
mkDefines = vs: optional (vs != [ ]) ":defines (${toString vs})";
mkDiminish = vs: optional (vs != [ ]) ":diminish (${toString vs})";
mkMode = map (v: ":mode ${v}");
mkBind = mkBindHelper "bind" "";
@ -232,8 +241,9 @@ let
++ mkBindStar config.bindStar ++ mkBindKeyMap config.bindKeyMap
++ mkBindLocal config.bindLocal ++ mkChords config.chords
++ mkCommand config.command ++ mkDefer config.defer
++ mkDemand config.demand ++ mkDiminish config.diminish
++ mkHook config.hook ++ mkMode config.mode
++ mkDefines config.defines ++ mkDemand config.demand
++ mkDiminish config.diminish ++ mkHook config.hook
++ mkMode config.mode
++ optionals (config.init != "") [ ":init" config.init ]
++ optionals (config.config != "") [ ":config" config.config ]
++ optionals (config.general != "") [ ":general" config.general ]

View File

@ -0,0 +1,55 @@
(defun camelcase-region (start end)
"Changes region from snake_case to camel_case"
(interactive "r")
(save-restriction (narrow-to-region start end)
(goto-char (point-min))
(while (re-search-forward "_\\(.\\)" nil t)
(replace-match (upcase (match-string 1))))))
(defun camelcase-word-or-region ()
"Changes word or region from snake_case to camel_case"
(interactive)
(let (pos1 pos2 bds)
(if (and transient-mark-mode mark-active)
(setq pos1 (region-beginning) pos2 (region-end))
(progn
(setq bds (bounds-of-thing-at-point 'symbol))
(setq pos1 (car bds) pos2 (cdr bds))))
(camelcase-region pos1 pos2)))
(defun split-name (s)
(split-string
(let ((case-fold-search nil))
(downcase
(replace-regexp-in-string "\\([a-z]\\)\\([A-Z]\\)" "\\1 \\2" s)))
"[^A-Za-z0-9]+"))
(defun underscore-string (s)
(mapconcat
'downcase
(split-name s) "_"))
(defun snakecase-region (begin end)
"Convert the given region from camel_case to snake_case"
(interactive "r")
(let* ((word (buffer-substring begin end))
(underscored (underscore-string word)))
(save-excursion
(widen) ; break out of the subregion so we can fix every usage of the function
(replace-string word underscored nil (point-min) (point-max)))))
(defun snakecase-word-or-region ()
"Changes word or region from camel_case to snake_case"
(interactive)
(let (pos1 pos2 bds)
(if (and transient-mark-mode mark-active)
(setq pos1 (region-beginning) pos2 (region-end))
(progn
(setq bds (bounds-of-thing-at-point 'symbol))
(setq pos1 (car bds) pos2 (cdr bds))))
(snakecase-region pos1 pos2)))
(global-set-key (kbd "C-c C--") 'camelcase-word-or-region)
(global-set-key (kbd "C-c C-_") 'snakecase-word-or-region)
(provide 'change-case)

View File

@ -0,0 +1,81 @@
;;; tclip.el --- tclip client for Emacs -*- lexical-binding: t; -*-
;; Copyright (C)
;; 2023 Tailscale, Inc.
;; Author: Xe Iaso <xe@tailscale.com>
;; Maintainer: Xe Iaso <xe@tailscale.com>
;; Created: 2023-01-13
;; Version: 0.1
;; Keywords: tailscale, pastebin, sharing
;; Homepage: https://github.com/tailscale-dev/tclip
;;; Commentary:
;;
;; This uses request-el to make requests to your tailnet's tclip server. You
;; can install request-el with M-x package-install.
;;
;; This package requires that you have a tclip server set up. This package
;; reaches out to a tclip server over either plain HTTP, or HTTPS should you
;; configure the variable `tclip-server'.
;;
;; Usage:
;;
;; To submit the contents of the current buffer to tclip:
;; M-x tclip-submit-buffer
;; To submit the contents of the currently highlighted region to tclip:
;; M-x tclip-submit-region
;;
;; Customization:
;;
;; To customize the tclip server this package reaches out to:
;; M-x customize-group tclip
;;
;; You can customize the tclip server URL by changing the value of `tclip-server':
;; (setq tclip-server "https://paste.shark-harmonic.ts.net")
;;; Code:
(require 'request)
(defgroup tclip nil
"Tclip server configuration."
:prefix "tclip-"
:group 'tclip)
(defcustom tclip-server "http://paste"
"The server that is running tclip or a service with a compatible API to tclip. This should NOT end with a trailing slash."
:group 'tclip
:type 'string)
(defun tclip--send-paste (fname content)
"Internal function that actually fires off the paste with name FNAME and content CONTENT to the tclip server."
(request (format "%s/api/post" tclip-server)
:type "POST"
:data `(("filename" . ,fname)
("content" . ,content))
:headers '(("Accept" . "text/plain"))
:timeout 60
:success (cl-function
(lambda (&key response &allow-other-keys)
(message "%s" (request-response-data response))))))
(defun tclip-submit-buffer ()
"Submits the entire current buffer to tclip."
(interactive)
(let ((fname (format "%s.%s"
(file-name-base (buffer-file-name))
(file-name-extension (buffer-file-name))))
(content (buffer-string)))
(tclip--send-paste fname content)))
(defun tclip-submit-region ()
"Submits the highlighted region to tclip."
(interactive)
(let ((fname (format "%s.%s"
(file-name-base (buffer-file-name))
(file-name-extension (buffer-file-name))))
(content (buffer-substring-no-properties (region-beginning) (region-end))))
(tclip--send-paste fname content)))
(provide 'tclip)
;;; tclip.el ends here

View File

@ -0,0 +1,105 @@
;;; xe-tools --- Xe's chatgpt bindings
;;; Commentary:
;;; I guess we're gonna have to deal with this shit,
;;; so I might as well try and learn how to use it.
;;; Code:
(setf lexical-binding t)
(eval-when-compile '(require 'cl))
(require 'request)
(defcustom xe/chatgpt-base-prompt
"You are an assistant that helps Xe Iaso with programming. You will return answers and code that helps Xe program things."
"The default system message for ChatGPT."
:type 'string)
(defcustom xe/chatgpt-model
"gpt-3.5-turbo"
"The model to use when querying ChatGPT."
:type 'string)
(defun xe/chatgpt--create-answer-buffer (suffix)
"Create a new scratch buffer with name SUFFIX and switch to it.
The buffer is set to markdown-mode. Return the buffer."
(let ((bufname (generate-new-buffer-name (format "*xe-chatgpt-%s*" suffix))))
(switch-to-buffer (get-buffer-create bufname))
(markdown-mode)
(get-buffer bufname)))
(defun xe/chatgpt--chomp (str)
"Chomp leading and tailing whitespace from STR."
(while (string-match "\\`\n+\\|^\\s-+\\|\\s-+$\\|\n+\\'"
str)
(setq str (replace-match "" t t str)))
str)
(defun xe/chatgpt--read-file (fname)
"Reads FNAME and returns its contents as a string."
(with-temp-buffer
(insert-file-contents fname)
(xe/chatgpt--chomp (buffer-string))))
(defun xe/chatgpt--make-request (question mode)
"Internal function to ask ChatGPT a QUESTION in MODE mode.
Inserts the result text of the first response to the a scratch buffer."
(xe/chatgpt--create-answer-buffer mode)
(insert question)
(let* ((req `(("model" . ,xe/chatgpt-model)
("messages" . ((("role" . "system") ("content" . ,xe/chatgpt-base-prompt))
(("role" . "user") ("content" . ,question))))))
(auth-key (xe/chatgpt--read-file
(format "%s/.openai-token" (getenv "HOME"))))
(headers `(("Content-Type" . "application/json")
("Authorization" . ,(format "Bearer %s" auth-key)))))
(request
"https://api.openai.com/v1/chat/completions"
:type "POST"
:data (json-encode req)
:headers headers
:parser 'json-read
:encoding 'utf-8
:success (cl-function
(lambda (&key data &allow-other-keys)
(let* ((choice (aref (alist-get 'choices data) 0))
(message (alist-get 'message choice))
(content (alist-get 'content message)))
(insert (xe/chatgpt--chomp content))))))))
(defun xe/ask-chatgpt (question)
"Ask ChatGPT a QUESTION and get the response put into your current buffer."
(interactive "squestion> ")
(xe/chatgpt--make-request (format "%s\n\n" question) "detail"))
(defun xe/ask-chatgpt-with-mode (question)
"Ask ChatGPT a QUESTION and get the response put into your current buffer. This will add the context of what editor major mode you are in."
(interactive "squestion> ")
(let* ((editor-mode (string-join (split-string (symbol-name major-mode) "-") " "))
(prompt (format "%s\nUser is in %s. Only include the code.\n\n" question editor-mode)))
(xe/chatgpt--make-request prompt "quick")))
(defun xe/chatgpt-explain (beginning end)
"Ask ChatGPT to explain this region of code from BEGINNING to END."
(interactive "r")
(let* ((code (buffer-substring-no-properties (region-beginning) (region-end)))
(mode-sp (split-string (symbol-name major-mode) "-"))
(editor-mode (string-join (split-string (symbol-name major-mode) "-") " "))
(prompt
(format "Explain this code. User is in %s.\n\n```%s\n%s```\n\n" editor-mode (car mode-sp) code)))
(xe/chatgpt--make-request prompt "explain")))
(defun xe/chatgpt-answer-question-about-code (beginning end question)
"Ask ChatGPT to answer a QUESTION about this region of code from BEGINNING to END."
(interactive "r\nsquestion> ")
(let* ((code (buffer-substring-no-properties (region-beginning) (region-end)))
(mode-sp (split-string (symbol-name major-mode) "-"))
(editor-mode (string-join (split-string (symbol-name major-mode) "-") " "))
(prompt
(format "%s I'm in %s.\n\n```%s\n%s```" question editor-mode (car mode-sp) code)))
(xe/chatgpt--make-request prompt "explain")))
(provide 'xe-chatgpt)
;;; xe-chatgpt.el ends here

View File

@ -0,0 +1,68 @@
;;; xe-tools --- Xe's tools
;;; Commentary:
;;; Code:
(defun xe/count-buffers (&optional display-anyway)
"Display or return the number of buffers."
(interactive)
(let ((buf-count (length (buffer-list))))
(if (or (interactive-p) display-anyway)
(message "%d buffers in this Emacs" buf-count)) buf-count))
(defun xe/look-of-disapproval ()
"Just in case we need this."
(interactive)
(insert "ಠ_ಠ"))
(defun xe/enable-minor-mode (my-pair)
"Enable minor mode if filename match the regexp. MY-PAIR is a cons
cell (regexp . minor-mode)."
(if (buffer-file-name)
(if (string-match (car my-pair) buffer-file-name)
(funcall (cdr my-pair)))))
(defun xe/tabnew-shell ()
"Opens a shell in a new tab (tmux Control-b c)."
(interactive)
(tab-bar-new-tab 1)
(let ((proj-type (projectile-project-type)))
(if (eq proj-type 'nil)
(vterm)
(projectile-run-vterm)))
(rename-uniquely))
(defun xe/kill-whitespace ()
"Kill the whitespace between two non-whitespace characters"
(interactive "*")
(save-excursion
(save-restriction
(save-match-data
(progn
(re-search-backward "[^ \t\r\n]" nil t)
(re-search-forward "[ \t\r\n]+" nil t)
(replace-match "" nil nil))))))
(defun xe/how-many-region (begin end regexp &optional interactive)
"Print number of non-trivial matches for REGEXP in region.
Non-interactive arguments are Begin End Regexp"
(interactive "r\nsHow many matches for (regexp): \np")
(let ((count 0) opoint)
(save-excursion
(setq end (or end (point-max)))
(goto-char (or begin (point)))
(while (and (< (setq opoint (point)) end)
(re-search-forward regexp end t))
(if (= opoint (point))
(forward-char 1)
(setq count (1+ count))))
(if interactive (message "%d occurrences" count))
count)))
(defun xe/linum-format-func (line)
"Properly format the line number"
(let ((w (length (number-to-string (count-lines (point-min) (point-max))))))
(propertize (format (format " %%%dd " w) line) 'face 'linum)))
(provide 'xe-tools)
;;; xe-tools.el ends here

View File

@ -16,12 +16,27 @@ in {
function fish_greeting;end
'';
".config/fish/functions/vterm_printf.fish".text = ''
function vterm_printf;
if begin; [ -n "$TMUX" ] ; and string match -q -r "screen|tmux" "$TERM"; end
# tell tmux to pass the escape sequences through
printf "\ePtmux;\e\e]%s\007\e\\" "$argv"
else if string match -q -- "screen*" "$TERM"
# GNU screen (screen, screen-256color, screen-256color-bce)
printf "\eP\e]%s\007\e\\" "$argv"
else
printf "\e]%s\e\\" "$argv"
end
end
'';
".config/fish/functions/fish_prompt.fish".source = ./fish_prompt.fish;
".config/fish/functions/fish_right_prompt.fish".source =
./fish_right_prompt.fish;
".config/fish/conf.d/ssh-agent.fish".source = ./ssh-agent.fish;
# global fish config
".config/fish/conf.d/001-unfuck-nixos.fish".source = ./unfuck-nixos.fish;
".config/fish/conf.d/cadey.fish".text = ''
alias edit "emacsclient -t -c -a ${dquot}"
alias e "edit"
@ -59,6 +74,31 @@ in {
# Set GPG TTY
set -x GPG_TTY (tty)
'';
".config/fish/conf.d/emacs.fish".text = ''
if [ "$INSIDE_EMACS" = 'vterm' ]
function clear
vterm_printf "51;Evterm-clear-scrollback";
tput clear;
end
function e
vterm_printf "51;Efind-file" $argv;
end
function vterm_prompt_end;
vterm_printf '51;A'(whoami)'@'(hostname)':'(pwd)
end
functions --copy fish_prompt vterm_old_fish_prompt
function fish_prompt --description 'Write out the prompt; do not replace this. Instead, put this at end of your file.'
# Remove the trailing newline from the original prompt. This is done
# using the string builtin from fish, but to make sure any escape codes
# are correctly interpreted, use %b for printf.
printf "%b" (string join "\n" (vterm_old_fish_prompt))
vterm_prompt_end
end
end
'';
};
home.packages = [ pkgs.fishPlugins.foreign-env ];

View File

@ -0,0 +1 @@
eval (cat /etc/set-environment | grep NIX_LD)

View File

@ -0,0 +1,6 @@
{
services.openssh.hostKeys = [{
path = "/etc/ssh/ssh_host_ed25519_key";
type = "ed25519";
}];
}

View File

@ -1,7 +1,7 @@
{ pkgs, ... }:
{ pkgs, config, ... }:
let
name = "Xe";
email = "me@christine.website";
name = "Xe Iaso";
email = "me@xeiaso.net";
commitTemplate = pkgs.writeTextFile {
name = "cadey-commit-template";
text = ''
@ -9,9 +9,10 @@ let
'';
};
in {
imports = [ ../../home-manager ./spacemacs ];
imports = [ ../../home-manager ];
within = {
emacs.enable = true;
fish.enable = true;
htop.enable = true;
neofetch.enable = true;

View File

@ -1,46 +1,54 @@
{ config, pkgs, ... }:
{ config, pkgs, lib, ... }:
let e = pkgs.writeTextFile {
name = "cadey-emacs.desktop";
destination = "/share/applications/cadey-emacs.desktop";
text = ''
[Desktop Entry]
Exec=emacsclient -nc
Icon=emacs
Name[en_US]=Emacs Client
Name=Emacs Client
StartupNotify=true
Terminal=false
Type=Application
'';
};
in
{
home.packages = with pkgs; [ anonymousPro e sqlite-interactive graphviz ];
with lib;
programs.emacs.enable = true;
home.file.".spacemacs".source = ./spacemacs;
home.file."bin/e" = {
let
e = pkgs.writeTextFile {
name = "cadey-emacs.desktop";
destination = "/share/applications/cadey-emacs.desktop";
text = ''
#!/bin/sh
emacsclient -a "" -nc $@
[Desktop Entry]
Exec=emacsclient -nc
Icon=emacs
Name[en_US]=Emacs Client
Name=Emacs Client
StartupNotify=true
Terminal=false
Type=Application
'';
executable = true;
};
home.activation.spacemacs = ''
mkdir -p ~/.ssh
cfg = config.within.spacemacs;
in {
options.within.spacemacs.enable = mkEnableOption "emacs with spacemacs";
if ! grep github.com ~/.ssh/known_hosts > /dev/null
then
echo "github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==" >> ~/.ssh/known_hosts
fi
config = mkIf cfg.enable {
home.packages = with pkgs; [ anonymousPro e sqlite-interactive graphviz ];
if [ ! -d "$HOME/.emacs.d" ]; then
GIT_CONFIG_GLOBAL=/dev/null GIT_CONFIG_SYSTEM=/dev/null git clone https://github.com/syl20bnr/spacemacs ~/.emacs.d
systemctl --user restart emacs
fi
'';
programs.emacs.enable = true;
home.file.".spacemacs".source = ./spacemacs;
home.file."bin/e" = {
text = ''
#!/bin/sh
emacsclient -a "" -nc $@
'';
executable = true;
};
home.activation.spacemacs = ''
mkdir -p ~/.ssh
if ! grep github.com ~/.ssh/known_hosts > /dev/null
then
echo "github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==" >> ~/.ssh/known_hosts
fi
if [ ! -d "$HOME/.emacs.d" ]; then
GIT_CONFIG_GLOBAL=/dev/null GIT_CONFIG_SYSTEM=/dev/null git clone https://github.com/syl20bnr/spacemacs ~/.emacs.d
systemctl --user restart emacs
fi
'';
};
}

View File

@ -63,14 +63,14 @@ values."
org-journal-dir "~/org/daily/"
org-journal-enable-agenda-integration t
org-journal-file-format "%Y%m%d.org"
org-journal-date-prefix "#+startup: logdrawer\n#+options: d:t\n#+TITLE: \n\n* Media\n* Calendar\n* Recurring\n** TODO Prune /r/tailscale\n** TODO Exercise\n** TODO Meditation\n"
org-journal-date-prefix "#+startup: logdrawer\n#+options: d:t\n#+TITLE: "
org-journal-time-prefix "* "
org-journal-time-format "TODO "
org-enable-epub-support t
org-enable-github-support t
org-enable-org-contacts-support t
org-contacts-files '("~/org/contacts.org")
org-capture-templates '(("c" "Contacts" entry (file "~/Org/contacts.org")
org-capture-templates '(("c" "Contacts" entry (file "~/org/contacts.org")
"* %(org-contacts-template-name)
:PROPERTIES:
:EMAIL: %(org-contacts-template-email)

View File

@ -25,6 +25,24 @@ in {
home-manager.users.mai = (import ./mai);
users.users.twi = {
isNormalUser = true;
shell = pkgs.fish;
extraGroups = [ "within" ];
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMOyr7PjUfbALe3+zgygnL0fQz4GhQ7qT9b0Lw+1Gzwk"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPg9gYKVglnO2HQodSJt4z4mNrUSUiyJQ7b+J798bwD9"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPrz5T/RdragJF6StZm92JZKPMJinYdw5fYnV4osiY8Q"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIF0I+UJPT7noL/bDvPj25SC24kpThqHUtge3tSQ9sIUx"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL46usOZyZD+CYa5wNBSpPxNWwF3EMeeAytPq6iVPO2X"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIN76Ol48QNvRjjjIaAa3WPqVWB/ryFMmOUJpszEz13TO"
];
};
home-manager.users.twi = (import ./twi);
nix.settings.trusted-users = [ "twi" ];
users.users.vic = {
isNormalUser = true;
extraGroups = [ "wheel" "libvirtd" "adbusers" "dialout" "within" ];

View File

@ -0,0 +1,29 @@
{ config, pkgs, ... }:
{
imports = [ ../../home-manager ];
within = {
emacs.enable = true;
fish.enable = true;
tmux.enable = true;
tmux.shortcut = "a";
vim.enable = true;
};
programs.direnv = {
enable = true;
nix-direnv.enable = true;
};
nixpkgs.config = {
allowBroken = true;
allowUnfree = true;
packageOverrides = import ../../../pkgs;
manual.manpages.enable = true;
};
services.lorri.enable = true;
}

View File

@ -2,14 +2,16 @@
"nodes": {
"agenix": {
"inputs": {
"darwin": "darwin",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1665870395,
"narHash": "sha256-Tsbqb27LDNxOoPLh0gw2hIb6L/6Ow/6lIBvqcHzEKBI=",
"lastModified": 1684153753,
"narHash": "sha256-PVbWt3qrjYAK+T5KplFcO+h7aZWfEj1UtyoKlvcDxh0=",
"owner": "ryantm",
"repo": "agenix",
"rev": "a630400067c6d03c9b3e0455347dc8559db14288",
"rev": "db5637d10f797bb251b94ef9040b237f4702cde3",
"type": "github"
},
"original": {
@ -18,10 +20,59 @@
"type": "github"
}
},
"darwin": {
"inputs": {
"nixpkgs": [
"agenix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1673295039,
"narHash": "sha256-AsdYgE8/GPwcelGgrntlijMg4t3hLFJFCRF3tL5WVjA=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "87b9d090ad39b25b2400029c64825fc2a8868943",
"type": "github"
},
"original": {
"owner": "lnl7",
"ref": "master",
"repo": "nix-darwin",
"type": "github"
}
},
"deno2nix": {
"inputs": {
"devshell": "devshell",
"flake-compat": "flake-compat_3",
"flake-compat": "flake-compat_2",
"flake-utils": [
"waifud",
"utils"
],
"nixpkgs": [
"waifud",
"nixpkgs"
]
},
"locked": {
"lastModified": 1670562741,
"narHash": "sha256-13PVEXOYrbsGn05bIp/WWhG6lREgfcQtRTQU9Jd4g8w=",
"owner": "Xe",
"repo": "deno2nix",
"rev": "db3563f20f74eab34e2c268e2a159325df315085",
"type": "github"
},
"original": {
"owner": "Xe",
"repo": "deno2nix",
"type": "github"
}
},
"deno2nix_2": {
"inputs": {
"devshell": "devshell_2",
"flake-compat": "flake-compat_4",
"flake-utils": [
"xesite",
"flake-utils"
@ -52,11 +103,11 @@
"utils": "utils"
},
"locked": {
"lastModified": 1672327199,
"narHash": "sha256-pFlngSHXKBhAmbaKZ4FYtu57LLunG+vWdL7a5vw1RvQ=",
"lastModified": 1686747123,
"narHash": "sha256-XUQK9kwHpTeilHoad7L4LjMCCyY13Oq383CoFADecRE=",
"owner": "serokell",
"repo": "deploy-rs",
"rev": "a5619f5660a00f58c2b7c16d89058e92327ac9b8",
"rev": "724463b5a94daa810abfc64a4f87faef4e00f984",
"type": "github"
},
"original": {
@ -66,6 +117,33 @@
}
},
"devshell": {
"inputs": {
"flake-utils": [
"waifud",
"deno2nix",
"flake-utils"
],
"nixpkgs": [
"waifud",
"deno2nix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1667210711,
"narHash": "sha256-IoErjXZAkzYWHEpQqwu/DeRNJGFdR7X2OGbkhMqMrpw=",
"owner": "numtide",
"repo": "devshell",
"rev": "96a9dd12b8a447840cc246e17a47b81a4268bba7",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "devshell",
"type": "github"
}
},
"devshell_2": {
"inputs": {
"flake-utils": [
"xesite",
@ -97,14 +175,15 @@
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs"
]
],
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1672596595,
"narHash": "sha256-nddXDfyfdC30tde6r1iDWtOQz3y/LLmnS+BS4dwz2Y0=",
"lastModified": 1688894441,
"narHash": "sha256-W0AkvPsqOUtPoHDQzcqVpR2JYB/cCCVkMaz4hhS4SNo=",
"owner": "nix-community",
"repo": "emacs-overlay",
"rev": "cd444d8f2d284c90a1e898bd102a40176e6dfcfa",
"rev": "0aeb4446b3ca3f4870febe3052d46bfbc04d2d7b",
"type": "github"
},
"original": {
@ -148,11 +227,11 @@
"flake-compat_3": {
"flake": false,
"locked": {
"lastModified": 1668681692,
"narHash": "sha256-Ht91NGdewz8IQLtWZ9LCeNXMSXHUss+9COoqu6JLmXU=",
"lastModified": 1673956053,
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "009399224d5e398d03b22badca40a37ac85412a1",
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
"type": "github"
},
"original": {
@ -177,13 +256,32 @@
"type": "github"
}
},
"flake-utils": {
"flake-compat_5": {
"flake": false,
"locked": {
"lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"lastModified": 1673956053,
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1687709756,
"narHash": "sha256-Y5wKlQSkgEK2weWdOu4J3riRd+kV/VCgHsqLNTTWQ/0=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"rev": "dbabf0ca0c0c4bce6ea5eaf65af5cb694d2082c7",
"type": "github"
},
"original": {
@ -204,11 +302,11 @@
]
},
"locked": {
"lastModified": 1662501203,
"narHash": "sha256-4BKeqCX2zwgBiTdlc2DjGQ0CttKm0vSw0r/bdFdM/PQ=",
"lastModified": 1677459247,
"narHash": "sha256-JbakfAiPYmCCV224yAMq/XO0udN5coWv/oazblMKdoY=",
"owner": "nix-community",
"repo": "gomod2nix",
"rev": "89cd0675b96775aa3ee86e7c0cf5bc238dd27976",
"rev": "3cbf3a51fe32e2f57af4c52744e7228bab22983d",
"type": "github"
},
"original": {
@ -219,15 +317,17 @@
},
"home-manager": {
"inputs": {
"nixpkgs": "nixpkgs_3",
"utils": "utils_2"
"nixpkgs": [
"agenix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1672349765,
"narHash": "sha256-Ul3lSGglgHXhgU3YNqsNeTlRH1pqxbR64h+2hM+HtnM=",
"lastModified": 1682203081,
"narHash": "sha256-kRL4ejWDhi0zph/FpebFYhzqlOBrk0Pl3dzGEKSAlEw=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "dd99675ee81fef051809bc87d67eb07f5ba022e8",
"rev": "32d3e39c491e2f91152c84f8ad8b003420eab0a1",
"type": "github"
},
"original": {
@ -236,6 +336,62 @@
"type": "github"
}
},
"home-manager_2": {
"inputs": {
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1688892808,
"narHash": "sha256-AeWzyG37EqyHH2C1GmrV9y0ZQ4e7rAs9AUOnw8I4YUI=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "b70db52ff06f30e3de7f21b6ea47e75baa0c46f6",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"iaso-fonts": {
"inputs": {
"nixpkgs": "nixpkgs_8",
"utils": "utils_4"
},
"locked": {
"lastModified": 1679684486,
"narHash": "sha256-XMpeeKmzxYpkh8uuxyGHcYzgORVysC8vMIVbzQdPtTs=",
"owner": "Xe",
"repo": "iosevka",
"rev": "85a6850cf67884b2d4752442bb9246415681e9e9",
"type": "github"
},
"original": {
"owner": "Xe",
"repo": "iosevka",
"type": "github"
}
},
"iosevka": {
"inputs": {
"nixpkgs": "nixpkgs_9",
"utils": "utils_5"
},
"locked": {
"lastModified": 1679684486,
"narHash": "sha256-XMpeeKmzxYpkh8uuxyGHcYzgORVysC8vMIVbzQdPtTs=",
"owner": "Xe",
"repo": "iosevka",
"rev": "85a6850cf67884b2d4752442bb9246415681e9e9",
"type": "github"
},
"original": {
"owner": "Xe",
"repo": "iosevka",
"type": "github"
}
},
"mara": {
"inputs": {
"naersk": "naersk",
@ -309,11 +465,11 @@
]
},
"locked": {
"lastModified": 1659610603,
"narHash": "sha256-LYgASYSPYo7O71WfeUOaEUzYfzuXm8c8eavJcel+pfI=",
"lastModified": 1679567394,
"narHash": "sha256-ZvLuzPeARDLiQUt6zSZFGOs+HZmE+3g4QURc8mkBsfM=",
"owner": "nmattia",
"repo": "naersk",
"rev": "c6a45e4277fa58abd524681466d3450f896dc094",
"rev": "88cd22380154a2c36799fe8098888f0f59861a15",
"type": "github"
},
"original": {
@ -324,6 +480,27 @@
}
},
"naersk_4": {
"inputs": {
"nixpkgs": [
"x",
"nixpkgs"
]
},
"locked": {
"lastModified": 1686572087,
"narHash": "sha256-jXTut7ZSYqLEgm/nTk7TuVL2ExahTip605bLINklAnQ=",
"owner": "nix-community",
"repo": "naersk",
"rev": "8507af04eb40c5520bd35d9ce6f9d2342cea5ad1",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "naersk",
"type": "github"
}
},
"naersk_5": {
"inputs": {
"nixpkgs": [
"xesite",
@ -331,11 +508,11 @@
]
},
"locked": {
"lastModified": 1662220400,
"narHash": "sha256-9o2OGQqu4xyLZP9K6kNe1pTHnyPz0Wr3raGYnr9AIgY=",
"lastModified": 1679567394,
"narHash": "sha256-ZvLuzPeARDLiQUt6zSZFGOs+HZmE+3g4QURc8mkBsfM=",
"owner": "nix-community",
"repo": "naersk",
"rev": "6944160c19cb591eb85bbf9b2f2768a935623ed3",
"rev": "88cd22380154a2c36799fe8098888f0f59861a15",
"type": "github"
},
"original": {
@ -346,11 +523,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1665732960,
"narHash": "sha256-WBZ+uSHKFyjvd0w4inbm0cNExYTn8lpYFcHEes8tmec=",
"lastModified": 1677676435,
"narHash": "sha256-6FxdcmQr5JeZqsQvfinIMr0XcTyTuR7EXX0H3ANShpQ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "4428e23312933a196724da2df7ab78eb5e67a88e",
"rev": "a08d6979dd7c82c4cef0dcc6ac45ab16051c1169",
"type": "github"
},
"original": {
@ -360,6 +537,22 @@
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1688764204,
"narHash": "sha256-FsvK+tIvelCI0tWwlMDKfiyb7P/KfxpGbXMrdCKiT8s=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d8bb6c681cf86265fdcf3cc3119f757bbb085835",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-23.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1671417167,
@ -378,11 +571,11 @@
},
"nixpkgs_3": {
"locked": {
"lastModified": 1671983799,
"narHash": "sha256-Z2Ro6hFPZHkBqkVXY5/aBUzxi5xizQGvuHQ9+T5B/ks=",
"lastModified": 1688679045,
"narHash": "sha256-t3xGEfYIwhaLTPU8FLtN/pLPytNeDwbLI6a7XFFBlGo=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "fad51abd42ca17a60fc1d4cb9382e2d79ae31836",
"rev": "3c7487575d9445185249a159046cc02ff364bff8",
"type": "github"
},
"original": {
@ -394,11 +587,11 @@
},
"nixpkgs_4": {
"locked": {
"lastModified": 1672350804,
"narHash": "sha256-jo6zkiCabUBn3ObuKXHGqqORUMH27gYDIFFfLq5P4wg=",
"lastModified": 1688679045,
"narHash": "sha256-t3xGEfYIwhaLTPU8FLtN/pLPytNeDwbLI6a7XFFBlGo=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "677ed08a50931e38382dbef01cba08a8f7eac8f6",
"rev": "3c7487575d9445185249a159046cc02ff364bff8",
"type": "github"
},
"original": {
@ -453,6 +646,36 @@
"type": "github"
}
},
"nixpkgs_8": {
"locked": {
"lastModified": 1678898370,
"narHash": "sha256-xTICr1j+uat5hk9FyuPOFGxpWHdJRibwZC+ATi0RbtE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ac718d02867a84b42522a0ece52d841188208f2c",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-unstable",
"type": "indirect"
}
},
"nixpkgs_9": {
"locked": {
"lastModified": 1678898370,
"narHash": "sha256-xTICr1j+uat5hk9FyuPOFGxpWHdJRibwZC+ATi0RbtE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ac718d02867a84b42522a0ece52d841188208f2c",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-unstable",
"type": "indirect"
}
},
"portable-svc": {
"inputs": {
"nixpkgs": "nixpkgs_6"
@ -506,11 +729,11 @@
]
},
"locked": {
"lastModified": 1667491896,
"narHash": "sha256-v2iUBQ0kwUz5a/MZGJvhlpDj+H8PLMJFRvvgYb1knZg=",
"lastModified": 1682194077,
"narHash": "sha256-ju/GPxWkZ2qob9TWZ9+cn1rIVY5Aq9Uo06lRTRY98Yg=",
"owner": "Xe",
"repo": "rhea",
"rev": "30a0900b9409b9c9044c83deaaaa9f708b402eb3",
"rev": "d0ab7994b597b54f7566e47a11426da203c33b35",
"type": "github"
},
"original": {
@ -524,12 +747,13 @@
"agenix": "agenix",
"deploy-rs": "deploy-rs",
"emacs-overlay": "emacs-overlay",
"home-manager": "home-manager",
"home-manager": "home-manager_2",
"mara": "mara",
"nixpkgs": "nixpkgs_4",
"printerfacts": "printerfacts",
"rhea": "rhea",
"utils": "utils_4",
"utils": "utils_3",
"vscode-server": "vscode-server",
"waifud": "waifud",
"wsl": "wsl",
"x": "x",
@ -548,11 +772,11 @@
]
},
"locked": {
"lastModified": 1669516540,
"narHash": "sha256-KzAKsPr6s77I2/0wWJ2tSY7Ca5Av/bqfw3aUv8lbuH4=",
"lastModified": 1687055571,
"narHash": "sha256-UvLoO6u5n9TzY80BpM4DaacxvyJl7u9mm9CA72d309g=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "d99b1e8e21de25b97cbadb413d3510cec0ba5bc5",
"rev": "2de557c780dcb127128ae987fca9d6c2b0d7dc0f",
"type": "github"
},
"original": {
@ -561,6 +785,57 @@
"type": "github"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"typst": {
"inputs": {
"nixpkgs": [
"xesite",
"nixpkgs"
]
},
"locked": {
"lastModified": 1680860298,
"narHash": "sha256-aDLg97A+isOBFJMIww2mjVPyTCPSVlguo2tojzms/04=",
"owner": "typst",
"repo": "typst",
"rev": "94e052b8ccace3221aa960b9abe3b3f32b1d894f",
"type": "github"
},
"original": {
"owner": "typst",
"repo": "typst",
"type": "github"
}
},
"utils": {
"locked": {
"lastModified": 1667395993,
@ -577,21 +852,6 @@
}
},
"utils_2": {
"locked": {
"lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"utils_3": {
"locked": {
"lastModified": 1638122382,
"narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=",
@ -606,13 +866,16 @@
"type": "github"
}
},
"utils_4": {
"utils_3": {
"inputs": {
"systems": "systems_2"
},
"locked": {
"lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"lastModified": 1687709756,
"narHash": "sha256-Y5wKlQSkgEK2weWdOu4J3riRd+kV/VCgHsqLNTTWQ/0=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"rev": "dbabf0ca0c0c4bce6ea5eaf65af5cb694d2082c7",
"type": "github"
},
"original": {
@ -621,8 +884,62 @@
"type": "github"
}
},
"utils_4": {
"locked": {
"lastModified": 1678901627,
"narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"utils_5": {
"locked": {
"lastModified": 1678901627,
"narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"vscode-server": {
"inputs": {
"flake-utils": [
"utils"
],
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1684517665,
"narHash": "sha256-SaAr66uCQ8CF75jIr23FZjk1+9Kfwm5sQnwV25206Gs=",
"owner": "nix-community",
"repo": "nixos-vscode-server",
"rev": "1e1358493df6529d4c7bc4cc3066f76fd16d4ae6",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixos-vscode-server",
"type": "github"
}
},
"waifud": {
"inputs": {
"deno2nix": "deno2nix",
"naersk": "naersk_3",
"nixpkgs": [
"nixpkgs"
@ -633,11 +950,11 @@
"xess": "xess_2"
},
"locked": {
"lastModified": 1666264211,
"narHash": "sha256-/GYmI0FIQ4v2kIzqOUatsUqCGQ8sMhenEyoaWvo2DuA=",
"lastModified": 1686147511,
"narHash": "sha256-KV2KL9TwY+8JexSg3bPnmQ29yWCdvhQMF96D12RmWr4=",
"owner": "Xe",
"repo": "waifud",
"rev": "adbd76009f14bd02773c44973ee855b6a84973dd",
"rev": "99069fbcd9a19060b7223dc71613f904b1a1be6c",
"type": "github"
},
"original": {
@ -646,9 +963,25 @@
"type": "github"
}
},
"wasigo": {
"flake": false,
"locked": {
"lastModified": 1687028565,
"narHash": "sha256-qTb4p9cwdDropX1l8CGvkSvs4l5BrRyxAGCph37YO4Q=",
"owner": "golang",
"repo": "go",
"rev": "261e26761805e03c126bf3934a8f39302e8d85fb",
"type": "github"
},
"original": {
"owner": "golang",
"repo": "go",
"type": "github"
}
},
"wsl": {
"inputs": {
"flake-compat": "flake-compat_2",
"flake-compat": "flake-compat_3",
"flake-utils": [
"utils"
],
@ -657,11 +990,11 @@
]
},
"locked": {
"lastModified": 1672225470,
"narHash": "sha256-CL81URMZdjwCbqYY+WqIZAo1aj9moWNPISJaRw2YwV4=",
"lastModified": 1688393327,
"narHash": "sha256-UHibyCq4nbnbsNE1SL4p87mYn0PLoGNn1ULXrpLeTRA=",
"owner": "nix-community",
"repo": "NixOS-WSL",
"rev": "79fa1eb78f746c30e41f1be76a209a407b25dc9d",
"rev": "0982e9ab209aee459ed3331ab4eadbb4d8a023e1",
"type": "github"
},
"original": {
@ -673,20 +1006,24 @@
"x": {
"inputs": {
"gomod2nix": "gomod2nix",
"iaso-fonts": "iaso-fonts",
"naersk": "naersk_4",
"nixpkgs": [
"nixpkgs"
],
"rust-overlay": "rust-overlay",
"utils": [
"utils"
]
],
"wasigo": "wasigo",
"xess": "xess_3"
},
"locked": {
"lastModified": 1672596703,
"narHash": "sha256-jq2PwMWQE8Dt3v4WRBa2qj77apR37L0l/Dwm+es2qcQ=",
"lastModified": 1688473456,
"narHash": "sha256-rrzWNiOBbu3OD5ii4NKUX32vsfE4AxEu06LrxUX2pvw=",
"owner": "Xe",
"repo": "x",
"rev": "88ab7e70b442a45a67e4a9f4f1ee79b0aa622273",
"rev": "24275d8382915c116b5c68501f3c1d3a893275bd",
"type": "github"
},
"original": {
@ -697,22 +1034,24 @@
},
"xesite": {
"inputs": {
"deno2nix": "deno2nix",
"flake-compat": "flake-compat_4",
"deno2nix": "deno2nix_2",
"flake-compat": "flake-compat_5",
"flake-utils": [
"utils"
],
"naersk": "naersk_4",
"iosevka": "iosevka",
"naersk": "naersk_5",
"nixpkgs": [
"nixpkgs"
]
],
"typst": "typst"
},
"locked": {
"lastModified": 1672519133,
"narHash": "sha256-KkwWlxbX1HSBDtyKX1/4L+z+ocGkptQMGe3VnsowXZg=",
"lastModified": 1688825369,
"narHash": "sha256-FNFEmgH4lQWlolP0jfBdnvMNlx7jnwhkLZDS9piooaA=",
"owner": "Xe",
"repo": "site",
"rev": "3890085b77db7637ca9b48cb7809cf898a26ec1c",
"rev": "8fb398117b48c0aed1f19c5e5a0d5ceeeab7045c",
"type": "github"
},
"original": {
@ -724,7 +1063,7 @@
"xess": {
"inputs": {
"nixpkgs": "nixpkgs_7",
"utils": "utils_3"
"utils": "utils_2"
},
"locked": {
"lastModified": 1640540322,
@ -752,11 +1091,36 @@
]
},
"locked": {
"lastModified": 1640540322,
"narHash": "sha256-II4raADUWKTLDAALyJSToAgL8FB1ADbRHqEr/b3JeIc=",
"lastModified": 1682266158,
"narHash": "sha256-VK66KyF1doJ24yktb9rp7Yv7auS6i0P8EnJLhFOz+jY=",
"owner": "Xe",
"repo": "Xess",
"rev": "5fabc96de6487a721235c4bdf18214519d9e6201",
"rev": "3a85d1de06cd3420b4d56a8edd72cd57e6f0806e",
"type": "github"
},
"original": {
"owner": "Xe",
"repo": "Xess",
"type": "github"
}
},
"xess_3": {
"inputs": {
"nixpkgs": [
"x",
"nixpkgs"
],
"utils": [
"x",
"utils"
]
},
"locked": {
"lastModified": 1682266158,
"narHash": "sha256-VK66KyF1doJ24yktb9rp7Yv7auS6i0P8EnJLhFOz+jY=",
"owner": "Xe",
"repo": "Xess",
"rev": "3a85d1de06cd3420b4d56a8edd72cd57e6f0806e",
"type": "github"
},
"original": {

275
flake.nix
View File

@ -8,6 +8,12 @@
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
utils.url = "github:numtide/flake-utils";
vscode-server = {
url = "github:nix-community/nixos-vscode-server";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "utils";
};
emacs-overlay = {
url = "github:nix-community/emacs-overlay";
inputs.nixpkgs.follows = "nixpkgs";
@ -52,7 +58,7 @@
};
outputs = { self, nixpkgs, deploy-rs, home-manager, agenix, printerfacts, mara
, rhea, waifud, emacs-overlay, wsl, x, xesite, ... }:
, rhea, waifud, emacs-overlay, wsl, x, xesite, vscode-server, ... }@inputs:
let
pkgs = nixpkgs.legacyPackages."x86_64-linux";
@ -62,6 +68,7 @@
modules = [
agenix.nixosModules.age
home-manager.nixosModules.home-manager
vscode-server.nixosModule
({ config, ... }: {
system.configurationRevision = self.sourceInfo.rev;
@ -72,7 +79,14 @@
home-manager.useUserPackages = true;
nixpkgs.overlays = [
emacs-overlay.overlay
(import ./overlays/tree-sitter-typescript.nix)
(import ./overlays/weechat.nix)
];
services.vscode-server.enable = true;
environment.systemPackages = with pkgs;
[ x.packages.${system}.uploud ];
})
./common
@ -84,6 +98,13 @@
] ++ extraModules;
};
mkAlrest = extraModules:
mkSystem (extraModules ++ [
./hardware/alrest
./hardware/location/YOW
waifud.nixosModules.x86_64-linux.waifud-runner
]);
in {
devShells.x86_64-linux.default = pkgs.mkShell {
buildInputs = [
@ -95,202 +116,13 @@
nixosModules = {
microcode = import ./common/microcode.nix;
home-manager = import ./common/home-manager;
workVM = ({ pkgs, config, ... }: {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
nixpkgs.overlays = [ emacs-overlay.overlay ];
nix.package = pkgs.nixVersions.stable;
nix.extraOptions = ''
experimental-features = nix-command flakes
'';
security.pam.loginLimits = [{
domain = "*";
type = "soft";
item = "nofile";
value = "unlimited";
}];
services.journald.extraConfig = ''
SystemMaxUse=100M
MaxFileSec=7day
'';
services.resolved = {
enable = true;
dnssec = "false";
};
users.groups.xe = { };
users.users.xe = {
extraGroups = [
"wheel"
"docker"
"audio"
"plugdev"
"libvirtd"
"adbusers"
"dialout"
"within"
];
shell = pkgs.fish;
isNormalUser = true;
group = "xe";
};
boot.binfmt.emulatedSystems = [ "wasm32-wasi" ];
environment.systemPackages = with pkgs; [ mosh flyctl ];
virtualisation.docker.enable = true;
services.tailscale.enable = true;
home-manager.users.xe = { lib, ... }:
let
name = "Xe Iaso";
email = "xe@tailscale.com";
commitTemplate = pkgs.writeTextFile {
name = "xe-commit-template";
text = ''
Signed-off-by: ${name} <${email}>
'';
};
in {
imports = [ ./common/home-manager ];
within = {
emacs.enable = true;
fish.enable = true;
neofetch.enable = true;
vim.enable = true;
tmux.enable = true;
};
services.lorri.enable = true;
services.emacs.enable = lib.mkForce false;
programs.direnv.enable = true;
programs.direnv.nix-direnv.enable = true;
programs.git = {
package = pkgs.gitAndTools.gitFull;
enable = true;
userName = name;
userEmail = email;
ignores = [ "*~" "*.swp" "*.#" ];
delta.enable = true;
extraConfig = {
commit.template = "${commitTemplate}";
core.editor = "vim";
color.ui = "auto";
credential.helper = "store --file ~/.git-credentials";
format.signoff = true;
init.defaultBranch = "main";
protocol.keybase.allow = "always";
pull.rebase = "true";
push.default = "current";
};
};
};
});
workVM = import ./modules/workVM.nix;
};
nixosConfigurations = {
# wsl
xatci = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
modules = [
home-manager.nixosModules.home-manager
wsl.nixosModules.wsl
({ config, ... }: {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
nixpkgs.overlays = [ emacs-overlay.overlay ];
networking.hostName = "xatci";
networking.nameservers = [ "100.100.100.100" ];
networking.search = [ "shark-harmonic.ts.net" ];
wsl = {
enable = true;
automountPath = "/mnt";
defaultUser = "cadey";
startMenuLaunchers = true;
};
nix.package = pkgs.nixVersions.stable;
nix.extraOptions = ''
experimental-features = nix-command flakes
'';
users.users.cadey = {
extraGroups = [
"wheel"
"docker"
"audio"
"plugdev"
"libvirtd"
"adbusers"
"dialout"
"within"
];
shell = pkgs.fish;
};
environment.systemPackages = with pkgs; [ mosh flyctl ];
virtualisation.docker.enable = true;
home-manager.users.cadey = { lib, ... }:
let
name = "Xe Iaso";
email = "me@xeiaso.net";
commitTemplate = pkgs.writeTextFile {
name = "cadey-commit-template";
text = ''
Signed-off-by: ${name} <${email}>
'';
};
in {
imports = [ ./common/home-manager ];
within = {
emacs.enable = true;
fish.enable = true;
neofetch.enable = true;
vim.enable = true;
tmux.enable = true;
};
services.emacs.enable = lib.mkForce false;
programs.direnv.enable = true;
programs.direnv.nix-direnv.enable = true;
programs.git = {
package = pkgs.gitAndTools.gitFull;
enable = true;
userName = name;
userEmail = email;
ignores = [ "*~" "*.swp" "*.#" ];
delta.enable = true;
extraConfig = {
commit.template = "${commitTemplate}";
core.editor = "vim";
color.ui = "auto";
credential.helper = "store --file ~/.git-credentials";
format.signoff = true;
init.defaultBranch = "main";
protocol.keybase.allow = "always";
pull.rebase = "true";
push.default = "current";
};
};
};
})
];
};
xatci =
mkSystem [ wsl.nixosModules.wsl (import ./modules/wsl.nix inputs) ];
keitai = mkSystem [ ./hosts/keitai ./hardware/location/YOW ];
@ -299,39 +131,18 @@
itsuki = mkSystem [ ./hosts/itsuki ./hardware/location/YOW ];
kos-mos = mkSystem [
./hosts/kos-mos
./hardware/alrest
./hardware/location/YOW
waifud.nixosModules.x86_64-linux.waifud-runner
];
kos-mos = mkAlrest [ ./hosts/kos-mos ];
logos = mkSystem [
./hosts/logos
./hardware/alrest
./hardware/location/YOW
waifud.nixosModules.x86_64-linux.waifud-runner
];
logos = mkAlrest [ ./hosts/logos ];
ontos = mkSystem [
./hosts/ontos
./hardware/alrest
./hardware/location/YOW
waifud.nixosModules.x86_64-linux.waifud-runner
];
ontos = mkAlrest [ ./hosts/ontos ];
pneuma = mkSystem [
./hosts/pneuma
./hardware/alrest
./hardware/location/YOW
waifud.nixosModules.x86_64-linux.waifud-runner
];
pneuma = mkAlrest [ ./hosts/pneuma ];
joker = mkSystem [ ./hosts/joker ./hardware/location/YYZ ];
# cloud
akko = mkSystem [
./hosts/akko
./hardware/location/YYZ
];
akko = mkSystem [ ./hosts/akko ./hardware/location/YYZ ];
firgu = mkSystem [ ./hosts/firgu ./hardware/location/YYZ ];
};
@ -359,7 +170,7 @@
};
deploy.nodes.chrysalis = {
hostname = "192.168.2.29";
hostname = "192.168.2.100";
sshUser = "root";
fastConnection = true;
@ -371,7 +182,7 @@
};
deploy.nodes.itsuki = {
hostname = "192.168.2.174";
hostname = "192.168.2.34";
sshUser = "root";
fastConnection = true;
@ -382,8 +193,20 @@
};
};
deploy.nodes.joker = {
hostname = "192.168.2.80";
sshUser = "root";
fastConnection = true;
profiles.system = {
user = "root";
path = deploy-rs.lib.x86_64-linux.activate.nixos
self.nixosConfigurations.joker;
};
};
deploy.nodes.logos = {
hostname = "192.168.2.35";
hostname = "192.168.2.33";
sshUser = "root";
fastConnection = true;
@ -407,7 +230,7 @@
};
deploy.nodes.ontos = {
hostname = "192.168.2.34";
hostname = "192.168.2.25";
sshUser = "root";
fastConnection = true;
@ -419,7 +242,7 @@
};
deploy.nodes.pneuma = {
hostname = "192.168.2.33";
hostname = "192.168.2.31";
sshUser = "root";
fastConnection = true;

View File

@ -40,6 +40,7 @@
services.tailscale.enable = true;
virtualisation.libvirtd.enable = true;
virtualisation.docker.enable = true;
systemd.services.network-setup = {
serviceConfig.Type = "oneshot";
@ -48,4 +49,8 @@
};
systemd.services.tailscaled.path = with pkgs; [ mosh getent shadow ];
home-manager.users.cadey = { ... }: {
within.emacs.enable = true;
};
}

View File

@ -30,6 +30,4 @@
swapDevices = [{ device = "/dev/nvme0n1p2"; }];
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
# high-resolution display
hardware.video.hidpi.enable = lib.mkDefault true;
}

View File

@ -2,7 +2,7 @@
{
services.zrepl = {
enable = true;
enable = false;
settings = {
global = {
logging = [{

BIN
hosts/.DS_Store vendored

Binary file not shown.

View File

@ -13,6 +13,7 @@ in {
};
":prometheus"."Pleroma.Web.Endpoint.MetricsExporter" = {
enabled = true;
auth = false;
format = mkRaw ":text";
path = "/api/pleroma/app_metrics";
};
@ -31,10 +32,14 @@ in {
max_pinned_statuses = 10;
max_account_fields = 100;
upload_limit = 67108864;
limit_to_local_content = mkRaw ":unauthenticated";
healthcheck = true;
cleanup_attachments = true;
allow_relay = true;
safe_dm_mentions = true;
external_user_synchronization = true;
};
":pleroma".":mrf".policies =
map mkRaw [ "Pleroma.Web.ActivityPub.MRF.SimplePolicy" ];

View File

@ -52,6 +52,7 @@
"mastodon.popps.org" = "Homophobia";
"meta-tube.de" =
"Conspiracy, CoVid19 denier videos https://fediblock.org/blocklist/#meta-tube.de";
"mostr.pub" = "nostr, unmoderated";
"midnightride.rs" = "Discrimination";
"mstdn.foxfam.club" = "Right wing twitter mirror";
"nicecrew.digital" = ''Discrimination, racism, "free speech zone"²'';

View File

@ -20,6 +20,13 @@
services.tailscale.enable = true;
services.postgresql = {
authentication = ''
host replication replication 100.64.0.0/10 md5
'';
enableTCPIP = true;
};
security.acme.acceptTerms = true;
services.nginx = {

View File

@ -1,12 +1,8 @@
{ lib, config, pkgs, ... }:
{
imports = [
./hardware-configuration.nix
./prometheus.nix
./solanum.nix
./znc.nix
];
imports =
[ ./hardware-configuration.nix ./prometheus.nix ./solanum.nix ./znc.nix ];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
@ -36,8 +32,14 @@
services.tailscale.enable = true;
services.postgresql.enable = true;
services.postgresql.package = pkgs.postgresql_15;
services.postgresql = {
enable = true;
package = pkgs.postgresql_15;
enableTCPIP = true;
authentication = ''
host marabot all 100.64.0.0/10 md5
'';
};
services.avahi = {
enable = true;

View File

@ -64,6 +64,10 @@
job_name = "chrysalis";
static_configs = [{ targets = [ "chrysalis:9100" ]; }];
}
{
job_name = "joker";
static_configs = [{ targets = [ "joker:9100" ]; }];
}
{
job_name = "firgu";
static_configs = [{ targets = [ "firgu:9100" ]; }];

View File

@ -1,34 +0,0 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports = [ ];
boot.initrd.availableKernelModules = [ "virtio_pci" "xhci_pci" "usbhid" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/d089a853-2017-4373-805a-7b9e99a60a38";
fsType = "ext4";
};
fileSystems."/boot/efi" =
{ device = "/dev/disk/by-uuid/A13D-95A6";
fsType = "vfat";
};
swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp0s1.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
}

View File

@ -50,22 +50,18 @@
services.tailscale.enable = true;
services.nginx = {
enable = true;
virtualHosts."itsuki.shark-harmonic.ts.net" = {
forceSSL = true;
locations."/" = {
proxyPass = "http://127.0.0.1:32400";
proxyWebsockets = true;
};
locations."/transmission" = {
proxyPass = "http://127.0.0.1:9091";
proxyWebsockets = true;
};
sslCertificate = "/srv/within/certs/itsuki.shark-harmonic.ts.net.crt";
sslCertificateKey = "/srv/within/certs/itsuki.shark-harmonic.ts.net.key";
};
xeserv.services.vest-pit-near.enable = true;
age.secrets.vest-pit-near = {
file = ../../secret/vest-pit-near.age;
path = "/var/lib/private/vest-pit-near/.env";
owner = "root";
group = "docker";
mode = "770";
};
within.users.enableSystem = true;
home-manager.users.cadey = { ... }: {
within.emacs.enable = true;
};
}

View File

@ -2,7 +2,7 @@
{
services.zrepl = {
enable = true;
enable = false;
settings = {
global = {
logging = [{

View File

@ -15,8 +15,37 @@
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.efi.efiSysMountPoint = "/boot/efi";
systemd.services.NetworkManager-wait-online.enable = false;
networking.hostName = "joker"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# make steam work
hardware.opengl.driSupport32Bit = true;
hardware.steam-hardware.enable = true;
within.microcode.enable = true;
within.microcode.vendor = "amd";
services.prometheus = {
exporters = {
node = {
enable = true;
};
wireguard.enable = true;
};
};
programs.steam = {
enable = true;
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
};
services.tailscale.enable = true;
services.openssh.enable = true;
hardware.bluetooth.enable = true;
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
@ -24,9 +53,6 @@
# Enable networking
networking.networkmanager.enable = true;
# Enable network manager applet
programs.nm-applet.enable = true;
# Set your time zone.
time.timeZone = "America/Toronto";
@ -36,9 +62,9 @@
# Enable the X11 windowing system.
services.xserver.enable = true;
# Enable the MATE Desktop Environment.
services.xserver.displayManager.lightdm.enable = true;
services.xserver.desktopManager.mate.enable = true;
# Enable the KDE Plasma Desktop Environment.
services.xserver.displayManager.sddm.enable = true;
services.xserver.desktopManager.plasma5.enable = true;
# Configure keymap in X11
services.xserver = {
@ -72,10 +98,11 @@
# Define a user account. Don't forget to set a password with passwd.
users.users.xe = {
isNormalUser = true;
description = "Xe IAso";
description = "Xe";
extraGroups = [ "networkmanager" "wheel" ];
packages = with pkgs; [
firefox
kate
# thunderbird
];
};
@ -94,6 +121,9 @@
# wget
];
programs._1password-gui.enable = true;
services.flatpak.enable = true;
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
@ -108,7 +138,7 @@
# services.openssh.enable = true;
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
networking.firewall.allowedTCPPorts = [ 9100 ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;

View File

@ -4,30 +4,32 @@
{ config, lib, pkgs, modulesPath, ... }:
{
imports = [ ];
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "virtio_pci" "xhci_pci" "usb_storage" "usbhid" ];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/402c8c24-de0b-4392-9a28-37517b15d0cf";
{ device = "/dev/disk/by-uuid/2cfe44a5-4f2f-4629-9469-e2e51f615f52";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/CF82-94A5";
fileSystems."/boot/efi" =
{ device = "/dev/disk/by-uuid/F4E2-BB3E";
fsType = "vfat";
};
fileSystems."/host" =
{ device = "share";
fsType = "virtiofs";
fileSystems."/data" =
{ device = "/dev/disk/by-uuid/a84c680c-4e0d-4cee-9f7c-1e131e689d3c";
fsType = "ext4";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/3fb88e75-9469-4b50-8ec0-c4fdd4dea9d0"; }
[ { device = "/dev/disk/by-uuid/337c4cbe-824a-49d6-aca7-102b392fdf5f"; }
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
@ -35,7 +37,8 @@
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp0s1.useDHCP = lib.mkDefault true;
# networking.interfaces.enp37s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View File

@ -18,4 +18,7 @@
# Optionally, you may need to select the appropriate driver version for your specific GPU.
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable;
virtualisation.docker.enableNvidia = true;
hardware.opengl.driSupport32Bit = true;
}

View File

@ -1,6 +1,6 @@
{ ... }: {
services.minecraft-server = {
enable = true;
enable = false;
eula =
true; # set to true if you agree to Mojang's EULA: https://account.mojang.com/documents/minecraft_eula
declarative = true;

View File

@ -9,4 +9,7 @@
services.xserver.videoDrivers = [ "nvidia" ];
hardware.opengl.enable = true;
virtualisation.docker.enableNvidia = true;
hardware.opengl.driSupport32Bit = true;
}

View File

@ -1,11 +1,17 @@
{ config, pkgs, ... }:
{ config, pkgs, lib, ... }:
{
boot.binfmt.emulatedSystems = [ "aarch64-linux" "wasm32-wasi" ];
virtualisation.docker.enable = true;
users.motd = builtins.readFile ./motd;
services.tailscale.port = 15430;
environment.systemPackages = with pkgs; [ wasmtime ];
environment.systemPackages = with pkgs; [ wasmtime weechat ];
services.tor = {
enable = true;
client.enable = true;
settings.SOCKSPort = [ 9051 ];
};
networking.hostName = "pneuma";
networking.hostId = "34fbd94b";

View File

@ -1,111 +0,0 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
../../hardware/macos-rosetta
];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# networking.hostName = "nixos"; # Define your hostname.
# Pick only one of the below networking options.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
# Set your time zone.
# time.timeZone = "Europe/Amsterdam";
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Select internationalisation properties.
# i18n.defaultLocale = "en_US.UTF-8";
# console = {
# font = "Lat2-Terminus16";
# keyMap = "us";
# useXkbConfig = true; # use xkbOptions in tty.
# };
# Enable the X11 windowing system.
# services.xserver.enable = true;
# Configure keymap in X11
# services.xserver.layout = "us";
# services.xserver.xkbOptions = {
# "eurosign:e";
# "caps:escape" # map caps to escape.
# };
# Enable CUPS to print documents.
# services.printing.enable = true;
# Enable sound.
# sound.enable = true;
# hardware.pulseaudio.enable = true;
# Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true;
# Define a user account. Don't forget to set a password with passwd.
# users.users.alice = {
# isNormalUser = true;
# extraGroups = [ "wheel" ]; # Enable sudo for the user.
# packages = with pkgs; [
# firefox
# thunderbird
# ];
# };
# List packages installed in system profile. To search, run:
# $ nix search wget
# environment.systemPackages = with pkgs; [
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
# wget
# ];
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
# programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
# };
# List services that you want to enable:
# Enable the OpenSSH daemon.
# services.openssh.enable = true;
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# Copy the NixOS configuration file and link it from the resulting system
# (/run/current-system/configuration.nix). This is useful in case you
# accidentally delete configuration.nix.
# system.copySystemConfiguration = true;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "23.05"; # Did you read the comment?
}

100
modules/workVM.nix Normal file
View File

@ -0,0 +1,100 @@
inputs:
({ pkgs, config, ... }: {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
nixpkgs.overlays = [ inputs.emacs-overlay.overlay ];
nix.package = pkgs.nixVersions.stable;
nix.extraOptions = ''
experimental-features = nix-command flakes
'';
security.pam.loginLimits = [{
domain = "*";
type = "soft";
item = "nofile";
value = "unlimited";
}];
services.journald.extraConfig = ''
SystemMaxUse=100M
MaxFileSec=7day
'';
services.resolved = {
enable = true;
dnssec = "false";
};
users.groups.xe = { };
users.users.xe = {
extraGroups = [
"wheel"
"docker"
"audio"
"plugdev"
"libvirtd"
"adbusers"
"dialout"
"within"
];
shell = pkgs.fish;
isNormalUser = true;
group = "xe";
};
boot.binfmt.emulatedSystems = [ "wasm32-wasi" ];
environment.systemPackages = with pkgs; [ mosh flyctl ];
virtualisation.docker.enable = true;
services.tailscale.enable = true;
home-manager.users.xe = { lib, ... }:
let
name = "Xe Iaso";
email = "xe@tailscale.com";
commitTemplate = pkgs.writeTextFile {
name = "xe-commit-template";
text = ''
Signed-off-by: ${name} <${email}>
'';
};
in {
imports = [ ./common/home-manager ];
within = {
emacs.enable = true;
fish.enable = true;
neofetch.enable = true;
vim.enable = true;
tmux.enable = true;
};
services.lorri.enable = true;
services.emacs.enable = lib.mkForce false;
programs.direnv.enable = true;
programs.direnv.nix-direnv.enable = true;
programs.git = {
package = pkgs.gitAndTools.gitFull;
enable = true;
userName = name;
userEmail = email;
ignores = [ "*~" "*.swp" "*.#" ];
delta.enable = true;
extraConfig = {
commit.template = "${commitTemplate}";
core.editor = "vim";
color.ui = "auto";
credential.helper = "store --file ~/.git-credentials";
format.signoff = true;
init.defaultBranch = "main";
protocol.keybase.allow = "always";
pull.rebase = "true";
push.default = "current";
};
};
};
})

86
modules/wsl.nix Normal file
View File

@ -0,0 +1,86 @@
inputs:
{ config, pkgs, ... }: {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
nixpkgs.overlays = [ inputs.emacs-overlay.overlay ];
networking.hostName = "xatci";
networking.nameservers = [ "100.100.100.100" ];
networking.search = [ "shark-harmonic.ts.net" ];
wsl = {
enable = true;
automountPath = "/mnt";
defaultUser = "cadey";
startMenuLaunchers = true;
};
nix.package = pkgs.nixVersions.stable;
nix.extraOptions = ''
experimental-features = nix-command flakes
'';
users.users.cadey = {
extraGroups = [
"wheel"
"docker"
"audio"
"plugdev"
"libvirtd"
"adbusers"
"dialout"
"within"
];
shell = pkgs.fish;
};
environment.systemPackages = with pkgs; [ mosh flyctl ];
virtualisation.docker.enable = true;
home-manager.users.cadey = { lib, ... }:
let
name = "Xe Iaso";
email = "me@xeiaso.net";
commitTemplate = pkgs.writeTextFile {
name = "cadey-commit-template";
text = ''
Signed-off-by: ${name} <${email}>
'';
};
in {
imports = [ ./common/home-manager ];
within = {
emacs.enable = true;
fish.enable = true;
neofetch.enable = true;
vim.enable = true;
tmux.enable = true;
};
services.emacs.enable = lib.mkForce false;
programs.direnv.enable = true;
programs.direnv.nix-direnv.enable = true;
programs.git = {
package = pkgs.gitAndTools.gitFull;
enable = true;
userName = name;
userEmail = email;
ignores = [ "*~" "*.swp" "*.#" ];
delta.enable = true;
extraConfig = {
commit.template = "${commitTemplate}";
core.editor = "vim";
color.ui = "auto";
credential.helper = "store --file ~/.git-credentials";
format.signoff = true;
init.defaultBranch = "main";
protocol.keybase.allow = "always";
pull.rebase = "true";
push.default = "current";
};
};
};
}

View File

@ -0,0 +1,12 @@
final: prev: {
tree-sitter-grammars = prev.tree-sitter-grammars // {
tree-sitter-typescript =
prev.tree-sitter-grammars.tree-sitter-typescript.overrideAttrs (_: {
nativeBuildInputs = [ final.nodejs final.tree-sitter ];
configurePhase = ''
tree-sitter generate --abi 13 typescript/src/grammar.json
tree-sitter generate --abi 13 tsx/src/grammar.json
'';
});
};
}

6
overlays/weechat.nix Normal file
View File

@ -0,0 +1,6 @@
final: prev: {
weechat = with prev.weechatScripts;
prev.weechat.override {
configure = { availablePlugins, ... }: { scripts = [ multiline ]; };
};
}

31
secret/vest-pit-near.age Normal file
View File

@ -0,0 +1,31 @@
age-encryption.org/v1
-> ssh-ed25519 jO2MvQ R7mnP98BF9irvrwmSiGXvCGSH4HRHEXueLCI5hPi4Rg
e4gCAVjIMqK9sMCrJOvDkvDqBr/8049SYw07OfqeSlc
-> ssh-ed25519 txQL9A n1Li4JKnpqfuhOYkcxG1feGB6NLOWosw7a1EkfiVVA0
YGNaFwd8LDA9fM/k4SLUNLKfWUVAPPgROv1IBgQB28c
-> ssh-ed25519 YcYwVA MKLHtMwH0HnJqbh/jX7SeY3VzAZjuDHkZPImTBFhsVc
7Fc9pKjIeZmeSxnkMsypBh8z8samVzZtMDhZPh/57x0
-> ssh-ed25519 rIaBGw q6vi7BoJjbEiW5mgEQftQMPe36e8SDVOAuRcgtxqPH0
622SRT3yK2/VR6fIVfZiM6dH1lXZtqu70+FiFMaHRWc
-> ssh-ed25519 H5HtPA NRfYR7Ziw/knEdVl8b+tps+52faQ6MFK0pZ38ky00Vo
3peAElIrLbMEehH3nXybb7sHIX59d3zO2+S9QCVuUu0
-> ssh-ed25519 Yy06mw tXs3VZaZLgST6132PPrc+gINdNTA7W9A45RP0asmAkE
VPJNJzxdSEhd2tUOHxgdj1H/izwx2pigprmX/PWGN9U
-> ssh-ed25519 6Sqpww jxhE5WAniOiMRQCEP3vh9tvUGhDnfOM6En/a6j+QG20
98KyhGiz8h2Y45mnybgYJwYvX79hQ/GLjRmZEM3mLbk
-> ssh-ed25519 Cb6l4g HpQlmIKD+Z5mVWNOrXA3IcAOKEiQ1AqTlSFO1O3BUQo
pjCKevKMv7l3iizclZssYEp8OUD9PpxSrvCsPi349Gs
-> ssh-ed25519 x40ZwA EKcqkK1B9jGdcTbDYUNw8tCENTZQZ5aSxHivZk7oUk0
Clq2yo9lYorE5FGu7BV3pjKZ9TKfTqeocNe0vZcmPTI
-> ssh-ed25519 ZvILxA Ds3kdk1rrs/zIlNyqUpmfawQS5LUwpTFuRYLaMQnNlA
CLNJRbTIEsQN5l8NfjS+q1qULiufoWpREZwOC+GOUR4
-> ssh-ed25519 0rx8bA Lc/VcsCB6K0smEcw5Ra1/xX9okpxNeIWEJuPLhv9lAI
/1V5SARjLBI1yiTJIyZpw9LYhZHIontyfJptrxbUr2E
-> ssh-ed25519 extxyg 0buC/eLOhx3bKc+fPo3P8fsFJDNY7u8ZUlw0QPMktSU
/gLQMN/h7hGC0UuMTEFK+mUwEpEWHP8yIdfzDGtwsGY
-> W)i,{"{-grease e'#HhO$m ?V,hnK^. rzk
Rc3mJ+WKdEOna0xQgjaJIKM4Ul41t+qlZE/VLzmtIctw6c9MHyPT/FbzDh/I3oM0
c5y/AK00jKDpYpM5u6JWI4RAVySb5Q
--- j4F8++dU88EAhmgbQnzdssB4TMism4qhysNVZILXUJs
,çÃëËÒQ>~£t¢&%²£ý2€\ÓP>¥c×ʬò/MyË"ŒTÐ_:¢¶=΅θn®õ<.ôfúYø
Ð6çc™,’«}BX <01>—~ÉüDì^àçÇ«-Y×ü™†<E284A2>´¾Ü½@*0æ¿iÉ¡&x;!¦ˆlèÍWΕ‰Ò0¦l}×%àÏ[Þʨ@ïŸÀPEì'î÷Ë0Ï÷@Óù¸¦K³¨<C2B3>>Œî<12>°®“,îi%œÙåï]¨á)_ˆ­WóÉaA<1C>\9qØ·_°ÏžîQg1j

View File

@ -42,6 +42,7 @@ in {
"secret/aws-within.website.age".publicKeys = publicKeys;
"secret/robocadey.age".publicKeys = publicKeys;
"secret/vest-pit-near.age".publicKeys = publicKeys;
"secret/akko-keyid.age".publicKeys = publicKeys;
"secret/akko-applicationkey.age".publicKeys = publicKeys;
}