NixOS deployment for LinuxLab
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

69 lines
1.7 KiB

{ config, lib, pkgs, inputs, ... }:
{
nixpkgs.overlays = [
# Make nixpkgs-unstable available as subtree
(_: _: {
unstable = import inputs.nixpkgs-unstable {
inherit (config.nixpkgs) system;
config = {
allowUnfree = true;
};
};
})
# Let builders fetch sources directly instead of uploading
(self: super: (super.prefer-remote-fetch self super))
];
# Who cares about licenses?
nixpkgs.config.allowUnfree = true;
# Link nixpkgs to etc for usage in NIX_PATH.
# This allows update to the symlinks when updating nixpkgs without changes
# to NIX_PATH, which requires a new session to bekome active.
environment.etc.nixpkgs.source = pkgs.linkFarm "nixpkgs" [
{ name = "nixpkgs"; inherit (pkgs) path; }
{ name = "nixpkgs-unstable"; inherit (pkgs.unstable) path; }
];
nix = {
nixPath = lib.mkForce [
"nixpkgs=/etc/nixpkgs/nixpkgs"
"nixpkgs-unstable=/etc/nixpkgs/nixpkgs-unstable"
];
registry = {
"nixpkgs" = {
from = { type = "indirect"; id = "nixpkgs"; };
to = { type = "path"; path = "/etc/nixpkgs/nixpkgs"; };
};
"nixpkgs-unstable" = {
from = { type = "indirect"; id = "nixpkgs-unstable"; };
to = { type = "path"; path = "/etc/nixpkgs/nixpkgs-unstable"; };
};
};
# Take out the trash
gc = {
automatic = true;
dates = "monthly";
options = "--delete-older-than 30d";
};
# Optimize the store
optimise = {
automatic = true;
dates = [ "monthly" ];
};
# Enable modern commands
settings = {
experimental-features = [
"flakes"
"nix-command"
];
};
};
}