Add rust
This commit is contained in:
parent
e0081668e0
commit
3bc3f55d8b
3 changed files with 94 additions and 6 deletions
76
flake.lock
76
flake.lock
|
@ -106,6 +106,26 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"fenix": {
|
||||||
|
"inputs": {
|
||||||
|
"naersk": "naersk_2",
|
||||||
|
"nixpkgs": "nixpkgs_3",
|
||||||
|
"rust-analyzer-src": "rust-analyzer-src"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1623037639,
|
||||||
|
"narHash": "sha256-JzblstxJmWo6gfQ9+HGroidGTHIk+tJstgsrxUmq6Ho=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "fenix",
|
||||||
|
"rev": "6fe14f8752d5b9fe4bc71bbeafa4916961b39975",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "fenix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"flake-compat": {
|
"flake-compat": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
|
@ -209,6 +229,26 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"naersk_2": {
|
"naersk_2": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"latest"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1622810282,
|
||||||
|
"narHash": "sha256-4wmvM3/xfD0hCdNDIXVzRMfL4yB1J+DjH6Zte2xbAxk=",
|
||||||
|
"owner": "nmattia",
|
||||||
|
"repo": "naersk",
|
||||||
|
"rev": "e8061169e1495871b56be97c5c51d310fae01374",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nmattia",
|
||||||
|
"repo": "naersk",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"naersk_3": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"latest"
|
"latest"
|
||||||
|
@ -304,6 +344,22 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nixpkgs_3": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1622797669,
|
||||||
|
"narHash": "sha256-xIyWeoYExzF0KNaKcqfxEX58fN4JTIQxTJWbsAujllc=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "1ca6b0a0cc38dbba0441202535c92841dd39d1ae",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nur": {
|
"nur": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1622714715,
|
"lastModified": 1622714715,
|
||||||
|
@ -355,15 +411,33 @@
|
||||||
"ci-agent": "ci-agent",
|
"ci-agent": "ci-agent",
|
||||||
"darwin": "darwin",
|
"darwin": "darwin",
|
||||||
"digga": "digga",
|
"digga": "digga",
|
||||||
|
"fenix": "fenix",
|
||||||
"home": "home",
|
"home": "home",
|
||||||
"latest": "latest",
|
"latest": "latest",
|
||||||
"naersk": "naersk_2",
|
"naersk": "naersk_3",
|
||||||
"nixos": "nixos",
|
"nixos": "nixos",
|
||||||
"nixos-hardware": "nixos-hardware",
|
"nixos-hardware": "nixos-hardware",
|
||||||
"nur": "nur",
|
"nur": "nur",
|
||||||
"pkgs": "pkgs"
|
"pkgs": "pkgs"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"rust-analyzer-src": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1622991006,
|
||||||
|
"narHash": "sha256-f8jdBL42+bU8KKchkW4fF6+kDBjgpoOZyP5yOYsebBk=",
|
||||||
|
"owner": "rust-analyzer",
|
||||||
|
"repo": "rust-analyzer",
|
||||||
|
"rev": "13da28cc2bc1b59f7af817eca36927a71edb023c",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "rust-analyzer",
|
||||||
|
"ref": "nightly",
|
||||||
|
"repo": "rust-analyzer",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"utils": {
|
"utils": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1610051610,
|
"lastModified": 1610051610,
|
||||||
|
|
12
flake.nix
12
flake.nix
|
@ -6,6 +6,7 @@
|
||||||
nixos.url = "nixpkgs/nixos-unstable";
|
nixos.url = "nixpkgs/nixos-unstable";
|
||||||
latest.url = "nixpkgs";
|
latest.url = "nixpkgs";
|
||||||
digga.url = "github:divnix/digga";
|
digga.url = "github:divnix/digga";
|
||||||
|
fenix.url = "github:nix-community/fenix";
|
||||||
|
|
||||||
ci-agent = {
|
ci-agent = {
|
||||||
url = "github:hercules-ci/hercules-ci-agent";
|
url = "github:hercules-ci/hercules-ci-agent";
|
||||||
|
@ -23,7 +24,7 @@
|
||||||
pkgs.inputs.nixpkgs.follows = "nixos";
|
pkgs.inputs.nixpkgs.follows = "nixos";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs@{ self, pkgs, digga, nixos, ci-agent, home, nixos-hardware, nur, ... }:
|
outputs = inputs@{ self, pkgs, digga, nixos, ci-agent, home, nixos-hardware, nur, fenix, ... }:
|
||||||
digga.lib.mkFlake {
|
digga.lib.mkFlake {
|
||||||
inherit self inputs;
|
inherit self inputs;
|
||||||
|
|
||||||
|
@ -36,6 +37,7 @@
|
||||||
./pkgs/default.nix
|
./pkgs/default.nix
|
||||||
pkgs.overlay # for `srcs`
|
pkgs.overlay # for `srcs`
|
||||||
nur.overlay
|
nur.overlay
|
||||||
|
fenix.overlay
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
latest = { };
|
latest = { };
|
||||||
|
@ -71,10 +73,10 @@
|
||||||
};
|
};
|
||||||
profiles = [ ./profiles ./users ];
|
profiles = [ ./profiles ./users ];
|
||||||
suites = { profiles, users, ... }: with profiles; rec {
|
suites = { profiles, users, ... }: with profiles; rec {
|
||||||
base = [ core users.root ];
|
base = [ core users.root ];
|
||||||
workstation = [ base sway develop game profiles.workstation ssh flatpak torrents pwn tor ];
|
workstation = [ base sway develop game profiles.workstation ssh flatpak torrents pwn tor rust ];
|
||||||
desktop = workstation ++ [ users.mae-desk amd school three_dee ];
|
desktop = workstation ++ [ users.mae-desk amd school three_dee ];
|
||||||
lap = workstation ++ [ users.mae-lap laptop bluetooth print networkmanager androidev ];
|
lap = workstation ++ [ users.mae-lap laptop bluetooth print networkmanager androidev ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
12
profiles/rust/default.nix
Normal file
12
profiles/rust/default.nix
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
let
|
||||||
|
fenix = pkgs.fenix;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
environment.systemPackages = [
|
||||||
|
fenix.stable.defaultToolchain
|
||||||
|
fenix.rust-analyzer
|
||||||
|
pkgs.cargo-edit
|
||||||
|
];
|
||||||
|
environment.variables.RUST_SRC_PATH = "${fenix.stable.rust-src}/lib/rustlib/src/rust/library/";
|
||||||
|
}
|
Loading…
Reference in a new issue