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"
|
|
|
|
"https://cache.alicehuston.xyz/?priority=5&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"
|
|
|
|
"https://cache.alicehuston.xyz"
|
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=%"
|
|
|
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
2024-03-24 13:08:42 -04:00
|
|
|
"cache-nix-dot:0hp/F6mUJXNyZeLBPNBjmyEh8gWsNVH+zkuwlWMmwXg="
|
2024-02-17 15:39:35 +01:00
|
|
|
];
|
2024-04-01 18:26:03 -04:00
|
|
|
trusted-users = [ "root" ];
|
2024-02-01 16:50:14 -05:00
|
|
|
};
|
|
|
|
|
2024-05-19 12:29:29 -04:00
|
|
|
inputs =
|
2024-02-02 22:54:36 +01:00
|
|
|
|
2024-05-19 12:29:29 -04:00
|
|
|
{
|
2024-05-20 01:10:42 -04:00
|
|
|
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
2024-05-19 12:29:29 -04:00
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable-small";
|
|
|
|
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-23.11";
|
|
|
|
systems.url = "github:nix-systems/default";
|
2024-05-20 01:10:42 -04:00
|
|
|
|
|
|
|
attic = {
|
|
|
|
url = "github:zhaofengli/attic";
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.follows = "nixpkgs";
|
|
|
|
nixpkgs-stable.follows = "nixpkgs-stable";
|
|
|
|
flake-utils.follows = "flake-utils";
|
|
|
|
};
|
2024-05-19 12:29:29 -04:00
|
|
|
};
|
2024-02-02 06:12:49 +01:00
|
|
|
|
2024-05-20 01:10:42 -04:00
|
|
|
fenix = {
|
|
|
|
url = "github:nix-community/fenix";
|
2024-05-19 12:29:29 -04:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2024-01-01 12:41:32 -05:00
|
|
|
|
2024-05-19 12:29:29 -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:10:42 -04:00
|
|
|
home-manager = {
|
|
|
|
url = "github:nix-community/home-manager";
|
2024-05-19 12:29:29 -04:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
2024-01-08 16:24:53 +01:00
|
|
|
};
|
2023-12-24 18:48:52 +01:00
|
|
|
|
2024-05-20 01:10:42 -04:00
|
|
|
hyprland-contrib = {
|
|
|
|
url = "github:hyprwm/contrib";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
2024-05-19 12:29:29 -04:00
|
|
|
};
|
2023-12-25 03:39:20 +01:00
|
|
|
|
2024-05-20 01:10:42 -04:00
|
|
|
nix = {
|
|
|
|
url = "github:NixOS/nix/latest-release";
|
2024-05-19 12:29:29 -04:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
2023-12-24 18:48:52 +01:00
|
|
|
};
|
2024-01-02 16:30:08 +01:00
|
|
|
|
2024-05-20 01:10:42 -04:00
|
|
|
nix-index-database = {
|
|
|
|
url = "github:Mic92/nix-index-database";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
2024-03-24 13:08:42 -04:00
|
|
|
};
|
|
|
|
|
2024-05-19 12:29:29 -04:00
|
|
|
nix-pre-commit = {
|
|
|
|
url = "github:jmgilman/nix-pre-commit";
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.follows = "nixpkgs";
|
|
|
|
flake-utils.follows = "flake-utils";
|
|
|
|
};
|
2024-03-24 14:21:28 -04:00
|
|
|
};
|
|
|
|
|
2024-05-20 01:10:42 -04:00
|
|
|
nixos-modules = {
|
|
|
|
url = "github:SuperSandro2000/nixos-modules";
|
2024-05-19 23:32:52 -04:00
|
|
|
inputs = {
|
|
|
|
nixpkgs.follows = "nixpkgs";
|
2024-05-20 01:10:42 -04:00
|
|
|
flake-utils.follows = "flake-utils";
|
2024-05-19 23:32:52 -04:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-05-20 01:10:42 -04:00
|
|
|
pre-commit-hooks = {
|
|
|
|
url = "github:cachix/pre-commit-hooks.nix";
|
2024-05-19 12:29:29 -04:00
|
|
|
inputs = {
|
|
|
|
nixpkgs.follows = "nixpkgs";
|
2024-05-20 01:10:42 -04:00
|
|
|
nixpkgs-stable.follows = "nixpkgs-stable";
|
2024-05-19 12:29:29 -04:00
|
|
|
};
|
2024-03-24 14:21:28 -04:00
|
|
|
};
|
|
|
|
|
2024-05-19 12:29:29 -04:00
|
|
|
rust-overlay = {
|
|
|
|
url = "github:oxalica/rust-overlay";
|
|
|
|
inputs = {
|
|
|
|
flake-utils.follows = "flake-utils";
|
|
|
|
nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
};
|
2024-03-24 14:21:28 -04:00
|
|
|
|
2024-05-20 01:10:42 -04:00
|
|
|
sops-nix = {
|
|
|
|
url = "github:Mic92/sops-nix";
|
2024-05-19 12:29:29 -04:00
|
|
|
inputs = {
|
|
|
|
nixpkgs.follows = "nixpkgs";
|
|
|
|
nixpkgs-stable.follows = "nixpkgs-stable";
|
|
|
|
};
|
2024-01-01 12:41:32 -05:00
|
|
|
};
|
2024-04-16 23:25:52 -04:00
|
|
|
|
2024-05-20 01:10:42 -04:00
|
|
|
wired-notify = {
|
|
|
|
url = "github:Toqozz/wired-notify";
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.follows = "nixpkgs";
|
|
|
|
rust-overlay.follows = "rust-overlay";
|
|
|
|
};
|
2024-05-19 12:29:29 -04:00
|
|
|
};
|
2024-04-16 23:25:52 -04:00
|
|
|
};
|
2023-12-23 06:49:01 +01:00
|
|
|
|
2024-03-03 18:06:28 -05:00
|
|
|
outputs =
|
|
|
|
{
|
|
|
|
self,
|
|
|
|
nix,
|
|
|
|
home-manager,
|
|
|
|
nix-pre-commit,
|
2024-03-24 14:21:28 -04:00
|
|
|
nixos-hardware,
|
2024-03-03 18:06:28 -05:00
|
|
|
nixos-modules,
|
|
|
|
nixpkgs,
|
|
|
|
sops-nix,
|
2024-03-24 14:21:28 -04:00
|
|
|
wired-notify,
|
2024-03-03 18:06:28 -05:00
|
|
|
...
|
|
|
|
}@inputs:
|
2023-12-27 10:03:13 +01:00
|
|
|
let
|
2024-02-06 20:35:02 +01:00
|
|
|
systems = [
|
|
|
|
"x86_64-linux"
|
|
|
|
"aarch64-linux"
|
|
|
|
];
|
|
|
|
|
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-16 11:39:01 -04:00
|
|
|
self: super:
|
|
|
|
import ./lib {
|
|
|
|
inherit nixpkgs inputs;
|
|
|
|
lib = self;
|
2024-05-15 00:38:59 -04:00
|
|
|
}
|
|
|
|
);
|
2024-05-19 12:50:52 -04:00
|
|
|
inherit (lib.rad-dev.systems) genSystems;
|
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
|
|
|
|
|
|
|
hydraJobs = import ./hydra/jobs.nix { inherit inputs outputs; };
|
|
|
|
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-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
|
|
|
}
|