new flake structure and overlays for unstable
This commit is contained in:
parent
e8c9cd32fd
commit
687fd92a94
47
flake.nix
47
flake.nix
@ -9,8 +9,7 @@
|
|||||||
{
|
{
|
||||||
description = "Kabbone's peronal NixOS Flake config";
|
description = "Kabbone's peronal NixOS Flake config";
|
||||||
|
|
||||||
inputs = # All flake references used to build my NixOS setup. These are dependencies.
|
inputs = {
|
||||||
{
|
|
||||||
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; # Nix Packages
|
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; # Nix Packages
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
|
||||||
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
||||||
@ -49,8 +48,45 @@
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs @ { self, nixpkgs, nixpkgs-unstable, nixos-hardware, home-manager, home-manager-unstable, agenix, jovian-nixos, microvm, impermanence, lanzaboote, ... }: # Function that tells my flake which to use and what do what to do with the dependencies.
|
outputs = {
|
||||||
rec {
|
self,
|
||||||
|
nixpkgs,
|
||||||
|
nixpkgs-unstable,
|
||||||
|
nixos-hardware,
|
||||||
|
home-manager,
|
||||||
|
home-manager-unstable,
|
||||||
|
agenix,
|
||||||
|
jovian-nixos,
|
||||||
|
microvm,
|
||||||
|
impermanence,
|
||||||
|
lanzaboote,
|
||||||
|
...
|
||||||
|
} @ inputs: rec {
|
||||||
|
inherit (self) outputs;
|
||||||
|
systems = [
|
||||||
|
"aarch64-linux"
|
||||||
|
"x86_64-linux"
|
||||||
|
];
|
||||||
|
|
||||||
|
forAllSystems = nixpkgs.lib.genAttrs systems;
|
||||||
|
#in {
|
||||||
|
# Your custom packages
|
||||||
|
# Accessible through 'nix build', 'nix shell', etc
|
||||||
|
packages = forAllSystems (system: import ./packages nixpkgs.legacyPackages.${system});
|
||||||
|
# Formatter for your nix files, available through 'nix fmt'
|
||||||
|
# Other options beside 'alejandra' include 'nixpkgs-fmt'
|
||||||
|
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra);
|
||||||
|
|
||||||
|
# Your custom packages and modifications, exported as overlays
|
||||||
|
overlays = import ./overlays {inherit inputs;};
|
||||||
|
# Reusable nixos modules you might want to export
|
||||||
|
# These are usually stuff you would upstream into nixpkgs
|
||||||
|
#nixosModules = import ./modules/kabbone;
|
||||||
|
# Reusable home-manager modules you might want to export
|
||||||
|
# These are usually stuff you would upstream into home-manager
|
||||||
|
#homeManagerModules = import ./modules/home-manager;
|
||||||
|
|
||||||
|
|
||||||
nixosConfigurations = ( # NixOS configurations
|
nixosConfigurations = ( # NixOS configurations
|
||||||
import ./hosts { # Imports ./hosts/default.nix
|
import ./hosts { # Imports ./hosts/default.nix
|
||||||
inherit (nixpkgs) lib;
|
inherit (nixpkgs) lib;
|
||||||
@ -59,6 +95,7 @@
|
|||||||
security.sudo.execWheelOnly = true;
|
security.sudo.execWheelOnly = true;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
hydraJobs = {
|
hydraJobs = {
|
||||||
"steamdeck" = nixosConfigurations.steamdeck.config.system.build.toplevel;
|
"steamdeck" = nixosConfigurations.steamdeck.config.system.build.toplevel;
|
||||||
"hades" = nixosConfigurations.hades.config.system.build.toplevel;
|
"hades" = nixosConfigurations.hades.config.system.build.toplevel;
|
||||||
@ -69,6 +106,4 @@
|
|||||||
"dmz" = nixosConfigurations.dmz.config.system.build.toplevel;
|
"dmz" = nixosConfigurations.dmz.config.system.build.toplevel;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
19
overlays/default.nix
Normal file
19
overlays/default.nix
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
{inputs, ...}: {
|
||||||
|
# This one brings our custom packages from the 'pkgs' directory
|
||||||
|
additions = final: _prev: import ../packages {pkgs = final;};
|
||||||
|
|
||||||
|
modifications = final: prev: {
|
||||||
|
mealie = final.unstable.mealie;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
# When applied, the unstable nixpkgs set (declared in the flake inputs) will
|
||||||
|
# be accessible through 'pkgs.unstable'
|
||||||
|
unstable-packages = final: _prev: {
|
||||||
|
unstable = import inputs.nixpkgs-unstable {
|
||||||
|
system = final.system;
|
||||||
|
config.allowUnfree = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user