Nixfiles/flake.nix

117 lines
3.3 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";
2022-11-20 21:16:25 +01:00
nix-gaming.url = "github:fufexan/nix-gaming";
2022-05-01 10:32:31 +02:00
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-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";
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";
nur.url = "github:nix-community/NUR";
# Extra Package Sources
simulationcraft = {
url = "github:simulationcraft/simc";
flake = false;
};
2022-10-09 16:35:03 +02:00
oscclip = {
url = "github:rumpelsepp/oscclip";
flake = false;
};
kabalist = {
url = "github:traxys/kabalist";
flake = false;
};
2023-02-12 13:12:37 +01:00
roaming_proxy.url = "github:traxys/roaming_proxy";
2022-05-01 10:32:31 +02:00
};
2022-05-01 10:32:31 +02:00
outputs = {
2022-10-31 16:42:44 +01:00
self,
2022-05-01 10:32:31 +02:00
home-manager,
nixpkgs,
...
} @ inputs: let
sources =
{
2022-11-23 20:43:50 +01:00
inherit (inputs) oscclip simulationcraft kabalist;
}
// (nixpkgs.legacyPackages.x86_64-linux.callPackage ./_sources/generated.nix {});
2023-02-12 13:11:59 +01:00
pkgList = system: callPackage:
(import ./pkgs/default.nix {
inherit sources callPackage;
naersk = inputs.naersk.lib."${system}";
})
// {
raclette = inputs.raclette.defaultPackage."${system}";
neovimTraxys = inputs.nvim-traxys.packages."${system}".nvim;
2023-02-12 13:12:37 +01:00
roaming_proxy = inputs.roaming_proxy.defaultPackage."${system}";
2023-02-12 13:11:59 +01:00
};
in {
2022-10-31 16:35:31 +01:00
templates = {
rust = {
path = ./templates/rust;
description = "My rust template using rust-overlay and direnv";
};
};
2023-02-12 13:11:59 +01:00
packages.x86_64-linux = pkgList "x86_64-linux" nixpkgs.legacyPackages.x86_64-linux.callPackage;
nixosConfigurations = {
ZeNixLaptop = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
modules = [
2022-05-01 10:32:31 +02:00
({pkgs, ...}: {
nixpkgs.overlays = [
2022-11-20 21:16:25 +01:00
inputs.nur.overlay
2022-07-17 11:46:23 +02:00
inputs.rust-overlay.overlays.default
2022-05-01 10:32:31 +02:00
inputs.nix-alien.overlay
2022-11-20 21:16:25 +01:00
inputs.nix-gaming.overlays.default
2022-07-21 00:42:37 +02:00
inputs.comma.overlays.default
2023-02-12 13:11:59 +01:00
(final: prev: pkgList system prev.callPackage)
];
})
./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-10-31 16:42:44 +01:00
home-manager.extraSpecialArgs = {flake = self;};
# Optionally, use home-manager.extraSpecialArgs to pass
# arguments to home.nix
}
];
};
};
};
}