Compare commits

...

11 Commits

Author SHA1 Message Date
chn
48f450bfe3 surface: add lantian patch 2024-01-17 14:31:09 +08:00
chn
7e4fe4837f surface: fix kernel 2024-01-17 14:27:55 +08:00
chn
13edf20710 use nixos-hardware from CHN-beta 2024-01-17 14:07:22 +08:00
chn
556a8d68fc surface: add config from nixos-hardware 2024-01-17 13:21:43 +08:00
chn
2e9972a8cd pc: enable waydroid 2024-01-17 12:16:03 +08:00
chn
30397a8443 pc: fix nvidia 2024-01-17 11:36:24 +08:00
chn
1fcecbb74d pc: disable waydroid 2024-01-17 09:38:55 +08:00
chn
d80d009e3a pc: enable virtualbox 2024-01-16 23:33:30 +08:00
chn
a9e0a57791 Revert "pc: enable anbox"
This reverts commit 17430b943e.
2024-01-16 23:15:57 +08:00
chn
17430b943e pc: enable anbox 2024-01-16 23:12:11 +08:00
chn
7e8bd6f959 pc: enable colord 2024-01-16 22:45:18 +08:00
4 changed files with 41 additions and 3 deletions

View File

@@ -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;
};
}

View File

@@ -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
View File

@@ -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",

View File

@@ -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: