From 1b27dde7e817a3e931deeeff51061fde596b0b46 Mon Sep 17 00:00:00 2001 From: cspark Date: Tue, 17 Dec 2024 23:57:39 +0000 Subject: [PATCH] Switch to emacs 30 --- flake.lock | 72 +++++++++++++++++--- flake.nix | 4 ++ global.nix | 14 +++- modules/nixos/cspark-desktop-exwm/module.nix | 20 +++++- 4 files changed, 97 insertions(+), 13 deletions(-) diff --git a/flake.lock b/flake.lock index d1b12c62..d9db19b6 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,24 @@ { "nodes": { + "emacs-overlay": { + "inputs": { + "nixpkgs": "nixpkgs", + "nixpkgs-stable": "nixpkgs-stable" + }, + "locked": { + "lastModified": 1734456142, + "narHash": "sha256-mSGDni1iJzHgNS04eiFM8u3d8IB8ziyNuf1A/YU+eWE=", + "owner": "nix-community", + "repo": "emacs-overlay", + "rev": "7932d8e1fa38eb94ab264469e915c5f04393f7a1", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "emacs-overlay", + "type": "github" + } + }, "flake-parts": { "inputs": { "nixpkgs-lib": "nixpkgs-lib" @@ -55,7 +74,7 @@ }, "musnix": { "inputs": { - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs_2" }, "locked": { "lastModified": 1733444216, @@ -78,7 +97,7 @@ "nixpkgs": [ "nixpkgs" ], - "nixpkgs-stable": "nixpkgs-stable", + "nixpkgs-stable": "nixpkgs-stable_2", "xwayland-satellite-stable": "xwayland-satellite-stable", "xwayland-satellite-unstable": "xwayland-satellite-unstable" }, @@ -133,7 +152,7 @@ "inputs": { "flake-parts": "flake-parts", "flake-root": "flake-root", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs_3", "treefmt-nix": "treefmt-nix" }, "locked": { @@ -152,11 +171,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1732837521, - "narHash": "sha256-jNRNr49UiuIwaarqijgdTR2qLPifxsVhlJrKzQ8XUIE=", + "lastModified": 1734119587, + "narHash": "sha256-AKU6qqskl0yf2+JdRdD0cfxX4b9x3KKV5RqA6wijmPM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "970e93b9f82e2a0f3675757eb0bfc73297cc6370", + "rev": "3566ab7246670a43abd2ffa913cc62dad9cdf7d5", "type": "github" }, "original": { @@ -185,6 +204,22 @@ } }, "nixpkgs-stable": { + "locked": { + "lastModified": 1734323986, + "narHash": "sha256-m/lh6hYMIWDYHCAsn81CDAiXoT3gmxXI9J987W5tZrE=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "394571358ce82dff7411395829aa6a3aad45b907", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-24.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-stable_2": { "locked": { "lastModified": 1733730953, "narHash": "sha256-dlK7n82FEyZlHH7BFHQAM5tua+lQO1Iv7aAtglc1O5s=", @@ -200,7 +235,7 @@ "type": "github" } }, - "nixpkgs-stable_2": { + "nixpkgs-stable_3": { "locked": { "lastModified": 1733842502, "narHash": "sha256-XbMLD1CxUx/nqoxKkz+jT35oU3vjryFjoHagsJZB/3U=", @@ -217,6 +252,22 @@ } }, "nixpkgs_2": { + "locked": { + "lastModified": 1732837521, + "narHash": "sha256-jNRNr49UiuIwaarqijgdTR2qLPifxsVhlJrKzQ8XUIE=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "970e93b9f82e2a0f3675757eb0bfc73297cc6370", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { "locked": { "lastModified": 1732617236, "narHash": "sha256-PYkz6U0bSEaEB1al7O1XsqVNeSNS+s3NVclJw7YC43w=", @@ -232,7 +283,7 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs_4": { "locked": { "lastModified": 1733759999, "narHash": "sha256-463SNPWmz46iLzJKRzO3Q2b0Aurff3U1n0nYItxq7jU=", @@ -250,12 +301,13 @@ }, "root": { "inputs": { + "emacs-overlay": "emacs-overlay", "home-manager": "home-manager", "musnix": "musnix", "niri": "niri", "nixd": "nixd", - "nixpkgs": "nixpkgs_3", - "nixpkgs-stable": "nixpkgs-stable_2" + "nixpkgs": "nixpkgs_4", + "nixpkgs-stable": "nixpkgs-stable_3" } }, "treefmt-nix": { diff --git a/flake.nix b/flake.nix index c4c5a9df..61e6f042 100644 --- a/flake.nix +++ b/flake.nix @@ -23,6 +23,10 @@ url = "github:musnix/musnix"; }; + #emacs-overlay = { + # url = "github:nix-community/emacs-overlay"; + #}; + #xwayland-satellite-flake = { # url = "github:cspark-development/xwayland-satellite-flake"; #}; diff --git a/global.nix b/global.nix index 43338436..4206171f 100644 --- a/global.nix +++ b/global.nix @@ -83,7 +83,19 @@ zoxide # A fast cd command that learns your habits tealdeer # A very fast implementation of tldr in Rust sc-im - emacs-gtk + + # emacs-gtk + #((inputs.emacs-overlay.packages.x86_64-linux.emacs-unstable-pgtk.overrideAttrs (oldAttrs: { + # buildInputs = oldAttrs.buildInputs ++ [ pkgs.webkitgtk ]; + #})).override { + # withXwidgets = true; + #}) + #(emacs30-pgtk.overrideAttrs (oldAttrs: { + # nativeBuildInputs = oldAttrs.nativeBuildInputs ++ [ pkgs.webkitgtk_4_0 ]; + # buildInputs = oldAttrs.buildInputs ++ [ pkgs.webkitgtk_4_0 ]; + #})) + emacs30-gtk3 + fastfetch appimage-run imagemagick diff --git a/modules/nixos/cspark-desktop-exwm/module.nix b/modules/nixos/cspark-desktop-exwm/module.nix index a1c3a34d..1848cc28 100644 --- a/modules/nixos/cspark-desktop-exwm/module.nix +++ b/modules/nixos/cspark-desktop-exwm/module.nix @@ -20,7 +20,13 @@ in desktopManager.xterm.enable = false; excludePackages = with pkgs; [ xterm ]; - windowManager.exwm.enable = true; + # windowManager.exwm.enable = true; + windowManager.session = lib.lists.singleton { + name = "exwm"; + start = '' + emacs + ''; + }; displayManager.startx.enable = true; }; @@ -36,12 +42,22 @@ in pinentry-qt gtk3 # Includes gtk-launch which is used by counsel-linux-app inside emacs - emacs-gtk + + # emacs-gtk + #((inputs.emacs-overlay.packages.x86_64-linux.emacs-unstable-pgtk.overrideAttrs (oldAttrs: { + # buildInputs = oldAttrs.buildInputs ++ [ pkgs.webkitgtk ]; + #})).override { + # withXwidgets = true; + #}) + # inputs.emacs-overlay.packages.x86_64-linux.emacs-unstable-pgtk + emacs30-gtk3 + light # GNU/Linux application to control backlights udiskie # Automounting drives dunst # Notification daemon + alacritty # External terminal just in case scrot # Screenshot tool lxqt.pcmanfm-qt # File Manager lxqt.lxqt-archiver # Archiver