mirror of
https://github.com/CHN-beta/nixos.git
synced 2026-01-11 14:49:23 +08:00
Compare commits
11 Commits
a624e98514
...
48f450bfe3
| Author | SHA1 | Date | |
|---|---|---|---|
| 48f450bfe3 | |||
| 7e4fe4837f | |||
| 13edf20710 | |||
| 556a8d68fc | |||
| 2e9972a8cd | |||
| 30397a8443 | |||
| 1fcecbb74d | |||
| d80d009e3a | |||
| a9e0a57791 | |||
| 17430b943e | |||
| 7e8bd6f959 |
@@ -75,7 +75,6 @@ inputs:
|
||||
waydroid.enable = true;
|
||||
docker.enable = true;
|
||||
kvmHost = { enable = true; gui = true; autoSuspend = [ "win10" "hardconnect" ]; };
|
||||
# kvmGuest.enable = true;
|
||||
nspawn = [ "arch" "ubuntu-22.04" "fedora" ];
|
||||
};
|
||||
services =
|
||||
@@ -137,7 +136,10 @@ inputs:
|
||||
wireguardIp = "192.168.83.3";
|
||||
};
|
||||
};
|
||||
bugs = [ "xmunet" "suspend-hibernate-waydroid" "backlight" "amdpstate" ];
|
||||
bugs = [ "xmunet" "backlight" "amdpstate" ];
|
||||
};
|
||||
services.colord.enable = true;
|
||||
virtualisation.virtualbox.host = { enable = true; enableExtensionPack = true; };
|
||||
hardware.nvidia.forceFullCompositionPipeline = true;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
inputs:
|
||||
{
|
||||
imports = inputs.localLib.mkModules [ inputs.topInputs.nixos-hardware.nixosModules.microsoft-surface-pro-intel ];
|
||||
config =
|
||||
{
|
||||
nixos =
|
||||
@@ -25,7 +26,7 @@ inputs:
|
||||
nixpkgs.march = "skylake";
|
||||
grub.installDevice = "efi";
|
||||
nix.substituters = [ "https://cache.nixos.org/" "https://nix-store.chn.moe" ];
|
||||
kernel.patches = [ "cjktty" ];
|
||||
kernel.patches = [ "cjktty" "lantian" ];
|
||||
impermanence.enable = true;
|
||||
networking.hostname = "surface";
|
||||
};
|
||||
@@ -56,5 +57,23 @@ inputs:
|
||||
};
|
||||
bugs = [ "xmunet" ];
|
||||
};
|
||||
# apply patches from nixos-hardware
|
||||
boot.kernelPatches = builtins.map
|
||||
(patch:
|
||||
{ inherit (patch) name patch; }
|
||||
// (if patch ? structuredExtraConfig then { extraStructuredConfig = patch.structuredExtraConfig; } else {}))
|
||||
(
|
||||
let
|
||||
version = inputs.config.boot.kernelPackages.kernel.version;
|
||||
majorVersion =
|
||||
let versionArray = builtins.splitVersion version;
|
||||
in "${builtins.elemAt versionArray 0}.${builtins.elemAt versionArray 1}";
|
||||
repoFile = "${inputs.topInputs.nixos-hardware}/microsoft/surface/common/kernel/linux-package.nix";
|
||||
inherit (inputs.pkgs.callPackage repoFile {}) repos;
|
||||
patchDir = repos.linux-surface + "/patches/${majorVersion}";
|
||||
patchFile = "${inputs.topInputs.nixos-hardware}/microsoft/surface/common/kernel/linux-6.6.x/patches.nix";
|
||||
in
|
||||
inputs.pkgs.callPackage patchFile { inherit (inputs.lib) kernel; inherit version patchDir; }
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
16
flake.lock
generated
16
flake.lock
generated
@@ -1095,6 +1095,21 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixos-hardware": {
|
||||
"locked": {
|
||||
"lastModified": 1705471591,
|
||||
"narHash": "sha256-JtZs5xMoRGLCoVxXmyHlWU1E3PgKdyJHWwlodJqdWE0=",
|
||||
"owner": "CHN-beta",
|
||||
"repo": "nixos-hardware",
|
||||
"rev": "f6cda6e1c3820da60777ef392eff64dedca8f15d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "CHN-beta",
|
||||
"repo": "nixos-hardware",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixos-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1704420045,
|
||||
@@ -1594,6 +1609,7 @@
|
||||
"nix-vscode-extensions": "nix-vscode-extensions",
|
||||
"nixd": "nixd",
|
||||
"nixos-cn": "nixos-cn",
|
||||
"nixos-hardware": "nixos-hardware",
|
||||
"nixpak": "nixpak",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"nixpkgs-2305": "nixpkgs-2305",
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
};
|
||||
nix-doom-emacs = { url = "github:nix-community/nix-doom-emacs"; inputs.nixpkgs.follows = "nixpkgs"; };
|
||||
nur-linyinfeng = { url = "github:linyinfeng/nur-packages"; inputs.nixpkgs.follows = "nixpkgs"; };
|
||||
nixos-hardware.url = "github:CHN-beta/nixos-hardware";
|
||||
};
|
||||
|
||||
outputs = inputs:
|
||||
|
||||
Reference in New Issue
Block a user