Initial commit
This commit is contained in:
65
modules/hosts/polaris/default.nix
Normal file
65
modules/hosts/polaris/default.nix
Normal file
@@ -0,0 +1,65 @@
|
||||
{ inputs, lux, ... }:
|
||||
{
|
||||
den.aspects.polaris = {
|
||||
includes = [ lux.bundles._.local-session ];
|
||||
|
||||
provides.kiri = {
|
||||
includes = with lux; [
|
||||
bitwarden
|
||||
email
|
||||
pim
|
||||
mpv
|
||||
sops-password
|
||||
steam
|
||||
];
|
||||
};
|
||||
|
||||
nixos =
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = with inputs.nixos-hardware.nixosModules; [
|
||||
common-pc
|
||||
common-pc-ssd
|
||||
common-cpu-amd
|
||||
common-gpu-amd
|
||||
];
|
||||
|
||||
services.hardware.openrgb.enable = true;
|
||||
|
||||
boot = {
|
||||
loader = {
|
||||
efi.canTouchEfiVariables = true;
|
||||
systemd-boot = {
|
||||
enable = true;
|
||||
consoleMode = "auto";
|
||||
configurationLimit = 5;
|
||||
|
||||
# Convert boot entry to a more readable name.
|
||||
extraInstallCommands = ''
|
||||
ENTRIES="${config.boot.loader.efi.efiSysMountPoint}/loader/entries"
|
||||
PROFILES="/nix/var/nix/profiles"
|
||||
|
||||
for file in "$ENTRIES"/nixos-generation-*.conf; do
|
||||
generation=$(${pkgs.coreutils}/bin/basename "$file" | ${pkgs.gnugrep}/bin/grep -o -E '[0-9]+')
|
||||
timestamp=$(${pkgs.coreutils}/bin/stat -c %y "$PROFILES/system-$generation-link" 2>/dev/null | ${pkgs.coreutils}/bin/cut -d. -f1)
|
||||
|
||||
if [ -z "$timestamp" ]; then
|
||||
timestamp="Unknown Date"
|
||||
fi
|
||||
|
||||
${pkgs.gnused}/bin/sed -i "s/^version .*/version Generation $generation - $timestamp/" "$file"
|
||||
done
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
tmp.cleanOnBoot = true;
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
50
modules/hosts/polaris/hardware.nix
Normal file
50
modules/hosts/polaris/hardware.nix
Normal file
@@ -0,0 +1,50 @@
|
||||
{
|
||||
den.aspects.polaris = {
|
||||
nixos =
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [
|
||||
"nvme"
|
||||
"xhci_pci"
|
||||
"ahci"
|
||||
"usbhid"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/bda7f8b9-2b3d-4190-8518-baa50490227e";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/26FE-CA37";
|
||||
fsType = "vfat";
|
||||
options = [
|
||||
"fmask=0077"
|
||||
"dmask=0077"
|
||||
];
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user