@@ 18,16 18,14 @@
},
"flake-parts": {
"inputs": {
- "nixpkgs-lib": [
- "nixpkgs"
- ]
+ "nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
- "lastModified": 1741352980,
- "narHash": "sha256-+u2UunDA4Cl5Fci3m7S643HzKmIDAe+fiXrLqYsR2fs=",
+ "lastModified": 1743550720,
+ "narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=",
"owner": "hercules-ci",
"repo": "flake-parts",
- "rev": "f4330d22f1c5d2ba72d3d22df5597d123fdb60a9",
+ "rev": "c621e8422220273271f52058f618c94e405bb0f5",
"type": "github"
},
"original": {
@@ 59,11 57,11 @@
},
"nixpkgs": {
"locked": {
- "lastModified": 1742546557,
- "narHash": "sha256-QyhimDBaDBtMfRc7kyL28vo+HTwXRPq3hz+BgSJDotw=",
+ "lastModified": 1746269363,
+ "narHash": "sha256-Q0lKWway9OmZnkDTpAoAE9VLXHOHqCqdJ3N0tkSM99g=",
"owner": "nixos",
"repo": "nixpkgs",
- "rev": "bfa9810ff7104a17555ab68ebdeafb6705f129b1",
+ "rev": "b6aef6c3553f849e1e6c08f1bcd3061df2b69fc4",
"type": "github"
},
"original": {
@@ 73,20 71,65 @@
"type": "github"
}
},
+ "nixpkgs-lib": {
+ "locked": {
+ "lastModified": 1743296961,
+ "narHash": "sha256-b1EdN3cULCqtorQ4QeWgLMrd5ZGOjLSLemfa00heasc=",
+ "owner": "nix-community",
+ "repo": "nixpkgs.lib",
+ "rev": "e4822aea2a6d1cdd36653c134cacfd64c97ff4fa",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-community",
+ "repo": "nixpkgs.lib",
+ "type": "github"
+ }
+ },
+ "nixpkgs_2": {
+ "locked": {
+ "lastModified": 1730768919,
+ "narHash": "sha256-8AKquNnnSaJRXZxc5YmF/WfmxiHX6MMZZasRP6RRQkE=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "a04d33c0c3f1a59a2c1cb0c6e34cd24500e5a1dc",
+ "type": "github"
+ },
+ "original": {
+ "owner": "NixOS",
+ "ref": "nixpkgs-unstable",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
+ "nixpkgs_3": {
+ "locked": {
+ "lastModified": 1744536153,
+ "narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "18dd725c29603f582cf1900e0d25f9f1063dbf11",
+ "type": "github"
+ },
+ "original": {
+ "owner": "NixOS",
+ "ref": "nixpkgs-unstable",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
"pre-commit-hooks": {
"inputs": {
"flake-compat": "flake-compat",
"gitignore": "gitignore",
- "nixpkgs": [
- "nixpkgs"
- ]
+ "nixpkgs": "nixpkgs_2"
},
"locked": {
- "lastModified": 1742300892,
- "narHash": "sha256-QmF0proyjXI9YyZO9GZmc7/uEu5KVwCtcdLsKSoxPAI=",
+ "lastModified": 1742649964,
+ "narHash": "sha256-DwOTp7nvfi8mRfuL1escHDXabVXFGT1VlPD1JHrtrco=",
"owner": "cachix",
"repo": "git-hooks.nix",
- "rev": "ea26a82dda75bee6783baca6894040c8e6599728",
+ "rev": "dcf5072734cb576d2b0c59b2ac44f5050b5eac82",
"type": "github"
},
"original": {
@@ 105,16 148,14 @@
},
"rust-overlay": {
"inputs": {
- "nixpkgs": [
- "nixpkgs"
- ]
+ "nixpkgs": "nixpkgs_3"
},
"locked": {
- "lastModified": 1742524367,
- "narHash": "sha256-KzTwk/5ETJavJZYV1DEWdCx05M4duFCxCpRbQSKWpng=",
+ "lastModified": 1746239644,
+ "narHash": "sha256-wMvMBMlpS1H8CQdSSgpLeoCWS67ciEkN/GVCcwk7Apc=",
"owner": "oxalica",
"repo": "rust-overlay",
- "rev": "70bf752d176b2ce07417e346d85486acea9040ef",
+ "rev": "bd32e88bef6da0e021a42fb4120a8df2150e9b8c",
"type": "github"
},
"original": {
@@ 1,20 1,9 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
- flake-parts = {
- url = "github:hercules-ci/flake-parts";
- inputs.nixpkgs-lib.follows = "nixpkgs";
- };
-
- pre-commit-hooks = {
- url = "github:cachix/git-hooks.nix";
- inputs.nixpkgs.follows = "nixpkgs";
- };
-
- rust-overlay = {
- url = "github:oxalica/rust-overlay";
- inputs.nixpkgs.follows = "nixpkgs";
- };
+ flake-parts.url = "github:hercules-ci/flake-parts";
+ pre-commit-hooks.url = "github:cachix/git-hooks.nix";
+ rust-overlay.url = "github:oxalica/rust-overlay";
};
outputs = inputs @ {
@@ 25,10 14,16 @@
rust-overlay,
...
}:
- flake-parts.lib.mkFlake {inherit inputs;} {
+ flake-parts.lib.mkFlake {inherit inputs;} ({withSystem, ...}: {
+ flake.nixosModules.default = {pkgs, ...}: {
+ imports = [./nix/module.nix];
+ services.canwa.package = withSystem pkgs.stdenv.hostPlatform.system (
+ {config, ...}:
+ config.packages.default
+ );
+ };
systems = ["x86_64-linux"];
perSystem = {
- config,
lib,
pkgs,
system,
@@ 37,11 32,13 @@
toolchain = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
libs = [];
in {
- _module.args.pkgs = import inputs.nixpkgs {
+ _module.args.pkgs = import nixpkgs {
inherit system;
- overlays = [inputs.rust-overlay.overlays.default];
+ overlays = [rust-overlay.overlays.default];
};
+ packages.default = pkgs.callPackage ./nix {};
+
checks.pre-commit-check = pre-commit-hooks.lib.${system}.run {
src = ./.;
hooks = {
@@ 96,5 93,5 @@
'';
};
};
- };
+ });
}