2019-12-02 22:18:30 -07:00
|
|
|
{
|
2019-12-05 01:36:15 -07:00
|
|
|
description = "A highly structured configuration database.";
|
2019-12-04 22:36:36 -07:00
|
|
|
|
2022-02-02 04:15:24 +01:00
|
|
|
nixConfig.extra-experimental-features = "nix-command flakes";
|
2022-04-26 11:30:17 +02:00
|
|
|
nixConfig.extra-substituters = "https://nix-dram.cachix.org https://dram.cachix.org https://nrdxp.cachix.org https://nix-community.cachix.org";
|
|
|
|
nixConfig.extra-trusted-public-keys = "nix-dram.cachix.org-1:CKjZ0L1ZiqH3kzYAZRt8tg8vewAx5yj8Du/+iR8Efpg= dram.cachix.org-1:baoy1SXpwYdKbqdTbfKGTKauDDeDlHhUpC+QuuILEMY= nrdxp.cachix.org-1:Fc5PSqY2Jm1TrWfm88l6cvGWwz3s93c6IOifQWnhNW4= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=";
|
2021-07-16 16:09:26 -05:00
|
|
|
|
2020-08-01 22:08:41 -06:00
|
|
|
inputs =
|
|
|
|
{
|
2022-04-09 16:40:03 +02:00
|
|
|
# Track channels with commits tested and built by hydra
|
2022-06-02 10:09:42 +02:00
|
|
|
nixos.url = "github:nixos/nixpkgs/nixos-22.05";
|
2021-08-05 20:30:40 -05:00
|
|
|
latest.url = "github:nixos/nixpkgs/nixos-unstable";
|
2021-04-01 21:10:24 -05:00
|
|
|
|
2022-08-27 13:49:55 +02:00
|
|
|
digga.url = "github:pub-solar/digga/fix/bootstrap-iso";
|
2021-07-15 17:15:18 -05:00
|
|
|
digga.inputs.nixpkgs.follows = "nixos";
|
|
|
|
digga.inputs.nixlib.follows = "nixos";
|
2021-07-12 17:32:13 -05:00
|
|
|
digga.inputs.home-manager.follows = "home";
|
2022-02-02 04:15:24 +01:00
|
|
|
digga.inputs.deploy.follows = "deploy";
|
2021-07-15 17:15:18 -05:00
|
|
|
|
2022-06-02 10:09:42 +02:00
|
|
|
home.url = "github:nix-community/home-manager/release-22.05";
|
2021-02-07 14:24:41 -07:00
|
|
|
home.inputs.nixpkgs.follows = "nixos";
|
2021-07-15 17:15:18 -05:00
|
|
|
|
2021-03-01 20:30:47 -07:00
|
|
|
darwin.url = "github:LnL7/nix-darwin";
|
2022-02-02 04:15:24 +01:00
|
|
|
darwin.inputs.nixpkgs.follows = "nixos";
|
2021-07-15 17:15:18 -05:00
|
|
|
|
2022-02-17 16:22:48 -08:00
|
|
|
deploy.url = "github:serokell/deploy-rs";
|
2022-02-02 04:15:24 +01:00
|
|
|
deploy.inputs.nixpkgs.follows = "nixos";
|
2021-07-15 17:15:18 -05:00
|
|
|
|
2021-05-13 10:35:23 -07:00
|
|
|
agenix.url = "github:ryantm/agenix";
|
2022-02-02 04:15:24 +01:00
|
|
|
agenix.inputs.nixpkgs.follows = "nixos";
|
2021-04-01 21:10:24 -05:00
|
|
|
|
2021-06-13 21:48:43 -07:00
|
|
|
nvfetcher.url = "github:berberman/nvfetcher";
|
2022-02-02 04:15:24 +01:00
|
|
|
nvfetcher.inputs.nixpkgs.follows = "nixos";
|
2021-07-15 17:15:18 -05:00
|
|
|
|
|
|
|
naersk.url = "github:nmattia/naersk";
|
2022-02-02 04:15:24 +01:00
|
|
|
naersk.inputs.nixpkgs.follows = "nixos";
|
2021-07-15 17:15:18 -05:00
|
|
|
|
2021-03-01 20:30:47 -07:00
|
|
|
nixos-hardware.url = "github:nixos/nixos-hardware";
|
2021-04-01 21:10:24 -05:00
|
|
|
|
2022-04-09 16:40:03 +02:00
|
|
|
nixos-generators.url = "github:nix-community/nixos-generators";
|
2020-08-01 22:08:41 -06:00
|
|
|
};
|
2019-12-13 21:39:25 -07:00
|
|
|
|
2021-05-13 10:35:23 -07:00
|
|
|
outputs =
|
|
|
|
{ self
|
|
|
|
, digga
|
|
|
|
, nixos
|
|
|
|
, home
|
|
|
|
, nixos-hardware
|
|
|
|
, nur
|
|
|
|
, agenix
|
2021-06-13 21:48:43 -07:00
|
|
|
, nvfetcher
|
2021-07-07 19:31:12 -05:00
|
|
|
, deploy
|
2021-05-13 10:35:23 -07:00
|
|
|
, ...
|
|
|
|
} @ inputs:
|
2021-07-16 16:01:25 -05:00
|
|
|
digga.lib.mkFlake
|
|
|
|
{
|
|
|
|
inherit self inputs;
|
|
|
|
|
2022-08-14 14:15:02 +02:00
|
|
|
channelsConfig = {
|
|
|
|
# allowUnfree = true;
|
|
|
|
};
|
2021-07-16 16:01:25 -05:00
|
|
|
|
2022-01-31 17:47:45 +01:00
|
|
|
supportedSystems = [ "x86_64-linux" "aarch64-linux" ];
|
|
|
|
|
2021-07-16 16:01:25 -05:00
|
|
|
channels = {
|
|
|
|
nixos = {
|
2021-07-20 18:33:45 -05:00
|
|
|
imports = [ (digga.lib.importOverlays ./overlays) ];
|
2022-08-14 14:21:11 +02:00
|
|
|
overlays = [ ];
|
2021-07-16 16:01:25 -05:00
|
|
|
};
|
2022-01-31 17:52:56 +01:00
|
|
|
latest = { };
|
2021-07-16 16:01:25 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
lib = import ./lib { lib = digga.lib // nixos.lib; };
|
2021-04-21 22:44:15 -05:00
|
|
|
|
2021-07-16 16:01:25 -05:00
|
|
|
sharedOverlays = [
|
|
|
|
(final: prev: {
|
|
|
|
__dontExport = true;
|
|
|
|
lib = prev.lib.extend (lfinal: lprev: {
|
|
|
|
our = self.lib;
|
|
|
|
});
|
|
|
|
})
|
2022-08-14 14:21:11 +02:00
|
|
|
nur.overlay
|
|
|
|
agenix.overlay
|
|
|
|
|
|
|
|
(import ./pkgs)
|
2021-07-16 16:01:25 -05:00
|
|
|
];
|
2021-04-21 22:44:15 -05:00
|
|
|
|
|
|
|
nixos = {
|
2021-07-16 16:01:25 -05:00
|
|
|
hostDefaults = {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
channelName = "nixos";
|
2021-10-11 22:11:36 +00:00
|
|
|
imports = [ (digga.lib.importExportableModules ./modules) ];
|
|
|
|
modules = [
|
2021-07-16 16:01:25 -05:00
|
|
|
{ lib.our = self.lib; }
|
2022-09-01 14:34:57 +02:00
|
|
|
# FIXME: upstream module causes a huge number of unnecessary
|
|
|
|
# dependencies to be pulled in for all systems -- many of them are
|
|
|
|
# graphical. should only be imported as needed.
|
|
|
|
# digga.nixosModules.bootstrapIso
|
2021-07-16 16:01:25 -05:00
|
|
|
digga.nixosModules.nixConfig
|
|
|
|
home.nixosModules.home-manager
|
|
|
|
agenix.nixosModules.age
|
|
|
|
];
|
|
|
|
};
|
2021-05-13 17:03:51 -07:00
|
|
|
|
2021-07-20 18:33:45 -05:00
|
|
|
imports = [ (digga.lib.importHosts ./hosts) ];
|
2021-07-16 16:01:25 -05:00
|
|
|
hosts = {
|
|
|
|
/* set host specific properties here */
|
2022-09-01 15:35:04 +02:00
|
|
|
bootstrap = {
|
|
|
|
modules = [
|
|
|
|
digga.nixosModules.bootstrapIso
|
|
|
|
];
|
|
|
|
};
|
2022-06-04 23:45:06 +02:00
|
|
|
PubSolarOS = {
|
|
|
|
tests = [
|
|
|
|
(import ./tests/first-test.nix { pkgs = nixos.legacyPackages.x86_64-linux; lib = nixos.lib; })
|
|
|
|
];
|
|
|
|
};
|
2021-05-27 10:41:55 -07:00
|
|
|
};
|
2021-07-16 16:01:25 -05:00
|
|
|
importables = rec {
|
2021-07-20 18:33:45 -05:00
|
|
|
profiles = digga.lib.rakeLeaves ./profiles // {
|
|
|
|
users = digga.lib.rakeLeaves ./users;
|
2021-07-16 16:01:25 -05:00
|
|
|
};
|
|
|
|
suites = with profiles; rec {
|
2022-08-13 22:59:05 +02:00
|
|
|
base = [ users.pub-solar users.root ];
|
2022-01-31 17:47:45 +01:00
|
|
|
iso = base ++ [ base-user graphical pub-solar-iso ];
|
2022-08-14 15:18:55 +02:00
|
|
|
pubsolaros = [ full-install base-user users.root ];
|
2021-10-24 22:03:28 +02:00
|
|
|
anonymous = [ pubsolaros users.pub-solar ];
|
2021-07-16 16:01:25 -05:00
|
|
|
};
|
2021-05-27 10:41:55 -07:00
|
|
|
};
|
2021-04-21 22:44:15 -05:00
|
|
|
};
|
2021-07-16 16:01:25 -05:00
|
|
|
|
|
|
|
home = {
|
2021-10-11 22:11:36 +00:00
|
|
|
imports = [ (digga.lib.importExportableModules ./users/modules) ];
|
|
|
|
modules = [ ];
|
2021-07-16 16:01:25 -05:00
|
|
|
importables = rec {
|
2021-07-20 18:33:45 -05:00
|
|
|
profiles = digga.lib.rakeLeaves ./users/profiles;
|
2021-07-16 16:01:25 -05:00
|
|
|
suites = with profiles; rec {
|
|
|
|
base = [ direnv git ];
|
|
|
|
};
|
2021-05-27 10:41:55 -07:00
|
|
|
};
|
2021-07-16 16:01:25 -05:00
|
|
|
users = {
|
2021-10-24 22:03:28 +02:00
|
|
|
pub-solar = { suites, ... }: { imports = suites.base; };
|
2021-07-16 16:01:25 -05:00
|
|
|
}; # digga.lib.importers.rakeLeaves ./users/hm;
|
2021-04-21 22:44:15 -05:00
|
|
|
};
|
|
|
|
|
2021-07-20 23:36:41 -05:00
|
|
|
devshell = ./shell;
|
2021-05-29 12:53:33 -07:00
|
|
|
|
2021-07-16 16:01:25 -05:00
|
|
|
homeConfigurations = digga.lib.mkHomeConfigurations self.nixosConfigurations;
|
2021-05-02 10:35:29 -07:00
|
|
|
|
2021-07-16 16:01:25 -05:00
|
|
|
deploy.nodes = digga.lib.mkDeployNodes self.nixosConfigurations { };
|
2022-08-13 20:35:43 +00:00
|
|
|
};
|
2019-12-02 22:18:30 -07:00
|
|
|
}
|