add rust support to config
This commit is contained in:
parent
5c2deec279
commit
52a6173f0b
7 changed files with 126 additions and 30 deletions
32
flake.nix
32
flake.nix
|
@ -21,6 +21,7 @@
|
|||
karton.url = "git+https://gitlab.com/obsidianical/microbin.git";
|
||||
arion.url = "github:hercules-ci/arion";
|
||||
gumseite.url = "git+https://gitlab.com/schrottkatze/gum-schulsachen.git";
|
||||
fenix.url = "github:nix-community/fenix";
|
||||
};
|
||||
|
||||
outputs = {
|
||||
|
@ -31,10 +32,30 @@
|
|||
home-manager,
|
||||
nixos-hardware,
|
||||
mac-brcm-fw,
|
||||
fenix,
|
||||
...
|
||||
} @ inputs: let
|
||||
pkgs = nixpkgs.legacyPackages."x86_64-linux";
|
||||
pkgs-unstable-small = nixpkgs-unstable-small.legacyPackages."x86_64-linux";
|
||||
system = "x86_64-linux";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
pkgs-stable = nixpkgs-stable.legacyPackages.${system};
|
||||
pkgs-unstable-small = nixpkgs-unstable-small.legacyPackages.${system};
|
||||
rs-toolchain = with fenix.packages.${system};
|
||||
combine [
|
||||
default.toolchain
|
||||
rust-analyzer
|
||||
];
|
||||
rs-platform = pkgs.makeRustPlatform {
|
||||
cargo = rs-toolchain;
|
||||
rustc = rs-toolchain;
|
||||
};
|
||||
rs-programs = final: prev: {
|
||||
s10e-jrnl = rs-platform.buildRustPackage {
|
||||
pname = "jrnl";
|
||||
version = "0.0.1";
|
||||
src = ./programs/jrnl;
|
||||
cargoLock.lockFile = ./programs/jrnl/Cargo.lock;
|
||||
};
|
||||
};
|
||||
in {
|
||||
devShells."x86_64-linux".default = pkgs.mkShell {
|
||||
buildInputs = [
|
||||
|
@ -46,13 +67,14 @@
|
|||
xmobar
|
||||
statgrab
|
||||
]))
|
||||
rs-toolchain
|
||||
pkgs.haskell-language-server
|
||||
];
|
||||
};
|
||||
nixosConfigurations = {
|
||||
monosodium-glutamate-g = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inherit inputs pkgs-unstable-small;
|
||||
inherit inputs pkgs-unstable-small pkgs-stable rs-programs;
|
||||
};
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
|
@ -74,7 +96,7 @@
|
|||
};
|
||||
catbook-j = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inherit inputs pkgs-unstable-small;
|
||||
inherit inputs pkgs-unstable-small pkgs-stable rs-programs;
|
||||
};
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
|
@ -96,7 +118,7 @@
|
|||
};
|
||||
potatobook-g = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inherit inputs pkgs-unstable-small;
|
||||
inherit inputs pkgs-unstable-small rs-programs;
|
||||
};
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue