From 453869609cb418593c45376257c870026e433c9e Mon Sep 17 00:00:00 2001 From: Swarsel Date: Tue, 10 Dec 2024 18:09:50 +0100 Subject: [PATCH] chore: adapt flake for 'nix flake check' --- SwarselSystems.org | 14 +++++++------- flake.nix | 4 +++- pkgs/e/default.nix | 4 ++-- profiles/common/home/packages.nix | 3 +++ profiles/darwin/common/nixos/default.nix | 2 +- profiles/home-manager/default.nix | 2 +- profiles/nbl-imba-2/default.nix | 2 +- profiles/server/winters/default.nix | 2 +- programs/emacs/init.el | 5 +++++ 9 files changed, 24 insertions(+), 14 deletions(-) diff --git a/SwarselSystems.org b/SwarselSystems.org index 3a0547a..c365d93 100644 --- a/SwarselSystems.org +++ b/SwarselSystems.org @@ -608,7 +608,6 @@ In this section I am creating some attributes that define general concepts of my }; }); formatter = forEachSystem (pkgs: pkgs.nixpkgs-fmt); - overlays = [ checks = forAllSystems ( system: let @@ -616,6 +615,7 @@ In this section I am creating some attributes that define general concepts of my in import ./checks { inherit self inputs system pkgs; } ); + overlaysList = [ (import ./overlays { inherit inputs; }).additions (import ./overlays { inherit inputs; }).modifications (import ./overlays { inherit inputs; }).nixpkgs-stable @@ -840,7 +840,7 @@ This is the "reference implementation" of a setup that runs without NixOS, only imports = builtins.attrValues outputs.homeManagerModules; nixpkgs = { - inherit (outputs) overlays; + overlays = outputs.overlaysList; config = { allowUnfree = true; }; @@ -933,7 +933,7 @@ My work machine. Built for more security, this is the gold standard of my config nixpkgs = { - inherit (outputs) overlays; + overlays = outputs.overlaysList; config = { allowUnfree = true; }; @@ -1151,7 +1151,7 @@ My work machine. Built for more security, this is the gold standard of my config nixpkgs = { - inherit (outputs) overlays; + overlays = outputs.overlaysList; config = { allowUnfree = true; }; @@ -1745,11 +1745,11 @@ This is a shorthand for calling emacsclient mostly. Also, it hides the kittyterm #+end_src #+begin_src nix :tangle pkgs/e/default.nix - { writeShellApplication, emacs-pgtk, sway, jq }: + { writeShellApplication, emacs30-pgtk, sway, jq }: writeShellApplication { name = "e"; - runtimeInputs = [ emacs-pgtk sway jq ]; + runtimeInputs = [ emacs30-pgtk sway jq ]; text = builtins.readFile ../../scripts/e.sh; } @@ -5683,7 +5683,7 @@ This section sets up all the imports that are used in the home-manager section. nix.settings.experimental-features = "nix-command flakes"; nixpkgs = { hostPlatform = "x86_64-darwin"; - inherit (outputs) overlays; + overlays = outputs.overlaysList; config = { allowUnfree = true; }; diff --git a/flake.nix b/flake.nix index 9828627..4c6732f 100644 --- a/flake.nix +++ b/flake.nix @@ -185,8 +185,9 @@ nativeBuildInputs = [ pkgs.nix pkgs.home-manager pkgs.git ]; }; }); + + # this sets the formatter that is going to be used by nix fmt formatter = forEachSystem (pkgs: pkgs.nixpkgs-fmt); - overlays = [ checks = forAllSystems ( system: let @@ -194,6 +195,7 @@ in import ./checks { inherit self inputs system pkgs; } ); + overlaysList = [ (import ./overlays { inherit inputs; }).additions (import ./overlays { inherit inputs; }).modifications (import ./overlays { inherit inputs; }).nixpkgs-stable diff --git a/pkgs/e/default.nix b/pkgs/e/default.nix index 7824e42..44ce262 100644 --- a/pkgs/e/default.nix +++ b/pkgs/e/default.nix @@ -1,7 +1,7 @@ -{ writeShellApplication, emacs-pgtk, sway, jq }: +{ writeShellApplication, emacs30-pgtk, sway, jq }: writeShellApplication { name = "e"; - runtimeInputs = [ emacs-pgtk sway jq ]; + runtimeInputs = [ emacs30-pgtk sway jq ]; text = builtins.readFile ../../scripts/e.sh; } diff --git a/profiles/common/home/packages.nix b/profiles/common/home/packages.nix index 8db2889..fd15ebf 100644 --- a/profiles/common/home/packages.nix +++ b/profiles/common/home/packages.nix @@ -37,6 +37,9 @@ statix nix-tree + # shellscripts + shfmt + # local file sharing wormhole-rs diff --git a/profiles/darwin/common/nixos/default.nix b/profiles/darwin/common/nixos/default.nix index 4644d81..b5bd74b 100644 --- a/profiles/darwin/common/nixos/default.nix +++ b/profiles/darwin/common/nixos/default.nix @@ -10,7 +10,7 @@ in nix.settings.experimental-features = "nix-command flakes"; nixpkgs = { hostPlatform = "x86_64-darwin"; - inherit (outputs) overlays; + overlays = outputs.overlaysList; config = { allowUnfree = true; }; diff --git a/profiles/home-manager/default.nix b/profiles/home-manager/default.nix index fa6c69b..6e263c0 100644 --- a/profiles/home-manager/default.nix +++ b/profiles/home-manager/default.nix @@ -4,7 +4,7 @@ imports = builtins.attrValues outputs.homeManagerModules; nixpkgs = { - inherit (outputs) overlays; + overlays = outputs.overlaysList; config = { allowUnfree = true; }; diff --git a/profiles/nbl-imba-2/default.nix b/profiles/nbl-imba-2/default.nix index bd9a8ad..49cc4af 100644 --- a/profiles/nbl-imba-2/default.nix +++ b/profiles/nbl-imba-2/default.nix @@ -29,7 +29,7 @@ in nixpkgs = { - inherit (outputs) overlays; + overlays = outputs.overlaysList; config = { allowUnfree = true; }; diff --git a/profiles/server/winters/default.nix b/profiles/server/winters/default.nix index 4ccb496..1420241 100644 --- a/profiles/server/winters/default.nix +++ b/profiles/server/winters/default.nix @@ -23,7 +23,7 @@ in nixpkgs = { - inherit (outputs) overlays; + overlays = outputs.overlaysList; config = { allowUnfree = true; }; diff --git a/programs/emacs/init.el b/programs/emacs/init.el index 43bcf96..de16e1d 100644 --- a/programs/emacs/init.el +++ b/programs/emacs/init.el @@ -1194,6 +1194,11 @@ create a new one." (use-package nixpkgs-fmt) +(use-package shfmt + :config + (setq shfmt-command "shfmt") + (setq shfmt-arguments '("-i" "4" "-s" "-sr"))) + (setq markdown-command "pandoc") (use-package markdown-mode