Nixfiles/flake.nix

103 lines
3.1 KiB
Nix
Raw Normal View History

{
description = "NixOS configuration";
2022-05-01 10:32:31 +02:00
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
2022-05-01 10:32:31 +02:00
nix-alien.url = "github:thiagokokada/nix-alien";
nix-ld.url = "github:Mic92/nix-ld/main";
nvim-traxys = {
url = "github:traxys/nvim-flake";
inputs.nixpkgs.follows = "nixpkgs";
};
zsh-traxys = {
url = "github:traxys/zsh-flake";
};
2022-06-01 22:24:15 +02:00
xdg-ninja = {
url = "github:traxys/xdg-ninja";
flake = false;
};
2022-07-17 11:46:23 +02:00
rust-overlay.url = "github:oxalica/rust-overlay";
2022-07-17 16:55:00 +02:00
naersk.url = "github:nix-community/naersk";
kabalist = {
url = "github:traxys/kabalist";
flake = false;
};
2022-07-21 00:42:37 +02:00
comma.url = "github:nix-community/comma";
2022-08-14 14:51:24 +02:00
raclette.url = "github:traxys/raclette";
2022-05-01 10:32:31 +02:00
};
2022-05-01 10:32:31 +02:00
outputs = {
home-manager,
nixpkgs,
...
} @ inputs: {
nixosConfigurations = {
ZeNixLaptop = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
modules = [
2022-05-01 10:32:31 +02:00
({pkgs, ...}: {
nixpkgs.overlays = [
2022-07-17 11:46:23 +02:00
inputs.rust-overlay.overlays.default
2022-02-13 20:58:15 +01:00
inputs.nvim-traxys.overlay."${system}"
2022-05-01 10:32:31 +02:00
inputs.nix-alien.overlay
2022-07-21 00:42:37 +02:00
inputs.comma.overlays.default
2022-04-10 18:03:08 +02:00
(final: prev: {
2022-06-01 22:24:15 +02:00
xdg-ninja = with pkgs;
stdenv.mkDerivation rec {
pname = "xdg-ninja";
version = "0.1";
src = inputs.xdg-ninja;
installPhase = ''
mkdir -p $out/bin
cp xdg-ninja.sh $out/bin
cp -r programs $out/bin
wrapProgram $out/bin/xdg-ninja.sh \
--prefix PATH : ${lib.makeBinPath [bash jq glow]}
'';
buildInputs = [jq glow bash];
nativeBuildInputs = [makeWrapper];
};
2022-07-17 16:55:00 +02:00
kabalist_cli = inputs.naersk.lib."${system}".buildPackage {
cargoBuildOptions = opts: opts ++ ["--package=kabalist_cli"];
root = inputs.kabalist;
};
2022-08-14 14:51:24 +02:00
raclette = inputs.raclette.defaultPackage."${system}";
2022-04-10 18:03:08 +02:00
})
];
})
./nixos/configuration.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
2022-05-01 10:32:31 +02:00
home-manager.users.traxys = {
config,
lib,
pkgs,
...
}: {
2022-02-06 10:46:29 +01:00
imports = [
./home.nix
2022-02-06 20:52:31 +01:00
./graphical.nix
./extra_info.nix
./localinfo.nix
2022-02-06 21:38:03 +01:00
./wm
./rustdev.nix
./git
2022-02-06 10:46:29 +01:00
inputs.zsh-traxys.home-managerModule."${system}"
2022-02-13 20:58:15 +01:00
inputs.nvim-traxys.home-managerModule."${system}"
2022-02-06 10:46:29 +01:00
];
};
# Optionally, use home-manager.extraSpecialArgs to pass
# arguments to home.nix
}
];
};
};
};
}