Configuration for my NixOS based systems and Home Manager
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

at 61ba8a8c85365ac8effbb1690d9eddbce9d11d3b 156 lines 5.3 kB view raw
1{ 2 description = "Home Manager configuration for noah"; 3 4 inputs = { 5 # Specify the source of Home Manager and Nixpkgs. 6 nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11"; 7 nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; 8 determinite = { 9 url = "https://flakehub.com/f/DeterminateSystems/determinate/3"; 10 inputs.nixpkgs.follows = "nixpkgs"; 11 }; 12 home-manager = { 13 url = "github:nix-community/home-manager/release-25.11"; 14 inputs.nixpkgs.follows = "nixpkgs"; 15 }; 16 pre-commit-hooks.url = "github:cachix/git-hooks.nix"; 17 agenix.url = "github:ryantm/agenix"; 18 }; 19 20 outputs = 21 { self 22 , nixpkgs 23 , nixpkgs-unstable 24 , determinite 25 , home-manager 26 , pre-commit-hooks 27 , agenix 28 , ... 29 }@inputs: 30 let 31 name = "misaki"; 32 system = "x86_64-linux"; 33 pkgs = import nixpkgs { 34 inherit system; 35 36 }; 37 unstable = import nixpkgs-unstable { 38 inherit system; 39 config.allowUnfreePredicate = 40 pkg: 41 builtins.elem (pkgs.lib.getName pkg) [ 42 "plexmediaserver" 43 "teamspeak-server" 44 ]; 45 overlays = [ 46 (final: prev: { 47 # Override the version of Plex installed to be the latest 48 plexRaw = prev.plexRaw.overrideAttrs rec { 49 version = "1.43.0.10389-8be686aa6"; 50 src = final.fetchurl { 51 url = "https://downloads.plex.tv/plex-media-server-new/${version}/debian/plexmediaserver_${version}_amd64.deb"; 52 sha256 = "0HjB8Ggekwl5dKwM1Kh51Ic25t3V6veKbuzM7czrpeg="; 53 }; 54 }; 55 ## Override the json object that contains verions and hashes for Immich 56 #immich = prev.immich.override { sourcesJSON = ./overrides/immich-sources.json; }; 57 ## Fix errors wit numpy version failing to resolve in the immich ML package 58 #immich-machine-learning = prev.immich-machine-learning.overrideAttrs 59 # (finalAttrs: prevAttrs: { 60 # pythonRelaxDeps = prevAttrs.pythonRelaxDeps ++ [ "numpy" ]; 61 # }); 62 }) 63 ]; 64 }; 65 supportedSystems = [ 66 "x86_64-linux" 67 "aarch64-linux" 68 "x86_64-darwin" 69 "aarch64-darwin" 70 ]; 71 forAllSystems = nixpkgs.lib.genAttrs supportedSystems; 72 in 73 { 74 nixosConfigurations.${name} = inputs.nixpkgs.lib.nixosSystem { 75 inherit system; 76 specialArgs = { inherit unstable inputs; }; 77 modules = [ 78 determinite.nixosModules.default 79 ./configuration.nix 80 agenix.nixosModules.default 81 home-manager.nixosModules.home-manager 82 { 83 home-manager.useGlobalPkgs = true; 84 home-manager.useUserPackages = true; 85 home-manager.users.noah = ./home.nix; 86 home-manager.extraSpecialArgs = { 87 inherit unstable; 88 }; 89 90 # Optionally, use home-manager.extraSpecialArgs to pass 91 # arguments to home.nix 92 } 93 #./hardware-configuration.nix 94 #./boot.nix 95 #./networking.nix 96 #./users.nix 97 #./packages.nix 98 #./services.nix 99 # See configuration.nix for more information on this one 100 #( 101 # { ... }: 102 # { 103 # time.timeZone = "America/Chicago"; 104 # i18n.defaultLocale = "en_US.UTF-8"; 105 # system.copySystemConfiguration = true; 106 # documentation.man.generateCaches = true; 107 # system.autoUpgrade = { 108 # enable = true; 109 # dates = "09:00"; 110 # randomizedDelaySec = "45min"; 111 # }; 112 # nix.gc.automatic = true; 113 # nix.gc.options = "--delete-older-than 8d"; 114 # system.stateVersion = "23.11"; # Did you read the comment? 115 # } 116 #) 117 ]; 118 specialArgs = { inherit home-manager nixpkgs-unstable; }; 119 }; 120 homeConfigurations."noah" = home-manager.lib.homeManagerConfiguration { 121 inherit pkgs; 122 123 # Specify your home configuration modules here, for example, 124 # the path to your home.nix. 125 modules = [ ./noah-home.nix ]; 126 127 # Optionally use extraSpecialArgs 128 # to pass through arguments to home.nix 129 extraSpecialArgs = { 130 inherit unstable; 131 }; 132 }; 133 checks = forAllSystems (system: { 134 pre-commit-check = inputs.pre-commit-hooks.lib.${system}.run { 135 src = ./.; 136 # If your hooks are intrusive, avoid running on each commit with a default_states like this: 137 # default_stages = ["manual" "push"]; 138 hooks = { 139 nixpkgs-fmt.enable = true; 140 nil.enable = true; 141 luacheck.enable = true; 142 }; 143 }; 144 }); 145 devShells = forAllSystems (system: { 146 default = nixpkgs.legacyPackages.${system}.mkShell { 147 inherit (self.checks.${system}.pre-commit-check) shellHook; 148 buildInputs = [ 149 pkgs.nixfmt-rfc-style 150 ] 151 ++ self.checks.${system}.pre-commit-check.enabledPackages; 152 }; 153 }); 154 formatter.${system} = inputs.nixpkgs.legacyPackages.${system}.nixfmt-rfc-style; 155 }; 156}