150 lines
4.5 KiB
Nix
150 lines
4.5 KiB
Nix
{
|
|
description = "A highly structured configuration database.";
|
|
|
|
nixConfig.extra-experimental-features = "nix-command flakes";
|
|
inputs =
|
|
{
|
|
stable.url = "github:nixos/nixpkgs/nixos-22.11";
|
|
nixos.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
latest.url = "github:nixos/nixpkgs/master";
|
|
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
|
|
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";
|
|
|
|
home.url = "github:nix-community/home-manager";
|
|
#home.url = "github:nix-community/home-manager/release-22.05";
|
|
# home.url = "path:/home/mae/home-manager";
|
|
home.inputs.nixpkgs.follows = "latest";
|
|
|
|
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";
|
|
|
|
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";
|
|
|
|
#peerix.url = "github:cid-chan/peerix";
|
|
peerix.url = "github:MaeIsBad/peerix/bad/timeout";
|
|
peerix.inputs.nixpkgs.follows = "nixos";
|
|
|
|
nixos-hardware.url = "github:nixos/nixos-hardware";
|
|
fenix.url = "github:nix-community/fenix";
|
|
|
|
pwnix.url = "git+https://im.badat.dev/bad/pwnix.git";
|
|
pwnix.inputs.nixpkgs.follows = "nixos";
|
|
|
|
nixgl.url = "github:guibou/nixGL";
|
|
nixgl.inputs.nixpkgs.follows = "nixos";
|
|
nixgl.inputs.flake-utils.follows = "flake-utils";
|
|
};
|
|
|
|
outputs =
|
|
{ self
|
|
, digga
|
|
, nixos
|
|
, home
|
|
, nixos-hardware
|
|
, agenix
|
|
, fenix
|
|
, nvfetcher
|
|
, deploy
|
|
, peerix
|
|
, nixgl
|
|
, ...
|
|
} @ inputs:
|
|
digga.lib.mkFlake
|
|
{
|
|
inherit self inputs;
|
|
|
|
channelsConfig = { allowUnfree = true; };
|
|
|
|
channels = {
|
|
nixos = {
|
|
imports = [ (digga.lib.importOverlays ./overlays) ];
|
|
overlays = [
|
|
# fenix.overlay breaks the cache, because it uses the system nixpkgs
|
|
(_: super: let pkgs = fenix.inputs.nixpkgs.legacyPackages.${super.system}; in fenix.overlays.default pkgs pkgs)
|
|
agenix.overlays.default
|
|
./pkgs/default.nix
|
|
|
|
peerix.overlay
|
|
nixgl.overlay
|
|
];
|
|
};
|
|
latest = { };
|
|
};
|
|
|
|
lib = import ./lib { lib = digga.lib // nixos.lib; };
|
|
|
|
sharedOverlays = [
|
|
(final: prev: {
|
|
__dontExport = true;
|
|
lib = prev.lib.extend (lfinal: lprev: {
|
|
our = self.lib;
|
|
});
|
|
})
|
|
];
|
|
|
|
nixos = {
|
|
hostDefaults = {
|
|
system = "x86_64-linux";
|
|
channelName = "nixos";
|
|
imports = [ (digga.lib.importExportableModules ./modules) ];
|
|
modules = [
|
|
{ lib.our = self.lib; }
|
|
digga.nixosModules.bootstrapIso
|
|
digga.nixosModules.nixConfig
|
|
home.nixosModules.home-manager
|
|
agenix.nixosModules.age
|
|
peerix.nixosModules.peerix
|
|
|
|
];
|
|
};
|
|
imports = [ (digga.lib.importHosts ./hosts) ];
|
|
hosts = {
|
|
/* set host specific properties here */
|
|
NixOS = { };
|
|
};
|
|
importables = rec {
|
|
profiles = digga.lib.rakeLeaves ./profiles // {
|
|
users = digga.lib.rakeLeaves ./users;
|
|
};
|
|
suites = (import ./suites) { inherit profiles; };
|
|
};
|
|
};
|
|
|
|
home = {
|
|
imports = [ (digga.lib.importExportableModules ./users/modules) ];
|
|
modules = [ ];
|
|
importables = rec {
|
|
profiles = digga.lib.rakeLeaves ./users/profiles;
|
|
suites = with profiles; rec {
|
|
base = [ direnv git ];
|
|
};
|
|
};
|
|
users = digga.lib.rakeLeaves ./users;
|
|
};
|
|
|
|
homeConfigurations = digga.lib.mkHomeConfigurations self.nixosConfigurations;
|
|
|
|
deploy.nodes = digga.lib.mkDeployNodes self.nixosConfigurations { };
|
|
|
|
}
|
|
;
|
|
}
|