diff --git a/flake.lock b/flake.lock index d5aa088..b9b9cca 100644 --- a/flake.lock +++ b/flake.lock @@ -20,6 +20,39 @@ "type": "github" } }, + "all-cabal-json": { + "flake": false, + "locked": { + "lastModified": 1665552503, + "narHash": "sha256-r14RmRSwzv5c+bWKUDaze6pXM7nOsiz1H8nvFHJvufc=", + "owner": "nix-community", + "repo": "all-cabal-json", + "rev": "d7c0434eebffb305071404edcf9d5cd99703878e", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "hackage", + "repo": "all-cabal-json", + "type": "github" + } + }, + "crane": { + "flake": false, + "locked": { + "lastModified": 1661875961, + "narHash": "sha256-f1h/2c6Teeu1ofAHWzrS8TwBPcnN+EEu+z1sRVmMQTk=", + "owner": "ipetkov", + "repo": "crane", + "rev": "d9f394e4e20e97c2a60c3ad82c2b6ef99be19e24", + "type": "github" + }, + "original": { + "owner": "ipetkov", + "repo": "crane", + "type": "github" + } + }, "deploy-rs": { "inputs": { "flake-compat": "flake-compat", @@ -63,6 +96,22 @@ "type": "github" } }, + "devshell_2": { + "flake": false, + "locked": { + "lastModified": 1667210711, + "narHash": "sha256-IoErjXZAkzYWHEpQqwu/DeRNJGFdR7X2OGbkhMqMrpw=", + "owner": "numtide", + "repo": "devshell", + "rev": "96a9dd12b8a447840cc246e17a47b81a4268bba7", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "devshell", + "type": "github" + } + }, "doom-emacs": { "flake": false, "locked": { @@ -113,6 +162,66 @@ "type": "github" } }, + "dream2nix": { + "inputs": { + "alejandra": [ + "helix", + "nixCargoIntegration", + "nixpkgs" + ], + "all-cabal-json": "all-cabal-json", + "crane": "crane", + "devshell": [ + "helix", + "nixCargoIntegration", + "devshell" + ], + "flake-utils-pre-commit": [ + "helix", + "nixCargoIntegration", + "nixpkgs" + ], + "ghc-utils": "ghc-utils", + "gomod2nix": [ + "helix", + "nixCargoIntegration", + "nixpkgs" + ], + "mach-nix": [ + "helix", + "nixCargoIntegration", + "nixpkgs" + ], + "nixpkgs": [ + "helix", + "nixCargoIntegration", + "nixpkgs" + ], + "poetry2nix": [ + "helix", + "nixCargoIntegration", + "nixpkgs" + ], + "pre-commit-hooks": [ + "helix", + "nixCargoIntegration", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1667251335, + "narHash": "sha256-nb2H2lsHQt8BQkX/uILJbJ2H80v+Dd9HbkYgWlASqdk=", + "owner": "nix-community", + "repo": "dream2nix", + "rev": "4b3a139c506582f40ce733eb4a91988242e17358", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "dream2nix", + "type": "github" + } + }, "emacs-overlay": { "flake": false, "locked": { @@ -318,6 +427,21 @@ } }, "flake-utils_5": { + "locked": { + "lastModified": 1659877975, + "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_6": { "locked": { "lastModified": 1623875721, "narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=", @@ -332,7 +456,7 @@ "type": "github" } }, - "flake-utils_6": { + "flake-utils_7": { "locked": { "lastModified": 1623875721, "narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=", @@ -364,6 +488,43 @@ "type": "github" } }, + "ghc-utils": { + "flake": false, + "locked": { + "lastModified": 1662774800, + "narHash": "sha256-1Rd2eohGUw/s1tfvkepeYpg8kCEXiIot0RijapUjAkE=", + "ref": "refs/heads/master", + "rev": "bb3a2d3dc52ff0253fb9c2812bd7aa2da03e0fea", + "revCount": 1072, + "type": "git", + "url": "https://gitlab.haskell.org/bgamari/ghc-utils" + }, + "original": { + "type": "git", + "url": "https://gitlab.haskell.org/bgamari/ghc-utils" + } + }, + "helix": { + "inputs": { + "nixCargoIntegration": "nixCargoIntegration", + "nixpkgs": "nixpkgs", + "rust-overlay": "rust-overlay" + }, + "locked": { + "lastModified": 1662052066, + "narHash": "sha256-tMO4wFXVRE/TPxOtaEpgu95Hff8PekqXZPt4e+5Di78=", + "owner": "helix-editor", + "repo": "helix", + "rev": "66276ce630cead06c84394768927fe20490d0638", + "type": "github" + }, + "original": { + "owner": "helix-editor", + "ref": "22.08.1", + "repo": "helix", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -388,7 +549,7 @@ "homePage": { "inputs": { "hugo-theme-anubis": "hugo-theme-anubis", - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs_2" }, "locked": { "lastModified": 1655227494, @@ -449,7 +610,7 @@ "evil-quick-diff": "evil-quick-diff", "explain-pause-mode": "explain-pause-mode", "flake-compat": "flake-compat_2", - "flake-utils": "flake-utils_3", + "flake-utils": "flake-utils_4", "format-all": "format-all", "nix-straight": "nix-straight", "nixpkgs": [ @@ -497,6 +658,33 @@ "type": "github" } }, + "nixCargoIntegration": { + "inputs": { + "devshell": "devshell_2", + "dream2nix": "dream2nix", + "nixpkgs": [ + "helix", + "nixpkgs" + ], + "rust-overlay": [ + "helix", + "rust-overlay" + ] + }, + "locked": { + "lastModified": 1667369867, + "narHash": "sha256-G7SyCunGnO+pWSJJDJP+RtF653Fz+B3jhX9Murd9JEY=", + "owner": "yusdacra", + "repo": "nix-cargo-integration", + "rev": "b89e3d7b0f7e2d0301891586456267435fc54aaa", + "type": "github" + }, + "original": { + "owner": "yusdacra", + "repo": "nix-cargo-integration", + "type": "github" + } + }, "nixos-hardware": { "locked": { "lastModified": 1666873549, @@ -514,6 +702,22 @@ } }, "nixpkgs": { + "locked": { + "lastModified": 1667231093, + "narHash": "sha256-RERXruzBEBuf0c7OfZeX1hxEKB+PTCUNxWeB6C1jd8Y=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "d40fea9aeb8840fea0d377baa4b38e39b9582458", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { "locked": { "lastModified": 1629226339, "narHash": "sha256-szvgmQcUJM3Kv/wNyIn+wtMrrvsks0bk9JOqI2Ij8Ao=", @@ -526,7 +730,7 @@ "type": "indirect" } }, - "nixpkgs_2": { + "nixpkgs_3": { "locked": { "narHash": "sha256-Ccpot1h/rV8MgcngDp5OrdmLTMaUTbStZTR5/sI7zW0=", "path": "/nix/store/n04lw5nrskzmz7rv17p09qrnjanfkg5d-source", @@ -555,7 +759,7 @@ }, "nvd": { "inputs": { - "flake-utils": "flake-utils_4", + "flake-utils": "flake-utils_5", "nixpkgs": [ "myNixpkgs" ] @@ -656,8 +860,8 @@ }, "recipemd": { "inputs": { - "flake-utils": "flake-utils_5", - "nixpkgs": "nixpkgs_2" + "flake-utils": "flake-utils_6", + "nixpkgs": "nixpkgs_3" }, "locked": { "lastModified": 1647022391, @@ -696,6 +900,7 @@ "deploy-rs": "deploy-rs", "devshell": "devshell", "flake-utils": "flake-utils_2", + "helix": "helix", "home-manager": "home-manager", "homePage": "homePage", "myNixpkgs": "myNixpkgs", @@ -725,9 +930,31 @@ "type": "github" } }, + "rust-overlay": { + "inputs": { + "flake-utils": "flake-utils_3", + "nixpkgs": [ + "helix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1667184938, + "narHash": "sha256-/kuCiXuAxiD0c0zrfDvJ1Yba3FuVdRk/ROfb393AeX4=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "8f81faec35508647ced65c44fd3e8648a5518afb", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, "scripts": { "inputs": { - "flake-utils": "flake-utils_6", + "flake-utils": "flake-utils_7", "nixpkgs": [ "myNixpkgs" ] diff --git a/flake.nix b/flake.nix index 92b3992..823729e 100644 --- a/flake.nix +++ b/flake.nix @@ -40,6 +40,7 @@ url = github:numtide/devshell; inputs.nixpkgs.follows = "myNixpkgs"; }; + helix.url = github:helix-editor/helix/22.08.1; }; outputs = { ... } @ args: import ./outputs.nix args; diff --git a/home/configurations.nix b/home/configurations.nix index 9e65949..7b086a8 100644 --- a/home/configurations.nix +++ b/home/configurations.nix @@ -2,6 +2,7 @@ , nixpkgs , home-manager , nix-doom-emacs +, helix , ... } @ inputs: let diff --git a/home/modules/helix/config/languages.toml b/home/modules/helix/config/languages.toml index b7280d4..0777ac4 100644 --- a/home/modules/helix/config/languages.toml +++ b/home/modules/helix/config/languages.toml @@ -1,2 +1,6 @@ [[language]] name = "rust" + +[[language]] +name = "nix" +formatter = "nixpkgs-fmt" \ No newline at end of file diff --git a/home/modules/helix/default.nix b/home/modules/helix/default.nix index b8b6711..a95f9f1 100644 --- a/home/modules/helix/default.nix +++ b/home/modules/helix/default.nix @@ -3,10 +3,17 @@ let cfg = config.dadada.home.helix; in { - options.dadada.home.helix.enable = lib.mkEnableOption "Enable helix editor"; + options.dadada.home.helix = { + enable = lib.mkEnableOption "Enable helix editor"; + package = lib.mkOption { + type = lib.types.package; + description = "Helix editor package to use"; + default = pkgs.helix; + }; + }; config = lib.mkIf cfg.enable { home.file.".config/helix".source = ./config; - home.packages = [ pkgs.helix ]; + home.packages = [ cfg.package ]; }; } diff --git a/nixos/configurations.nix b/nixos/configurations.nix index ddd892e..f692226 100644 --- a/nixos/configurations.nix +++ b/nixos/configurations.nix @@ -7,6 +7,7 @@ , nvd , scripts , recipemd +, helix , ... }@inputs: let @@ -40,6 +41,7 @@ in home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.sharedModules = (nixpkgs.lib.attrValues self.hmModules) ++ [ + { dadada.home.helix.package = builtins.trace helix.packages.${system} helix.packages.${system}.helix; } { manual.manpages.enable = false; } ]; home-manager.users.dadada = import ../home/home; diff --git a/outputs.nix b/outputs.nix index 67cc54a..7b78694 100644 --- a/outputs.nix +++ b/outputs.nix @@ -12,6 +12,7 @@ , recipemd , agenix , devshell +, helix , ... } @ inputs: (flake-utils.lib.eachDefaultSystem (system: