1{2 description = "Remowt";3 inputs = {4 nixpkgs.url = "github:nixos/nixpkgs/release-25.11";5 flake-parts = {6 url = "github:hercules-ci/flake-parts";7 inputs.nixpkgs-lib.follows = "nixpkgs";8 };9 rust-overlay = {10 url = "github:oxalica/rust-overlay";11 inputs.nixpkgs.follows = "nixpkgs";12 };13 crane.url = "github:ipetkov/crane";14 shelly.url = "github:CertainLach/shelly";15 };16 outputs =17 inputs@{18 nixpkgs,19 flake-parts,20 rust-overlay,21 crane,22 ...23 }:24 flake-parts.lib.mkFlake { inherit inputs; } {25 imports = [26 inputs.shelly.flakeModule27 ./nix/nixos-modules.nix28 ];29 systems = nixpkgs.lib.systems.flakeExposed;30 perSystem =31 {32 config,33 self',34 system,35 pkgs,36 ...37 }:38 let39 rust = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;40 craneLib = (crane.mkLib pkgs).overrideToolchain rust;41 in42 {43 _module.args.pkgs = import nixpkgs {44 inherit system;45 overlays = [ rust-overlay.overlays.default ];46 };47 packages = let48 remowtAgent = pkgs.callPackage ./nix/remowt-agent.nix {49 inherit craneLib;50 };51 in {52 polkit-backend = pkgs.callPackage ./nix/polkit-backend.nix {53 inherit craneLib;54 };55 remowt-agent = remowtAgent.x86_64;56 remowt-agent-aarch64 = remowtAgent.aarch64;57 remowt-agent-armv7l = remowtAgent.armv7l;58 remowt-agents = pkgs.callPackage ./nix/remowt-agents-bundle.nix {59 agents = remowtAgent;60 };61 remowt-ssh = pkgs.callPackage ./nix/remowt-ssh.nix {62 inherit craneLib;63 agents = self'.packages.remowt-agents;64 };65 };66 shelly.shells.default = {67 factory = craneLib.devShell;68 packages = with pkgs; [69 cargo-edit70 cargo-outdated71 lld72 hyperfine73 valgrind74 graphviz75 cargo-release76 rustPlatform.bindgenHook77 pam78 just79 ];80 };81 formatter = pkgs.alejandra;82 };83 };84}