diff --git a/checks/default.nix b/checks/default.nix index 741d164..376d792 100644 --- a/checks/default.nix +++ b/checks/default.nix @@ -11,22 +11,19 @@ ]; perSystem = - { config, ... }: + { ... }: { treefmt.config = { projectRootFile = ".git/config"; - flakeFormatter = true; - flakeCheck = true; programs = { nixfmt.enable = true; + deadnix.enable = false; }; }; - pre-commit.settings = { - hooks.treefmt = { - enable = true; - package = config.treefmt.build.wrapper; - }; + pre-commit.settings.hooks = { + nixfmt-rfc-style.enable = true; + deadnix.enable = false; }; }; diff --git a/flake.lock b/flake.lock index b8a8446..a5198a6 100644 --- a/flake.lock +++ b/flake.lock @@ -132,6 +132,22 @@ "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": { @@ -261,6 +277,24 @@ "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" @@ -513,6 +547,23 @@ "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", @@ -796,6 +847,22 @@ "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, @@ -826,6 +893,24 @@ "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, @@ -968,6 +1053,22 @@ } }, "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=", @@ -1035,6 +1136,22 @@ "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": [ @@ -1102,6 +1219,31 @@ "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", @@ -1124,7 +1266,8 @@ "nixThePlanet": "nixThePlanet", "nixosHardware": "nixosHardware", "nixpkgs": "nixpkgs_7", - "treefmt-nix": "treefmt-nix_2", + "rock5b": "rock5b", + "treefmt-nix": "treefmt-nix_3", "vscode-server": "vscode-server" } }, @@ -1232,6 +1375,23 @@ "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": [ @@ -1254,6 +1414,27 @@ } }, "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" @@ -1276,7 +1457,7 @@ "vscode-server": { "inputs": { "flake-utils": "flake-utils_2", - "nixpkgs": "nixpkgs_8" + "nixpkgs": "nixpkgs_9" }, "locked": { "lastModified": 1729422940, diff --git a/flake.nix b/flake.nix index de2ff34..e62a744 100644 --- a/flake.nix +++ b/flake.nix @@ -23,6 +23,7 @@ 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"; diff --git a/hmModules/emacs/default.nix b/hmModules/emacs/default.nix index 5eba7b8..54ff7dc 100644 --- a/hmModules/emacs/default.nix +++ b/hmModules/emacs/default.nix @@ -44,8 +44,8 @@ in mediainfo unzipNLS nodejs_20 - qadwaitadecorations - kdePackages.qtwayland + pkgs.qadwaitadecorations + pkgs.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" ''; } diff --git a/hmModules/emacs/init.el b/hmModules/emacs/init.el index d69b69c..154a4bc 100644 --- a/hmModules/emacs/init.el +++ b/hmModules/emacs/init.el @@ -57,7 +57,6 @@ (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 ?┃)) @@ -523,13 +522,10 @@ )) (use-package yaml-mode - :hook (yaml-mode . yaml-ts-mode)) + :hook (yaml-mode . tree-sitter-hl-mode)) (use-package sh-mode - :hook (sh-mode . bash-ts-mode)) - -(use-package gptscript-mode - :mode "\\.gpt\\'") + :hook (sh-mode . tree-sitter-hl-mode)) ;; FIXME ;; (use-package mmm-mode @@ -776,7 +772,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 @@ -851,18 +847,19 @@ 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 nil)) + org-roam-ui-open-on-start t)) (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) @@ -951,3 +948,30 @@ 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: diff --git a/hmModules/firefox/default.nix b/hmModules/firefox/default.nix index 400341e..bb04ac5 100644 --- a/hmModules/firefox/default.nix +++ b/hmModules/firefox/default.nix @@ -86,7 +86,7 @@ in }; xdg.configFile."tridactyl/tridactylrc".text = '' - set editorcmd emacsclient -c %f + set editorcmd footclient -e hx %f colors catppuccin ''; diff --git a/hmModules/hyprland/default.nix b/hmModules/hyprland/default.nix index 884d68b..bcc035e 100644 --- a/hmModules/hyprland/default.nix +++ b/hmModules/hyprland/default.nix @@ -25,7 +25,7 @@ in ../gammastep # ../wezterm # ../wayvnc - # ../swaync + ../swaync ../foot ]; diff --git a/hosts/archer/default.nix b/hosts/archer/default.nix index 6a4ac88..de91621 100644 --- a/hosts/archer/default.nix +++ b/hosts/archer/default.nix @@ -1,9 +1,7 @@ { pkgs, ... }: { - environment.systemPackages = with pkgs; [ - helix - vim - git + environment.systemPackages = [ + pkgs.vim ]; nix.settings.experimental-features = "nix-command flakes"; @@ -12,5 +10,5 @@ services.nix-daemon.enable = true; - system.stateVersion = 5; + # nixpkgs.localSystem = "x86_64-darwin"; } diff --git a/packages/deploy-darwin/default.nix b/packages/deploy-darwin/default.nix deleted file mode 100644 index 3feba21..0000000 --- a/packages/deploy-darwin/default.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ - writeShellApplication, - ... -}: -writeShellApplication { - name = "deploy-darwin"; - text = builtins.readFile ./deploy-darwin.sh; - runtimeInputs = [ ]; -} diff --git a/packages/deploy-darwin/deploy-darwin.sh b/packages/deploy-darwin/deploy-darwin.sh deleted file mode 100644 index baf540b..0000000 --- a/packages/deploy-darwin/deploy-darwin.sh +++ /dev/null @@ -1,11 +0,0 @@ -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" diff --git a/packages/deploy/deploy.sh b/packages/deploy/deploy.sh index 5e1b791..045facb 100644 --- a/packages/deploy/deploy.sh +++ b/packages/deploy/deploy.sh @@ -1,4 +1,4 @@ -host=${1-picard} +host=${1-mothership} nixos-rebuild switch \ --flake ".#${host}" \ diff --git a/packages/emacs/packages.nix b/packages/emacs/packages.nix index 7b1d204..2f30f68 100644 --- a/packages/emacs/packages.nix +++ b/packages/emacs/packages.nix @@ -24,16 +24,6 @@ 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 @@ -116,8 +106,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; [