shells and stuff 3
This commit is contained in:
33
flake.lock
generated
33
flake.lock
generated
@@ -464,11 +464,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1720796317,
|
"lastModified": 1720861673,
|
||||||
"narHash": "sha256-2B4PFl75fFjQkquRCPB5PYeY0bFqF/xvsLy014c+7W4=",
|
"narHash": "sha256-gh34LtCLvXCd/Xyk33mgQU3QqNyJ7ZwJj59c4Qdad78=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "neovim-nightly-overlay",
|
"repo": "neovim-nightly-overlay",
|
||||||
"rev": "a07ca86e6922bc2a68ec4c801ab7e05e12397af0",
|
"rev": "34b8101a10dfb4cb38832a17ef33281d59e2b2b3",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -480,11 +480,11 @@
|
|||||||
"neovim-src": {
|
"neovim-src": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1720739431,
|
"lastModified": 1720816717,
|
||||||
"narHash": "sha256-lEgZwuKL1eLsiFqoSiOZgq30jQCFTEYlreL79Txbxu4=",
|
"narHash": "sha256-C8bdG2wrI29afHI1705W37M7CPudz5117YafiBlW0Y4=",
|
||||||
"owner": "neovim",
|
"owner": "neovim",
|
||||||
"repo": "neovim",
|
"repo": "neovim",
|
||||||
"rev": "a5de650f0eb93a848831f1ba631485437a82d57b",
|
"rev": "10256bb760fcab0dc25f7eb5b0b45966cb771939",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -610,6 +610,7 @@
|
|||||||
"neovim-nightly-overlay": "neovim-nightly-overlay",
|
"neovim-nightly-overlay": "neovim-nightly-overlay",
|
||||||
"nixpkgs": "nixpkgs_2",
|
"nixpkgs": "nixpkgs_2",
|
||||||
"nixpkgs-stable": "nixpkgs-stable_2",
|
"nixpkgs-stable": "nixpkgs-stable_2",
|
||||||
|
"rust-overlay": "rust-overlay_2",
|
||||||
"systems": "systems_3"
|
"systems": "systems_3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -655,6 +656,26 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"rust-overlay_2": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1720837122,
|
||||||
|
"narHash": "sha256-WMwo/kZ3o2h5Bls4dEyQ3XFZ4nw2UbbOUFpq3aVlkms=",
|
||||||
|
"owner": "oxalica",
|
||||||
|
"repo": "rust-overlay",
|
||||||
|
"rev": "92f0608ab66c9770e931056b1c7a1b6249dbc43a",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "oxalica",
|
||||||
|
"repo": "rust-overlay",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"systems": {
|
"systems": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1681028828,
|
"lastModified": 1681028828,
|
||||||
|
|||||||
@@ -35,7 +35,10 @@
|
|||||||
url = "github:nix-community/fenix";
|
url = "github:nix-community/fenix";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
rust-overlay.url = "github:oxalica/rust-overlay";
|
rust-overlay = {
|
||||||
|
url = "github:oxalica/rust-overlay";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
outputs = {
|
outputs = {
|
||||||
self,
|
self,
|
||||||
@@ -59,7 +62,7 @@
|
|||||||
);
|
);
|
||||||
in {
|
in {
|
||||||
inherit lib;
|
inherit lib;
|
||||||
devShells = forEachSystem (pkgs: import ./nixos/core/shells/dev.nix {inherit inputs pkgs;});
|
devShells = forEachSystem (pkgs: import ./nixos/core/shells/dev.nix {inherit pkgs;});
|
||||||
formatter = forEachSystem (pkgs: pkgs.alejandra);
|
formatter = forEachSystem (pkgs: pkgs.alejandra);
|
||||||
|
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# TODO: Set your username
|
||||||
home = {
|
home = {
|
||||||
username = "cnst";
|
username = "cnst";
|
||||||
homeDirectory = "/home/cnst";
|
homeDirectory = "/home/cnst";
|
||||||
@@ -27,6 +28,7 @@
|
|||||||
|
|
||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
|
|
||||||
|
# Nicely reload system units when changing configs
|
||||||
systemd.user.startServices = "sd-switch";
|
systemd.user.startServices = "sd-switch";
|
||||||
|
|
||||||
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
||||||
|
|||||||
@@ -1,19 +1,10 @@
|
|||||||
{nixpkgs ? import <nixpkgs> {}}: let
|
{pkgs ? import <nixpkgs> {}, ...}: {
|
||||||
rustOverlay = builtins.fetchTarball "https://github.com/oxalica/rust-overlay/archive/master.tar.gz";
|
default = pkgs.mkShell {
|
||||||
pinnedPkgs = nixpkgs.fetchFromGitHub {
|
nativeBuildInputs = with pkgs; [
|
||||||
owner = "NixOS";
|
_rustBuild
|
||||||
repo = "nixpkgs";
|
];
|
||||||
rev = "1fe6ed37fd9beb92afe90671c0c2a662a03463dd";
|
|
||||||
sha256 = "1daa0y3p17shn9gibr321vx8vija6bfsb5zd7h4pxdbbwjkfq8n2";
|
|
||||||
};
|
|
||||||
pkgs = import pinnedPkgs {
|
|
||||||
overlays = [(import rustOverlay)];
|
|
||||||
};
|
|
||||||
in
|
|
||||||
pkgs.mkShell {
|
|
||||||
buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
rust-bin.stable.latest.default
|
# rust-bin.stable.latest.default
|
||||||
rust-analyzer
|
|
||||||
openssl
|
openssl
|
||||||
pkg-config
|
pkg-config
|
||||||
ez
|
ez
|
||||||
@@ -26,4 +17,5 @@ in
|
|||||||
alias find=fd
|
alias find=fd
|
||||||
'';
|
'';
|
||||||
RUST_BACKTRACE = 1;
|
RUST_BACKTRACE = 1;
|
||||||
}
|
};
|
||||||
|
}
|
||||||
|
|||||||
34
nixos/core/shells/dev.nixbak
Normal file
34
nixos/core/shells/dev.nixbak
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
{
|
||||||
|
inputs,
|
||||||
|
pkgs ? import <nixpkgs> {},
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
_rustBuildOxalica = inputs.rust-overlay.packages.${pkgs.stdenv.hostPlatform.system}.rust.override {
|
||||||
|
extensions = [
|
||||||
|
"rust-src"
|
||||||
|
"rust-analyzer"
|
||||||
|
"clippy"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
_rustBuild = _rustBuildOxalica;
|
||||||
|
in {
|
||||||
|
default = pkgs.mkShell {
|
||||||
|
nativeBuildInputs = with pkgs; [
|
||||||
|
_rustBuild
|
||||||
|
];
|
||||||
|
buildInputs = with pkgs; [
|
||||||
|
rust-bin.stable.latest.default
|
||||||
|
openssl
|
||||||
|
pkg-config
|
||||||
|
ez
|
||||||
|
fd
|
||||||
|
gtk3
|
||||||
|
gtk4
|
||||||
|
];
|
||||||
|
shellHook = ''
|
||||||
|
alias ls=eza
|
||||||
|
alias find=fd
|
||||||
|
'';
|
||||||
|
RUST_BACKTRACE = 1;
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user