2022-02-05 21:42:36 +02:00
|
|
|
{
|
|
|
|
description = "System and user config";
|
|
|
|
|
|
|
|
inputs = {
|
2022-10-15 12:01:36 +03:00
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
2022-02-05 21:42:36 +02:00
|
|
|
|
2023-01-20 01:54:05 +02:00
|
|
|
nix-super.url = "gitlab:max/nix-super?host=git.privatevoid.net";
|
2022-02-05 21:42:36 +02:00
|
|
|
|
|
|
|
home-manager.url = "github:nix-community/home-manager/master";
|
|
|
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
|
|
|
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
|
|
|
|
2022-05-30 22:20:39 +03:00
|
|
|
nix-crx.url = "git+https://git.privatevoid.net/max/nix-crx.git";
|
2022-02-05 21:42:36 +02:00
|
|
|
nix-crx.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
|
|
|
deploy-rs.url = "github:serokell/deploy-rs";
|
|
|
|
deploy-rs.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
|
|
|
agenix.url = "github:ryantm/agenix";
|
|
|
|
agenix.inputs.nixpkgs.follows = "nixpkgs";
|
2022-03-01 23:48:07 +02:00
|
|
|
|
2022-05-30 22:43:59 +03:00
|
|
|
helix.url = "github:helix-editor/helix";
|
2022-03-01 23:48:07 +02:00
|
|
|
helix.inputs.nixpkgs.follows = "nixpkgs";
|
2022-02-05 21:42:36 +02:00
|
|
|
|
|
|
|
kernel-clr = { url = "github:clearlinux-pkgs/linux"; flake = false; };
|
2022-03-17 20:59:46 +02:00
|
|
|
|
|
|
|
dream2nix.url = "github:nix-community/dream2nix";
|
|
|
|
dream2nix.inputs.nixpkgs.follows = "nixpkgs";
|
2022-07-01 22:38:41 +03:00
|
|
|
|
2022-12-05 17:51:58 +02:00
|
|
|
nixpak.url = "github:nixpak/nixpak";
|
2022-07-01 22:38:41 +03:00
|
|
|
nixpak.inputs.nixpkgs.follows = "nixpkgs";
|
2022-08-06 21:21:28 +03:00
|
|
|
|
|
|
|
nil.url = "github:oxalica/nil";
|
|
|
|
nil.inputs.nixpkgs.follows = "nixpkgs";
|
2022-09-26 19:06:50 +03:00
|
|
|
|
2023-02-10 19:03:23 +02:00
|
|
|
depot.url = "gitlab:private-void/depot?host=git.privatevoid.net";
|
2022-09-26 19:06:50 +03:00
|
|
|
depot.inputs.nixpkgs.follows = "nixpkgs";
|
2023-01-11 23:44:02 +02:00
|
|
|
|
|
|
|
lanzaboote.url = "github:nix-community/lanzaboote";
|
|
|
|
lanzaboote.inputs.nixpkgs.follows = "nixpkgs";
|
2023-03-02 23:27:37 +02:00
|
|
|
|
|
|
|
nixified-ai.url = "github:nixified-ai/flake/nixos";
|
2022-02-05 21:42:36 +02:00
|
|
|
};
|
|
|
|
outputs = { self, nixpkgs, home-manager, nixos-hardware, ... }@inputs:
|
|
|
|
let
|
|
|
|
inherit (nixpkgs) lib;
|
|
|
|
system = "x86_64-linux";
|
|
|
|
pkgs = import nixpkgs {
|
|
|
|
inherit system;
|
2023-03-03 15:32:15 +02:00
|
|
|
config.allowUnfreePredicate = pkg: lib.elem (lib.getName pkg) (import ./packages/unfree.nix);
|
2022-02-05 21:42:36 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
deploy-rs-lib = inputs.deploy-rs.lib.${system};
|
|
|
|
agenixModule = inputs.agenix.nixosModules.age;
|
|
|
|
|
|
|
|
aspect = import ./modules inputs;
|
|
|
|
hosts = import ./hosts;
|
|
|
|
specialArgs = { inherit inputs hosts aspect; };
|
|
|
|
|
|
|
|
mkNixOS' = lib: name: lib.nixosSystem {
|
|
|
|
inherit system;
|
|
|
|
inherit specialArgs;
|
|
|
|
modules = [ hosts."${name}".nixos ];
|
|
|
|
};
|
|
|
|
mkNixOS = mkNixOS' nixpkgs.lib;
|
|
|
|
in {
|
|
|
|
nixosModules = aspect.modules;
|
|
|
|
nixosConfigurations =
|
|
|
|
lib.genAttrs [ "TITAN" "jericho" ] mkNixOS;
|
|
|
|
|
|
|
|
deploy.nodes = with deploy-rs-lib; {
|
|
|
|
TITAN = {
|
|
|
|
hostname = "titan.hypr";
|
|
|
|
profiles.system = {
|
|
|
|
user = "root";
|
|
|
|
path = activate.nixos self.nixosConfigurations.TITAN;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
jericho = {
|
|
|
|
hostname = "jericho.hypr";
|
|
|
|
profiles.system = {
|
|
|
|
user = "root";
|
|
|
|
path = activate.nixos self.nixosConfigurations.jericho;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
packages.${system} = import ./packages {
|
2022-03-17 21:02:48 +02:00
|
|
|
inherit inputs pkgs;
|
2022-02-05 21:42:36 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
defaultApp.${system} = {
|
|
|
|
type = "app";
|
|
|
|
program = self.packages.${system}.flake-installer.outPath;
|
|
|
|
};
|
|
|
|
|
|
|
|
hydraJobs = {
|
|
|
|
systems.${system} = lib.mapAttrs (_: x: x.config.system.build.toplevel) self.nixosConfigurations;
|
|
|
|
packages = self.packages;
|
|
|
|
};
|
|
|
|
|
|
|
|
homeConfigurations = {
|
|
|
|
max = inputs.home-manager.lib.homeManagerConfiguration {
|
2022-07-22 01:18:31 +03:00
|
|
|
inherit pkgs;
|
|
|
|
modules = [
|
|
|
|
{
|
|
|
|
home.homeDirectory = "/home/max";
|
|
|
|
home.username = "max";
|
|
|
|
}
|
|
|
|
./users/max/home.nix
|
|
|
|
];
|
2022-02-05 21:42:36 +02:00
|
|
|
extraSpecialArgs = { inherit inputs; };
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|