2022-08-25 12:21:35 -06:00
|
|
|
{
|
|
|
|
description = "bold.daemon";
|
|
|
|
|
|
|
|
inputs = {
|
2022-10-29 11:00:07 -06:00
|
|
|
unstable.url = "github:NixOS/nixpkgs";
|
2022-08-27 07:45:25 -06:00
|
|
|
unstableSmall.url = "github:NixOS/nixpkgs/nixos-unstable-small";
|
2022-08-31 19:24:47 -06:00
|
|
|
|
2023-05-26 08:06:02 -06:00
|
|
|
#stable.url = "github:NixOS/nixpkgs/nixos-22.11-small";
|
|
|
|
stable.url = "github:NixOS/nixpkgs/nixos-23.05-small";
|
2023-05-25 12:14:37 -06:00
|
|
|
|
2022-12-28 14:42:00 -07:00
|
|
|
sops-nix = {
|
2022-12-25 06:04:43 -07:00
|
|
|
url = "github:Mic92/sops-nix";
|
|
|
|
inputs.nixpkgs-stable.follows = "stable";
|
|
|
|
inputs.nixpkgs.follows = "unstable";
|
|
|
|
};
|
|
|
|
|
|
|
|
xin-secrets = {
|
|
|
|
url = "git+ssh://xin-secrets-ro/qbit/xin-secrets.git?ref=main";
|
|
|
|
inputs.sops-nix.follows = "sops-nix";
|
|
|
|
};
|
|
|
|
|
2022-09-01 11:49:36 -06:00
|
|
|
nixos-hardware = { url = "github:NixOS/nixos-hardware/master"; };
|
2022-08-25 12:21:35 -06:00
|
|
|
|
|
|
|
emacs-overlay = {
|
2023-02-28 10:45:23 -07:00
|
|
|
url =
|
|
|
|
"github:nix-community/emacs-overlay/d54a1521619daa37c9aa8c9e3362abb34e676007";
|
2022-08-25 12:21:35 -06:00
|
|
|
inputs.nixpkgs.follows = "stable";
|
|
|
|
};
|
|
|
|
|
|
|
|
darwin = {
|
|
|
|
url = "github:lnl7/nix-darwin";
|
2022-09-09 10:37:15 -06:00
|
|
|
inputs.nixpkgs.follows = "unstableSmall";
|
2022-08-25 12:21:35 -06:00
|
|
|
};
|
|
|
|
|
2022-11-16 20:28:42 -07:00
|
|
|
microca = {
|
|
|
|
url = "github:qbit/microca";
|
|
|
|
inputs.nixpkgs.follows = "unstable";
|
|
|
|
};
|
2022-12-05 20:23:12 -07:00
|
|
|
gostart = {
|
|
|
|
url = "github:qbit/gostart";
|
2023-06-06 19:02:30 -06:00
|
|
|
inputs.nixpkgs.follows = "stable";
|
2022-11-25 07:50:55 -07:00
|
|
|
};
|
2023-05-23 06:30:07 -06:00
|
|
|
pr-status = {
|
|
|
|
url = "github:qbit/pr-status-pl";
|
|
|
|
inputs.nixpkgs.follows = "stable";
|
|
|
|
};
|
2022-11-16 20:28:42 -07:00
|
|
|
taskobs = {
|
|
|
|
url = "github:qbit/taskobs";
|
|
|
|
inputs.nixpkgs.follows = "unstable";
|
|
|
|
};
|
|
|
|
xintray = {
|
|
|
|
url = "github:qbit/xintray";
|
|
|
|
inputs.nixpkgs.follows = "unstable";
|
|
|
|
};
|
|
|
|
tsvnstat = {
|
2022-12-10 09:52:32 -07:00
|
|
|
url = "github:qbit/tsvnstat";
|
2022-11-16 20:28:42 -07:00
|
|
|
inputs.nixpkgs.follows = "unstable";
|
|
|
|
};
|
2023-01-10 18:37:25 -07:00
|
|
|
pots = {
|
|
|
|
url = "github:qbit/pots";
|
|
|
|
inputs.nixpkgs.follows = "unstable";
|
|
|
|
};
|
2023-01-29 06:11:36 -07:00
|
|
|
po = {
|
|
|
|
url = "github:qbit/po";
|
|
|
|
inputs.nixpkgs.follows = "unstable";
|
|
|
|
};
|
2023-01-31 12:55:24 -07:00
|
|
|
tsRevProx = {
|
|
|
|
url = "github:qbit/ts-reverse-proxy";
|
|
|
|
inputs.nixpkgs.follows = "unstable";
|
|
|
|
};
|
2022-08-25 12:21:35 -06:00
|
|
|
|
|
|
|
gqrss = {
|
|
|
|
url = "github:qbit/gqrss";
|
|
|
|
flake = false;
|
|
|
|
};
|
2022-08-30 15:56:37 -06:00
|
|
|
|
|
|
|
peerix = {
|
|
|
|
url = "github:cid-chan/peerix";
|
|
|
|
inputs.nixpkgs.follows = "stable";
|
|
|
|
};
|
2022-12-15 08:26:49 -07:00
|
|
|
|
|
|
|
talon = {
|
2023-01-19 18:49:12 -07:00
|
|
|
url = "github:qbit/talon-nix";
|
2022-12-15 08:26:49 -07:00
|
|
|
inputs.nixpkgs.follows = "unstable";
|
|
|
|
};
|
2022-08-25 12:21:35 -06:00
|
|
|
};
|
|
|
|
|
2023-05-28 15:12:04 -06:00
|
|
|
outputs = { self, darwin, gostart, nixos-hardware, peerix, po, pots, pr-status
|
|
|
|
, stable, talon, tsRevProx, tsvnstat, unstable, unstableSmall, xin-secrets
|
|
|
|
, xintray, ... }@inputs:
|
2022-08-25 12:21:35 -06:00
|
|
|
let
|
2023-04-19 07:20:51 -06:00
|
|
|
xinlib = import ./lib { inherit (unstable) lib; };
|
2023-01-05 11:44:21 -07:00
|
|
|
supportedSystems = [ "x86_64-linux" ];
|
|
|
|
#[ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
|
2022-10-12 07:13:52 -06:00
|
|
|
forAllSystems = unstable.lib.genAttrs supportedSystems;
|
2023-06-06 11:06:43 -06:00
|
|
|
unstablePkgsFor = forAllSystems (system:
|
|
|
|
import unstable {
|
|
|
|
inherit system;
|
|
|
|
#imports = [ ./overlays ];
|
|
|
|
});
|
|
|
|
stablePkgsFor = forAllSystems (system:
|
|
|
|
import stable {
|
|
|
|
inherit system;
|
|
|
|
#imports = [ ./overlays ];
|
|
|
|
});
|
2022-08-25 12:21:35 -06:00
|
|
|
hostBase = {
|
|
|
|
modules = [
|
|
|
|
# Common config stuffs
|
|
|
|
(import (./default.nix))
|
|
|
|
|
|
|
|
xin-secrets.nixosModules.sops
|
|
|
|
xin-secrets.nixosModules.xin-secrets
|
2022-08-31 08:00:21 -06:00
|
|
|
|
|
|
|
peerix.nixosModules.peerix
|
2022-08-25 12:21:35 -06:00
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2022-09-04 08:04:56 -06:00
|
|
|
overlays = [
|
2022-11-16 20:24:40 -07:00
|
|
|
inputs.emacs-overlay.overlay
|
2022-12-05 20:23:12 -07:00
|
|
|
inputs.gostart.overlay
|
2023-05-23 06:30:07 -06:00
|
|
|
inputs.microca.overlay
|
|
|
|
inputs.peerix.overlay
|
2023-01-10 18:37:25 -07:00
|
|
|
inputs.pots.overlay
|
2023-05-23 06:30:07 -06:00
|
|
|
inputs.pr-status.overlay
|
2022-12-15 08:26:49 -07:00
|
|
|
inputs.talon.overlays.default
|
2023-05-23 06:30:07 -06:00
|
|
|
inputs.taskobs.overlay
|
|
|
|
inputs.tsRevProx.overlay
|
2022-09-04 08:04:56 -06:00
|
|
|
];
|
2022-08-25 12:21:35 -06:00
|
|
|
|
|
|
|
buildSys = sys: sysBase: extraMods: name:
|
|
|
|
sysBase.lib.nixosSystem {
|
|
|
|
system = sys;
|
2023-02-02 05:35:19 -07:00
|
|
|
specialArgs = {
|
|
|
|
inherit inputs;
|
|
|
|
inherit xinlib;
|
|
|
|
};
|
2022-08-25 12:21:35 -06:00
|
|
|
modules = hostBase.modules ++ extraMods ++ [{
|
|
|
|
nix = {
|
|
|
|
registry.nixpkgs.flake = sysBase;
|
2023-01-04 18:43:54 -07:00
|
|
|
registry.stable.flake = stable;
|
|
|
|
registry.unstable.flake = unstable;
|
2023-01-05 06:45:49 -07:00
|
|
|
nixPath = [ "nixpkgs=${sysBase}" ];
|
2022-08-25 12:21:35 -06:00
|
|
|
};
|
2023-02-02 05:48:19 -07:00
|
|
|
}] ++ [ (xinlib.buildVer self) (./. + "/hosts/${name}") ]
|
2022-08-25 12:21:35 -06:00
|
|
|
++ [{ nixpkgs.overlays = overlays; }];
|
|
|
|
};
|
2023-06-06 11:06:43 -06:00
|
|
|
lpkgs = unstable.legacyPackages.x86_64-linux;
|
2022-09-09 09:56:41 -06:00
|
|
|
darwinPkgs = unstableSmall.legacyPackages.aarch64-darwin;
|
2022-08-25 12:21:35 -06:00
|
|
|
in {
|
|
|
|
darwinConfigurations = {
|
|
|
|
plq = darwin.lib.darwinSystem {
|
|
|
|
system = "aarch64-darwin";
|
2023-05-26 08:06:02 -06:00
|
|
|
specialArgs = { inherit xinlib; };
|
2022-08-25 12:21:35 -06:00
|
|
|
modules = [
|
|
|
|
xin-secrets.nixosModules.sops
|
|
|
|
./overlays
|
|
|
|
|
|
|
|
./hosts/plq
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2023-06-20 12:45:15 -06:00
|
|
|
# Expose all of the overlays to unstable so we can test build
|
|
|
|
# everything before deploying
|
|
|
|
legacyPackages.x86_64-linux = import unstable {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
overlays = let
|
|
|
|
overlayFn = import ./overlays;
|
|
|
|
stableList = overlayFn {
|
|
|
|
isUnstable = true;
|
|
|
|
inherit xinlib;
|
|
|
|
};
|
|
|
|
unstableList = overlayFn {
|
|
|
|
isUnstable = false;
|
|
|
|
inherit xinlib;
|
|
|
|
};
|
|
|
|
in [ ] ++ stableList.nixpkgs.overlays ++ unstableList.nixpkgs.overlays;
|
|
|
|
};
|
|
|
|
|
2022-09-01 11:49:36 -06:00
|
|
|
formatter.x86_64-linux = stable.legacyPackages.x86_64-linux.nixfmt;
|
|
|
|
formatter.aarch64-darwin = stable.legacyPackages.aarch64-darwin.nixfmt;
|
|
|
|
|
2023-06-06 11:06:43 -06:00
|
|
|
devShells.x86_64-linux.default = xinlib.buildShell lpkgs;
|
2023-02-02 05:48:19 -07:00
|
|
|
devShells.aarch64-darwin.default = xinlib.buildShell darwinPkgs;
|
2022-08-25 12:21:35 -06:00
|
|
|
|
|
|
|
nixosConfigurations = {
|
2022-12-23 09:31:46 -07:00
|
|
|
europa = buildSys "x86_64-linux" unstable [
|
2022-12-15 08:26:49 -07:00
|
|
|
nixos-hardware.nixosModules.framework
|
|
|
|
talon.nixosModules.talon
|
|
|
|
] "europa";
|
2023-06-07 07:07:25 -06:00
|
|
|
pwntie = buildSys "x86_64-linux" stable [ ] "pwntie";
|
2022-12-23 09:31:46 -07:00
|
|
|
stan = buildSys "x86_64-linux" unstable [ ] "stan";
|
2023-05-28 15:12:04 -06:00
|
|
|
#weather = buildSys "aarch64-linux" stable
|
|
|
|
# [ nixos-hardware.nixosModules.raspberry-pi-4 ] "weather";
|
2022-10-10 08:05:37 -06:00
|
|
|
|
2023-05-26 08:06:02 -06:00
|
|
|
faf = buildSys "x86_64-linux" stable [ ./configs/hardened.nix ] "faf";
|
|
|
|
box = buildSys "x86_64-linux" stable [ ./configs/hardened.nix ] "box";
|
2023-01-04 06:57:30 -07:00
|
|
|
#luna = buildSys "x86_64-linux" stable
|
|
|
|
# [ "${nixos-hardware}/common/cpu/intel" ] "luna";
|
2023-05-26 08:06:02 -06:00
|
|
|
h = buildSys "x86_64-linux" stable [
|
2022-12-05 20:23:12 -07:00
|
|
|
./configs/hardened.nix
|
|
|
|
gostart.nixosModule
|
2023-01-10 18:37:25 -07:00
|
|
|
pots.nixosModule
|
2023-05-23 06:30:07 -06:00
|
|
|
pr-status.nixosModule
|
2022-12-05 20:23:12 -07:00
|
|
|
] "h";
|
2023-01-04 06:57:30 -07:00
|
|
|
#router =
|
|
|
|
# buildSys "x86_64-linux" stable [ ./configs/hardened.nix ] "router";
|
2022-08-25 12:21:35 -06:00
|
|
|
|
2023-06-05 14:05:38 -06:00
|
|
|
arm64Install = stable.lib.nixosSystem {
|
2022-08-25 12:21:35 -06:00
|
|
|
system = "aarch64-linux";
|
|
|
|
|
|
|
|
modules = [
|
|
|
|
(import (./installer.nix))
|
|
|
|
xin-secrets.nixosModules.sops
|
|
|
|
|
|
|
|
"${stable}/nixos/modules/installer/sd-card/sd-image-aarch64-installer.nix"
|
|
|
|
];
|
|
|
|
};
|
2022-11-22 20:59:22 -07:00
|
|
|
|
2022-08-25 12:21:35 -06:00
|
|
|
isoInstall = stable.lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
|
|
|
|
modules = [
|
2023-02-02 05:48:19 -07:00
|
|
|
(xinlib.buildVer self)
|
2022-08-25 12:21:35 -06:00
|
|
|
(import (./installer.nix))
|
|
|
|
xin-secrets.nixosModules.sops
|
|
|
|
|
2022-08-25 19:10:29 -06:00
|
|
|
"${stable}/nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares-plasma5.nix"
|
2022-08-25 12:21:35 -06:00
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
2022-09-06 13:49:01 -06:00
|
|
|
|
2022-10-12 07:13:52 -06:00
|
|
|
packages = forAllSystems (system:
|
2023-06-13 07:19:13 -06:00
|
|
|
let
|
|
|
|
upkgs = unstablePkgsFor.${system};
|
|
|
|
spkgs = stablePkgsFor.${system};
|
2023-06-06 11:06:43 -06:00
|
|
|
|
2022-10-12 07:13:52 -06:00
|
|
|
in {
|
2022-10-18 22:19:28 -06:00
|
|
|
ada_language_server =
|
2023-06-06 11:06:43 -06:00
|
|
|
spkgs.callPackage ./pkgs/ada_language_server.nix { inherit spkgs; };
|
|
|
|
alire = spkgs.callPackage ./pkgs/alire.nix { inherit spkgs; };
|
|
|
|
bearclaw = spkgs.callPackage ./pkgs/bearclaw.nix { inherit spkgs; };
|
2023-07-02 05:47:22 -06:00
|
|
|
clilol = spkgs.callPackage ./pkgs/clilol.nix { inherit spkgs; };
|
2023-06-06 11:06:43 -06:00
|
|
|
gqrss = spkgs.callPackage ./pkgs/gqrss.nix {
|
|
|
|
inherit spkgs;
|
2022-10-12 20:34:56 -06:00
|
|
|
isUnstable = true;
|
|
|
|
};
|
2023-06-06 11:06:43 -06:00
|
|
|
iamb = upkgs.callPackage ./pkgs/iamb.nix { };
|
|
|
|
icbirc = spkgs.callPackage ./pkgs/icbirc.nix {
|
|
|
|
inherit spkgs;
|
2022-10-12 20:34:56 -06:00
|
|
|
isUnstable = true;
|
|
|
|
};
|
2023-06-06 11:06:43 -06:00
|
|
|
femtolisp = upkgs.callPackage ./pkgs/femtolisp.nix { };
|
2023-06-27 20:16:30 -06:00
|
|
|
fyne = upkgs.callPackage ./pkgs/fyne.nix { inherit upkgs; };
|
2023-06-13 07:19:13 -06:00
|
|
|
flake-warn =
|
|
|
|
spkgs.callPackage ./pkgs/flake-warn.nix { inherit spkgs; };
|
2023-06-06 11:06:43 -06:00
|
|
|
kurinto = spkgs.callPackage ./pkgs/kurinto.nix { };
|
|
|
|
mcchunkie = spkgs.callPackage ./pkgs/mcchunkie.nix { inherit spkgs; };
|
|
|
|
yaegi = spkgs.callPackage ./pkgs/yaegi.nix { inherit spkgs; };
|
2023-06-30 07:48:39 -06:00
|
|
|
gen-patches =
|
|
|
|
spkgs.callPackage ./bins/gen-patches.nix { inherit spkgs; };
|
2023-06-06 11:06:43 -06:00
|
|
|
yarr = spkgs.callPackage ./pkgs/yarr.nix {
|
|
|
|
inherit spkgs;
|
2022-10-12 20:34:56 -06:00
|
|
|
isUnstable = true;
|
|
|
|
};
|
2023-02-11 05:44:34 -07:00
|
|
|
precursorupdater =
|
2023-06-06 11:06:43 -06:00
|
|
|
spkgs.python3Packages.callPackage ./pkgs/precursorupdater.nix {
|
|
|
|
inherit spkgs;
|
2023-02-11 05:44:34 -07:00
|
|
|
};
|
2023-06-06 11:06:43 -06:00
|
|
|
kobuddy = upkgs.python3Packages.callPackage ./pkgs/kobuddy.nix {
|
|
|
|
inherit upkgs;
|
2023-02-08 06:27:19 -07:00
|
|
|
};
|
2023-06-06 11:06:43 -06:00
|
|
|
ghexport = upkgs.python3Packages.callPackage ./pkgs/ghexport.nix {
|
|
|
|
inherit upkgs;
|
2023-02-08 13:39:41 -07:00
|
|
|
};
|
|
|
|
hpi =
|
2023-06-06 11:06:43 -06:00
|
|
|
upkgs.python3Packages.callPackage ./pkgs/hpi.nix { inherit upkgs; };
|
|
|
|
promnesia = upkgs.python3Packages.callPackage ./pkgs/promnesia.nix {
|
|
|
|
inherit upkgs;
|
2022-12-02 15:01:05 -07:00
|
|
|
};
|
2023-03-06 08:30:52 -07:00
|
|
|
sliding-sync =
|
2023-06-06 11:06:43 -06:00
|
|
|
spkgs.callPackage ./pkgs/sliding-sync.nix { inherit spkgs; };
|
|
|
|
golink = spkgs.callPackage ./pkgs/golink.nix { inherit spkgs; };
|
|
|
|
gokrazy = upkgs.callPackage ./pkgs/gokrazy.nix { inherit upkgs; };
|
|
|
|
gosignify = spkgs.callPackage ./pkgs/gosignify.nix { inherit spkgs; };
|
2023-06-13 07:19:13 -06:00
|
|
|
gotosocial =
|
|
|
|
spkgs.callPackage ./pkgs/gotosocial.nix { inherit spkgs; };
|
2022-11-01 10:35:42 -06:00
|
|
|
govulncheck =
|
2023-06-06 11:06:43 -06:00
|
|
|
upkgs.callPackage ./pkgs/govulncheck.nix { inherit upkgs; };
|
|
|
|
zutty = upkgs.callPackage ./pkgs/zutty.nix {
|
|
|
|
inherit upkgs;
|
2022-10-12 20:34:56 -06:00
|
|
|
isUnstable = true;
|
|
|
|
};
|
2022-11-16 15:00:30 -07:00
|
|
|
inherit (xintray.packages.${system}) xintray;
|
2022-11-16 20:24:40 -07:00
|
|
|
inherit (tsvnstat.packages.${system}) tsvnstat;
|
2023-01-10 18:37:25 -07:00
|
|
|
inherit (pots.packages.${system}) pots;
|
2023-01-29 06:11:36 -07:00
|
|
|
inherit (po.packages.${system}) po;
|
2023-01-31 12:55:24 -07:00
|
|
|
inherit (tsRevProx.packages.${system}) ts-reverse-proxy;
|
2023-06-06 11:06:43 -06:00
|
|
|
|
|
|
|
inherit (spkgs) matrix-synapse;
|
2022-10-12 07:13:52 -06:00
|
|
|
});
|
|
|
|
|
2022-09-19 07:05:32 -06:00
|
|
|
templates."ada" = {
|
|
|
|
path = ./templates/ada;
|
|
|
|
description = "Ada template.";
|
|
|
|
};
|
2022-09-06 13:49:01 -06:00
|
|
|
templates."go" = {
|
|
|
|
path = ./templates/go;
|
|
|
|
description = "Go template.";
|
|
|
|
};
|
2022-09-23 16:33:22 -06:00
|
|
|
templates."perl" = {
|
|
|
|
path = ./templates/perl;
|
|
|
|
description = "Perl template.";
|
|
|
|
};
|
2022-09-27 17:33:33 -06:00
|
|
|
templates."mojo" = {
|
|
|
|
path = ./templates/mojo;
|
|
|
|
description = "Perl MojoLicious template.";
|
|
|
|
};
|
2022-10-05 21:46:32 -06:00
|
|
|
templates."ocaml" = {
|
|
|
|
path = ./templates/ocaml;
|
|
|
|
description = "OCaml template.";
|
|
|
|
};
|
2023-01-05 08:45:45 -07:00
|
|
|
|
2023-03-09 09:33:25 -07:00
|
|
|
checks = let buildList = [ "europa" "stan" "h" "box" "faf" ];
|
|
|
|
in with unstable.lib;
|
2023-03-09 09:45:22 -07:00
|
|
|
foldl' recursiveUpdate { } (mapAttrsToList (name: system: {
|
|
|
|
"${system.pkgs.stdenv.hostPlatform.system}"."${name}" =
|
|
|
|
system.config.system.build.toplevel;
|
2023-03-22 10:35:46 -06:00
|
|
|
}) (filterAttrs (n: _: (builtins.elem n buildList))
|
2023-03-09 09:45:22 -07:00
|
|
|
self.nixosConfigurations));
|
2022-08-25 12:21:35 -06:00
|
|
|
};
|
|
|
|
}
|