From fc7d0876caed738e72b3a6b0c288bced96f79529 Mon Sep 17 00:00:00 2001 From: Natasha Moongrave Date: Tue, 16 Jun 2026 15:17:23 +0200 Subject: Switched to vimjoyer's nix parts template --- flake.nix | 158 ++++---------------------------------------------------------- 1 file changed, 10 insertions(+), 148 deletions(-) (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix index 3662ed9..efda00c 100644 --- a/flake.nix +++ b/flake.nix @@ -1,160 +1,22 @@ { - description = "NixOS config (clean direct flake)"; - inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11"; # nixpkgs stable; used as the default source for all packages. - nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; # unstable for when stable is too behind (called by prefixing the pkg with 'unstable.') + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + + flake-parts.url = "github:hercules-ci/flake-parts"; + import-tree.url = "github:vic/import-tree"; - home-manager = { - # NixOS home-manager - url = "github:nix-community/home-manager/release-25.11"; + wrapper-modules.url = "github:BirdeeHub/nix-wrapper-modules"; + + nixos-hardware = { + url = "github:NixOS/nixos-hardware"; inputs.nixpkgs.follows = "nixpkgs"; }; stylix = { - # Colorscheme and general style handling - url = "github:danth/stylix/release-25.11"; + url = "github:nix-community/stylix"; inputs.nixpkgs.follows = "nixpkgs"; }; - - fenix = { - # Rust tool-chain handler - url = "github:nix-community/fenix"; - inputs.nixpkgs.follows = "nixpkgs-unstable"; - }; - - nixcord.url = "github:FlameFlag/nixcord"; # NixOS discord flake - - nixos-hardware.url = "github:NixOS/nixos-hardware"; # NixOS hardware flake for simpler system specific optimisation - agenix = { - url = "github:ryantm/agenix"; - nixpkgs.follows = "nixpkgs"; - # choose not to download darwin deps (saves some resources on Linux) - darwin.follows = ""; - }; }; - outputs = inputs @ { - self, - nixpkgs, - nixpkgs-unstable, - home-manager, - stylix, - fenix, - nixos-hardware, - agenix, - ... - }: let - system = "x86_64-linux"; - - overlays = [ - (final: prev: { - unstable = import nixpkgs-unstable { - # handle the unstable prefix - inherit system; - config.allowUnfree = true; - }; - }) - - fenix.overlays.default - ]; - in { - nixosConfigurations = { - ##################################### MYSTRA X220 MAIN LAPTOP (HARDENED) ##################################### - mystra = nixpkgs.lib.nixosSystem { - inherit system; - - specialArgs = {inherit inputs;}; - - modules = [ - { - nixpkgs = { - inherit overlays; - config.allowUnfree = true; - }; - } - - nixos-hardware.nixosModules.lenovo-thinkpad-x220 - agenix.nixosModules.default - agenix.homeManagerModules.default # Install the agenix hM module aswell - - ./hosts/mystra/configuration.nix - ./system - - stylix.nixosModules.stylix - home-manager.nixosModules.home-manager - - { - home-manager.users.mun.imports = [ - ./home/mun - ./home/rices/schrottkatze/home.nix - ]; - } - ]; - }; - ##################################### HERRA HOME WORKSTATION ##################################### - herra = nixpkgs.lib.nixosSystem { - inherit system; - - specialArgs = {inherit inputs;}; - - modules = [ - { - nixpkgs = { - inherit overlays; - config.allowUnfree = true; - }; - } - - # TODO: Add amd gpu and intel cpu nixosnixos-hardware configs - agenix.nixosModules.default - agenix.homeManagerModules.default # Install the agenix hM module aswell - - ./hosts/herra/configuration.nix - ./system - - stylix.nixosModules.stylix - home-manager.nixosModules.home-manager - - { - home-manager.users.mun.imports = [ - ./home/mun - ./home/rices/cinnamon/home.nix - ]; - } - ]; - }; - ##################################### KRONOS HP ELITEBOOK CURRENT MAIN (BACKUP, HARDENED) LAPTOP ##################################### - kronos = nixpkgs.lib.nixosSystem { - inherit system; - - specialArgs = {inherit inputs;}; - - modules = [ - { - nixpkgs = { - inherit overlays; - config.allowUnfree = true; - }; - } - nixos-hardware.nixosModules.hp-elitebook-830g6 - agenix.nixosModules.default - agenix.homeManagerModules.default # Install the agenix hM module aswell - - ./hosts/kronos/configuration.nix - ./system - - stylix.nixosModules.stylix - home-manager.nixosModules.home-manager - - { - home-manager.users.mun.imports = [ - ./home/mun - ./home/rices/nord-blue/home.nix - ]; - } - ]; - }; - }; - }; + outputs = inputs: inputs.flake-parts.lib.mkFlake {inherit inputs;} (inputs.import-tree ./modules); } -- cgit v1.2.3