aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix126
1 files changed, 67 insertions, 59 deletions
diff --git a/flake.nix b/flake.nix
index 1d0b640..3aa5a79 100644
--- a/flake.nix
+++ b/flake.nix
@@ -1,6 +1,6 @@
{
inputs = {
- nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
+ nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
nci.url = "github:yusdacra/nix-cargo-integration";
nci.inputs.nixpkgs.follows = "nixpkgs";
parts.url = "github:hercules-ci/flake-parts";
@@ -8,68 +8,76 @@
};
outputs =
- inputs@{ self, parts, nci, ... }:
- parts.lib.mkFlake { inherit inputs; } ({moduleWithSystem, withSystem, ...}: {
- systems = [
- "x86_64-linux"
- "aarch64-linux"
- ];
- imports = [ nci.flakeModule ];
+ inputs@{
+ self,
+ parts,
+ nci,
+ ...
+ }:
+ parts.lib.mkFlake { inherit inputs; } (
+ { moduleWithSystem, withSystem, ... }:
+ {
+ systems = [
+ "x86_64-linux"
+ "aarch64-linux"
+ ];
+ imports = [ nci.flakeModule ];
- flake = {
- # nixosModules.default = flake-parts-lib.importApply ./nix/nixos-module.nix { localFlake = self; inherit withSystem; };
- nixosModules.default = moduleWithSystem (
- perSystem@{ config }: # NOTE: only explicit params will be in perSystem
- nixos@{ ... }:
- {
- services.catinator.package = perSystem.config.packages.default;
- imports = [ ./nix/nixos-module.nix ];
- }
- );
- };
+ flake = {
+ # nixosModules.default = flake-parts-lib.importApply ./nix/nixos-module.nix { localFlake = self; inherit withSystem; };
+ nixosModules.default = moduleWithSystem (
+ perSystem@{ config }: # NOTE: only explicit params will be in perSystem
+ nixos@{ ... }:
+ {
+ services.catinator.package = perSystem.config.packages.default;
+ imports = [ ./nix/nixos-module.nix ];
+ }
+ );
+ };
- perSystem =
- {
- pkgs,
- config,
- lib,
- ...
- }:
- let
- # shorthand for accessing this crate's outputs
- # you can access crate outputs under `config.nci.outputs.<crate name>` (see documentation)
- crateOutputs = config.nci.outputs."catinator";
- in
- {
- nci = {
- projects."catinator".path = ./.;
- crates."catinator" =
- let
- mkDerivation = {
- nativeBuildInputs = [ pkgs.file.dev ];
- };
- in
- {
- drvConfig = {
- inherit mkDerivation;
- };
- depsDrvConfig = {
- inherit mkDerivation;
+ perSystem =
+ {
+ pkgs,
+ config,
+ lib,
+ ...
+ }:
+ let
+ # shorthand for accessing this crate's outputs
+ # you can access crate outputs under `config.nci.outputs.<crate name>` (see documentation)
+ crateOutputs = config.nci.outputs."catinator";
+ in
+ {
+ nci = {
+ projects."catinator".path = ./.;
+ crates."catinator" =
+ let
+ mkDerivation = {
+ nativeBuildInputs = [ pkgs.file.dev ];
+ };
+ in
+ {
+ drvConfig = {
+ inherit mkDerivation;
+ };
+ depsDrvConfig = {
+ inherit mkDerivation;
+ };
};
- };
- toolchainConfig = {
- channel = "stable";
- targets = [ "x86_64-unknown-linux-musl" ];
- components = [
- "rustfmt"
- "rust-src"
- ];
+ toolchainConfig = {
+ channel = "stable";
+ targets = [ "x86_64-unknown-linux-musl" ];
+ components = [
+ "rustfmt"
+ "rust-src"
+ ];
+ };
};
- };
- devShells.default = crateOutputs.devShell;
- packages.default = crateOutputs.packages.release;
- };
- });
+ devShells.default = crateOutputs.devShell;
+ packages.default = crateOutputs.packages.release;
+ };
+ }
+ );
}