mirror of
https://git.lgmrszd.xyz/Lgmrszd/nix-cfg.git
synced 2025-12-14 15:48:21 +01:00
Add few packages, use overlays, add separate inputs
This commit is contained in:
parent
426cbf395d
commit
6d78a9ac8d
4 changed files with 81 additions and 20 deletions
50
flake.nix
50
flake.nix
|
|
@ -7,20 +7,19 @@
|
|||
# which represents the GitHub repository URL + branch/commit-id/tag.
|
||||
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
# separate inputs to lock some packages
|
||||
# locked - stuff to be updated very unfrequently
|
||||
# fresh - mostly desktop apps
|
||||
nixpkgs-locked.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
nixpkgs-fresh.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-23.05";
|
||||
# nix-index-database.url = "github:nix-community/nix-index-database";
|
||||
# nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
|
||||
# nur = {
|
||||
# url = "github:nix-community/NUR";
|
||||
# };
|
||||
# nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
# home-manager, used for managing user configuration
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/master";
|
||||
# The `follows` keyword in inputs is used for inheritance.
|
||||
# Here, `inputs.nixpkgs` of home-manager is kept consistent with
|
||||
# the `inputs.nixpkgs` of the current flake,
|
||||
# to avoid problems caused by different versions of nixpkgs.
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nh = {
|
||||
|
|
@ -31,22 +30,48 @@
|
|||
|
||||
outputs = inputs@{
|
||||
nixpkgs,
|
||||
nixpkgs-locked,
|
||||
nixpkgs-fresh,
|
||||
nixpkgs-stable,
|
||||
# nix-index-database,
|
||||
# nur,
|
||||
home-manager,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
overlay-locked = final: prev: {
|
||||
locked = import nixpkgs-locked {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
};
|
||||
overlay-fresh = final: prev: {
|
||||
fresh = import nixpkgs-fresh {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
};
|
||||
overlay-stable = final: prev: {
|
||||
stable = import nixpkgs-stable {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
};
|
||||
my-overlays = [
|
||||
overlay-locked
|
||||
overlay-fresh
|
||||
overlay-stable
|
||||
];
|
||||
in
|
||||
{
|
||||
nixosConfigurations.lgm-nixos = nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
inherit system;
|
||||
specialArgs = {
|
||||
pkgs-stable = import nixpkgs-stable {
|
||||
system = system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
secrets = import ./secrets {};
|
||||
};
|
||||
modules = [
|
||||
({ config, pkgs, ... }: { nixpkgs.overlays = my-overlays; })
|
||||
# nur.nixosModules.nur
|
||||
inputs.nh.nixosModules.default
|
||||
./configuration.nix
|
||||
|
|
@ -63,7 +88,6 @@
|
|||
home-manager.users.lgm = import ./home.nix;
|
||||
|
||||
home-manager.extraSpecialArgs = with specialArgs; {
|
||||
inherit pkgs-stable;
|
||||
inherit secrets;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue