devos/flake.nix

151 lines
4.5 KiB
Nix
Raw Normal View History

2019-12-03 06:18:30 +01:00
{
2019-12-05 09:36:15 +01:00
description = "A highly structured configuration database.";
2021-12-06 20:14:40 +01:00
nixConfig.extra-experimental-features = "nix-command flakes";
inputs =
{
2023-01-14 20:36:28 +01:00
stable.url = "github:nixos/nixpkgs/nixos-22.11";
2022-10-20 18:26:28 +02:00
nixos.url = "github:nixos/nixpkgs/nixos-unstable";
latest.url = "github:nixos/nixpkgs/master";
2021-04-02 04:10:24 +02:00
flake-utils.url = "github:numtide/flake-utils";
2022-11-23 09:41:54 +01:00
digga.url = "github:divnix/digga/home-manager-22.11";
digga.inputs.nixpkgs.follows = "nixos";
digga.inputs.nixpkgs-unstable.follows = "latest";
digga.inputs.nixlib.follows = "nixos";
digga.inputs.home-manager.follows = "home";
digga.inputs.deploy.follows = "deploy";
2022-10-08 20:59:20 +02:00
home.url = "github:nix-community/home-manager";
#home.url = "github:nix-community/home-manager/release-22.05";
2022-07-03 01:06:34 +02:00
# home.url = "path:/home/mae/home-manager";
home.inputs.nixpkgs.follows = "latest";
2021-03-02 04:30:47 +01:00
darwin.url = "github:LnL7/nix-darwin";
darwin.inputs.nixpkgs.follows = "nixos";
deploy.url = "github:input-output-hk/deploy-rs";
deploy.inputs.nixpkgs.follows = "nixos";
deploy.inputs.fenix.follows = "fenix";
agenix.url = "github:ryantm/agenix";
agenix.inputs.nixpkgs.follows = "nixos";
2021-04-02 04:10:24 +02:00
nvfetcher.url = "github:berberman/nvfetcher";
nvfetcher.inputs.nixpkgs.follows = "nixos";
nvfetcher.inputs.flake-utils.follows = "flake-utils";
naersk.url = "github:nmattia/naersk";
naersk.inputs.nixpkgs.follows = "nixos";
2022-07-11 16:04:56 +02:00
#peerix.url = "github:cid-chan/peerix";
peerix.url = "github:MaeIsBad/peerix/bad/timeout";
2022-06-16 19:22:10 +02:00
peerix.inputs.nixpkgs.follows = "nixos";
2021-03-02 04:30:47 +01:00
nixos-hardware.url = "github:nixos/nixos-hardware";
fenix.url = "github:nix-community/fenix";
2022-07-25 18:19:54 +02:00
pwnix.url = "git+https://im.badat.dev/bad/pwnix.git";
pwnix.inputs.nixpkgs.follows = "nixos";
2022-09-19 12:38:27 +02:00
nixgl.url = "github:guibou/nixGL";
2023-04-24 10:35:10 +02:00
nixgl.inputs.nixpkgs.follows = "nixos";
nixgl.inputs.flake-utils.follows = "flake-utils";
};
outputs =
{ self
, digga
, nixos
, home
, nixos-hardware
, agenix
, fenix
, nvfetcher
, deploy
2022-06-16 19:22:10 +02:00
, peerix
2022-09-19 12:38:27 +02:00
, nixgl
, ...
} @ inputs:
2021-07-16 23:01:25 +02:00
digga.lib.mkFlake
{
inherit self inputs;
channelsConfig = { allowUnfree = true; };
channels = {
nixos = {
2021-07-21 01:33:45 +02:00
imports = [ (digga.lib.importOverlays ./overlays) ];
2021-07-16 23:01:25 +02:00
overlays = [
2022-09-01 17:27:11 +02:00
# fenix.overlay breaks the cache, because it uses the system nixpkgs
2022-11-17 20:58:01 +01:00
(_: super: let pkgs = fenix.inputs.nixpkgs.legacyPackages.${super.system}; in fenix.overlays.default pkgs pkgs)
2023-03-19 14:19:17 +01:00
agenix.overlays.default
2021-07-16 23:01:25 +02:00
./pkgs/default.nix
2022-06-16 19:22:10 +02:00
peerix.overlay
2022-09-19 12:38:27 +02:00
nixgl.overlay
2021-07-16 23:01:25 +02:00
];
};
latest = { };
2021-07-16 23:01:25 +02:00
};
2021-07-16 23:01:25 +02:00
lib = import ./lib { lib = digga.lib // nixos.lib; };
2021-07-16 23:01:25 +02:00
sharedOverlays = [
(final: prev: {
__dontExport = true;
lib = prev.lib.extend (lfinal: lprev: {
our = self.lib;
});
})
];
2021-04-22 05:44:15 +02:00
nixos = {
2021-07-16 23:01:25 +02:00
hostDefaults = {
system = "x86_64-linux";
channelName = "nixos";
imports = [ (digga.lib.importExportableModules ./modules) ];
modules = [
2021-07-16 23:01:25 +02:00
{ lib.our = self.lib; }
digga.nixosModules.bootstrapIso
2021-07-16 23:01:25 +02:00
digga.nixosModules.nixConfig
home.nixosModules.home-manager
agenix.nixosModules.age
2022-06-16 19:22:10 +02:00
peerix.nixosModules.peerix
2021-07-16 23:01:25 +02:00
];
};
2021-07-21 01:33:45 +02:00
imports = [ (digga.lib.importHosts ./hosts) ];
2021-07-16 23:01:25 +02:00
hosts = {
/* set host specific properties here */
NixOS = { };
2021-05-27 19:41:55 +02:00
};
2021-07-16 23:01:25 +02:00
importables = rec {
2021-07-21 01:33:45 +02:00
profiles = digga.lib.rakeLeaves ./profiles // {
users = digga.lib.rakeLeaves ./users;
2021-07-16 23:01:25 +02:00
};
suites = (import ./suites) { inherit profiles; };
2021-05-27 19:41:55 +02:00
};
2021-04-22 05:44:15 +02:00
};
2021-07-16 23:01:25 +02:00
home = {
imports = [ (digga.lib.importExportableModules ./users/modules) ];
modules = [ ];
2021-07-16 23:01:25 +02:00
importables = rec {
2021-07-21 01:33:45 +02:00
profiles = digga.lib.rakeLeaves ./users/profiles;
2021-07-16 23:01:25 +02:00
suites = with profiles; rec {
base = [ direnv git ];
};
2021-05-27 19:41:55 +02:00
};
2022-09-19 12:38:27 +02:00
users = digga.lib.rakeLeaves ./users;
2021-04-22 05:44:15 +02:00
};
2021-07-16 23:01:25 +02:00
homeConfigurations = digga.lib.mkHomeConfigurations self.nixosConfigurations;
2021-07-16 23:01:25 +02:00
deploy.nodes = digga.lib.mkDeployNodes self.nixosConfigurations { };
2021-07-16 23:01:25 +02:00
}
2021-04-22 05:44:15 +02:00
;
2019-12-03 06:18:30 +01:00
}