add nix dev flake for development on nixos

This commit is contained in:
2026-07-02 20:52:15 +02:00
parent 08915e1359
commit 40141693f3
3 changed files with 151 additions and 0 deletions
Generated
+82
View File
@@ -0,0 +1,82 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1782918843,
"narHash": "sha256-ETYnV9U7Sr+A45dohzZdfCZKOss4qrTkO+wgNZNvEc0=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "e8273b29fe1390ec8d4603f2477357555291432e",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs",
"rust-overlay": "rust-overlay",
"utils": "utils"
}
},
"rust-overlay": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1782962170,
"narHash": "sha256-HsaK9yDDypMB2TPxAYz0mPKtmYhgNwFQa72b3Ko6kRE=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "e3fa5cf86b93914b8f312b2a1ca14fbb139c655c",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
}
},
"root": "root",
"version": 7
}
+60
View File
@@ -0,0 +1,60 @@
{
description = "Nix development flake for SoftwareManager-rs";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixpkgs-unstable";
utils.url = "github:numtide/flake-utils";
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{
self,
nixpkgs,
utils,
rust-overlay,
...
}:
utils.lib.eachDefaultSystem (
system:
let
overlays = [ (import rust-overlay) ];
pkgs = import nixpkgs {
inherit system overlays;
};
rust = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
libs = with pkgs; [
libX11
libXrandr
libXinerama
libXcursor
libXi
libxkbcommon
];
in
{
devShells = {
default =
with pkgs;
mkShell {
buildInputs = [
rust
cargo-nextest
]
++ libs;
shellHook = ''
echo Entered Rust dev shell for project SoftwareManager-rs
'';
};
};
}
);
}
+9
View File
@@ -0,0 +1,9 @@
[toolchain]
channel = "nightly"
components = [
"clippy",
"rustfmt",
"rust-analyzer",
"rust-src",
"rustc-codegen-cranelift",
]