ark/flake.nix

140 lines
4.4 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";
digga.url = "github:divnix/digga/main";
digga.inputs.nixpkgs.follows = "nixos";
digga.inputs.nixlib.follows = "nixos";
digga.inputs.home-manager.follows = "home";
home.url = "github:nix-community/home-manager/master";
home.inputs.nixpkgs.follows = "nixos";
naersk.url = "github:nmattia/naersk";
naersk.inputs.nixpkgs.follows = "nixos";
nixos-hardware.url = "github:nixos/nixos-hardware";
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-02-18 20:31:01 +03:00
/*
helix = {
url = "https://github.com/helix-editor/helix.git";
type = "git";
submodules = true;
inputs.nixpkgs.follows = "nixos";
};
*/
nixosPersistence.url = "github:nix-community/impermanence";
nixpkgsWayland = {
url = "github:colemickens/nixpkgs-wayland";
inputs.nixpkgs.follows = "nixos";
};
};
outputs =
2022-02-18 20:31:01 +03:00
{
self,
digga,
nixos,
home,
nixos-hardware,
nixosPersistence,
nixpkgsWayland,
rnixLsp,
alejandra,
...
}
@ inputs:
digga.lib.mkFlake
2021-07-17 00:01:25 +03:00
{
inherit self inputs;
channelsConfig = { allowUnfree = true; };
channels = {
nixos = {
2022-02-18 20:31:01 +03:00
imports = [(digga.lib.importOverlays ./overlays)];
2021-07-17 00:01:25 +03:00
overlays = [
2022-02-25 20:01:43 +03:00
nixpkgsWayland.overlay
2022-02-18 20:31:01 +03:00
(
_: prev: {
#helix = helix.packages.${prev.system}.helix;
#helix-src = prev.helix.src;
#rnix-lsp = rnixLsp.packages.${prev.system}.rnix-lsp;
}
)
(
_: prev: {
alejandra = alejandra.defaultPackage.${prev.system};
remarshal =
prev.remarshal.overrideAttrs
(
old: {
postPatch =
''
substituteInPlace pyproject.toml \
--replace "poetry.masonry.api" "poetry.core.masonry.api" \
--replace 'PyYAML = "^5.3"' 'PyYAML = "*"' \
--replace 'tomlkit = "^0.7"' 'tomlkit = "*"'
'';
}
);
}
)
2021-10-23 22:15:28 +03:00
./pkgs/default.nix
2021-07-17 00:01:25 +03:00
];
};
2021-04-22 06:44:15 +03:00
};
2021-07-17 00:01:25 +03:00
lib = import ./lib { lib = digga.lib // nixos.lib; };
sharedOverlays = [
2022-02-18 20:31:01 +03:00
(
_: prev: {
__dontExport = true;
lib = prev.lib.extend (_: _: { our = self.lib; });
}
)
2021-07-17 00:01:25 +03:00
];
2021-04-22 06:44:15 +03:00
nixos = {
2021-07-17 00:01:25 +03:00
hostDefaults = {
system = "x86_64-linux";
channelName = "nixos";
2022-02-18 20:31:01 +03:00
imports = [(digga.lib.importExportableModules ./modules)];
modules = [
2021-07-17 00:01:25 +03:00
{ lib.our = self.lib; }
digga.nixosModules.bootstrapIso
2021-07-17 00:01:25 +03:00
digga.nixosModules.nixConfig
home.nixosModules.home-manager
nixosPersistence.nixosModules.impermanence
2021-07-17 00:01:25 +03:00
];
};
2022-02-18 20:31:01 +03:00
imports = [(digga.lib.importHosts ./hosts)];
hosts = {};
2021-07-17 00:01:25 +03:00
importables = rec {
2022-02-18 20:31:01 +03:00
profiles =
(digga.lib.rakeLeaves ./profiles)
// {
users = digga.lib.rakeLeaves ./users;
nixos-hardware = nixos-hardware.nixosModules;
};
suites =
with profiles; {
base = [cachix core users.root];
work = [users.patriot develop];
};
2021-06-16 18:19:07 +03:00
};
2021-04-22 06:44:15 +03:00
};
2021-07-17 00:01:25 +03:00
home = {
2022-02-18 20:31:01 +03:00
imports = [(digga.lib.importExportableModules ./users/modules)];
modules = [];
2021-07-17 00:01:25 +03:00
importables = rec {
2021-07-21 02:33:45 +03:00
profiles = digga.lib.rakeLeaves ./users/profiles;
2022-02-18 20:31:01 +03:00
suites = with profiles; rec { base = [direnv git starship]; };
2021-06-16 18:19:07 +03:00
};
2021-04-22 06:44:15 +03:00
};
devshell = ./shell;
2021-07-17 00:01:25 +03:00
homeConfigurations = digga.lib.mkHomeConfigurations self.nixosConfigurations;
2022-02-18 20:31:01 +03:00
deploy.nodes = digga.lib.mkDeployNodes self.nixosConfigurations {};
};
2019-12-03 08:18:30 +03:00
}