[refactor] flake.nix: trim flake inputs

This commit is contained in:
Jalil David Salamé Messina 2024-05-04 20:46:39 +02:00
parent 2fd2cb29c9
commit 876dc45719
Signed by: jalil
GPG key ID: F016B9E770737A0B
2 changed files with 12 additions and 58 deletions

View file

@ -296,6 +296,7 @@
"gitignore": { "gitignore": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"nixvim",
"pre-commit-hooks", "pre-commit-hooks",
"nixpkgs" "nixpkgs"
] ]
@ -394,27 +395,6 @@
"type": "github" "type": "github"
} }
}, },
"nix-darwin": {
"inputs": {
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1713946171,
"narHash": "sha256-lc75rgRQLdp4Dzogv5cfqOg6qYc5Rp83oedF2t0kDp8=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "230a197063de9287128e2c68a7a4b0cd7d0b50a7",
"type": "github"
},
"original": {
"owner": "lnl7",
"repo": "nix-darwin",
"type": "github"
}
},
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1714746424, "lastModified": 1714746424,
@ -445,22 +425,6 @@
"type": "indirect" "type": "indirect"
} }
}, },
"nixpkgs-stable": {
"locked": {
"lastModified": 1710695816,
"narHash": "sha256-3Eh7fhEID17pv9ZxrPwCLfqXnYP006RKzSs0JptsN84=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "614b4613980a522ba49f0d194531beddbb7220d3",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-23.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixvim": { "nixvim": {
"inputs": { "inputs": {
"devshell": "devshell", "devshell": "devshell",
@ -469,13 +433,11 @@
"home-manager": [ "home-manager": [
"home-manager" "home-manager"
], ],
"nix-darwin": "nix-darwin", "nix-darwin": [],
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ],
"pre-commit-hooks": [ "pre-commit-hooks": "pre-commit-hooks"
"pre-commit-hooks"
]
}, },
"locked": { "locked": {
"lastModified": 1714730761, "lastModified": 1714730761,
@ -497,9 +459,13 @@
"flake-utils": "flake-utils_3", "flake-utils": "flake-utils_3",
"gitignore": "gitignore", "gitignore": "gitignore",
"nixpkgs": [ "nixpkgs": [
"nixvim",
"nixpkgs" "nixpkgs"
], ],
"nixpkgs-stable": "nixpkgs-stable" "nixpkgs-stable": [
"nixvim",
"nixpkgs"
]
}, },
"locked": { "locked": {
"lastModified": 1714478972, "lastModified": 1714478972,
@ -524,7 +490,6 @@
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"nixvim": "nixvim", "nixvim": "nixvim",
"pre-commit-hooks": "pre-commit-hooks",
"stylix": "stylix" "stylix": "stylix"
} }
}, },

View file

@ -19,7 +19,8 @@
inputs.nixvim.url = "github:nix-community/nixvim"; inputs.nixvim.url = "github:nix-community/nixvim";
inputs.nixvim.inputs.nixpkgs.follows = "nixpkgs"; inputs.nixvim.inputs.nixpkgs.follows = "nixpkgs";
inputs.nixvim.inputs.home-manager.follows = "home-manager"; inputs.nixvim.inputs.home-manager.follows = "home-manager";
inputs.nixvim.inputs.pre-commit-hooks.follows = "pre-commit-hooks"; # disable MacOS stuff
inputs.nixvim.inputs.nix-darwin.follows = "";
# WARN: Flakehub is outdated (39 days out of date) # WARN: Flakehub is outdated (39 days out of date)
# inputs.home-manager.url = "https://flakehub.com/f/nix-community/home-manager/0.1.*.tar.gz"; # inputs.home-manager.url = "https://flakehub.com/f/nix-community/home-manager/0.1.*.tar.gz";
@ -31,9 +32,6 @@
inputs.neovim-flake.url = "github:neovim/neovim?dir=contrib"; inputs.neovim-flake.url = "github:neovim/neovim?dir=contrib";
inputs.neovim-flake.inputs.nixpkgs.follows = "nixpkgs"; inputs.neovim-flake.inputs.nixpkgs.follows = "nixpkgs";
inputs.pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix";
inputs.pre-commit-hooks.inputs.nixpkgs.follows = "nixpkgs";
# Flake outputs that other flakes can use # Flake outputs that other flakes can use
outputs = outputs =
{ {
@ -42,7 +40,6 @@
stylix, stylix,
home-manager, home-manager,
nixos-hardware, nixos-hardware,
pre-commit-hooks,
jpassmenu, jpassmenu,
audiomenu, audiomenu,
nixvim, nixvim,
@ -74,15 +71,8 @@
pkgs = import nixpkgs { inherit system overlays; }; pkgs = import nixpkgs { inherit system overlays; };
module = ./nvim/nixvim.nix; module = ./nvim/nixvim.nix;
}; };
pre-commit-check = pre-commit-hooks.lib.${system}.run { # alejandra = {};
src = builtins.path { # typos = {};
path = ./.;
name = "configuration.nix";
};
hooks.typos.enable = true;
hooks.nixfmt.enable = true;
hooks.nixfmt.package = pkgs.nixfmt-rfc-style;
};
} }
); );
@ -202,7 +192,6 @@
{ pkgs, system }: { pkgs, system }:
{ {
default = pkgs.mkShell { default = pkgs.mkShell {
inherit (self.checks.${system}.pre-commit-check) shellHook;
buildInputs = with pkgs; [ buildInputs = with pkgs; [
just just
self.packages.${system}.nvim self.packages.${system}.nvim