62 lines
1.8 KiB
Nix
62 lines
1.8 KiB
Nix
|
{
|
||
|
description = "NixOS configuration for GPD Win Max";
|
||
|
|
||
|
nixConfig = {
|
||
|
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://cache.nixos.org/"
|
||
|
];
|
||
|
|
||
|
trusted-users = [
|
||
|
"root"
|
||
|
"@wheel"
|
||
|
];
|
||
|
};
|
||
|
|
||
|
inputs = {
|
||
|
nixpkgs.url = "nixpkgs/nixos-23.05";
|
||
|
impermanence.url = "github:nix-community/impermanence";
|
||
|
|
||
|
home-manager = {
|
||
|
url = "github:nix-community/home-manager/release-23.05";
|
||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||
|
};
|
||
|
|
||
|
inputs.nixos-cn = {
|
||
|
url = "github:nixos-cn/flakes";
|
||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||
|
};
|
||
|
};
|
||
|
|
||
|
outputs = {self, nixpkgs, home-manager, nixos-cn,...}: {
|
||
|
nixosConfigurations.gpd = nixpkgs.lib.nixosSystem rec {
|
||
|
system = "x86_64-linux";
|
||
|
|
||
|
specialArgs = {
|
||
|
pkgs = import nixpkgs {
|
||
|
system = system;
|
||
|
config.allowUnfree = true;
|
||
|
};
|
||
|
|
||
|
cn-pkgs = import nixos-cn {
|
||
|
system = system;
|
||
|
config.allowUnfree = true;
|
||
|
}
|
||
|
};
|
||
|
|
||
|
modules = [
|
||
|
./configuration.nix
|
||
|
impermanence.nixosModules.impermanence
|
||
|
|
||
|
home-manager.nixosModules.home-manager {
|
||
|
home-manager.useGlobalPkgs = true;
|
||
|
home-manager.useUserPackages = true;
|
||
|
home-manager.users = import ./per-user;
|
||
|
}
|
||
|
];
|
||
|
};
|
||
|
};
|
||
|
}
|