From 7318d5cc7f63b00a382ead97271841a48cd61a13 Mon Sep 17 00:00:00 2001 From: Eval EXEC Date: Sat, 28 Sep 2024 11:53:50 +0800 Subject: [PATCH 1/8] update config tree Signed-off-by: Eval EXEC --- Makefile | 8 +- flake.nix | 130 ++++++++++++------ home.nix => home-manager/home.nix | 54 +++++++- modules/home-manager/default.nix | 6 + modules/nixos/default.nix | 6 + cachix.nix => nixos/cachix.nix | 0 {cachix => nixos/cachix}/nix-community.nix | 0 configuration.nix => nixos/configuration.nix | 24 +++- g810-led.nix => nixos/g810-led.nix | 0 .../hardware-configuration.nix | 7 +- .../scripts}/network-dispatcher.sh | 0 overlays/default.nix | 30 ++++ pkgs/default.nix | 5 + 13 files changed, 213 insertions(+), 57 deletions(-) rename home.nix => home-manager/home.nix (92%) create mode 100644 modules/home-manager/default.nix create mode 100644 modules/nixos/default.nix rename cachix.nix => nixos/cachix.nix (100%) rename {cachix => nixos/cachix}/nix-community.nix (100%) rename configuration.nix => nixos/configuration.nix (96%) rename g810-led.nix => nixos/g810-led.nix (100%) rename hardware-configuration.nix => nixos/hardware-configuration.nix (99%) rename {scripts => nixos/scripts}/network-dispatcher.sh (100%) create mode 100644 overlays/default.nix create mode 100644 pkgs/default.nix diff --git a/Makefile b/Makefile index 72b4edb..450de11 100644 --- a/Makefile +++ b/Makefile @@ -9,11 +9,11 @@ dry-build: fmt git diff --exit-code sudo -S nixos-rebuild dry-build --flake /home/exec/Projects/github.com/eval-exec/nixos-configuration/.#Mufasa --verbose -switch🔄: fmt - git diff --exit-code - rm /home/exec/.config/fontconfig/conf.d/10-hm-fonts.conf || true +switch🔄: + # git diff --exit-code + # rm /home/exec/.config/fontconfig/conf.d/10-hm-fonts.conf || true sudo -S nixos-rebuild switch --max-jobs 20 --cores 20 --flake /home/exec/Projects/github.com/eval-exec/nixos-configuration/.#Mufasa --verbose --show-trace --print-build-logs - notify-send "NixOS: make switch finished" + # notify-send "NixOS: make switch finished" boot: fmt git diff --exit-code diff --git a/flake.nix b/flake.nix index 15b3391..163a648 100644 --- a/flake.nix +++ b/flake.nix @@ -22,65 +22,111 @@ inputs.nixpkgs.follows = "nixpkgs"; }; }; - outputs = { self, nixpkgs, - nur, home-manager, - emacs-overlay, - nixpkgs-unstable, - sops-nix, ... - }: + }@inputs: + let + inherit (self) outputs; + # Supported systems for your flake packages, shell, etc. + systems = [ + "aarch64-linux" + "i686-linux" + "x86_64-linux" + "aarch64-darwin" + "x86_64-darwin" + ]; + # This is a function that generates an attribute by calling a function you + # pass to it, with each system as an argument + forAllSystems = nixpkgs.lib.genAttrs systems; + in { # packages.x86_64-linux.hello = nixpkgs.legacyPackages.x86_64-linux.hello; # packages.x86_64-linux = [ # ]; + # Your custom packages + # Accessible through 'nix build', 'nix shell', etc + packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system}); + # packages.x86_64-linux.default = self.packages.x86_64-linux.hello; + formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra); + + # Your custom packages and modifications, exported as overlays + overlays = import ./overlays { inherit inputs; }; + # Reusable nixos modules you might want to export + # These are usually stuff you would upstream into nixpkgs + nixosModules = import ./modules/nixos; + # Reusable home-manager modules you might want to export + # These are usually stuff you would upstream into home-manager + # homeManagerModules = import ./modules/home-manager; + + # NixOS configuration entrypoint + # Available through 'nixos-rebuild --flake .#your-hostname' + nixosConfigurations = { + # FIXME replace with your hostname + Mufasa = nixpkgs.lib.nixosSystem { - nixosConfigurations.Mufasa = nixpkgs.lib.nixosSystem rec { - system = "x86_64-linux"; - specialArgs = { - pkgs-unstable = import nixpkgs-unstable { - inherit system; - config = { - allowUnfree = true; - }; + specialArgs = { + inherit inputs outputs; }; - inherit - nixpkgs - home-manager - emacs-overlay - nixpkgs-unstable - sops-nix - nur - ; + modules = [ + ./nixos/configuration.nix + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.exec = import ./home-manager/home.nix; + } + ]; }; - modules = [ - ./hardware-configuration.nix - ./configuration.nix - nur.nixosModules.nur - sops-nix.nixosModules.sops - home-manager.nixosModules.home-manager - { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.users.exec = import ./home.nix; - home-manager.extraSpecialArgs = specialArgs; - nixpkgs.overlays = [ - nur.overlay - emacs-overlay.overlay - ]; - - # Optionally, use home-manager.extraSpecialArgs to pass - # arguments to home.nix - } - ]; }; + + # nixosConfigurations.Mufasa = nixpkgs.lib.nixosSystem { + # specialArgs = { + # inherit inputs outputs; + # }; + # system = "x86_64-linux"; + # specialArgs = { + # pkgs-unstable = import nixpkgs-unstable { + # inherit system; + # config = { + # allowUnfree = true; + # }; + # }; + # inherit + # nixpkgs + # home-manager + # emacs-overlay + # nixpkgs-unstable + # sops-nix + # nur + # ; + # }; + # modules = [ + # ./nixos/hardware-configuration.nix + # nur.nixosModules.nur + # sops-nix.nixosModules.sops + # home-manager.nixosModules.home-manager + # { + # home-manager.useGlobalPkgs = true; + # home-manager.useUserPackages = true; + # home-manager.users.exec = import ./home.nix; + # home-manager.extraSpecialArgs = specialArgs; + # nixpkgs.overlays = [ + # nur.overlay + # emacs-overlay.overlay + # ]; + + # # Optionally, use home-manager.extraSpecialArgs to pass + # # arguments to home.nix + # } + # ]; + # }; }; } diff --git a/home.nix b/home-manager/home.nix similarity index 92% rename from home.nix rename to home-manager/home.nix index 7e116f4..0b28651 100644 --- a/home.nix +++ b/home-manager/home.nix @@ -2,15 +2,59 @@ config, pkgs, inputs, + # outputs, lib, fetchFromGitHub, - pkgs-unstable, + # pkgs-unstable, rustPlatform, ... }: { + # You can import other home-manager modules here + imports = [ + # If you want to use modules your own flake exports (from modules/home-manager): + # outputs.homeManagerModules.example + + # Or modules exported from other flakes (such as nix-colors): + # inputs.nix-colors.homeManagerModules.default + + # You can also split up your configuration and import pieces of it here: + # ./nvim.nix + ]; + + # nixpkgs = { + # # You can add overlays here + # overlays = [ + # # Add overlays your own flake exports (from overlays and pkgs dir): + # # outputs.overlays.additions + # # outputs.overlays.modifications + # # outputs.overlays.unstable-packages + # # outputs.overlays.nur-packages + + # # You can also add overlays exported from other flakes: + # # neovim-nightly-overlay.overlays.default + + # # Or define it inline, for example: + # # (final: prev: { + # # hi = final.hello.overrideAttrs (oldAttrs: { + # # patches = [ ./change-hello-to-hi.patch ]; + # # }); + # # }) + # ]; + # # Configure your nixpkgs instance + # config = { + # # Disable if you don't want unfree packages + # allowUnfree = true; + # permittedInsecurePackages = [ + # "electron-27.3.11" + # ]; + # }; + # }; + # home config example + # home-manager.backupFileExtension = "hm-backup"; + home.username = "exec"; home.homeDirectory = "/home/exec"; home.stateVersion = "24.05"; @@ -23,8 +67,8 @@ home.packages = with pkgs; [ # nur.repos.xddxdd.wechat-uos - nur.repos.xddxdd.baidunetdisk - nur.repos.xddxdd.netease-cloud-music + # nur.repos.xddxdd.baidunetdisk + # nur.repos.xddxdd.netease-cloud-music # nur.repos.xddxdd.qqmusic # nur.repos.linyinfeng.wemeet alsa-utils @@ -44,7 +88,7 @@ sshfs discord syncthing - pkgs-unstable.zed-editor + unstable.zed-editor slack ripgrep dpkg @@ -52,7 +96,7 @@ ascii ruff sqlite - ollama + unstable.ollama nyxt awscli2 waypipe diff --git a/modules/home-manager/default.nix b/modules/home-manager/default.nix new file mode 100644 index 0000000..45aae31 --- /dev/null +++ b/modules/home-manager/default.nix @@ -0,0 +1,6 @@ +# Add your reusable home-manager modules to this directory, on their own file (https://nixos.wiki/wiki/Module). +# These should be stuff you would like to share with others, not your personal configurations. +{ + # List your module files here + # my-module = import ./my-module.nix; +} diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix new file mode 100644 index 0000000..8605069 --- /dev/null +++ b/modules/nixos/default.nix @@ -0,0 +1,6 @@ +# Add your reusable NixOS modules to this directory, on their own file (https://nixos.wiki/wiki/Module). +# These should be stuff you would like to share with others, not your personal configurations. +{ + # List your module files here + # my-module = import ./my-module.nix; +} diff --git a/cachix.nix b/nixos/cachix.nix similarity index 100% rename from cachix.nix rename to nixos/cachix.nix diff --git a/cachix/nix-community.nix b/nixos/cachix/nix-community.nix similarity index 100% rename from cachix/nix-community.nix rename to nixos/cachix/nix-community.nix diff --git a/configuration.nix b/nixos/configuration.nix similarity index 96% rename from configuration.nix rename to nixos/configuration.nix index feb944c..dd4599c 100644 --- a/configuration.nix +++ b/nixos/configuration.nix @@ -6,8 +6,8 @@ config, pkgs, inputs, + outputs, lib, - pkgs-unstable, fetchurl, ... }: @@ -18,6 +18,7 @@ # ./cachix.nix ./g810-led.nix + ./hardware-configuration.nix ]; # sops = { @@ -316,7 +317,7 @@ }; ollama = { enable = true; - package = pkgs-unstable.ollama; + package = pkgs.unstable.ollama; sandbox = false; listenAddress = "127.0.0.1:11435"; writablePaths = [ "/home/exec/.ollama" ]; @@ -427,7 +428,6 @@ users.extraGroups.vboxusers.members = [ "exec" ]; - home-manager.backupFileExtension = "hm-backup"; # home-manager = { # useGlobalPkgs = true; # useUserPackages = true; @@ -560,6 +560,23 @@ # List packages installed in system profile. To search, run: # $ nix search wget nixpkgs = { + # You can add overlays here + overlays = [ + # Add overlays your own flake exports (from overlays and pkgs dir): + outputs.overlays.additions + outputs.overlays.modifications + outputs.overlays.unstable-packages + + # You can also add overlays exported from other flakes: + # neovim-nightly-overlay.overlays.default + + # Or define it inline, for example: + # (final: prev: { + # hi = final.hello.overrideAttrs (oldAttrs: { + # patches = [ ./change-hello-to-hi.patch ]; + # }); + # }) + ]; config = { allowUnfree = true; cudaSupport = false; @@ -593,6 +610,7 @@ libsForQt5.xdg-desktop-portal-kde kdePackages.kde-gtk-config # libinput + home-manager kdePackages.qtvirtualkeyboard kdePackages.discover xdg-desktop-portal diff --git a/g810-led.nix b/nixos/g810-led.nix similarity index 100% rename from g810-led.nix rename to nixos/g810-led.nix diff --git a/hardware-configuration.nix b/nixos/hardware-configuration.nix similarity index 99% rename from hardware-configuration.nix rename to nixos/hardware-configuration.nix index cfb36b2..ffb3289 100644 --- a/hardware-configuration.nix +++ b/nixos/hardware-configuration.nix @@ -93,6 +93,10 @@ # networking.interfaces.wlp59s0.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + # # nixpkgs.config.packageOverrides = pkgs: { + # # vaapiIntel = pkgs.vaapiIntel.override {enableHybridCodec = true;}; + # # }; + powerManagement.cpuFreqGovernor = "powersave"; powerManagement.powertop.enable = true; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; @@ -114,9 +118,6 @@ hardware.opengl.enable = true; # hardware.opengl.driSupport = true; hardware.opengl.driSupport32Bit = true; - # # nixpkgs.config.packageOverrides = pkgs: { - # # vaapiIntel = pkgs.vaapiIntel.override {enableHybridCodec = true;}; - # # }; hardware.opengl.extraPackages = with pkgs; [ intel-media-driver # LIBVA_DRIVER_NAME=iHD intel-vaapi-driver # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium) diff --git a/scripts/network-dispatcher.sh b/nixos/scripts/network-dispatcher.sh similarity index 100% rename from scripts/network-dispatcher.sh rename to nixos/scripts/network-dispatcher.sh diff --git a/overlays/default.nix b/overlays/default.nix new file mode 100644 index 0000000..3aef316 --- /dev/null +++ b/overlays/default.nix @@ -0,0 +1,30 @@ +# This file defines overlays +{inputs, ...}: { + # This one brings our custom packages from the 'pkgs' directory + additions = final: _prev: import ../pkgs final.pkgs; + + # This one contains whatever you want to overlay + # You can change versions, add patches, set compilation flags, anything really. + # https://nixos.wiki/wiki/Overlays + modifications = final: prev: { + # example = prev.example.overrideAttrs (oldAttrs: rec { + # ... + # }); + }; + + # When applied, the unstable nixpkgs set (declared in the flake inputs) will + # be accessible through 'pkgs.unstable' + unstable-packages = final: _prev: { + unstable = import inputs.nixpkgs-unstable { + system = final.system; + config.allowUnfree = true; + }; + }; + + nur-packages = final: _prev: { + nur = import inputs.nur { + system = final.system; + config.allowUnfree = true; + }; + }; +} diff --git a/pkgs/default.nix b/pkgs/default.nix new file mode 100644 index 0000000..3d9e23c --- /dev/null +++ b/pkgs/default.nix @@ -0,0 +1,5 @@ +# Custom packages, that can be defined similarly to ones from nixpkgs +# You can build them using 'nix build .#example' +pkgs: { + # example = pkgs.callPackage ./example { }; +} From 15f5c70b9610f27bb5aa87a2a5abd1e0a33fab13 Mon Sep 17 00:00:00 2001 From: Eval EXEC Date: Sat, 28 Sep 2024 13:20:42 +0800 Subject: [PATCH 2/8] Remove comments --- flake.nix | 45 --------------------------------------------- 1 file changed, 45 deletions(-) diff --git a/flake.nix b/flake.nix index 163a648..43f2e9d 100644 --- a/flake.nix +++ b/flake.nix @@ -64,9 +64,6 @@ # Reusable home-manager modules you might want to export # These are usually stuff you would upstream into home-manager # homeManagerModules = import ./modules/home-manager; - - # NixOS configuration entrypoint - # Available through 'nixos-rebuild --flake .#your-hostname' nixosConfigurations = { # FIXME replace with your hostname Mufasa = nixpkgs.lib.nixosSystem { @@ -86,47 +83,5 @@ ]; }; }; - - # nixosConfigurations.Mufasa = nixpkgs.lib.nixosSystem { - # specialArgs = { - # inherit inputs outputs; - # }; - # system = "x86_64-linux"; - # specialArgs = { - # pkgs-unstable = import nixpkgs-unstable { - # inherit system; - # config = { - # allowUnfree = true; - # }; - # }; - # inherit - # nixpkgs - # home-manager - # emacs-overlay - # nixpkgs-unstable - # sops-nix - # nur - # ; - # }; - # modules = [ - # ./nixos/hardware-configuration.nix - # nur.nixosModules.nur - # sops-nix.nixosModules.sops - # home-manager.nixosModules.home-manager - # { - # home-manager.useGlobalPkgs = true; - # home-manager.useUserPackages = true; - # home-manager.users.exec = import ./home.nix; - # home-manager.extraSpecialArgs = specialArgs; - # nixpkgs.overlays = [ - # nur.overlay - # emacs-overlay.overlay - # ]; - - # # Optionally, use home-manager.extraSpecialArgs to pass - # # arguments to home.nix - # } - # ]; - # }; }; } From 11b2339f63f3d9b2d17bb441cf31b2ef20506314 Mon Sep 17 00:00:00 2001 From: Eval EXEC Date: Sat, 28 Sep 2024 13:51:16 +0800 Subject: [PATCH 3/8] add sops --- flake.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/flake.nix b/flake.nix index 43f2e9d..5aa39c2 100644 --- a/flake.nix +++ b/flake.nix @@ -27,6 +27,7 @@ self, nixpkgs, home-manager, + sops-nix, ... }@inputs: let @@ -74,6 +75,7 @@ modules = [ ./nixos/configuration.nix + sops-nix.nixosModules.sops home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; From 1b744f95a2a69e5ee66d5b2bc6c21d923e8798ce Mon Sep 17 00:00:00 2001 From: Eval EXEC Date: Sat, 28 Sep 2024 15:56:35 +0800 Subject: [PATCH 4/8] update --- Makefile | 6 +-- home-manager/home.nix | 11 ++---- nixos/configuration.nix | 1 + overlays/default.nix | 11 +++++- pkgs/default.nix | 4 +- pkgs/emacs/default.nix | 87 +++++++++++++++++++++++++++++++++++++++++ 6 files changed, 106 insertions(+), 14 deletions(-) create mode 100644 pkgs/emacs/default.nix diff --git a/Makefile b/Makefile index 450de11..b97dbfc 100644 --- a/Makefile +++ b/Makefile @@ -10,10 +10,10 @@ dry-build: fmt sudo -S nixos-rebuild dry-build --flake /home/exec/Projects/github.com/eval-exec/nixos-configuration/.#Mufasa --verbose switch🔄: - # git diff --exit-code - # rm /home/exec/.config/fontconfig/conf.d/10-hm-fonts.conf || true + git diff --exit-code + rm /home/exec/.config/fontconfig/conf.d/10-hm-fonts.conf || true sudo -S nixos-rebuild switch --max-jobs 20 --cores 20 --flake /home/exec/Projects/github.com/eval-exec/nixos-configuration/.#Mufasa --verbose --show-trace --print-build-logs - # notify-send "NixOS: make switch finished" + notify-send "NixOS: make switch finished" boot: fmt git diff --exit-code diff --git a/home-manager/home.nix b/home-manager/home.nix index 0b28651..fecba19 100644 --- a/home-manager/home.nix +++ b/home-manager/home.nix @@ -199,7 +199,6 @@ gst_all_1.gstreamer helix httpie - cask hugo iftop imagemagick @@ -559,19 +558,17 @@ package = pkgs.jdk21; }; emacs = { - enable = false; + enable = true; package = pkgs.emacs-git.override { withGTK3 = true; }; - # package = pkgs.emacs-git; - extraPackages = epkgs: [ pkgs.emacsPackages.jinx pkgs.emacsPackages.mu4e pkgs.emacsPackages.rime pkgs.emacsPackages.vterm pkgs.emacsPackages.w3m - (pkgs.emacsPackages.org.overrideAttrs (old: { - patches = [ ]; - })) + # (pkgs.emacsPackages.org.overrideAttrs (old: { + # patches = [ ]; + # })) pkgs.librime pkgs.mu pkgs.tdlib diff --git a/nixos/configuration.nix b/nixos/configuration.nix index dd4599c..104f446 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -578,6 +578,7 @@ # }) ]; config = { + enableParallelBuildingByDefault = true; allowUnfree = true; cudaSupport = false; permittedInsecurePackages = [ diff --git a/overlays/default.nix b/overlays/default.nix index 3aef316..35ce046 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -1,5 +1,6 @@ # This file defines overlays -{inputs, ...}: { +{ inputs, ... }: +{ # This one brings our custom packages from the 'pkgs' directory additions = final: _prev: import ../pkgs final.pkgs; @@ -10,6 +11,14 @@ # example = prev.example.overrideAttrs (oldAttrs: rec { # ... # }); + # Add -O3 -mtune=native -march=native to CFLAGS for emacs-git + emacs-git = prev.emacs-git.overrideAttrs (old: { + configureFlags = old.configureFlags ++ [ + "-O3" + "-mtune=native" + "-march=native" + ]; + }); }; # When applied, the unstable nixpkgs set (declared in the flake inputs) will diff --git a/pkgs/default.nix b/pkgs/default.nix index 3d9e23c..664971d 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -1,5 +1,3 @@ # Custom packages, that can be defined similarly to ones from nixpkgs # You can build them using 'nix build .#example' -pkgs: { - # example = pkgs.callPackage ./example { }; -} +pkgs: { emacs = pkgs.callPackage ./emacs { }; } diff --git a/pkgs/emacs/default.nix b/pkgs/emacs/default.nix new file mode 100644 index 0000000..1dbb31d --- /dev/null +++ b/pkgs/emacs/default.nix @@ -0,0 +1,87 @@ +{ + lib, + stdenv, + pkgs, + fetchFromGitHub, +}: + +stdenv.mkDerivation rec { + pname = "emacs"; + version = "master"; + + src = fetchFromGitHub { + owner = "emacs-mirror"; + repo = "emacs"; + rev = "bba14a27678317eee68e87a343e7314b3949f6c7"; + hash = "sha256-POoudgSF2VpAN2FmlkwTI6wvWPxfQDaXl/gGu/VYxvI="; + }; + + doCheck = false; + + meta = with lib; { + description = "Emacs build with -O3"; + longDescription = '' + Emacs build in master branch, with O3 optimization. + ''; + homepage = "https://www.gnu.org/software/emacs/"; + changelog = "https://github.com/emacs-mirror/emacs/commits/master/"; + license = licenses.gpl3Plus; + platforms = platforms.all; + }; + nativeBuildInputs = with pkgs; [ + gcc + clang + ]; + buildInputs = with pkgs; [ + pkg-config + autoconf + ncurses + libseccomp + glib + openssl + jansson + acl + attr + liburing + gnutls + webkitgtk + xorg.libX11 + xorg.libXaw + libotf + librsvg + gtk3 + xorg.libXpm + giflib + tree-sitter + xorg.libXext + libgccjit + libcxx + zlib + texinfo + imagemagick + ]; + preConfigure = '' + export CFLAGS='-O3 -mtune=native -march=native' + ''; + configureFlags = [ + "--with-imagemagick" + "--with-modules" + "--with-cairo" + "--with-cairo-xcb" + "--without-compress-install" + "--with-native-compilation" + "--with-mailutils" + "--enable-link-time-optimization" + "--with-tree-sitter" + "--with-xinput2" + "--with-dbus" + "--with-native-compilation=aot" + "--with-file-notification=inotify" + ]; + enableParallelBuilding = true; + + # installPhase = '' + # make install DESTDIR=$out + # ''; + +} From da8ce366157842ddc82870eec6c688a4bb5fd9af Mon Sep 17 00:00:00 2001 From: Eval EXEC Date: Sat, 28 Sep 2024 15:57:31 +0800 Subject: [PATCH 5/8] update --- home-manager/home.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/home-manager/home.nix b/home-manager/home.nix index fecba19..c9b7f20 100644 --- a/home-manager/home.nix +++ b/home-manager/home.nix @@ -382,7 +382,7 @@ systemctl --user start mbsync ''; onNotifyPost = '' - /home/exec/Projects/git.savannah.gnu.org/git/emacs-build/emacs/bin/emacsclient -e "(progn (unless (boundp 'mu4e--server-process) (mu4e t)) (mu4e-update-index-nonlazy)(message \"imapnotify received new mail.\"))" + ${pkgs.emacs-git}/bin/emacsclient -e "(progn (unless (boundp 'mu4e--server-process) (mu4e t)) (mu4e-update-index-nonlazy)(message \"imapnotify received new mail.\"))" ''; }; @@ -485,7 +485,7 @@ enable = true; # frequency = "*-*-* *:*:00,20,40"; postExec = '' - /home/exec/Projects/git.savannah.gnu.org/git/emacs-build/emacs/bin/emacsclient -e "(progn (unless (boundp 'mu4e--server-process) (mu4e t)) (mu4e-update-index-nonlazy)(message \"mbsync executed.\"))" + ${pkgs.emacs-git}/bin/emacsclient -e "(progn (unless (boundp 'mu4e--server-process) (mu4e t)) (mu4e-update-index-nonlazy)(message \"mbsync executed.\"))" ''; verbose = true; }; From ff6bbdc2cc5cc9d5f55086e9a89589f9dd32ac86 Mon Sep 17 00:00:00 2001 From: Eval EXEC Date: Sat, 28 Sep 2024 15:59:23 +0800 Subject: [PATCH 6/8] nix flake update --- flake.lock | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/flake.lock b/flake.lock index 2913f8e..b67c0b0 100644 --- a/flake.lock +++ b/flake.lock @@ -9,11 +9,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1726564564, - "narHash": "sha256-izOTrtEpdqrUpr5Qj2I4zNJH0q1E49c/1Nd1GeIC4L8=", + "lastModified": 1727497939, + "narHash": "sha256-HeP1DfZ0YzfU05QG3nV/YCWEGHT+L4cU495yGnqj1lg=", "owner": "nix-community", "repo": "emacs-overlay", - "rev": "efdb0ad85219e9be1f77aaa3ca3085be8b130603", + "rev": "d50b1c32137c01919f3a6ac22b5abd163d321774", "type": "github" }, "original": { @@ -60,11 +60,11 @@ }, "hardware": { "locked": { - "lastModified": 1726489388, - "narHash": "sha256-JBHtN+n1HzKawpnOQAz6jdgvrtYV9c/kyzgoIdguQGo=", + "lastModified": 1727437159, + "narHash": "sha256-v4qLwEw5OmprgQZTT7KZMNU7JjXJzRypw8+Cw6++fWk=", "owner": "nixos", "repo": "nixos-hardware", - "rev": "dc8b0296f68f72f3fe77469c549a6f098555c2e9", + "rev": "d830ad47cc992b4a46b342bbc79694cbd0e980b2", "type": "github" }, "original": { @@ -80,11 +80,11 @@ ] }, "locked": { - "lastModified": 1725703823, - "narHash": "sha256-tDgM4d8mLK0Hd6YMB2w1BqMto1XBXADOzPEaLl10VI4=", + "lastModified": 1726989464, + "narHash": "sha256-Vl+WVTJwutXkimwGprnEtXc/s/s8sMuXzqXaspIGlwM=", "owner": "nix-community", "repo": "home-manager", - "rev": "208df2e558b73b6a1f0faec98493cb59a25f62ba", + "rev": "2f23fa308a7c067e52dfcc30a0758f47043ec176", "type": "github" }, "original": { @@ -96,11 +96,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1726447378, - "narHash": "sha256-2yV8nmYE1p9lfmLHhOCbYwQC/W8WYfGQABoGzJOb1JQ=", + "lastModified": 1727264057, + "narHash": "sha256-KQPI8CTTnB9CrJ7LrmLC4VWbKZfljEPBXOFGZFRpxao=", "owner": "nixos", "repo": "nixpkgs", - "rev": "086b448a5d54fd117f4dc2dee55c9f0ff461bdc1", + "rev": "759537f06e6999e141588ff1c9be7f3a5c060106", "type": "github" }, "original": { @@ -112,11 +112,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1726320982, - "narHash": "sha256-RuVXUwcYwaUeks6h3OLrEmg14z9aFXdWppTWPMTwdQw=", + "lastModified": 1727264057, + "narHash": "sha256-KQPI8CTTnB9CrJ7LrmLC4VWbKZfljEPBXOFGZFRpxao=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "8f7492cce28977fbf8bd12c72af08b1f6c7c3e49", + "rev": "759537f06e6999e141588ff1c9be7f3a5c060106", "type": "github" }, "original": { @@ -144,11 +144,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1726463316, - "narHash": "sha256-gI9kkaH0ZjakJOKrdjaI/VbaMEo9qBbSUl93DnU7f4c=", + "lastModified": 1727348695, + "narHash": "sha256-J+PeFKSDV+pHL7ukkfpVzCOO7mBSrrpJ3svwBFABbhI=", "owner": "nixos", "repo": "nixpkgs", - "rev": "99dc8785f6a0adac95f5e2ab05cc2e1bf666d172", + "rev": "1925c603f17fc89f4c8f6bf6f631a802ad85d784", "type": "github" }, "original": { @@ -160,11 +160,11 @@ }, "nur": { "locked": { - "lastModified": 1726588031, - "narHash": "sha256-PF6YVoyToSXhYFOXJPXNNDU/81mGdw8+FwA2xyxLcIs=", + "lastModified": 1727506142, + "narHash": "sha256-NzcMxwZSe+D7TJAiLWbp2peBkkXOAOQzcabJqLFFLOQ=", "owner": "nix-community", "repo": "NUR", - "rev": "11c6db57a315f47ab4cdcf33fdb00481345c6036", + "rev": "70927943520aee93363191b0ecc7d163bc05aa2a", "type": "github" }, "original": { @@ -193,11 +193,11 @@ "nixpkgs-stable": "nixpkgs-stable_2" }, "locked": { - "lastModified": 1726524647, - "narHash": "sha256-qis6BtOOBBEAfUl7FMHqqTwRLB61OL5OFzIsOmRz2J4=", + "lastModified": 1727423009, + "narHash": "sha256-+4B/dQm2EnORIk0k2wV3aHGaE0WXTBjColXjj7qWh10=", "owner": "Mic92", "repo": "sops-nix", - "rev": "e2d404a7ea599a013189aa42947f66cede0645c8", + "rev": "127a96f49ddc377be6ba76964411bab11ae27803", "type": "github" }, "original": { From 50b0947c070b2974c3564bfbbeaee727fbcc4431 Mon Sep 17 00:00:00 2001 From: Eval EXEC Date: Sat, 28 Sep 2024 16:03:14 +0800 Subject: [PATCH 7/8] add age --- nixos/configuration.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 104f446..27f3ff6 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -656,6 +656,7 @@ pkg-config polkit proxychains-ng + age python3 qemu scheme-manpages From 8fc57a318ee89a4b375cba20bdae55d00be198fb Mon Sep 17 00:00:00 2001 From: Eval EXEC Date: Sat, 28 Sep 2024 19:23:54 +0800 Subject: [PATCH 8/8] nix flake update --- flake.lock | 18 +++++++++--------- flake.nix | 3 ++- home-manager/home.nix | 2 +- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/flake.lock b/flake.lock index b67c0b0..965ba33 100644 --- a/flake.lock +++ b/flake.lock @@ -9,11 +9,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1727497939, - "narHash": "sha256-HeP1DfZ0YzfU05QG3nV/YCWEGHT+L4cU495yGnqj1lg=", + "lastModified": 1727513931, + "narHash": "sha256-/cBHpBz2b0CGsuOK+zl4Si/7YZCpVSg+DIs76cuvlXo=", "owner": "nix-community", "repo": "emacs-overlay", - "rev": "d50b1c32137c01919f3a6ac22b5abd163d321774", + "rev": "c8f9c557cc398c64bc8a9d9f90d968c55421098b", "type": "github" }, "original": { @@ -96,11 +96,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1727264057, - "narHash": "sha256-KQPI8CTTnB9CrJ7LrmLC4VWbKZfljEPBXOFGZFRpxao=", + "lastModified": 1727397532, + "narHash": "sha256-pojbL/qteElw/nIXlN8kmHn/w6PQbEHr7Iz+WOXs0EM=", "owner": "nixos", "repo": "nixpkgs", - "rev": "759537f06e6999e141588ff1c9be7f3a5c060106", + "rev": "f65141456289e81ea0d5a05af8898333cab5c53d", "type": "github" }, "original": { @@ -160,11 +160,11 @@ }, "nur": { "locked": { - "lastModified": 1727506142, - "narHash": "sha256-NzcMxwZSe+D7TJAiLWbp2peBkkXOAOQzcabJqLFFLOQ=", + "lastModified": 1727520353, + "narHash": "sha256-55giv557fcrpCMMiqguMNQudETujcNm5QFu7gDeMduc=", "owner": "nix-community", "repo": "NUR", - "rev": "70927943520aee93363191b0ecc7d163bc05aa2a", + "rev": "08546da084eec64003fb90a2902155ff2a9271af", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 5aa39c2..ec7698c 100644 --- a/flake.nix +++ b/flake.nix @@ -55,7 +55,7 @@ packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system}); # packages.x86_64-linux.default = self.packages.x86_64-linux.hello; - formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra); + # formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra); # Your custom packages and modifications, exported as overlays overlays = import ./overlays { inherit inputs; }; @@ -68,6 +68,7 @@ nixosConfigurations = { # FIXME replace with your hostname Mufasa = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; specialArgs = { inherit inputs outputs; diff --git a/home-manager/home.nix b/home-manager/home.nix index c9b7f20..6e5c154 100644 --- a/home-manager/home.nix +++ b/home-manager/home.nix @@ -558,7 +558,7 @@ package = pkgs.jdk21; }; emacs = { - enable = true; + enable = false; package = pkgs.emacs-git.override { withGTK3 = true; }; extraPackages = epkgs: [ pkgs.emacsPackages.jinx