diff --git a/hosts/pinwheel/configuration.nix b/hosts/pinwheel/configuration.nix index f1e69ca..981ad5d 100644 --- a/hosts/pinwheel/configuration.nix +++ b/hosts/pinwheel/configuration.nix @@ -86,6 +86,7 @@ git.enable = true; openvpn.enable = true; go.enable = true; + rust.enable = true; keyboard.enable = true; docker.enable = true; podman.enable = false; diff --git a/hosts/pinwheel/modules/rust/default.nix b/hosts/pinwheel/modules/rust/default.nix new file mode 100644 index 0000000..befa30b --- /dev/null +++ b/hosts/pinwheel/modules/rust/default.nix @@ -0,0 +1,23 @@ +{ pkgs, lib, config, ... }: +let + enabled = config.mod.rust.enable; +in +{ + options = { + mod.rust = { + enable = lib.mkEnableOption "enable rust module"; + }; + }; + + config = lib.mkIf enabled { + home-manager.users.alex = { + home.packages = [ + pkgs.rustc + pkgs.cargo + pkgs.rustfmt + pkgs.clippy + pkgs.rust-analyzer + ]; + }; + }; +}