nix: switching to using flakes
This commit is contained in:
29
nix/flake.nix
Normal file
29
nix/flake.nix
Normal file
@ -0,0 +1,29 @@
|
||||
{
|
||||
inputs.nixpkgs.url = "nixpkgs/nixos-22.11";
|
||||
inputs.nixpkgs-unstable.url = "nixpkgs/nixos-unstable";
|
||||
|
||||
# inputs.home-manager.url = "github:nix-community/home-manager";
|
||||
|
||||
outputs = { self, nixpkgs, nixpkgs-unstable, ... }@attrs:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
overlay-unstable = final: prev: {
|
||||
unstable = nixpkgs-unstable.legacyPackages.${prev.system};
|
||||
# use this variant if unfree packages are needed:
|
||||
# unstable = import nixpkgs-unstable {
|
||||
# inherit system;
|
||||
# config.allowUnfree = true;
|
||||
# };
|
||||
};
|
||||
in {
|
||||
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = attrs;
|
||||
modules = [
|
||||
# Overlays-module makes "pkgs.unstable" available in configuration.nix
|
||||
({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; })
|
||||
./configuration.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user