#+TITLE: Nix Flakes Config #+AUTHOR: materus #+DESCRIPTION: Nix flake declarations #+STARTUP: overview #+OPTIONS: \n:t #+auto_tangle: t * Flakes ** Main Flake Flake of entire repo. [[./flake.nix][link]] #+name: version #+begin_src txt :noweb-ref version 25.05 #+end_src #+name: main_flake #+begin_src nix header-args :tangle ./flake.nix :noweb yes { description = "MKK flake: NixOS and home manager configs"; inputs = { nixpkgs = { type = "github"; owner = "NixOS"; repo = "nixpkgs"; ref = "nixos-unstable"; }; nixpkgs-stable = { type = "github"; owner = "NixOS"; repo = "nixpkgs"; ref = "nixos-<>"; }; hm-stable = { type = "github"; owner = "nix-community"; repo = "home-manager"; ref = "release-<>"; inputs.nixpkgs.follows = "nixpkgs-stable"; }; config-unstable = { url = "path:./nix/subflake"; inputs = { nixpkgs.follows = "nixpkgs"; }; }; config-stable = { url = "path:./nix/subflake"; inputs = { nixpkgs.follows = "nixpkgs-stable"; home-manager.follows = "hm-stable"; }; }; }; outputs = inputs: import (builtins.toString ./nix) { inherit inputs; configRootPath = (builtins.toString ./.); }; } #+end_src ** Subflake Subflake with dependencies, used so there's no need for duplication for stable and unstable. [[./nix/subflake/flake.nix][link]] #+name: subflake #+begin_src nix header-args :tangle ./nix/subflake/flake.nix { description = "Subflake of Lemon repository, contains dependencies"; inputs = { nixpkgs = { type = "github"; owner = "NixOS"; repo = "nixpkgs"; ref = "nixos-unstable"; }; flake-utils = { type = "github"; owner = "numtide"; repo = "flake-utils"; ref = "main"; }; base16 = { type = "github"; owner = "SenchoPens"; repo = "base16.nix"; ref = "main"; }; devshell = { type = "github"; owner = "numtide"; repo = "devshell"; ref = "main"; inputs = { nixpkgs.follows = "nixpkgs"; }; }; home-manager = { type = "github"; owner = "nix-community"; repo = "home-manager"; ref = "master"; inputs = { nixpkgs.follows = "nixpkgs"; }; }; emacs-overlay = { type = "github"; owner = "nix-community"; repo = "emacs-overlay"; ref = "master"; inputs = { nixpkgs.follows = "nixpkgs"; }; }; nixos-hardware = { type = "github"; owner = "NixOS"; repo = "nixos-hardware"; ref = "master"; }; nixerus = { type = "github"; owner = "materusPL"; repo = "Nixerus"; ref = "master"; inputs = { nixpkgs.follows = "nixpkgs"; home-manager.follows = "home-manager"; }; }; nix-vscode-extensions = { type = "github"; owner = "nix-community"; repo = "nix-vscode-extensions"; ref = "master"; inputs = { nixpkgs.follows = "nixpkgs"; flake-utils.follows = "flake-utils"; }; }; sops-nix = { type = "github"; owner = "Mic92"; repo = "sops-nix"; ref = "master"; inputs = { nixpkgs.follows = "nixpkgs"; }; }; git-agecrypt = { type = "github"; owner = "vlaci"; repo = "git-agecrypt"; ref = "main"; inputs = { nixpkgs.follows = "nixpkgs"; flake-utils.follows = "flake-utils"; }; }; plasma-manager = { type = "github"; owner = "nix-community"; repo = "plasma-manager"; ref = "trunk"; inputs = { nixpkgs.follows = "nixpkgs"; home-manager.follows = "home-manager"; }; }; impermanence = { type = "github"; owner = "nix-community"; repo = "impermanence"; ref = "master"; }; nur = { type = "github"; owner = "nix-community"; repo = "NUR"; ref = "master"; }; }; outputs = inputs: inputs; } #+end_src