mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-09 23:22:57 +00:00
add rust programming tooling
This commit is contained in:
parent
77708aebd9
commit
f828c1c200
@ -99,6 +99,7 @@ inputs.nixpkgs.lib.nixosSystem {
|
||||
keybase.enable = true;
|
||||
mullvad.enable = false;
|
||||
nixlang.enable = true;
|
||||
rust.enable = true;
|
||||
yt-dlp.enable = true;
|
||||
gaming = {
|
||||
dwarf-fortress.enable = true;
|
||||
|
@ -6,6 +6,7 @@
|
||||
./lua.nix
|
||||
./nix.nix
|
||||
./python.nix
|
||||
./rust.nix
|
||||
./terraform.nix
|
||||
];
|
||||
|
||||
|
17
modules/common/programming/rust.nix
Normal file
17
modules/common/programming/rust.nix
Normal file
@ -0,0 +1,17 @@
|
||||
{ config, pkgs, lib, ... }: {
|
||||
|
||||
options.rust.enable = lib.mkEnableOption "Rust programming language.";
|
||||
|
||||
config = lib.mkIf config.rust.enable {
|
||||
|
||||
home-manager.users.${config.user} = {
|
||||
|
||||
home.packages = with pkgs; [ cargo rustc ];
|
||||
|
||||
programs.fish.shellAbbrs = { };
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
@ -5,7 +5,7 @@
|
||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs";
|
||||
inputs.poetry2nix.url = "github:nix-community/poetry2nix";
|
||||
|
||||
outputs = { nixpkgs, flake-utils, poetry2nix }:
|
||||
outputs = { self, nixpkgs, flake-utils, poetry2nix }:
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = import nixpkgs {
|
||||
|
@ -11,7 +11,7 @@
|
||||
inputs.pypi-deps-db.follows = "pypi-deps-db";
|
||||
};
|
||||
|
||||
outputs = { nixpkgs, mach-nix }:
|
||||
outputs = { self, nixpkgs, mach-nix }:
|
||||
let
|
||||
supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-darwin" ];
|
||||
forAllSystems = f:
|
||||
|
20
templates/rust/flake.nix
Normal file
20
templates/rust/flake.nix
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
description = "Basic Rust project";
|
||||
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
outputs = { self, nixpkgs }:
|
||||
let
|
||||
forAllSystems = nixpkgs.lib.genAttrs [
|
||||
"x86_64-linux"
|
||||
"x86_64-darwin"
|
||||
"aarch64-linux"
|
||||
"aarch64-darwin"
|
||||
];
|
||||
in {
|
||||
devShells = forAllSystems (system:
|
||||
let pkgs = import nixpkgs { inherit system; };
|
||||
in {
|
||||
default =
|
||||
pkgs.mkShell { buildInputs = with pkgs; [ gcc rustc cargo ]; };
|
||||
});
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user