2023-12-23 06:49:01 +01:00
|
|
|
{
|
2023-12-23 07:39:10 +01:00
|
|
|
description = "NixOS configuration for RAD-Development Servers";
|
2023-12-23 06:49:01 +01:00
|
|
|
|
2024-02-01 16:50:14 -05:00
|
|
|
nixConfig = {
|
2024-02-17 15:39:35 +01:00
|
|
|
substituters = [
|
2024-02-18 06:11:47 +01:00
|
|
|
"https://cache.nixos.org/?priority=1&want-mass-query=true"
|
2024-04-29 19:56:40 -04:00
|
|
|
"https://attic.alicehuston.xyz/cache-nix-dot?priority=4&want-mass-query=true"
|
2024-02-18 06:11:47 +01:00
|
|
|
"https://nix-community.cachix.org/?priority=10&want-mass-query=true"
|
2024-02-17 15:39:35 +01:00
|
|
|
];
|
|
|
|
trusted-substituters = [
|
|
|
|
"https://cache.nixos.org"
|
2024-04-29 19:56:40 -04:00
|
|
|
"https://attic.alicehuston.xyz/cache-nix-dot"
|
2024-02-17 15:39:35 +01:00
|
|
|
"https://nix-community.cachix.org"
|
|
|
|
];
|
|
|
|
trusted-public-keys = [
|
|
|
|
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
|
|
|
"cache.alicehuston.xyz:SJAm8HJVTWUjwcTTLAoi/5E1gUOJ0GWum2suPPv7CUo=%"
|
2024-06-25 18:04:47 -04:00
|
|
|
"cache-nix-dot:Od9KN34LXc6Lu7y1ozzV1kIXZa8coClozgth/SYE7dU="
|
2024-02-17 15:39:35 +01:00
|
|
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
|
|
|
];
|
2024-04-01 18:26:03 -04:00
|
|
|
trusted-users = [ "root" ];
|
2024-02-01 16:50:14 -05:00
|
|
|
};
|
|
|
|
|
2024-05-20 01:11:38 -04:00
|
|
|
inputs = {
|
2024-05-21 19:55:10 -04:00
|
|
|
flake-compat.url = "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz";
|
|
|
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
2024-05-20 01:11:38 -04:00
|
|
|
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
2024-06-22 11:03:18 -04:00
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
|
|
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.05";
|
2024-05-20 01:11:38 -04:00
|
|
|
systems.url = "github:nix-systems/default";
|
|
|
|
|
2024-08-03 13:26:50 -04:00
|
|
|
arch_mirror = {
|
|
|
|
url = "github:RichieCahill/arch_mirror";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
|
2024-05-20 01:11:38 -04:00
|
|
|
attic = {
|
|
|
|
url = "github:zhaofengli/attic";
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.follows = "nixpkgs";
|
|
|
|
nixpkgs-stable.follows = "nixpkgs-stable";
|
2024-06-19 15:29:55 -04:00
|
|
|
flake-compat.follows = "flake-compat";
|
2024-05-20 01:11:38 -04:00
|
|
|
flake-utils.follows = "flake-utils";
|
2024-05-19 12:29:29 -04:00
|
|
|
};
|
2024-05-20 01:11:38 -04:00
|
|
|
};
|
2024-02-02 06:12:49 +01:00
|
|
|
|
2024-05-20 01:11:38 -04:00
|
|
|
fenix = {
|
|
|
|
url = "github:nix-community/fenix";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2024-01-01 12:41:32 -05:00
|
|
|
|
2024-06-09 10:29:30 -04:00
|
|
|
firefox-addons = {
|
|
|
|
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
|
2024-06-19 15:29:55 -04:00
|
|
|
inputs = {
|
|
|
|
nixpkgs.follows = "nixpkgs";
|
|
|
|
flake-utils.follows = "flake-utils";
|
|
|
|
};
|
2024-06-09 10:29:30 -04:00
|
|
|
};
|
|
|
|
|
2024-05-20 01:11:38 -04:00
|
|
|
flake-utils = {
|
|
|
|
url = "github:numtide/flake-utils";
|
|
|
|
inputs.systems.follows = "systems";
|
|
|
|
};
|
2024-02-02 05:20:43 +01:00
|
|
|
|
2024-05-20 01:11:38 -04:00
|
|
|
home-manager = {
|
|
|
|
url = "github:nix-community/home-manager";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2023-12-24 18:48:52 +01:00
|
|
|
|
2024-05-20 01:11:38 -04:00
|
|
|
hyprland-contrib = {
|
|
|
|
url = "github:hyprwm/contrib";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2023-12-25 03:39:20 +01:00
|
|
|
|
2024-06-22 10:57:23 -04:00
|
|
|
microvm = {
|
|
|
|
url = "github:astro/microvm.nix";
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.follows = "nixpkgs";
|
|
|
|
flake-utils.follows = "flake-utils";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-05-20 01:11:38 -04:00
|
|
|
nix = {
|
|
|
|
url = "github:NixOS/nix/latest-release";
|
2024-05-21 19:55:10 -04:00
|
|
|
inputs = {
|
|
|
|
nixpkgs.follows = "nixpkgs";
|
|
|
|
flake-compat.follows = "flake-compat";
|
|
|
|
flake-parts.follows = "flake-parts";
|
2024-08-06 17:27:44 -04:00
|
|
|
git-hooks-nix.follows = "pre-commit-hooks";
|
2024-05-21 19:55:10 -04:00
|
|
|
};
|
2024-05-20 01:11:38 -04:00
|
|
|
};
|
2024-01-02 16:30:08 +01:00
|
|
|
|
2024-05-20 01:11:38 -04:00
|
|
|
nix-index-database = {
|
|
|
|
url = "github:Mic92/nix-index-database";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2024-06-03 11:27:04 -04:00
|
|
|
nixos-generators = {
|
|
|
|
url = "github:nix-community/nixos-generators";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2024-03-24 13:08:42 -04:00
|
|
|
|
2024-05-20 01:11:38 -04:00
|
|
|
nixos-modules = {
|
|
|
|
url = "github:SuperSandro2000/nixos-modules";
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.follows = "nixpkgs";
|
|
|
|
flake-utils.follows = "flake-utils";
|
2024-05-19 23:32:52 -04:00
|
|
|
};
|
2024-05-20 01:11:38 -04:00
|
|
|
};
|
2024-05-19 23:32:52 -04:00
|
|
|
|
2024-05-20 01:11:38 -04:00
|
|
|
pre-commit-hooks = {
|
2024-08-06 17:27:44 -04:00
|
|
|
url = "github:cachix/git-hooks.nix";
|
2024-05-20 01:11:38 -04:00
|
|
|
inputs = {
|
|
|
|
nixpkgs.follows = "nixpkgs";
|
|
|
|
nixpkgs-stable.follows = "nixpkgs-stable";
|
2024-05-21 19:55:10 -04:00
|
|
|
flake-compat.follows = "flake-compat";
|
2024-03-24 14:21:28 -04:00
|
|
|
};
|
2024-05-20 01:11:38 -04:00
|
|
|
};
|
2024-03-24 14:21:28 -04:00
|
|
|
|
2024-05-20 01:11:38 -04:00
|
|
|
rust-overlay = {
|
|
|
|
url = "github:oxalica/rust-overlay";
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.follows = "nixpkgs";
|
2024-05-19 12:29:29 -04:00
|
|
|
};
|
2024-05-20 01:11:38 -04:00
|
|
|
};
|
2024-03-24 14:21:28 -04:00
|
|
|
|
2024-05-20 01:11:38 -04:00
|
|
|
sops-nix = {
|
|
|
|
url = "github:Mic92/sops-nix";
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.follows = "nixpkgs";
|
|
|
|
nixpkgs-stable.follows = "nixpkgs-stable";
|
2024-01-01 12:41:32 -05:00
|
|
|
};
|
2024-05-20 01:11:38 -04:00
|
|
|
};
|
2024-04-16 23:25:52 -04:00
|
|
|
|
2024-07-06 23:11:33 -04:00
|
|
|
server_tools = {
|
|
|
|
url = "github:RAD-Development/server_tools";
|
2024-08-06 17:27:44 -04:00
|
|
|
inputs = {
|
|
|
|
nixpkgs.follows = "nixpkgs";
|
|
|
|
flake-utils.follows = "flake-utils";
|
|
|
|
};
|
2024-07-06 23:11:33 -04:00
|
|
|
};
|
|
|
|
|
2024-05-20 01:11:38 -04:00
|
|
|
wired-notify = {
|
|
|
|
url = "github:Toqozz/wired-notify";
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.follows = "nixpkgs";
|
|
|
|
rust-overlay.follows = "rust-overlay";
|
2024-05-21 19:55:10 -04:00
|
|
|
flake-parts.follows = "flake-parts";
|
2024-05-19 12:29:29 -04:00
|
|
|
};
|
2024-04-16 23:25:52 -04:00
|
|
|
};
|
2024-05-20 01:11:38 -04:00
|
|
|
};
|
2023-12-23 06:49:01 +01:00
|
|
|
|
2024-03-03 18:06:28 -05:00
|
|
|
outputs =
|
2024-05-21 19:47:21 -04:00
|
|
|
{ self, nixpkgs, ... }@inputs:
|
2023-12-27 10:03:13 +01:00
|
|
|
let
|
2024-02-06 20:35:02 +01:00
|
|
|
systems = [
|
|
|
|
"x86_64-linux"
|
2024-05-20 00:11:17 -04:00
|
|
|
# disable arm for now as hydra isn't set up for it
|
|
|
|
# "aarch64-linux"
|
2024-02-06 20:35:02 +01:00
|
|
|
];
|
|
|
|
|
2024-02-01 16:50:14 -05:00
|
|
|
forEachSystem = lib.genAttrs systems;
|
2024-02-02 06:12:49 +01:00
|
|
|
|
2024-05-19 02:24:00 -04:00
|
|
|
# gets the base path of the repo
|
|
|
|
src = builtins.path { path = ./.; };
|
2024-01-01 12:41:32 -05:00
|
|
|
|
2024-05-15 00:38:59 -04:00
|
|
|
# adds our lib functions to lib namespace
|
|
|
|
lib = nixpkgs.lib.extend (
|
2024-05-21 19:47:21 -04:00
|
|
|
self: _:
|
2024-05-16 11:39:01 -04:00
|
|
|
import ./lib {
|
|
|
|
inherit nixpkgs inputs;
|
|
|
|
lib = self;
|
2024-05-15 00:38:59 -04:00
|
|
|
}
|
|
|
|
);
|
2024-06-03 20:59:02 -04:00
|
|
|
inherit (lib.rad-dev.systems) genSystems getImages;
|
2024-05-19 23:44:59 -04:00
|
|
|
inherit (self) outputs; # for hydra
|
2024-05-16 11:39:01 -04:00
|
|
|
in
|
2024-05-19 23:32:52 -04:00
|
|
|
rec {
|
2024-05-19 10:26:46 -04:00
|
|
|
inherit lib; # for allowing use of custom functions in nix repl
|
2024-05-16 11:39:01 -04:00
|
|
|
|
2024-07-07 22:50:46 -04:00
|
|
|
hydraJobs = import ./hydra/jobs.nix { inherit inputs outputs systems; };
|
2024-05-16 11:39:01 -04:00
|
|
|
formatter = forEachSystem (system: nixpkgs.legacyPackages.${system}.nixfmt-rfc-style);
|
2024-05-15 00:38:59 -04:00
|
|
|
|
2024-05-19 12:50:52 -04:00
|
|
|
nixosConfigurations = genSystems inputs src (src + "/systems");
|
2024-06-03 20:59:02 -04:00
|
|
|
images = {
|
|
|
|
install-iso = getImages nixosConfigurations "install-iso";
|
|
|
|
iso = getImages nixosConfigurations "iso";
|
|
|
|
qcow = getImages nixosConfigurations "qcow";
|
|
|
|
};
|
|
|
|
|
2024-05-19 23:32:52 -04:00
|
|
|
checks = import ./checks.nix { inherit inputs forEachSystem formatter; };
|
2024-05-19 23:38:11 -04:00
|
|
|
devShells = import ./shell.nix { inherit inputs forEachSystem checks; };
|
2023-12-27 10:03:13 +01:00
|
|
|
};
|
2023-12-23 06:49:01 +01:00
|
|
|
}
|