mirror of
https://github.com/CHN-beta/nixos.git
synced 2026-01-12 01:09:24 +08:00
add chn-nixos-test
This commit is contained in:
33
flake.nix
33
flake.nix
@@ -67,9 +67,9 @@
|
||||
};
|
||||
};
|
||||
|
||||
outputs = inputs:
|
||||
outputs = inputs: { nixosConfigurations =
|
||||
{
|
||||
nixosConfigurations."chn-PC" = inputs.nixpkgs.lib.nixosSystem
|
||||
"chn-PC" = inputs.nixpkgs.lib.nixosSystem
|
||||
{
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { inherit inputs; };
|
||||
@@ -122,5 +122,32 @@
|
||||
./modules/home/chn.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
"chn-nixos-test" = inputs.nixpkgs.lib.nixosSystem
|
||||
{
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { inherit inputs; };
|
||||
modules =
|
||||
[
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
inputs.nix-index-database.nixosModules.nix-index
|
||||
( import ./modules/basic.nix { hostName = "chn-nixos-test"; })
|
||||
( import ./modules/i18n.nix { fcitx = false; } )
|
||||
./modules/sops.nix
|
||||
( import ./modules/boot/basic.nix { efi = true; timeout = 30; })
|
||||
./modules/boot/chn-nixos-test.nix
|
||||
./modules/filesystem/chn-nixos-test.nix
|
||||
./modules/hardware/chn-nixos-test.nix
|
||||
./modules/networking/basic.nix
|
||||
./modules/networking/ssh.nix
|
||||
./modules/packages/terminal.nix
|
||||
./modules/users/root.nix
|
||||
./modules/users/chn.nix
|
||||
./modules/virtualisation/kvm_guest.nix
|
||||
./modules/home/root.nix
|
||||
./modules/home/chn.nix
|
||||
];
|
||||
};
|
||||
}; };
|
||||
}
|
||||
|
||||
@@ -26,6 +26,5 @@
|
||||
services.nix-daemon.serviceConfig.Slice = "-.slice";
|
||||
};
|
||||
programs.nix-ld.enable = true;
|
||||
environment.systemPackages = [ inputs.inputs.nix-alien.packages.x86_64-linux.nix-alien ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -11,18 +11,6 @@
|
||||
efi.canTouchEfiVariables = efi;
|
||||
};
|
||||
initrd.systemd.enable = true;
|
||||
kernelPackages = ( inputs.inputs.nixpkgs.lib.nixosSystem
|
||||
{
|
||||
system = "x86_64-linux";
|
||||
modules =
|
||||
[{
|
||||
nixpkgs =
|
||||
{
|
||||
hostPlatform = { system = "x86_64-linux"; gcc = { arch = "alderlake"; tune = "alderlake"; }; };
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
}];
|
||||
} ).pkgs.linuxPackages_xanmod_latest;
|
||||
};
|
||||
hardware.enableAllFirmware = true;
|
||||
};
|
||||
|
||||
@@ -4,6 +4,18 @@ inputs:
|
||||
{
|
||||
boot =
|
||||
{
|
||||
kernelPackages = ( inputs.inputs.nixpkgs.lib.nixosSystem
|
||||
{
|
||||
system = "x86_64-linux";
|
||||
modules =
|
||||
[{
|
||||
nixpkgs =
|
||||
{
|
||||
hostPlatform = { system = "x86_64-linux"; gcc = { arch = "alderlake"; tune = "alderlake"; }; };
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
}];
|
||||
} ).pkgs.linuxPackages_xanmod_latest;
|
||||
initrd.availableKernelModules =
|
||||
[
|
||||
"ahci" "i915" "intel_cstate" "nvidia" "nvidia_drm" "nvidia_modeset" "nvidia_uvm" "nvme" "sr_mod"
|
||||
|
||||
11
modules/boot/chn-nixos-test.nix
Normal file
11
modules/boot/chn-nixos-test.nix
Normal file
@@ -0,0 +1,11 @@
|
||||
{ pkgs, ... }@inputs:
|
||||
{
|
||||
config =
|
||||
{
|
||||
boot =
|
||||
{
|
||||
kernelPackages = inputs.pkgs.linuxPackages_xanmod_latest;
|
||||
initrd.availableKernelModules = [ "ahci" "sr_mod" "usb_storage" "virtio_blk" "virtio_pci" "xhci_pci" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
25
modules/filesystem/chn-nixos-test.nix
Normal file
25
modules/filesystem/chn-nixos-test.nix
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
config =
|
||||
{
|
||||
fileSystems =
|
||||
{
|
||||
"/" =
|
||||
{
|
||||
device = "/dev/mapper/root";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@root,compress-force=zstd:15" ];
|
||||
};
|
||||
"/boot" =
|
||||
{
|
||||
device = "/dev/disk/by-uuid/18C6-B1F4";
|
||||
fsType = "vfat";
|
||||
};
|
||||
};
|
||||
boot.initrd.luks.devices.root =
|
||||
{
|
||||
device = "/dev/disk/by-partuuid/4f419ebd-2b49-4959-aa5f-46cfdd0cfc3e";
|
||||
header = "/dev/disk/by-partuuid/b0255c40-fd3c-4c95-9af7-4d64ad2e450f";
|
||||
allowDiscards = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
1
modules/hardware/chn-nixos-test.nix
Normal file
1
modules/hardware/chn-nixos-test.nix
Normal file
@@ -0,0 +1 @@
|
||||
{ config.nix.settings.system-features = [ "gccarch-alderlake" ]; }
|
||||
@@ -10,7 +10,7 @@
|
||||
vim nano
|
||||
wget aria2 curl yt-dlp
|
||||
tree git autojump exa
|
||||
nix-output-monitor
|
||||
nix-output-monitor inputs.inputs.nix-alien.packages.x86_64-linux.nix-alien
|
||||
apacheHttpd certbot-full
|
||||
pigz rar unrar upx unzip zip
|
||||
util-linux snapper
|
||||
|
||||
0
secrets/chn-nixos-test.yaml
Normal file
0
secrets/chn-nixos-test.yaml
Normal file
Reference in New Issue
Block a user