{ description = "Rory&'s services flake"; nixConfig = { extra-substituters = [ "https://attic.computer.surgery/grapevine" "https://hyprland.cachix.org" ]; extra-trusted-public-keys = [ "grapevine:nYiZ0Qz9nT7Y7kNC/2NdoS3+J9gwTyWxOvlwZnFgceA=" "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" ]; }; inputs = { # Different nixpkgs versions nixpkgs = { url = "github:NixOS/nixpkgs/nixos-unstable"; }; # nixpkgs-stable = { # url = "github:NixOS/nixpkgs/nixos-24.11"; # }; nixpkgs-master = { url = "github:NixOS/nixpkgs/master"; }; nixpkgs-RoryNix = { #url = "github:NixOS/nixpkgs/nixos-23.05"; url = "github:NixOS/nixpkgs/master"; }; # Draupnir module/package #nixpkgs-DraupnirPkg.url = "github:r-ryantm/nixpkgs/auto-update/draupnir"; #nixpkgs-DraupnirPkg.url = "github:NixOS/nixpkgs/master"; # nixpkgs-keydb.url = "github:NixOS/nixpkgs?rev=e0464e47880a69896f0fb1810f00e0de469f770a"; #MatrixContentFilter.url = "git+file:/home/Rory/git/matrix/MatrixContentFilter?submodules=1"; # Base modules home-manager.url = "github:nix-community/home-manager/master"; sops-nix.url = "github:Mic92/sops-nix"; flake-utils.url = "github:numtide/flake-utils"; # Packages grapevine.url = "gitlab:matrix/grapevine-fork?host=gitlab.computer.surgery"; conduit.url = "gitlab:famedly/conduit/next"; # - AUR imports # aur-visual-paradigm = { # url = "git+https://aur.archlinux.org/visual-paradigm.git"; # flake = false; # }; lix-module = { url = "https://git.lix.systems/lix-project/nixos-module/archive/2.91.1-2.tar.gz"; inputs.nixpkgs.follows = "nixpkgs"; }; # Own projects/custom modules botcore-v4 = { url = "gitlab:BotCore-Devs/BotCore-v4/staging"; }; ooye = { url = "git+https://cgit.rory.gay/nix/OOYE-module.git"; }; cgit-magenta = { url = "git+https://cgit.rory.gay/cgit-magenta.git"; inputs.nixpkgs.follows = "nixpkgs"; }; # Packages built from git synapseHttpAntispamSrc = { url = "github:TheArcaneBrony/synapse-http-antispam"; flake = false; }; nhekoSrc = { url = "github:Nheko-reborn/nheko/master"; flake = false; }; mtxclientSrc = { url = "github:Nheko-reborn/mtxclient/master"; flake = false; }; draupnirSrc = { url = "github:the-draupnir-project/Draupnir/main"; flake = false; }; matrixSpecSrc = { url = "github:matrix-org/matrix-spec/main"; flake = false; }; hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1&ref=refs/tags/v0.48.1"; hy3 = { url = "github:outfoxxed/hy3?ref=hl0.48.0"; inputs.hyprland.follows = "hyprland"; }; safeNSound = { url = "git+https://cgit.rory.gay/school/nodejs-final-assignment.git/"; inputs = { flake-utils.follows = "flake-utils"; nixpkgs.follows = "nixpkgs"; }; }; }; outputs = inputs: with inputs; { nixosConfigurations = { Module-dev = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ ./host/Module-dev/configuration.nix home-manager.nixosModules.home-manager lix-module.nixosModules.default ]; }; Rory-ovh = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ ./host/Rory-ovh/configuration.nix ./hardware-configuration.nix ./host/Rory-nginx/services/matrix/synapse/workers/module.nix home-manager.nixosModules.home-manager lix-module.nixosModules.default grapevine.nixosModules.default ooye.modules.default safeNSound.nixosModules.default ( { pkgs, lib, ... }: { disabledModules = [ "services/matrix/synapse.nix" ]; imports = [ "${nixpkgs-master}/nixos/modules/services/matrix/synapse.nix" #"${nixpkgs-Draupnir}/nixos/modules/services/matrix/draupnir.nix" ]; nixpkgs.overlays = [ (final: prev: { matrix-synapse-unwrapped = self.packages.${pkgs.stdenv.hostPlatform.system}.matrix-synapse-unwrapped-patched; draupnir = inputs.nixpkgs-master.legacyPackages.${pkgs.stdenv.hostPlatform.system}.draupnir; #draupnir = inputs.nixpkgs-DraupnirPkg.legacyPackages.${pkgs.stdenv.hostPlatform.system}.draupnir; matrix-synapse-plugins.synapse-http-antispam = prev.matrix-synapse-plugins.synapse-http-antispam.overrideAttrs (oldAttrs: { src = inputs.synapseHttpAntispamSrc; version = inputs.synapseHttpAntispamSrc.rev; }); }) ]; } ) ]; specialArgs = { inherit botcore-v4; inherit home-manager; inherit grapevine; inherit conduit; #inherit nixpkgs-Draupnir; inherit nixpkgs-DraupnirPkg; inherit cgit-magenta; inherit (inputs) draupnirSrc; }; }; Rory-nginx = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ ./host/Rory-nginx/configuration.nix ./hardware-configuration.nix ./packages/redpanda-connect/module.nix home-manager.nixosModules.home-manager lix-module.nixosModules.default grapevine.nixosModules.default # these arent really modules... botcore-v4.modules.bots botcore-v4.modules.frontend botcore-v4.modules.dataupdater botcore-v4.modules.users ]; specialArgs = { inherit botcore-v4; inherit home-manager; inherit grapevine; inherit conduit; }; }; #UNSTABLE #Rory-devenv = nixpkgs.lib.nixosSystem { # system = "x86_64-linux"; # modules = [ # ./host/Rory-devenv/configuration.nix # ./hardware-configuration.nix # home-manager.nixosModules.home-manager # ]; # specialArgs = { # inherit home-manager; # }; #}; Rory-desktop = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ ./host/Rory-desktop/configuration.nix ./hardware-configuration.nix ./packages/overlays/jetbrains-plugins.nix home-manager.nixosModules.home-manager lix-module.nixosModules.default sops-nix.nixosModules.sops ( { ... }: { nix = { registry.nixpkgs.flake = nixpkgs; nixPath = [ "nixpkgs=${nixpkgs.outPath}" ]; }; } ) #( # { pkgs, lib, ... }: # { # nixpkgs.overlays = [ # (final: prev: { # jetbrains = (prev.jetbrains // { # plugins = (prev.jetbrains.plugins // { # addPlugins = (pkgs.callPackage "${inputs.nixpkgs-JetbrainsPlugins}/pkgs/applications/editors/jetbrains/plugins/default.nix" { }).addPlugins; # }); # }); # }) # ]; # } #) ]; specialArgs = { inherit home-manager; inherit (inputs) mtxclientSrc; inherit (inputs) nhekoSrc; inherit hyprland; inherit hy3; }; }; Rory-laptop = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ ./host/Rory-laptop/configuration.nix ./hardware-configuration.nix home-manager.nixosModules.home-manager lix-module.nixosModules.default sops-nix.nixosModules.sops #temporary: ./packages/overlays/lldb.nix ( { ... }: { nix = { registry.nixpkgs.flake = nixpkgs; nixPath = [ "nixpkgs=${nixpkgs.outPath}" ]; }; } ) ]; specialArgs = { inherit home-manager; inherit (inputs) matrixSpecSrc; inherit (inputs) mtxclientSrc; inherit (inputs) nhekoSrc; inherit hyprland; inherit hy3; }; }; Arc = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ ./host/Arc/configuration.nix ./hardware-configuration.nix home-manager.nixosModules.home-manager lix-module.nixosModules.default ( { ... }: { nix = { registry.nixpkgs.flake = nixpkgs; nixPath = [ "nixpkgs=${nixpkgs.outPath}" ]; }; } ) ]; specialArgs = { inherit home-manager; inherit hyprland; inherit hy3; }; }; Rory-portable = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ ./host/Rory-portable/configuration.nix ./hardware-configuration.nix home-manager.nixosModules.home-manager ( { ... }: { nix = { registry.nixpkgs.flake = nixpkgs; nixPath = [ "nixpkgs=${nixpkgs.outPath}" ]; }; } ) ]; specialArgs = { inherit home-manager; inherit (inputs) mtxclientSrc; inherit (inputs) nhekoSrc; }; }; Rory-NTFS = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ ./host/Rory-NTFS/configuration.nix ./hardware-configuration.nix home-manager.nixosModules.home-manager ( { ... }: { nix = { registry.nixpkgs.flake = nixpkgs; nixPath = [ "nixpkgs=${nixpkgs.outPath}" ]; }; } ) ]; specialArgs = { inherit home-manager; inherit (inputs) mtxclientSrc; inherit (inputs) nhekoSrc; }; }; #STABLE RoryNix = nixpkgs-RoryNix.lib.nixosSystem { system = "i686-linux"; modules = [ ./host/RoryNix/configuration.nix ./hardware-configuration.nix ( { ... }: { nixpkgs.hostPlatform = "i686-linux"; nixpkgs.buildPlatform = "x86_64-linux"; nix.registry.nixpkgs.flake = nixpkgs-RoryNix; } ) ]; }; # ISO images uISO = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ ./host/uISO/iso-root.nix ./host/uISO/development.nix ]; specialArgs = { # inherit spacebarchat-server-master; }; }; }; modules = { monitoring = import ./modules/monitoring/module.nix; redpanda-connect = import ./packages/redpanda-connect/module.nix; }; } // flake-utils.lib.eachSystem flake-utils.lib.allSystems ( system: let pkgs = import nixpkgs { inherit system; }; pkgs-master = import nixpkgs-master { inherit system; }; in { packages.nheko-git = ( pkgs.callPackage ./packages/nheko-git.nix { inherit nhekoSrc; inherit mtxclientSrc; voipSupport = false; } ); packages.mtxclient-git = (pkgs.callPackage ./packages/mtxclient-git.nix { inherit mtxclientSrc; }); packages.matrix-spec-git = (pkgs.callPackage ./packages/matrix-spec.nix { inherit matrixSpecSrc; }); packages.nbtexplorer = pkgs.callPackage ./packages/nbtexplorer.nix { }; # untested #packages.draupnir-main = pkgs.draupnir.overrideAttrs (oldAttrs: { # src = draupnirSrc; # version = draupnirSrc.rev; #}); packages.redpanda-connect = (pkgs.callPackage ./packages/redpanda-connect/default.nix { }); packages.matrix-synapse-unwrapped-patched = pkgs-master.matrix-synapse-unwrapped.overrideAttrs (oldAttrs: rec { patches = (if oldAttrs ? patches then oldAttrs.patches else []) ++ pkgs.lib.map ( path: ./packages/overlays/matrix-synapse/patches/${path} ) (builtins.attrNames (builtins.readDir ./packages/overlays/matrix-synapse/patches)); cargoDeps = pkgs.rustPlatform.fetchCargoVendor { inherit (oldAttrs) src; inherit patches; name = "${oldAttrs.pname}-${oldAttrs.version}"; hash = "sha256-9VJnn8aPkShqK2wYGFr+S5koIjma7VOr+LkLXwStL1E="; }; }); } ); }