difftreelog
chore update flake
in: trunk
16 files changed
Cargo.tomldiffbeforeafterboth--- a/Cargo.toml
+++ b/Cargo.toml
@@ -2,6 +2,8 @@
members = ["crates/*", "cmds/*"]
resolver = "2"
package.version = "0.1.0"
+package.edition = "2021"
+package.rust-version = "1.82.0"
[workspace.dependencies]
nixlike = { path = "./crates/nixlike" }
cmds/fleet/Cargo.tomldiffbeforeafterboth--- a/cmds/fleet/Cargo.toml
+++ b/cmds/fleet/Cargo.toml
@@ -3,7 +3,8 @@
description = "NixOS configuration management"
version = "0.2.0"
authors = ["Yaroslav Bolyukin <iam@lach.pw>"]
-edition = "2021"
+edition.workspace = true
+rust-version.workspace = true
[dependencies]
nixlike.workspace = true
cmds/generator-helper/Cargo.tomldiffbeforeafterboth--- a/cmds/generator-helper/Cargo.toml
+++ b/cmds/generator-helper/Cargo.toml
@@ -1,7 +1,8 @@
[package]
name = "fleet-generator-helper"
-edition = "2021"
version.workspace = true
+edition.workspace = true
+rust-version.workspace = true
[dependencies]
age.workspace = true
cmds/generator-helper/src/main.rsdiffbeforeafterboth--- a/cmds/generator-helper/src/main.rs
+++ b/cmds/generator-helper/src/main.rs
@@ -234,8 +234,8 @@
let recipients = load_identities()?;
write_private(&recipients, &output, stdin(), encoding)?;
}
- Opts::Generate(gen) => {
- match gen {
+ Opts::Generate(generate) => {
+ match generate {
Generate::Ed25519 {
public,
private,
cmds/install-secrets/Cargo.tomldiffbeforeafterboth--- a/cmds/install-secrets/Cargo.toml
+++ b/cmds/install-secrets/Cargo.toml
@@ -1,8 +1,8 @@
[package]
name = "fleet-install-secrets"
version = "0.1.0"
-edition = "2021"
-rust-version = "1.77.2"
+edition.workspace = true
+rust-version.workspace = true
[dependencies]
clap.workspace = true
cmds/terraform-provider-fleet/Cargo.tomldiffbeforeafterboth--- a/cmds/terraform-provider-fleet/Cargo.toml
+++ b/cmds/terraform-provider-fleet/Cargo.toml
@@ -1,7 +1,8 @@
[package]
name = "terraform-provider-fleet"
-edition = "2021"
version.workspace = true
+edition.workspace = true
+rust-version.workspace = true
[dependencies]
anyhow.workspace = true
crates/better-command/Cargo.tomldiffbeforeafterboth--- a/crates/better-command/Cargo.toml
+++ b/crates/better-command/Cargo.toml
@@ -1,7 +1,8 @@
[package]
name = "better-command"
version = "0.1.0"
-edition = "2021"
+edition.workspace = true
+rust-version.workspace = true
[dependencies]
regex = "1.10"
crates/fleet-base/Cargo.tomldiffbeforeafterboth--- a/crates/fleet-base/Cargo.toml
+++ b/crates/fleet-base/Cargo.toml
@@ -1,7 +1,8 @@
[package]
name = "fleet-base"
-edition = "2021"
version.workspace = true
+edition.workspace = true
+rust-version.workspace = true
[dependencies]
age.workspace = true
crates/fleet-shared/Cargo.tomldiffbeforeafterboth--- a/crates/fleet-shared/Cargo.toml
+++ b/crates/fleet-shared/Cargo.toml
@@ -1,7 +1,8 @@
[package]
name = "fleet-shared"
-edition = "2021"
version.workspace = true
+edition.workspace = true
+rust-version.workspace = true
[dependencies]
base64 = "0.22.1"
crates/nix-eval/Cargo.tomldiffbeforeafterboth--- a/crates/nix-eval/Cargo.toml
+++ b/crates/nix-eval/Cargo.toml
@@ -1,8 +1,9 @@
[package]
name = "nix-eval"
-edition = "2021"
version.workspace = true
build = "build.rs"
+edition.workspace = true
+rust-version.workspace = true
[dependencies]
anyhow.workspace = true
crates/nix-native-eval/Cargo.tomldiffbeforeafterboth--- a/crates/nix-native-eval/Cargo.toml
+++ b/crates/nix-native-eval/Cargo.toml
@@ -1,7 +1,8 @@
[package]
name = "nix-native-eval"
-edition = "2021"
version.workspace = true
+edition.workspace = true
+rust-version.workspace = true
[dependencies]
anyhow.workspace = true
crates/nixlike/Cargo.tomldiffbeforeafterboth--- a/crates/nixlike/Cargo.toml
+++ b/crates/nixlike/Cargo.toml
@@ -1,7 +1,8 @@
[package]
name = "nixlike"
version = "0.1.0"
-edition = "2021"
+edition.workspace = true
+rust-version.workspace = true
[dependencies]
thiserror.workspace = true
flake.lockdiffbeforeafterboth--- a/flake.lock
+++ b/flake.lock
@@ -2,11 +2,11 @@
"nodes": {
"crane": {
"locked": {
- "lastModified": 1731098351,
- "narHash": "sha256-HQkYvKvaLQqNa10KEFGgWHfMAbWBfFp+4cAgkut+NNE=",
+ "lastModified": 1739936662,
+ "narHash": "sha256-x4syUjNUuRblR07nDPeLDP7DpphaBVbUaSoeZkFbGSk=",
"owner": "ipetkov",
"repo": "crane",
- "rev": "ef80ead953c1b28316cc3f8613904edc2eb90c28",
+ "rev": "19de14aaeb869287647d9461cbd389187d8ecdb7",
"type": "github"
},
"original": {
@@ -22,11 +22,11 @@
]
},
"locked": {
- "lastModified": 1730504689,
- "narHash": "sha256-hgmguH29K2fvs9szpq2r3pz2/8cJd2LPS+b4tfNFCwE=",
+ "lastModified": 1738453229,
+ "narHash": "sha256-7H9XgNiGLKN1G1CgRh0vUL4AheZSYzPm+zmZ7vxbJdo=",
"owner": "hercules-ci",
"repo": "flake-parts",
- "rev": "506278e768c2a08bec68eb62932193e341f55c90",
+ "rev": "32ea77a06711b758da0ad9bd6a844c5740a87abd",
"type": "github"
},
"original": {
@@ -37,16 +37,16 @@
},
"nixpkgs": {
"locked": {
- "lastModified": 1731873344,
- "narHash": "sha256-bKfFggwcvvh9gmOsaMCXKVAGBfXCZZ6QrxLq9Nb1/vw=",
+ "lastModified": 1740339700,
+ "narHash": "sha256-cbrw7EgQhcdFnu6iS3vane53bEagZQy/xyIkDWpCgVE=",
"owner": "nixos",
"repo": "nixpkgs",
- "rev": "39e98fadd66c2564ac85b1f65bab89e044302c62",
+ "rev": "04ef94c4c1582fd485bbfdb8c4a8ba250e359195",
"type": "github"
},
"original": {
"owner": "nixos",
- "ref": "master",
+ "ref": "release-24.11",
"repo": "nixpkgs",
"type": "github"
}
@@ -56,7 +56,8 @@
"crane": "crane",
"flake-parts": "flake-parts",
"nixpkgs": "nixpkgs",
- "rust-overlay": "rust-overlay"
+ "rust-overlay": "rust-overlay",
+ "shelly": "shelly"
}
},
"rust-overlay": {
@@ -66,11 +67,11 @@
]
},
"locked": {
- "lastModified": 1731820690,
- "narHash": "sha256-/hHFMTD+FGURXZ4JtfXoIgpy87zL505pVi6AL76Wc+U=",
+ "lastModified": 1740277845,
+ "narHash": "sha256-NNU0CdiaSbAeZ8tpDG4aFi9qtcdlItRvk8Xns9oBrVU=",
"owner": "oxalica",
"repo": "rust-overlay",
- "rev": "bbab2ab9e1932133b1996baa1dc00fefe924ca81",
+ "rev": "f933070c29f9c1c5457447a51903f27f76ebb519",
"type": "github"
},
"original": {
@@ -78,6 +79,21 @@
"repo": "rust-overlay",
"type": "github"
}
+ },
+ "shelly": {
+ "locked": {
+ "lastModified": 1737089050,
+ "narHash": "sha256-SQ22z9L7fSC8FWNIlImpKeBGBUPoWpsTy9uc75o7uK0=",
+ "owner": "CertainLach",
+ "repo": "shelly",
+ "rev": "b5fa6bb56dcd1541ec399ceab1e95a74872ecd34",
+ "type": "github"
+ },
+ "original": {
+ "owner": "CertainLach",
+ "repo": "shelly",
+ "type": "github"
+ }
}
},
"root": "root",
flake.nixdiffbeforeafterboth1{2 description = "NixOS configuration management";34 inputs = {5 nixpkgs.url = "github:nixos/nixpkgs/master";6 rust-overlay = {7 url = "github:oxalica/rust-overlay";8 inputs.nixpkgs.follows = "nixpkgs";9 };10 flake-parts = {11 url = "github:hercules-ci/flake-parts";12 inputs.nixpkgs-lib.follows = "nixpkgs";13 };14 crane.url = "github:ipetkov/crane";15 };16 outputs = inputs:17 inputs.flake-parts.lib.mkFlake {18 inherit inputs;19 } {20 flake = rec {21 lib =22 (import ./lib {23 inherit (inputs.nixpkgs) lib;24 })25 // {26 fleetConfiguration = throw "function-based interface is deprecated, use flake-parts syntax instead";27 };28 flakeModules.default = import ./lib/flakePart.nix {29 inherit (inputs) crane;30 };31 flakeModule = flakeModules.default;3233 fleetModules.tf = ./modules/extras/tf.nix;3435 # To be used with https://github.com/NixOS/nix/pull/889236 schemas = let37 inherit (inputs.nixpkgs.lib) mapAttrs;38 in {39 fleetConfigurations = {40 version = 1;41 doc = ''42 The `fleetConfigurations` flake output defines fleet cluster configurations.43 '';44 inventory = output: {45 children =46 mapAttrs (configName: cluster: {47 what = "fleet cluster configuration";4849 children =50 mapAttrs (hostName: host: {51 what = "host [${host.system}]";52 })53 cluster.config.hosts;54 # It is possible to implement this inventory right now, but I want to55 # get rid of `fleet.nix` file in the future.56 # children.secrets = { };57 })58 output;59 };60 };61 };62 };63 # Supported and tested list of deployment targets.64 systems = ["x86_64-linux" "aarch64-linux" "armv7l-linux" "armv6l-linux"];65 perSystem = {66 config,67 system,68 pkgs,69 ...70 }: let71 inherit (lib.attrsets) mapAttrs';72 inherit (lib.lists) elem;73 # Can also be built for darwin, through it is not usual to deploy nixos systems from macos machines.74 # I have no hardware for such testing, thus only adding machines I actually have and use.75 #76 # It is not possible to deploy any host from armv6/armv7 hardware, and I don't think it even makes sense.77 deployerSystems = ["aarch64-linux" "x86_64-linux"];78 deployerSystem = elem system deployerSystems;79 lib = pkgs.lib;80 rust = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;81 craneLib = (inputs.crane.mkLib pkgs).overrideToolchain rust;82 in {83 _module.args.pkgs = import inputs.nixpkgs {84 inherit system;85 overlays = [(inputs.rust-overlay.overlays.default)];86 };87 # Reference fleet package should be built with nightly rust, specified in rust-toolchain.toml.88 packages = lib.mkIf deployerSystem (let89 packages = pkgs.callPackages ./pkgs {90 inherit craneLib;91 };92 in93 packages // {default = packages.fleet;});94 # fleet-install-secrets will not be built normally, because they are not ran directly by user most of the time.95 # checks there build packages for default nixpkgs rustPlatform packages.96 checks = let97 packages = pkgs.callPackages ./pkgs {98 inherit craneLib;99 };100 prefixAttrs = prefix: attrs:101 mapAttrs' (name: value: {102 name = "${prefix}${name}";103 value = value.overrideAttrs (prev: {104 pname = "${prefix}${prev.pname}";105 });106 })107 attrs;108 in109 # `fleet` crate wants nightly rust, also little sense of supporting it on stable nixpkgs.110 (prefixAttrs "nixpkgs-" (removeAttrs packages ["fleet"]));111 # TODO: It should be possible to move lib.mkIf to default attribute, instead of disabling the whole112 # devShells block, yet nix flake check fails here, due to no default shell found. It is nix or flake-parts bug?113 devShells = lib.mkIf deployerSystem {114 default = craneLib.devShell {115 packages = with pkgs; [116 rust117 alejandra118 cargo-edit119 cargo-udeps120 cargo-fuzz121 cargo-watch122 cargo-outdated123124 pkg-config125 openssl126 bacon127 nil128 rustPlatform.bindgenHook129 nixVersions.nix_2_22130 ];131 env.PROTOC = "${pkgs.protobuf}/bin/protoc";132 };133 };134 formatter = pkgs.alejandra;135 };136 };137}lib/flakePart.nixdiffbeforeafterboth--- a/lib/flakePart.nix
+++ b/lib/flakePart.nix
@@ -65,11 +65,12 @@
else data;
nixpkgs.buildUsing = mkOptionDefault bootstrapNixpkgs;
nixpkgs.overlays = [
- (final: prev:
- import ../pkgs {
+ (final: prev: {
+ inherit (import ../pkgs {
inherit (prev) callPackage;
craneLib = crane.mkLib prev;
- })
+ }) fleet-install-secrets;
+ })
];
};
}
rust-toolchain.tomldiffbeforeafterboth--- a/rust-toolchain.toml
+++ b/rust-toolchain.toml
@@ -1,3 +1,3 @@
[toolchain]
-channel = "nightly-2024-11-12"
+channel = "1.85.0"
components = ["rustfmt", "clippy", "rust-analyzer", "rust-src"]