added initial config for mandarin

This commit is contained in:
Aly Raffauf 2024-06-14 14:05:59 -04:00
parent d819e646a0
commit 143b4fb588
5 changed files with 193 additions and 0 deletions

View file

@ -92,6 +92,7 @@
inputs.nixpkgs.lib.genAttrs [
"fallarbor"
"lavaridge"
"mandarin"
"mauville"
"petalburg"
"rustboro"

View file

@ -0,0 +1,68 @@
# Custom Desktop with Ryzen CPU and Nvidia GPU.
{
config,
inputs,
lib,
pkgs,
self,
...
}: {
imports = [
./disko.nix
./hardware.nix
./home.nix
];
boot = {
# Bootloader.
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
};
networking.hostName = "mandarin";
alyraffauf = {
base = {
enable = true;
plymouth.enable = true;
zramSwap = {enable = true;};
};
users = {
aly = {
enable = true;
password = "$y$j9T$NSS7QcEtN4yiigPyofwlI/$nxdgz0lpySa0heDMjGlHe1gX3BWf48jK6Tkfg4xMEs6";
};
morgan = {
enable = true;
password = "$y$j9T$frYXYFwo4KuPWEqilfPCN1$CtRMMK4HFLKu90qkv1cCkvp1UdJocUbkySQlVElwkM2";
};
};
desktop = {
enable = true;
greetd = {
enable = true;
session = lib.getExe config.programs.hyprland.package;
autologin = {
enable = true;
user = "morgan";
};
};
hyprland.enable = true;
};
apps = {
steam.enable = true;
podman.enable = true;
virt-manager.enable = true;
};
scripts = {
hoenn.enable = true;
};
services = {
tailscale.enable = true;
};
};
system.stateVersion = "24.05";
}

59
hosts/mandarin/disko.nix Normal file
View file

@ -0,0 +1,59 @@
{inputs, ...}: {
imports = [
inputs.disko.nixosModules.disko
];
disko.devices = {
disk = {
vdb = {
type = "disk";
device = "/dev/nvme0n1";
content = {
type = "gpt";
partitions = {
ESP = {
size = "1024M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [
"umask=0077"
];
};
};
luks = {
size = "100%";
content = {
type = "luks";
name = "crypted";
content = {
type = "btrfs";
extraArgs = ["-f"];
subvolumes = {
"/root" = {
mountpoint = "/";
mountOptions = ["compress=zstd" "noatime"];
};
"persist" = {
mountpoint = "/persist";
mountOptions = ["compress=zstd" "noatime"];
};
"/home" = {
mountpoint = "/home";
mountOptions = ["compress=zstd" "noatime"];
};
"/nix" = {
mountpoint = "/nix";
mountOptions = ["compress=zstd" "noatime"];
};
};
};
};
};
};
};
};
};
};
}

View file

@ -0,0 +1,43 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{
config,
inputs,
lib,
modulesPath,
pkgs,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot = {
initrd = {
availableKernelModules = ["nvme" "xhci_pci" "thunderbolt" "usb_storage" "sd_mod"];
kernelModules = [];
};
kernelModules = ["kvm-amd"];
};
hardware = {
nvidia = {
# Modesetting is required.
modesetting.enable = true;
nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.stable;
};
opengl = {
driSupport = true;
driSupport32Bit = true;
};
};
services.xserver.videoDrivers = ["nvidia"];
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
}

22
hosts/mandarin/home.nix Normal file
View file

@ -0,0 +1,22 @@
{
config,
inputs,
lib,
pkgs,
...
}: {
home-manager = {
sharedModules = [
{
alyraffauf = {
desktop = {
hyprland.autoSuspend = false;
sway.autoSuspend = false;
};
};
}
];
users.aly = import ../../homes/aly.nix;
users.morgan = import ../../homes/morgan.nix;
};
}