mirror of
https://github.com/CHN-beta/nixos.git
synced 2026-01-12 01:29:24 +08:00
modules.system.kernel: remove cachyos kernel
This commit is contained in:
@@ -23,7 +23,6 @@ inputs:
|
||||
nixpkgs.march = "znver2";
|
||||
initrd.sshd = {};
|
||||
networking = {};
|
||||
# do not use cachyos kernel, beesd + cachyos kernel + heavy io = system freeze, not sure why
|
||||
};
|
||||
services =
|
||||
{
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
* 完善 slurm 文档,调整 slurm 设置:内存,nice
|
||||
* 调整 sbatch-tui 选项
|
||||
* 打包 cachyos
|
||||
* 打包 intel 编译器
|
||||
* 切换到 niri,清理 plasma
|
||||
* 调整其它用户的 zsh 配置
|
||||
|
||||
16
flake.lock
generated
16
flake.lock
generated
@@ -38,21 +38,6 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"cachyos-lts": {
|
||||
"locked": {
|
||||
"lastModified": 1743535541,
|
||||
"narHash": "sha256-OlBtXY26w9OcAmpqrTvxaG4/rfDdavauQF2eRxb+ySs=",
|
||||
"owner": "drakon64",
|
||||
"repo": "nixos-cachyos-kernel",
|
||||
"rev": "8516d89c4e0c4a25cea1be8431db3963359ee81b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "drakon64",
|
||||
"repo": "nixos-cachyos-kernel",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"catppuccin": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
@@ -824,7 +809,6 @@
|
||||
"inputs": {
|
||||
"blog": "blog",
|
||||
"bscpkgs": "bscpkgs",
|
||||
"cachyos-lts": "cachyos-lts",
|
||||
"catppuccin": "catppuccin",
|
||||
"concurrencpp": "concurrencpp",
|
||||
"cppcoro": "cppcoro",
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
};
|
||||
catppuccin = { url = "github:catppuccin/nix"; inputs.nixpkgs.follows = "nixpkgs"; };
|
||||
bscpkgs = { url = "github:CHN-beta/bscpkgs"; inputs.nixpkgs.follows = "nixpkgs"; };
|
||||
cachyos-lts.url = "github:drakon64/nixos-cachyos-kernel";
|
||||
nixvirt = { url = "github:CHN-beta/NixVirt"; inputs.nixpkgs.follows = "nixpkgs"; };
|
||||
|
||||
misskey = { url = "git+https://github.com/CHN-beta/misskey?submodules=1"; flake = false; };
|
||||
|
||||
@@ -4,74 +4,64 @@ inputs:
|
||||
{
|
||||
variant = mkOption
|
||||
{
|
||||
type = types.nullOr (types.enum [ "nixos" "xanmod-lts" "xanmod-latest" "cachyos" "cachyos-lts" ]);
|
||||
type = types.nullOr (types.enum [ "nixos" "xanmod-lts" "xanmod-latest" ]);
|
||||
default = "xanmod-lts";
|
||||
};
|
||||
patches = mkOption { type = types.listOf types.nonEmptyStr; default = []; };
|
||||
modules.modprobeConfig = mkOption { type = types.listOf types.str; default = []; };
|
||||
};
|
||||
config = let inherit (inputs.config.nixos.system) kernel; in inputs.lib.mkMerge
|
||||
[
|
||||
config = let inherit (inputs.config.nixos.system) kernel; in
|
||||
{
|
||||
boot =
|
||||
{
|
||||
boot =
|
||||
kernelModules = [ "br_netfilter" ];
|
||||
# modprobe --show-depends
|
||||
initrd.availableKernelModules =
|
||||
[
|
||||
"bfq" "failover" "net_failover" "nls_cp437" "nls_iso8859-1" "sd_mod"
|
||||
"sr_mod" "usbcore" "usbhid" "usbip-core" "usb-common" "usb_storage" "vhci-hcd" "virtio" "virtio_blk"
|
||||
"virtio_net" "virtio_ring" "virtio_scsi" "cryptd" "libaes"
|
||||
"ahci" "ata_piix" "nvme" "sdhci_acpi" "virtio_pci" "xhci_pci"
|
||||
# networking for nas
|
||||
"igb"
|
||||
# disk for srv1
|
||||
"megaraid_sas"
|
||||
# disks for cluster
|
||||
"nfs" "nfsv4"
|
||||
# netowrk for srv1
|
||||
"bnx2x" "tg3"
|
||||
# network for srv2
|
||||
"e1000e" "igb" "atlantic" "igc"
|
||||
# temp wireless for nas
|
||||
"r8712u"
|
||||
# network for srv3
|
||||
"igb"
|
||||
# touchscreen for one
|
||||
"pinctrl-tigerlake"
|
||||
]
|
||||
++ (inputs.lib.optionals (kernel.variant != "nixos") [ "crypto_simd" ]);
|
||||
extraModulePackages = with inputs.config.boot.kernelPackages; [ v4l2loopback zenpower ];
|
||||
extraModprobeConfig = builtins.concatStringsSep "\n" kernel.modules.modprobeConfig;
|
||||
kernelParams = [ "delayacct" ];
|
||||
kernelPackages = inputs.lib.mkIf (kernel.variant != null)
|
||||
{
|
||||
kernelModules = [ "br_netfilter" ];
|
||||
# modprobe --show-depends
|
||||
initrd.availableKernelModules =
|
||||
[
|
||||
"bfq" "failover" "net_failover" "nls_cp437" "nls_iso8859-1" "sd_mod"
|
||||
"sr_mod" "usbcore" "usbhid" "usbip-core" "usb-common" "usb_storage" "vhci-hcd" "virtio" "virtio_blk"
|
||||
"virtio_net" "virtio_ring" "virtio_scsi" "cryptd" "libaes"
|
||||
"ahci" "ata_piix" "nvme" "sdhci_acpi" "virtio_pci" "xhci_pci"
|
||||
# networking for nas
|
||||
"igb"
|
||||
# disk for srv1
|
||||
"megaraid_sas"
|
||||
# disks for cluster
|
||||
"nfs" "nfsv4"
|
||||
# netowrk for srv1
|
||||
"bnx2x" "tg3"
|
||||
# network for srv2
|
||||
"e1000e" "igb" "atlantic" "igc"
|
||||
# temp wireless for nas
|
||||
"r8712u"
|
||||
# network for srv3
|
||||
"igb"
|
||||
# touchscreen for one
|
||||
"pinctrl-tigerlake"
|
||||
]
|
||||
++ (inputs.lib.optionals (kernel.variant != "nixos") [ "crypto_simd" ]);
|
||||
extraModulePackages = with inputs.config.boot.kernelPackages; [ v4l2loopback zenpower ];
|
||||
extraModprobeConfig = builtins.concatStringsSep "\n" kernel.modules.modprobeConfig;
|
||||
kernelParams = [ "delayacct" ];
|
||||
kernelPackages = inputs.lib.mkIf (kernel.variant != null)
|
||||
{
|
||||
nixos = inputs.pkgs.linuxPackages;
|
||||
xanmod-lts = inputs.pkgs.linuxPackages_xanmod;
|
||||
xanmod-latest = inputs.pkgs.linuxPackages_xanmod_latest;
|
||||
cachyos = inputs.pkgs.linuxPackages_cachyos;
|
||||
# TODO: package cachyos-lts
|
||||
cachyos-lts = inputs.pkgs.linuxPackages_cachyos_lts;
|
||||
}.${kernel.variant};
|
||||
kernelPatches =
|
||||
let
|
||||
patches =
|
||||
{
|
||||
hibernate-progress =
|
||||
[{
|
||||
name = "hibernate-progress";
|
||||
patch =
|
||||
let version = inputs.lib.versions.majorMinor inputs.config.boot.kernelPackages.kernel.version;
|
||||
in ./hibernate-progress-${version}.patch;
|
||||
}];
|
||||
};
|
||||
in builtins.concatLists (builtins.map (name: patches.${name}) kernel.patches);
|
||||
};
|
||||
}
|
||||
# enable scx when using cachyos
|
||||
(
|
||||
inputs.lib.mkIf (builtins.elem kernel.variant [ "cachyos" "cachyos-lts" ])
|
||||
{ services.scx = { enable = true; scheduler = "scx_rustland"; }; }
|
||||
)
|
||||
];
|
||||
nixos = inputs.pkgs.linuxPackages;
|
||||
xanmod-lts = inputs.pkgs.linuxPackages_xanmod;
|
||||
xanmod-latest = inputs.pkgs.linuxPackages_xanmod_latest;
|
||||
}.${kernel.variant};
|
||||
kernelPatches =
|
||||
let
|
||||
patches =
|
||||
{
|
||||
hibernate-progress =
|
||||
[{
|
||||
name = "hibernate-progress";
|
||||
patch =
|
||||
let version = inputs.lib.versions.majorMinor inputs.config.boot.kernelPackages.kernel.version;
|
||||
in ./hibernate-progress-${version}.patch;
|
||||
}];
|
||||
};
|
||||
in builtins.concatLists (builtins.map (name: patches.${name}) kernel.patches);
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -39,8 +39,6 @@ in platformConfig //
|
||||
{
|
||||
inherit (inputs.topInputs.nix-vscode-extensions.overlays.default final prev) nix-vscode-extensions;
|
||||
firefox-addons = (import "${inputs.topInputs.rycee}" { inherit (prev) pkgs; }).firefox-addons;
|
||||
linuxPackages_cachyos_lts =
|
||||
final.linuxPackagesFor (inputs.topInputs.cachyos-lts.overlays.default final prev).linuxPackages_cachyos;
|
||||
})
|
||||
inputs.topInputs.self.overlays.default
|
||||
(final: prev:
|
||||
|
||||
Reference in New Issue
Block a user