Compare commits

...

19 commits

Author SHA1 Message Date
159e7a7c72
Make pre-commit re-use the same config for treefmt
All checks were successful
/ test (push) Successful in 1m23s
2024-11-15 10:06:16 +01:00
827f1d16d9
Trying to fix nix-on-droid 2024-11-15 10:06:11 +01:00
ef177f1293
tree-sitter-hl-mode doesn't exist anymore 2024-11-15 10:05:43 +01:00
a031de90f4
Enable gptsript-mode for .gpt files 2024-11-15 10:05:12 +01:00
c71d2715a3
Otherwise a firefox window pop up every time Emacs starts 2024-11-15 10:04:32 +01:00
e66b6653db
Typo 2024-11-15 10:04:20 +01:00
bcbbe82906
This has to be a symbol now apparently 2024-11-15 10:04:00 +01:00
0f3d872faf
Fix org capture template 2024-11-15 10:03:39 +01:00
392e10d5c4
Use external (not committed) custom file 2024-11-15 10:03:25 +01:00
8f46975d54
Remove rock5b input 2024-11-15 10:03:02 +01:00
0eff21231b
Packages renamed 2024-11-15 10:02:50 +01:00
fb1244edcf
Tridactyl uses emacsclient as external editor 2024-11-15 10:02:22 +01:00
00f6fd9f6e
Proof of concept work in progress darwin deployment script 2024-11-15 10:02:04 +01:00
f13e48aaaf
Not using swayvnc anymore (sunshine is better) 2024-11-15 10:01:41 +01:00
9f1eeca6b4
New default name 2024-11-15 10:01:29 +01:00
13a40b624d
Add gptscript to Emacs packages 2024-11-15 10:01:01 +01:00
9e4694d115
Add telega to Emacs packages 2024-11-15 10:00:24 +01:00
0175810b04
Not relevant anymore 2024-11-15 09:59:52 +01:00
3451b47e6a
Format 2024-11-15 09:58:47 +01:00
12 changed files with 67 additions and 238 deletions

View file

@ -11,19 +11,22 @@
];
perSystem =
{ ... }:
{ config, ... }:
{
treefmt.config = {
projectRootFile = ".git/config";
flakeFormatter = true;
flakeCheck = true;
programs = {
nixfmt.enable = true;
deadnix.enable = false;
};
};
pre-commit.settings.hooks = {
nixfmt-rfc-style.enable = true;
deadnix.enable = false;
pre-commit.settings = {
hooks.treefmt = {
enable = true;
package = config.treefmt.build.wrapper;
};
};
};

185
flake.lock generated
View file

@ -132,22 +132,6 @@
"type": "github"
}
},
"fan-control": {
"flake": false,
"locked": {
"lastModified": 1669548492,
"narHash": "sha256-qqPmOEF+r10VGz3izAnHZW6aJk1mOXy9BrpR9FvWSt0=",
"owner": "pymumu",
"repo": "fan-control-rock5b",
"rev": "8419990c6c0f47a3ed0b55255d7e3591cc5fdab9",
"type": "github"
},
"original": {
"owner": "pymumu",
"repo": "fan-control-rock5b",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
@ -277,24 +261,6 @@
"type": "indirect"
}
},
"flake-parts_5": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib_3"
},
"locked": {
"lastModified": 1678379998,
"narHash": "sha256-TZdfNqftHhDuIFwBcN9MUThx5sQXCTeZk9je5byPKRw=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "c13d60b89adea3dc20704c045ec4d50dd964d447",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems_2"
@ -547,23 +513,6 @@
"type": "github"
}
},
"kernel-src": {
"flake": false,
"locked": {
"lastModified": 1676631659,
"narHash": "sha256-TjAF7BPSDy5iHSk8byp+vsKop0V+rqrmr+TXLqXLB2M=",
"owner": "radxa",
"repo": "kernel",
"rev": "a9583fb47e9b96c552f458a376207141602c0025",
"type": "github"
},
"original": {
"owner": "radxa",
"repo": "kernel",
"rev": "a9583fb47e9b96c552f458a376207141602c0025",
"type": "github"
}
},
"lanzaboote": {
"inputs": {
"crane": "crane",
@ -847,22 +796,6 @@
"type": "github"
}
},
"nixpkgs-kernel": {
"locked": {
"lastModified": 1656239181,
"narHash": "sha256-wW1xRFBn376yGloXZ4QzBE4hjipMawpV18Lshd9QSPw=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "f2537a505d45c31fe5d9c27ea9829b6f4c4e6ac5",
"type": "github"
},
"original": {
"owner": "nixos",
"repo": "nixpkgs",
"rev": "f2537a505d45c31fe5d9c27ea9829b6f4c4e6ac5",
"type": "github"
}
},
"nixpkgs-lib": {
"locked": {
"lastModified": 1730504152,
@ -893,24 +826,6 @@
"type": "github"
}
},
"nixpkgs-lib_3": {
"locked": {
"dir": "lib",
"lastModified": 1678375444,
"narHash": "sha256-XIgHfGvjFvZQ8hrkfocanCDxMefc/77rXeHvYdzBMc8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "130fa0baaa2b93ec45523fdcde942f6844ee9f6e",
"type": "github"
},
"original": {
"dir": "lib",
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1730741070,
@ -1053,22 +968,6 @@
}
},
"nixpkgs_8": {
"locked": {
"lastModified": 1678470307,
"narHash": "sha256-OEeMUr3ueLIXyW/OaFUX5jUdimyQwMg/7e+/Q0gC/QE=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "0c4800d579af4ed98ecc47d464a5e7b0870c4b1f",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_9": {
"locked": {
"lastModified": 1682134069,
"narHash": "sha256-TnI/ZXSmRxQDt2sjRYK/8j8iha4B4zP2cnQCZZ3vp7k=",
@ -1136,22 +1035,6 @@
"type": "github"
}
},
"panfork": {
"flake": false,
"locked": {
"lastModified": 1670633863,
"narHash": "sha256-4eZHMiYS+sRDHNBtLZTA8ELZnLns7yT3USU5YQswxQ0=",
"owner": "panfork",
"repo": "mesa",
"rev": "120202c675749c5ef81ae4c8cdc30019b4de08f4",
"type": "gitlab"
},
"original": {
"owner": "panfork",
"repo": "mesa",
"type": "gitlab"
}
},
"pre-commit-hooks-nix": {
"inputs": {
"flake-compat": [
@ -1219,31 +1102,6 @@
"type": "github"
}
},
"rock5b": {
"inputs": {
"fan-control": "fan-control",
"flake-parts": "flake-parts_5",
"kernel-src": "kernel-src",
"nixpkgs": "nixpkgs_8",
"nixpkgs-kernel": "nixpkgs-kernel",
"panfork": "panfork",
"tow-boot": "tow-boot",
"treefmt-nix": "treefmt-nix_2"
},
"locked": {
"lastModified": 1685695782,
"narHash": "sha256-zBQFjZhFWsxCA31jI4Ui3l8KhrqQaG0dHi/v/vIvZcM=",
"owner": "aciceri",
"repo": "rock5b-nixos",
"rev": "3868939df4a6d5292077e154c8cb36de1fde4d30",
"type": "github"
},
"original": {
"owner": "aciceri",
"repo": "rock5b-nixos",
"type": "github"
}
},
"root": {
"inputs": {
"agenix": "agenix",
@ -1266,8 +1124,7 @@
"nixThePlanet": "nixThePlanet",
"nixosHardware": "nixosHardware",
"nixpkgs": "nixpkgs_7",
"rock5b": "rock5b",
"treefmt-nix": "treefmt-nix_3",
"treefmt-nix": "treefmt-nix_2",
"vscode-server": "vscode-server"
}
},
@ -1375,23 +1232,6 @@
"type": "github"
}
},
"tow-boot": {
"flake": false,
"locked": {
"lastModified": 1677346757,
"narHash": "sha256-3SKlcZhfUaNz1bd/l/1B3D66NUk3sALVIyP8DHv41SU=",
"owner": "aciceri",
"repo": "Tow-Boot",
"rev": "85d099f3473effdeca409bd165175d64dfb37ecc",
"type": "github"
},
"original": {
"owner": "aciceri",
"ref": "rock5b",
"repo": "Tow-Boot",
"type": "github"
}
},
"treefmt-nix": {
"inputs": {
"nixpkgs": [
@ -1414,27 +1254,6 @@
}
},
"treefmt-nix_2": {
"inputs": {
"nixpkgs": [
"rock5b",
"nixpkgs"
]
},
"locked": {
"lastModified": 1678277086,
"narHash": "sha256-fQ1G72KhLWWf2z+ug9+4ErTEayvlcVQMul0qusKKBgk=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "ec39cfa24342fdf0b04ae44592a191c4765f9c74",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
},
"treefmt-nix_3": {
"inputs": {
"nixpkgs": [
"nixpkgs"
@ -1457,7 +1276,7 @@
"vscode-server": {
"inputs": {
"flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_9"
"nixpkgs": "nixpkgs_8"
},
"locked": {
"lastModified": 1729422940,

View file

@ -23,7 +23,6 @@
inputs.nixpkgs.follows = "nixpkgs";
};
agenix.url = "github:ryantm/agenix";
rock5b.url = "github:aciceri/rock5b-nixos";
treefmt-nix = {
url = "github:numtide/treefmt-nix";
inputs.nixpkgs.follows = "nixpkgs";

View file

@ -44,8 +44,8 @@ in
mediainfo
unzipNLS
nodejs_20
pkgs.qadwaitadecorations
pkgs.kdePackages.qtwayland
qadwaitadecorations
kdePackages.qtwayland
]
++ (with hunspellDicts; [
en_US-large
@ -62,12 +62,12 @@ in
);
in
lib.hm.dag.entryAfter [ "writeBoundary" ] ''
PATH=$PATH:${path}
if [ ! -d "$HOME/.config/emacs" ]; then
mkdir "$HOME/.config/emacs"
$DRY_RUN_CMD ln -s "$HOME/projects/aciceri/nixfleet/hmModules/emacs/init.el" "$HOME/.config/emacs/init.el"
$DRY_RUN_CMD ln -s "$HOME/.config/emacs" "$HOME/emacs"
fi
$DRY_RUN_CMD ln -sfn ${treesitGrammars} "$HOME/.config/emacs/tree-sitter"
PATH=$PATH:${path}
if [ ! -d "$HOME/.config/emacs" ]; then
mkdir "$HOME/.config/emacs"
$DRY_RUN_CMD ln -s "$HOME/projects/aciceri/nixfleet/hmModules/emacs/init.el" "$HOME/.config/emacs/init.el"
$DRY_RUN_CMD ln -s "$HOME/.config/emacs" "$HOME/emacs"
fi
$DRY_RUN_CMD ln -sfn ${treesitGrammars} "$HOME/.config/emacs/tree-sitter"
'';
}

View file

@ -57,6 +57,7 @@
(focus-follows-mouse t)
(mouse-autoselect-window t)
(treesit-font-lock-level 4)
(custom-file "~/.config/emacs/custom.el")
:config
(set-face-background 'vertical-border (face-background 'default))
(set-display-table-slot standard-display-table 'vertical-border (make-glyph-code ?┃))
@ -522,10 +523,13 @@
))
(use-package yaml-mode
:hook (yaml-mode . tree-sitter-hl-mode))
:hook (yaml-mode . yaml-ts-mode))
(use-package sh-mode
:hook (sh-mode . tree-sitter-hl-mode))
:hook (sh-mode . bash-ts-mode))
(use-package gptscript-mode
:mode "\\.gpt\\'")
;; FIXME
;; (use-package mmm-mode
@ -772,7 +776,7 @@ This is meant to be an helper to be called from the window manager."
:target (file+head "%<%Y-%m-%d>.org" "#+TITLE: %<%Y-%m-%d>"))
("b" "Billable entry" entry
"* TODO ${Entry} :billable:${Client}:\n:PROPERTIES:\n:SPENT: ${Spent}\n:END:\n%?"
:target (file+head "%<%Y-%m-%d>.org" "#+title %<%Y-%m-%d>")
:target (file+head "%<%Y-%m-%d>.org" "#+TITLE: %<%Y-%m-%d>")
:create-id t))
)
:config
@ -847,19 +851,18 @@ This is meant to be an helper to be called from the window manager."
("C-c n s" . consult-org-roam-search))
(use-package org-roam-ui
:straight
:after org-roam
:hook (after-init . org-roam-ui-mode) ;; don't care about startup time since I'm using Emacs daemonized
:config
(setq org-roam-ui-sync-theme t
org-roam-ui-follow t
org-roam-ui-update-on-save t
org-roam-ui-open-on-start t))
org-roam-ui-open-on-start nil))
(use-package gptel
:custom
(gptel-api-key (lambda () (require 'f) (f-read-text (getenv "OPENAI_API_KEY_PATH"))))
(gptel-model "gpt-4o")
(gptel-model 'gpt-4o)
:config
(require 'gptel-curl)
@ -948,30 +951,3 @@ This is meant to be an helper to be called from the window manager."
(provide 'init)
;;; init.el ends here
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(custom-safe-themes
'("5bafdfa3e21f921abf9b9fd77e1e0ce032e62e3a6f8f13ec8ce7945727c654e9"
"5f92b9fc442528b6f106eaefa18bb5e7bfa0d737164e18f1214410fef2a6678d"
"b7f70bd00f79099f11d67a25c592d70593377488a263bb3dd73dee99b0549dba"
"7d10494665024176a90895ff7836a8e810d9549a9872c17db8871900add93d5c"
"b5c3c59e2fff6877030996eadaa085a5645cc7597f8876e982eadc923f597aca" default))
'(magit-todos-insert-after '(bottom) nil nil "Changed by setter of obsolete option `magit-todos-insert-at'")
'(org-fold-catch-invisible-edits 'show-and-error nil nil "Customized with use-package org")
'(safe-local-variable-values
'((eval progn (require 'org-re-reveal)
(add-hook 'after-save-hook #'org-re-reveal-export-to-html nil t))
(copilot-mode 0) (copilot-mode -1))))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
;; Local Variables:
;; byte-compile-warnings: (not free-vars noruntime unresolved)
;; End:

View file

@ -86,7 +86,7 @@ in
};
xdg.configFile."tridactyl/tridactylrc".text = ''
set editorcmd footclient -e hx %f
set editorcmd emacsclient -c %f
colors catppuccin
'';

View file

@ -25,7 +25,7 @@ in
../gammastep
# ../wezterm
# ../wayvnc
../swaync
# ../swaync
../foot
];

View file

@ -1,7 +1,9 @@
{ pkgs, ... }:
{
environment.systemPackages = [
pkgs.vim
environment.systemPackages = with pkgs; [
helix
vim
git
];
nix.settings.experimental-features = "nix-command flakes";
@ -10,5 +12,5 @@
services.nix-daemon.enable = true;
# nixpkgs.localSystem = "x86_64-darwin";
system.stateVersion = 5;
}

View file

@ -0,0 +1,9 @@
{
writeShellApplication,
...
}:
writeShellApplication {
name = "deploy-darwin";
text = builtins.readFile ./deploy-darwin.sh;
runtimeInputs = [ ];
}

View file

@ -0,0 +1,11 @@
CLOSURE_DRV=$(nix eval .#darwinConfigurations.archer.config.system.build.toplevel.drvPath --raw)
echo "$CLOSURE_DRV"
nix copy --to ssh://admin@macos-ventura "$CLOSURE_DRV"
# shellcheck disable=SC2029
ssh admin@macos-ventura "nix build $CLOSURE_DRV^out"
ssh admin@macos-ventura "./result/activate-user"
ssh admin@macos-ventura "echo admin | sudo -S ./result/activate"
# ssh admin@macos-ventura "./result/sw/bin/darwin-rebuild activate"
ssh admin@macos-ventura "nix profile install ./result"

View file

@ -1,4 +1,4 @@
host=${1-mothership}
host=${1-picard}
nixos-rebuild switch \
--flake ".#${host}" \

View file

@ -24,6 +24,16 @@ let
};
deps = [ ];
};
gptscript = buildEmacsPackage {
name = "gptscript";
src = pkgs.fetchFromGitHub {
owner = "emacs-openai";
repo = "gptscript-mode";
rev = "d9c6272de1288d3f42a1cbac136e5fac57e185e2";
hash = "sha256-RM0dptx8qm2b4fvW6oQ0Lq5kshRKcapeIW2piUMAZmw=";
};
deps = [ ];
};
};
# *List* containing emacs packages from (M)ELPA
@ -106,8 +116,8 @@ let
gptel
agenix
solidity-mode
telega
# org-re-reveal # FIXME very not nice hash mismatch when building
# gptel # TODO uncomment when there will be a new release including GPT-4o
]
)
++ (with elpaPackages; [