moved to using overlays on nixpkgs-unstable (named as default nixpkgs)
so that i can specify more easily which package i would like using pkgs.stable.package and even pkgs.main.package if i want to be on the actual bleeding edge
This commit is contained in:
parent
904e0e66d6
commit
8ad1d43730
5 changed files with 258 additions and 138 deletions
55
flake.nix
55
flake.nix
|
@ -3,8 +3,10 @@
|
|||
|
||||
inputs = {
|
||||
# NixOS official package source, using the nixos-24.11 branch as stable and nixos-unstable as default
|
||||
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-24.11";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
stablepkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
|
||||
nixpkgs-master.url = "github:NixOS/nixpkgs/master";
|
||||
nur.url = "github:nix-community/NUR";
|
||||
|
||||
# Home manager using nixos-unstable
|
||||
home-manager = {
|
||||
|
@ -47,15 +49,51 @@
|
|||
outputs =
|
||||
{
|
||||
self,
|
||||
nixpkgs-stable,
|
||||
nixpkgs,
|
||||
stablepkgs,
|
||||
nixpkgs-master,
|
||||
nur,
|
||||
home-manager,
|
||||
...
|
||||
}@inputs:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
stablepkgs = stablepkgs.legacyPacakges.${system};
|
||||
genericModules = [
|
||||
{
|
||||
nix.registry.nixos.flake = inputs.self;
|
||||
environment.etc."nix/inputs/nixpkgs".source = nixpkgs.outPath;
|
||||
nix.nixPath = [ "nixpkgs=${nixpkgs.outPath}" ];
|
||||
}
|
||||
# inputs.home-manager.nixosModules.home-manager
|
||||
# {
|
||||
# nix.registry.nixos.flake = inputs.self;
|
||||
# home-manager.useGlobalPkgs = true;
|
||||
# home-manager.useUserPackages = true;
|
||||
# }
|
||||
({ config, pkgs, ... }: {
|
||||
nixpkgs.overlays = [
|
||||
overlay-stable
|
||||
overlay-master
|
||||
nur.overlay
|
||||
];
|
||||
}
|
||||
)
|
||||
];
|
||||
# Overlay definitions
|
||||
# nixpkgs-unstable
|
||||
overlay-stable = final: prev: {
|
||||
stable = import nixpkgs-stable {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
};
|
||||
# nixpkgs-master
|
||||
overlay-master = final: prev: {
|
||||
master = import nixpkgs-master {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
nixosConfigurations.gabbielaptop = nixpkgs.lib.nixosSystem {
|
||||
|
@ -63,7 +101,7 @@
|
|||
specialArgs = {
|
||||
inherit inputs;
|
||||
};
|
||||
modules = [
|
||||
modules = genericModules ++ [
|
||||
# Import nixos modules here
|
||||
./hosts/gabbielaptop/configuration.nix
|
||||
./modules/nh.nix
|
||||
|
@ -75,14 +113,11 @@
|
|||
inputs.musnix.nixosModules.musnix
|
||||
# inputs.stylix.nixosModules.stylix
|
||||
{ nix.settings = inputs.aagl.nixConfig; } # Setup cachix for aagl projects
|
||||
|
||||
# Imports home-manager module for use within nixos, not reccomended for use WITH standalone version
|
||||
# inputs.home-manager.nixosModules.default
|
||||
];
|
||||
};
|
||||
nixosConfigurations.biggerpi = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
modules = genericModules ++ [
|
||||
inputs.disko.nixosModules.disko
|
||||
inputs.satisfactory-server.nixosModules.satisfactory
|
||||
./hosts/biggerpi/configuration.nix
|
||||
|
@ -92,7 +127,7 @@
|
|||
|
||||
# Standalone home-manager config
|
||||
homeConfigurations.blue = home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
extraSpecialArgs = {
|
||||
inherit inputs;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue