{ description = "Home Manager configuration for noah"; inputs = { # Specify the source of Home Manager and Nixpkgs. nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11"; nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; determinite = { url = "https://flakehub.com/f/DeterminateSystems/determinate/3"; inputs.nixpkgs.follows = "nixpkgs"; }; home-manager = { url = "github:nix-community/home-manager/release-25.11"; inputs.nixpkgs.follows = "nixpkgs"; }; pre-commit-hooks.url = "github:cachix/git-hooks.nix"; agenix.url = "github:ryantm/agenix"; }; outputs = { self , nixpkgs , nixpkgs-unstable , determinite , home-manager , pre-commit-hooks , agenix , ... }@inputs: let system = "x86_64-linux"; pkgs = import nixpkgs { inherit system; }; unstable = import nixpkgs-unstable { inherit system; config.allowUnfreePredicate = pkg: builtins.elem (pkgs.lib.getName pkg) [ "plexmediaserver" "teamspeak-server" ]; overlays = [ (final: prev: { # Override the version of Plex installed to be the latest plexRaw = prev.plexRaw.overrideAttrs rec { version = "1.43.0.10389-8be686aa6"; src = final.fetchurl { url = "https://downloads.plex.tv/plex-media-server-new/${version}/debian/plexmediaserver_${version}_amd64.deb"; sha256 = "0HjB8Ggekwl5dKwM1Kh51Ic25t3V6veKbuzM7czrpeg="; }; }; ## Override the json object that contains verions and hashes for Immich #immich = prev.immich.override { sourcesJSON = ./overrides/immich-sources.json; }; ## Fix errors wit numpy version failing to resolve in the immich ML package #immich-machine-learning = prev.immich-machine-learning.overrideAttrs # (finalAttrs: prevAttrs: { # pythonRelaxDeps = prevAttrs.pythonRelaxDeps ++ [ "numpy" ]; # }); }) ]; }; supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]; forAllSystems = nixpkgs.lib.genAttrs supportedSystems; in { nixosConfigurations.misaki = inputs.nixpkgs.lib.nixosSystem { system = "x86_64-linux"; specialArgs = { inherit unstable inputs home-manager; }; modules = [ determinite.nixosModules.default ./configuration.nix agenix.nixosModules.default home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.users.noah = ./home.nix; home-manager.extraSpecialArgs = { inherit unstable; }; # Optionally, use home-manager.extraSpecialArgs to pass # arguments to home.nix } ]; }; homeConfigurations."noah" = home-manager.lib.homeManagerConfiguration { inherit pkgs; # Specify your home configuration modules here, for example, # the path to your home.nix. modules = [ ./noah-home.nix ]; # Optionally use extraSpecialArgs # to pass through arguments to home.nix extraSpecialArgs = { inherit unstable; }; }; checks = forAllSystems (system: { pre-commit-check = inputs.pre-commit-hooks.lib.${system}.run { src = ./.; # If your hooks are intrusive, avoid running on each commit with a default_states like this: # default_stages = ["manual" "push"]; hooks = { nixpkgs-fmt.enable = true; nil.enable = true; luacheck.enable = true; }; }; }); devShells = forAllSystems (system: { default = nixpkgs.legacyPackages.${system}.mkShell { inherit (self.checks.${system}.pre-commit-check) shellHook; buildInputs = [ pkgs.nixfmt-rfc-style ] ++ self.checks.${system}.pre-commit-check.enabledPackages; }; }); formatter.${system} = inputs.nixpkgs.legacyPackages.${system}.nixfmt-rfc-style; }; }