summaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorNatasha Moongrave <natasha@256phi.eu>2026-06-16 15:17:23 +0200
committerNatasha Moongrave <natasha@256phi.eu>2026-06-16 15:17:23 +0200
commitfc7d0876caed738e72b3a6b0c288bced96f79529 (patch)
tree56142a08c88c7313bfb1f8546824b347864cf56c /flake.nix
parent7d484f0e61df24d94481d6f3bfef9fcdff792eb0 (diff)
Switched to vimjoyer's nix parts template
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix158
1 files changed, 10 insertions, 148 deletions
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);
}