This repository has been archived on 2023-07-23. You can view files and clone it, but cannot push or open issues or pull requests.
gpd-configurations/flake.nix

82 lines
2.2 KiB
Nix
Raw Normal View History

{
2023-07-04 08:53:01 +00:00
description = "NixOS configuration for GPD Win Max";
2023-07-04 08:53:01 +00:00
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;
2023-07-04 08:53:01 +00:00
trusted-users = [
"user"
"root"
"@wheel"
];
};
2023-07-04 08:53:01 +00:00
inputs = {
nixpkgs.url = "nixpkgs/nixos-23.05";
impermanence.url = "github:nix-community/impermanence";
2023-07-04 08:53:01 +00:00
home-manager = {
url = "github:nix-community/home-manager/release-23.05";
inputs.nixpkgs.follows = "nixpkgs";
};
2023-07-04 08:53:01 +00:00
nixos-cn = {
url = "github:nixos-cn/flakes";
inputs.nixpkgs.follows = "nixpkgs";
};
2023-07-04 08:53:01 +00:00
};
2023-07-04 08:53:01 +00:00
outputs = { self, nixpkgs, home-manager, nixos-cn, impermanence, ... }: {
nixosConfigurations.gpd = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
2023-07-04 08:53:01 +00:00
specialArgs = {
pkgs = import nixpkgs {
system = system;
config.allowUnfree = true;
overlays = [
(self: super: {
waybar = super.waybar.overrideAttrs (oldAttrs: {
# enable hyprland support
mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ];
});
2023-07-20 10:16:18 +00:00
vaapiIntel = super.vaapiIntel.overrideAttrs (oldAttrs: {
enableHybridCodec = true;
});
2023-07-04 08:53:01 +00:00
})
];
};
2023-07-04 08:53:01 +00:00
cn-pkgs = import nixos-cn {
system = system;
config.allowUnfree = true;
};
};
2023-07-04 08:53:01 +00:00
modules = [
./configuration.nix
impermanence.nixosModules.impermanence
nixos-cn.nixosModules.nixos-cn-registries
nixos-cn.nixosModules.nixos-cn
2023-07-04 08:53:01 +00:00
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users = import ./home;
}
];
};
2023-07-04 08:53:01 +00:00
};
}