1
0
nuc-configurations/flake.nix
2023-11-30 08:24:47 +08:00

53 lines
1.3 KiB
Nix

{
description = "NixOS configuration for NUC";
nixConfig = rec {
auto-optimise-store = true;
experimental-features = [ "nix-command" "flakes" ];
trusted-substituters = [
"https://mirrors.ustc.edu.cn/nix-channels/store" # 中科大
"https://mirrors.tuna.tsinghua.edu.cn/nix-channels/store" # 清华
"https://mirrors.bfsu.edu.cn/nix-channels/store" # 北外
"https://mirror.sjtu.edu.cn/nix-channels/store" # 交大
"https://nixos-cn.cachix.org"
"https://cache.nixos.org/"
];
substituters = trusted-substituters;
trusted-users = [
"login"
"root"
"@wheel"
];
};
inputs = {
nixpkgs.url = "nixpkgs/nixos-23.11";
nixpkgs-unstable.url = "nixpkgs/nixos-unstable";
impermanence.url = "github:nix-community/impermanence";
};
outputs = { self, nixpkgs, impermanence, nixpkgs-unstable, ... }: {
nixosConfigurations.default = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
specialArgs = {
pkgs = import nixpkgs {
system = system;
config.allowUnfree = true;
};
pkgs-unstable = import nixpkgs-unstable {
system = system;
config.allowUnfree = true;
};
};
modules = [
./configuration.nix
impermanence.nixosModules.impermanence
];
};
};
}