7 Commits

  1. 110
      README.org
  2. 56
      flake.lock
  3. 1
      flake.nix
  4. 1
      hosts/nixos/default.nix
  5. 2
      modules/emacs.nix
  6. 26
      modules/godot.nix
  7. 2
      modules/x11.nix

110
README.org

@ -17,8 +17,8 @@
#+HUGO_DRAFT: false
#+HTML: <a href="https://nixos.org"><img src="https://img.shields.io/badge/NixOS-unstable-blue.svg?style=flat-square&logo=NixOS&logoColor=white"></a>
#+HTML: <a href="https://www.gnu.org/software/emacs/"><img src="https://img.shields.io/badge/Emacs-29.0-blueviolet.svg?style=flat-square&logo=GNU%20Emacs&logoColor=white"></a>
#+HTML: <a href="https://orgmode.org"><img src="https://img.shields.io/badge/Org-9.6.6-%2377aa99?style=flat-square&logo=org&logoColor=white"></a>
#+HTML: <a href="https://www.gnu.org/software/emacs/"><img src="https://img.shields.io/badge/Emacs-29.1-blueviolet.svg?style=flat-square&logo=GNU%20Emacs&logoColor=white"></a>
#+HTML: <a href="https://orgmode.org"><img src="https://img.shields.io/badge/Org-9.6.12-%2377aa99?style=flat-square&logo=org&logoColor=white"></a>
#+NAME: description
#+BEGIN_SRC text
@ -591,7 +591,6 @@ nixos = nixpkgs.lib.nixosSystem {
<<module-x11>>
<<module-ssh>>
<<module-hugo>>
<<module-godot>>
<<module-docker>>
<<module-flakes>>
<<module-cachix>>
@ -616,7 +615,6 @@ Deploy this configuration with ~nixos-rebuild switch --flake /etc/dotfiles/#nixo
modules.x11.enable = true;
modules.ssh.enable = true;
modules.hugo.enable = true;
modules.godot.enable = true;
modules.flakes.enable = true;
modules.cachix.enable = true;
modules.docker.enable = true;
@ -748,7 +746,7 @@ in {
services.picom.enable = true;
services.printing.enable = true;
fonts.fonts = with pkgs; [
fonts.packages = with pkgs; [
iosevka-bin
fira-code-symbols
emacs-all-the-icons-fonts
@ -844,44 +842,6 @@ in {
}
#+END_SRC
** Godot
#+NAME: module-godot
#+BEGIN_SRC nix
./modules/godot.nix
#+END_SRC
[[https://godotengine.org][Godot]] is a cross-platform, free and open-source game engine released under the MIT license. It provides a huge set of common tools, so you can focus on making your game without reinventing the wheel. It's completely free and open-source, no strings attached, no royalties. The game belongs to the creator down to each line of the engine code.
#+BEGIN_SRC nix :noweb yes :tangle modules/godot.nix
# <<file-warning>>
{ config, options, lib, pkgs, ... }:
with lib;
with lib.types;
let
cfg = config.modules.godot;
in {
options.modules.godot = {
enable = mkOption {
type = bool;
default = false;
};
};
config = mkIf cfg.enable {
environment.systemPackages = [
pkgs.tiled
pkgs.godot
pkgs.godot-server
pkgs.godot-headless
pkgs.gdtoolkit
];
};
}
#+END_SRC
** Flakes
#+NAME: module-flakes
@ -1401,7 +1361,6 @@ let
<<emacs-projectile-package>>
<<emacs-lsp-package>>
<<emacs-company-package>>
<<emacs-gdscript-package>>
<<emacs-ccls-package>>
<<emacs-golang-package>>
<<emacs-dart-package>>
@ -1488,6 +1447,7 @@ When Emacs is started, it normally tries to load a Lisp program from an ititiali
<<emacs-vterm-elisp>>
<<emacs-magit-elisp>>
<<emacs-fonts-elisp>>
<<emacs-line-numbers-elisp>>
<<emacs-frames-elisp>>
<<emacs-ligatures-elisp>>
<<emacs-elfeed-elisp>>
@ -1495,7 +1455,6 @@ When Emacs is started, it normally tries to load a Lisp program from an ititiali
<<emacs-electric-pair-elisp>>
<<emacs-lsp-elisp>>
<<emacs-company-elisp>>
<<emacs-gdscript-elisp>>
<<emacs-golang-elisp>>
<<emacs-typescript-elisp>>
<<emacs-dart-elisp>>
@ -2023,6 +1982,24 @@ epkgs.hydra
"tf" '(hydra-text-scale/body :which-key "Font"))
#+END_SRC
*** Line Numbers
With relative line numbers, each line in a file is numbered relative to the cursor's current position to show the distance to that line. The current line is marked 0, the ones above and below are marked 1, and so on.
#+NAME: emacs-line-numbers-elisp
#+BEGIN_SRC emacs-lisp
;; Enable relative line numbers.
;; (global-display-line-numbers-mode +1)
(setq display-line-numbers-type 'relative)
;; Enable line numbering for all programming modes.
(add-hook 'prog-mode-hook 'display-line-numbers-mode)
;; Add a shortcut to toggle line numbers.
(dotfiles/leader
"tl" '(display-line-numbers-mode :which-key "Line Numbers"))
#+END_SRC
*** Ligatures
#+NAME: emacs-ligatures-package
@ -2585,6 +2562,7 @@ pkgs.isync
#+NAME: emacs-mu4e-package
#+BEGIN_SRC nix
epkgs.mu4e
epkgs.mu4e-alert
#+END_SRC
@ -2779,48 +2757,6 @@ epkgs.company
(global-company-mode +1)
#+END_SRC
*** GDScript Mode
#+NAME: emacs-gdscript-package
#+BEGIN_SRC nix
epkgs.gdscript-mode
#+END_SRC
https://github.com/godotengine/emacs-gdscript-mode is an Emacs package to get GDScript support and syntax highlighting. Some of its features include:
+ Syntax highlighting
+ Code folding
+ Debugger support
+ Support for scenes and script files
+ Comment wrapping
+ Indentation
+ Automatic parsing
+ Code formatting
#+NAME: emacs-gdscript-elisp
#+BEGIN_SRC emacs-lisp
(require 'gdscript-mode)
;; Silence lsp warnings for gdscript.
(defun lsp--gdscript-ignore-errors (original-function &rest args)
"Ignore the error message resulting from Godot not replying to the `JSONRPC' request."
(if (string-equal major-mode "gdscript-mode")
(let ((json-data (nth 0 args)))
(if (and (string= (gethash "jsonrpc" json-data "") "2.0")
(not (gethash "id" json-data nil))
(not (gethash "method" json-data nil)))
nil; (message "Method not found")
(apply original-function args)))
(apply original-function args)))
;; Run the function around `lsp--get-message-type' to suppress warnings.
(advice-add #'lsp--get-message-type :around #'lsp--gdscript-ignore-errors)
;; Add custom keybinds.
(dotfiles/leader
"lg" '(gdscript-hydra-show :which-key "GDScript"))
#+END_SRC
*** Go Mode
#+NAME: emacs-golang-package

56
flake.lock

@ -7,11 +7,11 @@
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1685990369,
"narHash": "sha256-Il0jkVxzFveEXvsZTZcQM7zMn8xc8SZnnVjP6HtBsvg=",
"lastModified": 1700847529,
"narHash": "sha256-jvTozEnNxaR7jvHc50eAfHoP8aN7+QPt1ETqr+raGSo=",
"owner": "nix-community",
"repo": "emacs-overlay",
"rev": "d0ed6edc7561f7a5518bd51f501e0cc6f9aa3023",
"rev": "d419c32b00f86aa2bdf56ad8e1f4516b796539b9",
"type": "github"
},
"original": {
@ -25,11 +25,11 @@
"systems": "systems"
},
"locked": {
"lastModified": 1685518550,
"narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
"lastModified": 1694529238,
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef",
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
"type": "github"
},
"original": {
@ -43,11 +43,11 @@
"systems": "systems_2"
},
"locked": {
"lastModified": 1685518550,
"narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
"lastModified": 1694529238,
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef",
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
"type": "github"
},
"original": {
@ -63,11 +63,11 @@
]
},
"locked": {
"lastModified": 1685999310,
"narHash": "sha256-gaRMZhc7z4KeU/xS3IWv3kC+WhVcAXOLXXGKLe5zn1Y=",
"lastModified": 1700847865,
"narHash": "sha256-uWaOIemGl9LF813MW0AEgCBpKwFo2t1Wv3BZc6e5Frw=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "28614ed7a1e3ace824c122237bdc0e5e0b62c5c3",
"rev": "8cedd63eede4c22deb192f1721dd67e7460e1ebe",
"type": "github"
},
"original": {
@ -78,11 +78,11 @@
},
"nixos-hardware": {
"locked": {
"lastModified": 1684899633,
"narHash": "sha256-NtwerXX8UFsoNy6k+DukJMriWtEjQtMU/Urbff2O2Dg=",
"lastModified": 1700559156,
"narHash": "sha256-gL4epO/qf+wo30JjC3g+b5Bs8UrpxzkhNBBsUYxpw2g=",
"owner": "nixos",
"repo": "nixos-hardware",
"rev": "4cc688ee711159b9bcb5a367be44007934e1a49d",
"rev": "c3abafb01cd7045dba522af29b625bd1e170c2fb",
"type": "github"
},
"original": {
@ -93,11 +93,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1685931219,
"narHash": "sha256-8EWeOZ6LKQfgAjB/USffUSELPRjw88A+xTcXnOUvO5M=",
"lastModified": 1700612854,
"narHash": "sha256-yrQ8osMD+vDLGFX7pcwsY/Qr5PUd6OmDMYJZzZi0+zc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "7409480d5c8584a1a83c422530419efe4afb0d19",
"rev": "19cbff58383a4ae384dea4d1d0c823d72b49d614",
"type": "github"
},
"original": {
@ -109,27 +109,27 @@
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1685883127,
"narHash": "sha256-zPDaPNrAtBnO24rNqjHLINHsqTdRbgWy1c/TL3EdwlM=",
"lastModified": 1700678569,
"narHash": "sha256-2Ki+2UvOidxEb3xB4ADqlbPQ2BZOF4uZMR094O8or2I=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d4a9ff82fc18723219b60c66fb2ccb0734c460eb",
"rev": "8f1180704ac35baded1a74164365ac7cdfba6f38",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-22.11",
"ref": "nixos-23.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1686011541,
"narHash": "sha256-17FBPsSqj/HTzo2OXymc0bUnOzHp/qdBIn4tu6YOV5Y=",
"lastModified": 1700856099,
"narHash": "sha256-RnEA7iJ36Ay9jI0WwP+/y4zjEhmeN6Cjs9VOFBH7eVQ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "14d96ff665fb5f95b97f828c93b64a7159edd632",
"rev": "0bd59c54ef06bc34eca01e37d689f5e46b3fe2f1",
"type": "github"
},
"original": {
@ -140,11 +140,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1685931219,
"narHash": "sha256-8EWeOZ6LKQfgAjB/USffUSELPRjw88A+xTcXnOUvO5M=",
"lastModified": 1700612854,
"narHash": "sha256-yrQ8osMD+vDLGFX7pcwsY/Qr5PUd6OmDMYJZzZi0+zc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "7409480d5c8584a1a83c422530419efe4afb0d19",
"rev": "19cbff58383a4ae384dea4d1d0c823d72b49d614",
"type": "github"
},
"original": {

1
flake.nix

@ -22,7 +22,6 @@
./modules/x11.nix
./modules/ssh.nix
./modules/hugo.nix
./modules/godot.nix
./modules/docker.nix
./modules/flakes.nix
./modules/cachix.nix

1
hosts/nixos/default.nix

@ -10,7 +10,6 @@
modules.x11.enable = true;
modules.ssh.enable = true;
modules.hugo.enable = true;
modules.godot.enable = true;
modules.flakes.enable = true;
modules.cachix.enable = true;
modules.docker.enable = true;

2
modules/emacs.nix

@ -36,6 +36,7 @@ let
epkgs.password-store
epkgs.docker
epkgs.dockerfile-mode
epkgs.mu4e
epkgs.mu4e-alert
epkgs.dired-single
epkgs.nerd-icons
@ -55,7 +56,6 @@ let
epkgs.lsp-mode
epkgs.lsp-ui
epkgs.company
epkgs.gdscript-mode
epkgs.ccls
epkgs.go-mode
epkgs.dart-mode

26
modules/godot.nix

@ -1,26 +0,0 @@
# This file is controlled by /etc/dotfiles/README.org
{ config, options, lib, pkgs, ... }:
with lib;
with lib.types;
let
cfg = config.modules.godot;
in {
options.modules.godot = {
enable = mkOption {
type = bool;
default = false;
};
};
config = mkIf cfg.enable {
environment.systemPackages = [
pkgs.tiled
pkgs.godot
pkgs.godot-server
pkgs.godot-headless
pkgs.gdtoolkit
];
};
}

2
modules/x11.nix

@ -43,7 +43,7 @@ in {
services.picom.enable = true;
services.printing.enable = true;
fonts.fonts = with pkgs; [
fonts.packages = with pkgs; [
iosevka-bin
fira-code-symbols
emacs-all-the-icons-fonts

Loading…
Cancel
Save