mirror of
https://github.com/ivabus/nixos
synced 2024-11-22 00:15:06 +03:00
Add rust overlay
Signed-off-by: Ivan Bushchik <ivabus@ivabus.dev>
This commit is contained in:
parent
9017e9e97d
commit
159b40598a
3 changed files with 19 additions and 10 deletions
11
flake.nix
11
flake.nix
|
@ -12,28 +12,29 @@
|
|||
|
||||
apple-silicon-support.url = "github:tpwrules/nixos-apple-silicon";
|
||||
|
||||
#nixos-vf2 = { url = "path:/root/nixos-vf2"; };
|
||||
#nixos-vf2 = { url = "github:Snektron/nixos-vf2"; };
|
||||
rust-overlay.url = "github:oxalica/rust-overlay";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, home-manager, nix-darwin, apple-silicon-support
|
||||
# , nixos-vf2
|
||||
outputs = { self, nixpkgs, home-manager, rust-overlay, apple-silicon-support
|
||||
, ... }@inputs: {
|
||||
# Stella = Unchartevice 6540 (Ryzen 3 3250U, 16GB RAM)
|
||||
nixosConfigurations."stella" = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = inputs;
|
||||
modules = [ home-manager.nixosModules.home-manager ./machines/stella ];
|
||||
};
|
||||
|
||||
# Vetus = iMac 27" 2017, i5, 64 GB RAM
|
||||
nixosConfigurations."vetus" = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = inputs;
|
||||
modules = [ home-manager.nixosModules.home-manager ./machines/vetus ];
|
||||
};
|
||||
|
||||
# Celerrime = MacBook Air M2
|
||||
nixosConfigurations."celerrime" = nixpkgs.lib.nixosSystem {
|
||||
system = "aarch64-linux";
|
||||
specialArgs = inputs;
|
||||
modules = [
|
||||
home-manager.nixosModules.home-manager
|
||||
apple-silicon-support.nixosModules.apple-silicon-support
|
||||
|
@ -44,12 +45,14 @@
|
|||
# cursor = vm for "running" linux programs on aarch64
|
||||
nixosConfigurations."cursor" = nixpkgs.lib.nixosSystem {
|
||||
system = "aarch64-linux";
|
||||
specialArgs = inputs;
|
||||
modules = [ home-manager.nixosModules.home-manager ./machines/cursor ];
|
||||
};
|
||||
|
||||
# Raspberry Pi 4B 2GB RAM
|
||||
nixosConfigurations."rubusidaeus" = nixpkgs.lib.nixosSystem {
|
||||
system = "aarch64-linux";
|
||||
specialArgs = inputs;
|
||||
modules = [
|
||||
"${nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix"
|
||||
home-manager.nixosModules.home-manager
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, pkgs, ... }:
|
||||
{ config, pkgs, rust-overlay, ... }:
|
||||
|
||||
let my = import ../..;
|
||||
in {
|
||||
|
@ -18,7 +18,7 @@ in {
|
|||
devel.enable = true;
|
||||
gaming.enable = false;
|
||||
graphical.enable = true;
|
||||
latex.enable = true;
|
||||
latex.enable = false;
|
||||
media-client.enable = true;
|
||||
torrent.enable = true;
|
||||
virtualisation.enable = false;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{ config, pkgs, lib, rust-overlay, ... }:
|
||||
|
||||
let cfg = config.my.roles.devel;
|
||||
in {
|
||||
|
@ -7,10 +7,16 @@ in {
|
|||
config = lib.mkIf (cfg.enable) (lib.mkMerge [
|
||||
{
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
nixpkgs.overlays = [ rust-overlay.overlays.default ];
|
||||
environment.systemPackages = with pkgs; [
|
||||
rustc
|
||||
cargo
|
||||
rustup
|
||||
(rust-bin.stable.latest.default.override {
|
||||
extensions = [ "rust-src" ];
|
||||
targets = [
|
||||
pkgs.stdenv.hostPlatform.config
|
||||
"x86_64-unknown-linux-musl"
|
||||
"aarch64-unknown-linux-musl"
|
||||
];
|
||||
})
|
||||
clang
|
||||
llvm
|
||||
lld
|
||||
|
|
Loading…
Reference in a new issue