add chn-nixos-test

This commit is contained in:
2023-06-13 21:23:33 +08:00
parent 8d88cd19b6
commit 8b1377bedd
9 changed files with 80 additions and 17 deletions

View File

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

View File

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

View File

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

View File

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

View 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" ];
};
};
}

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

View File

@@ -0,0 +1 @@
{ config.nix.settings.system-features = [ "gccarch-alderlake" ]; }

View File

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

View File