diff options
-rw-r--r-- | flake.lock | 94 | ||||
-rw-r--r-- | flake.nix | 2 | ||||
-rw-r--r-- | hosts/kunagisa/configuration.nix | 23 | ||||
-rw-r--r-- | hosts/kunagisa/hardware-configuration.nix | 7 | ||||
-rw-r--r-- | modules/emacs/README.org | 29 | ||||
-rw-r--r-- | modules/emacs/eglot-booster.nix | 13 | ||||
-rw-r--r-- | modules/emacs/emacs.nix | 16 | ||||
-rw-r--r-- | modules/gnome.nix | 10 | ||||
-rw-r--r-- | users/leonardo.nix | 6 |
9 files changed, 77 insertions, 123 deletions
@@ -12,11 +12,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1718371084, - "narHash": "sha256-abpBi61mg0g+lFFU0zY4C6oP6fBwPzbHPKBGw676xsA=", + "lastModified": 1723293904, + "narHash": "sha256-b+uqzj+Wa6xgMS9aNbX4I+sXeb5biPDi39VgvSFqFvU=", "owner": "ryantm", "repo": "agenix", - "rev": "3a56735779db467538fb2e577eda28a9daacaca6", + "rev": "f6291c5935fdc4e0bef208cfc0dcab7e3f7a1c41", "type": "github" }, "original": { @@ -72,11 +72,11 @@ "firefox-gnome-theme": { "flake": false, "locked": { - "lastModified": 1719338677, - "narHash": "sha256-OQ5dFaPS6RZT/Du+9Xih7cA4WGBV3cgkdlc+Bbtg84U=", + "lastModified": 1723137499, + "narHash": "sha256-MOE9NeU2i6Ws1GhGmppMnjOHkNLl2MQMJmGhaMzdoJM=", "owner": "rafaelmardojai", "repo": "firefox-gnome-theme", - "rev": "3c1143946b22b74057b1ab2c249258fcd70c7d48", + "rev": "fb5b578a4f49ae8705e5fea0419242ed1b8dba70", "type": "github" }, "original": { @@ -103,24 +103,6 @@ "type": "github" } }, - "flake-utils_2": { - "inputs": { - "systems": "systems_3" - }, - "locked": { - "lastModified": 1709126324, - "narHash": "sha256-q6EQdSeUZOG26WelxqkmR7kArjgWCdw5sfJVHPH/7j8=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "d465f4819400de7c8d874d50b982301f28a84605", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "from-elisp": { "flake": false, "locked": { @@ -142,11 +124,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1719180626, - "narHash": "sha256-vZAzm5KQpR6RGple1dzmSJw5kPivES2heCFM+ZWkt0I=", + "lastModified": 1723986931, + "narHash": "sha256-Fy+KEvDQ+Hc8lJAV3t6leXhZJ2ncU5/esxkgt3b8DEY=", "owner": "nix-community", "repo": "home-manager", - "rev": "6b1f90a8ff92e81638ae6eb48cd62349c3e387bb", + "rev": "2598861031b78aadb4da7269df7ca9ddfc3e1671", "type": "github" }, "original": { @@ -157,16 +139,15 @@ }, "mixrank": { "inputs": { - "flake-utils": "flake-utils_2", "nixpkgs_latest": "nixpkgs_latest", "nixpkgs_old": "nixpkgs_old" }, "locked": { - "lastModified": 1719341626, - "narHash": "sha256-j+8CRlfDcwmB82idpkurh5LPBg9MlLIQ9+hJHN6Z25o=", + "lastModified": 1722895966, + "narHash": "sha256-BB8eFyaOT72FB5jya/2VQJzVZzlz3WaJgI0PECDEvhA=", "ref": "2024-05-06-hosts-in-nix", - "rev": "5ebea421cc7d143c2decc905f60f1f4876ec0397", - "revCount": 62183, + "rev": "fab3b0da4ef3bbfe9aae47ca13e11ad1660f2e7d", + "revCount": 64201, "type": "git", "url": "ssh://[email protected]/mixrank/mixrank" }, @@ -178,11 +159,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1719322773, - "narHash": "sha256-BqPxtFwXrpJQDh65NOIHX99pz2rtIMshG9Mt2xnnc5c=", + "lastModified": 1724067415, + "narHash": "sha256-WJBAEFXAtA41RMpK8mvw0cQ62CJkNMBtzcEeNIJV7b0=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "caabc425565bbd5c8640630b0bf6974961a49242", + "rev": "b09c46430ffcf18d575acf5c339b38ac4e1db5d2", "type": "github" }, "original": { @@ -193,11 +174,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1718895438, - "narHash": "sha256-k3JqJrkdoYwE3fHE6xGDY676AYmyh4U2Zw+0Bwe5DLU=", + "lastModified": 1723175592, + "narHash": "sha256-M0xJ3FbDUc4fRZ84dPGx5VvgFsOzds77KiBMW/mMTnI=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "d603719ec6e294f034936c0d0dc06f689d91b6c3", + "rev": "5e0ca22929f3342b19569b21b2f3462f053e497b", "type": "github" }, "original": { @@ -209,27 +190,27 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1719122173, - "narHash": "sha256-aEMsNUtqSPwn6l+LIZ/rX++nCgun3E9M3uSZs6Rwb7w=", + "lastModified": 1723938990, + "narHash": "sha256-9tUadhnZQbWIiYVXH8ncfGXGvkNq3Hag4RCBEMUk7MI=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "906320ae02f769d13a646eb3605a9821df0d6ea2", + "rev": "c42fcfbdfeae23e68fc520f9182dde9f38ad1890", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-23.11", + "ref": "nixos-24.05", "repo": "nixpkgs", "type": "github" } }, "nixpkgs_2": { "locked": { - "lastModified": 1719075281, - "narHash": "sha256-CyyxvOwFf12I91PBWz43iGT1kjsf5oi6ax7CrvaMyAo=", + "lastModified": 1723637854, + "narHash": "sha256-med8+5DSWa2UnOqtdICndjDAEjxr5D7zaIiK4pn0Q7c=", "owner": "nixos", "repo": "nixpkgs", - "rev": "a71e967ef3694799d0c418c98332f7ff4cc5f6af", + "rev": "c3aa7b8938b17aebd2deecf7be0636000d62a2b9", "type": "github" }, "original": { @@ -241,17 +222,17 @@ }, "nixpkgs_latest": { "locked": { - "lastModified": 1677018132, - "narHash": "sha256-o1v+S9cn3M5wwBT7+5YdWPDRRkIpe2uAjzNGLnnJPm8=", + "lastModified": 1720492477, + "narHash": "sha256-PV6LKJpj43tuKAMEfmXiKZjlOW1IqZORUJ8WYcdLtGE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "581e3f902954cbf7b6eec7b04deb41b23fcb6b7a", + "rev": "64f145f456b7a3953f191cad9e257cd88412044e", "type": "github" }, "original": { "owner": "NixOS", "repo": "nixpkgs", - "rev": "581e3f902954cbf7b6eec7b04deb41b23fcb6b7a", + "rev": "64f145f456b7a3953f191cad9e257cd88412044e", "type": "github" } }, @@ -313,21 +294,6 @@ "repo": "default", "type": "github" } - }, - "systems_3": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } } }, "root": "root", @@ -49,7 +49,7 @@ ./users/leonardo.nix home-manager.nixosModules.home-manager agenix.nixosModules.default - mixrank.nixosModules.${system}.dev-machine + mixrank.nixosModules.dev-machine ]; }; in { diff --git a/hosts/kunagisa/configuration.nix b/hosts/kunagisa/configuration.nix index b9b669a..9965d92 100644 --- a/hosts/kunagisa/configuration.nix +++ b/hosts/kunagisa/configuration.nix @@ -16,22 +16,17 @@ boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; networking.hostName = "kunagisa"; # Define your hostname. - # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. # Configure network proxy if necessary # networking.proxy.default = "http://user:password@proxy:port/"; # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; - # Enable networking networking.networkmanager.enable = true; - # Set your time zone. time.timeZone = "America/Sao_Paulo"; - # Select internationalisation properties. i18n.defaultLocale = "pt_BR.UTF-8"; - # Enable the X11 windowing system. services.xserver = { enable = true; xkb = { @@ -40,14 +35,10 @@ }; }; - # Configure console keymap console.keyMap = "br-abnt2"; - # Enable CUPS to print documents. services.printing.enable = true; - # Enable sound with pipewire. - sound.enable = true; hardware.pulseaudio.enable = false; security.rtkit.enable = true; services.pipewire = { @@ -55,22 +46,8 @@ alsa.enable = true; alsa.support32Bit = true; pulse.enable = true; - # If you want to use JACK applications, uncomment this - #jack.enable = true; - - # use the example session manager (no others are packaged yet so this is enabled by default, - # no need to redefine it in your config for now) - #media-session.enable = true; }; - # Enable touchpad support (enabled default in most desktopManager). - # services.xserver.libinput.enable = true; - - # Open ports in the firewall. - # networking.firewall.allowedTCPPorts = [ ... ]; - # networking.firewall.allowedUDPPorts = [ ... ]; - # Or disable the firewall altogether. - # networking.firewall.enable = false; networking.firewall = { enable = false; # allowedTCPPorts = [ 12345 ]; diff --git a/hosts/kunagisa/hardware-configuration.nix b/hosts/kunagisa/hardware-configuration.nix index 6e353af..f98cb38 100644 --- a/hosts/kunagisa/hardware-configuration.nix +++ b/hosts/kunagisa/hardware-configuration.nix @@ -9,8 +9,13 @@ ]; boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" ]; - boot.initrd.kernelModules = [ ]; + boot.initrd.kernelModules = [ "amdgpu" ]; boot.kernelModules = [ "kvm-amd" ]; + boot.kernelPackages = pkgs.linuxPackages_latest; + # boot.kernelParams = [ + # "video=HDMI-1:1920x1080@60" + # "video=DP-2:2560x1080@75" + # ]; boot.extraModulePackages = [ ]; fileSystems."/" = diff --git a/modules/emacs/README.org b/modules/emacs/README.org index a8eb7eb..20caf5e 100644 --- a/modules/emacs/README.org +++ b/modules/emacs/README.org @@ -31,7 +31,7 @@ You can also use it as a ~nixosModule~, in order to add additional packages like #+begin_src emacs-lisp :tangle yes (use-package modus-themes) ;; (use-package kanagawa-theme) -(load-theme 'modus-operandi-tinted t) +(load-theme 'tango t) (add-hook 'after-make-frame-functions (lambda (frame) @@ -74,20 +74,13 @@ Configuration to automagically open age files, and to encrypt them correctly to :config (age-file-enable)) #+end_src -** Flyspell -#+begin_src emacs-lisp :tangle yes -(use-package flyspell - :hook (org-mode . flyspell-mode) - :custom - (ispell-program-name "aspell")) -#+end_src ** All the Icons -Works through nixosModules. #+begin_src emacs-lisp :tangle yes (use-package all-the-icons) (use-package all-the-icons-completion :after all-the-icons + :after marginalia :hook (marginalia-mode . all-the-icons-completion-mode)) #+end_src ** Direnv @@ -168,19 +161,10 @@ Better help defaults (use-package which-key :config (which-key-mode)) #+end_src -** Dired +** Dirvish I wanna try some QoL addons for dired. #+begin_src emacs-lisp :tangle yes -(use-package dired - :hook (dired-mode . dired-hide-details-mode)) -(use-package dired-subtree - :after dired - :config - (add-hook 'dired-mode-hook - (lambda () (local-set-key (kbd "<tab>") #'dired-subtree-toggle)))) - -(use-package all-the-icons-dired - :hook (dired-mode . all-the-icons-dired-mode)) +(use-package dirvish) #+end_src ** Windows I wanna test out =winner-mode= @@ -196,7 +180,12 @@ I wanna test out =winner-mode= Language server support. Already comes installed but used to configure additional language servers. #+begin_src emacs-lisp :tangle yes (use-package eglot + :ensure nil :config (add-to-list 'eglot-server-programs '(nix-mode . ("nil")))) + +(use-package eglot-booster + :after eglot + :config (eglot-booster-mode)) #+end_src ** Corfu diff --git a/modules/emacs/eglot-booster.nix b/modules/emacs/eglot-booster.nix new file mode 100644 index 0000000..5d9df5a --- /dev/null +++ b/modules/emacs/eglot-booster.nix @@ -0,0 +1,13 @@ +{ trivialBuild, + fetchFromGitHub, +}: +trivialBuild { + pname = "eglot-booster"; + version = "0.1.0"; + src = fetchFromGitHub { + owner = "jdtsmith"; + repo = "eglot-booster"; + rev = "e19dd7ea81bada84c66e8bdd121408d9c0761fe6"; + hash = "sha256-vF34ZoUUj8RENyH9OeKGSPk34G6KXZhEZozQKEcRNhs="; + }; +} diff --git a/modules/emacs/emacs.nix b/modules/emacs/emacs.nix index bb0626b..bc73977 100644 --- a/modules/emacs/emacs.nix +++ b/modules/emacs/emacs.nix @@ -9,15 +9,16 @@ let nil parallel ripgrep + emacs-lsp-booster ]; - org-tangle-elisp-blocks = (pkgs.callPackage ./org.nix {inherit pkgs; from-elisp = inputs.from-elisp;}).org-tangle ({ language, flags } : + org-tangle-elisp-blocks = (pkgs.callPackage ./org.nix {inherit pkgs; inherit (inputs) from-elisp;}).org-tangle ({ language, flags } : let is-elisp = (language == "emacs-lisp") || (language == "elisp"); is-tangle = if flags ? ":tangle" then flags.":tangle" == "yes" || flags.":tangle" == "y" else false; in is-elisp && is-tangle ); config-el = pkgs.writeText "config.el" (org-tangle-elisp-blocks (builtins.readFile ./README.org)); - emacs = (pkgs.emacsWithPackagesFromUsePackage { + emacs = pkgs.emacsWithPackagesFromUsePackage { package = pkgs.emacs.override { withGTK3 = true; withNativeCompilation = true; @@ -25,6 +26,12 @@ let withSystemd = true; withToolkitScrollBars = true; }; + override = epkgs: epkgs // { + eglot-booster = pkgs.callPackage ./eglot-booster.nix { + inherit (pkgs) fetchFromGitHub; + inherit (epkgs) trivialBuild; + }; + }; config = config-el; alwaysEnsure = true; defaultInitFile = true; @@ -34,10 +41,7 @@ let tree-sitter-python ])) ] ++ outside-emacs; - override = final: prev: { - final.buildInputs = prev.buildInputs or [] ++ outside-emacs; - }; - }); + }; in { config = { diff --git a/modules/gnome.nix b/modules/gnome.nix index 386cb94..a80001f 100644 --- a/modules/gnome.nix +++ b/modules/gnome.nix @@ -18,7 +18,7 @@ # }) # ]; environment.systemPackages = with pkgs; [ - gnome.gnome-tweaks + gnome-tweaks tela-icon-theme ] ++ (with gnomeExtensions; [ appindicator @@ -45,15 +45,15 @@ gnome-photos gnome-tour gedit - ]) ++ (with pkgs.gnome; [ - cheese # webcam tool - gnome-music + cheese gnome-terminal epiphany # web browser geary # email reader evince # document viewer - gnome-characters totem # video player + ]) ++ (with pkgs.gnome; [ + gnome-music + gnome-characters tali # poker game iagno # go game hitori # sudoku game diff --git a/users/leonardo.nix b/users/leonardo.nix index c858494..ed59bf2 100644 --- a/users/leonardo.nix +++ b/users/leonardo.nix @@ -1,7 +1,6 @@ { pkgs, config, inputs, ... }: let hosts-pub-keys = import ../secrets/host-pub-keys.nix; - host-key = hosts-pub-keys.${config.networking.hostName}; in { imports = [ @@ -10,9 +9,9 @@ in ]; config = { nix = { + package = pkgs.lib.mkForce pkgs.nixVersions.nix_2_23; settings = { trusted-users = [ "root" "leonardo" ]; - experimental-features = "nix-command flakes"; auto-optimise-store = true; }; gc = { @@ -26,7 +25,8 @@ in prismlauncher rage ]; - + + nixpkgs = { config.allowUnfree = true; config.allowUnfreePredicate = _: true; |