ark/flake.nix

126 lines
3.2 KiB
Nix
Raw Normal View History

2019-12-03 08:18:30 +03:00
{
2019-12-05 11:36:15 +03:00
description = "A highly structured configuration database.";
2022-02-18 20:31:01 +03:00
inputs = {
nixos.url = "github:nixos/nixpkgs/nixos-unstable";
2022-04-09 18:01:35 +03:00
fup.url = "github:gytis-ivaskevicius/flake-utils-plus";
home.url = "github:nix-community/home-manager/release-21.11";
2022-02-18 20:31:01 +03:00
home.inputs.nixpkgs.follows = "nixos";
2022-04-09 18:01:35 +03:00
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixos";
};
2022-02-18 20:31:01 +03:00
naersk.url = "github:nmattia/naersk";
naersk.inputs.nixpkgs.follows = "nixos";
2022-04-09 18:01:35 +03:00
nixCargoIntegration.url = "github:yusdacra/nix-cargo-integration";
nixCargoIntegration.inputs.nixpkgs.follows = "nixos";
nixCargoIntegration.inputs.rustOverlay.follows = "rust-overlay";
nixosHardware.url = "github:nixos/nixos-hardware";
nixosPersistence.url = "github:nix-community/impermanence";
2022-02-18 20:31:01 +03:00
rnixLsp = {
url = "github:nix-community/rnix-lsp";
inputs.naersk.follows = "naersk";
inputs.nixpkgs.follows = "nixos";
};
alejandra = {
url = "github:kamadorueda/alejandra";
inputs.nixpkgs.follows = "nixos";
};
2022-04-09 18:01:35 +03:00
helix = {
url = "github:helix-editor/helix";
2022-02-18 20:31:01 +03:00
inputs.nixpkgs.follows = "nixos";
2022-04-09 18:01:35 +03:00
inputs.rust-overlay.follows = "rust-overlay";
inputs.nixCargoIntegration.follows = "nixCargoIntegration";
2022-02-18 20:31:01 +03:00
};
};
2022-03-09 23:55:02 +03:00
outputs = {
self,
2022-04-09 18:01:35 +03:00
fup,
2022-03-09 23:55:02 +03:00
home,
2022-04-09 18:01:35 +03:00
nixosHardware,
2022-03-09 23:55:02 +03:00
nixosPersistence,
nixpkgsWayland,
rnixLsp,
alejandra,
2022-04-09 18:01:35 +03:00
helix,
nixos,
2022-03-09 23:55:02 +03:00
...
} @ inputs:
2022-04-09 18:01:35 +03:00
fup.lib.mkFlake
2022-02-18 20:31:01 +03:00
{
2022-03-09 23:55:02 +03:00
inherit self inputs;
2022-04-09 18:01:35 +03:00
supportedSystems = ["x86_64-linux"];
channelsConfig.allowUnfree = true;
nix.generateRegistryFromInputs = true;
nix.generateNixPathFromInputs = true;
nix.linkInputs = true;
2022-03-09 23:55:02 +03:00
sharedOverlays = [
2022-04-09 18:01:35 +03:00
(_: prev: {
lib = prev.lib.extend (_: _: builtins);
})
(_: prev: {
lib = prev.lib.extend (_: l: {
pkgBin = id:
if l.isString id
then "${prev.${id}}/bin/${id}"
else "${prev.${id.name}}/bin/${id.bin}";
});
})
2022-03-09 23:55:02 +03:00
];
2022-04-09 18:01:35 +03:00
channels.nixos = {
overlays = [
./overlays/chromium-wayland.nix
./overlays/phantom.nix
(
_: prev: {
helix = helix.packages.${prev.system}.helix;
rnix-lsp = rnixLsp.packages.${prev.system}.rnix-lsp;
alejandra = alejandra.defaultPackage.${prev.system};
}
)
];
2022-02-18 20:31:01 +03:00
};
2022-04-09 18:01:35 +03:00
hostDefaults = {
channelName = "nixos";
modules = [
home.nixosModules.home-manager
./profiles
./modules
./locale
./secrets
];
2022-03-09 23:55:02 +03:00
};
2022-04-09 18:01:35 +03:00
hosts.lungmen = {
modules = with nixosHardware.nixosModules; [
nixos.nixosModules.notDetected
nixosPersistence.nixosModules.impermanence
common-pc-ssd
common-pc
common-gpu-amd
common-cpu-amd
./profiles/network/networkmanager
./users/root
./users/patriot
./hosts/lungmen
];
};
outputsBuilder = channels:
with channels.nixos; {
devShell = mkShell {
name = "prts";
buildInputs = [git git-crypt];
};
};
2022-03-09 23:55:02 +03:00
};
2019-12-03 08:18:30 +03:00
}