mirror of
https://github.com/TheWanderingCrow/CrOS.git
synced 2026-01-10 17:34:05 -05:00
add natsirt host
This commit is contained in:
parent
0707dd7f72
commit
ac44d78860
4 changed files with 192 additions and 0 deletions
5
home/natsirt/Natsirt.nix
Normal file
5
home/natsirt/Natsirt.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{...}: {
|
||||
imports = [
|
||||
common/core
|
||||
];
|
||||
}
|
||||
36
home/natsirt/common/core/default.nix
Normal file
36
home/natsirt/common/core/default.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
hostSpec,
|
||||
...
|
||||
}: let
|
||||
platform =
|
||||
if hostSpec.isDarwin
|
||||
then "darwin"
|
||||
else "nixos";
|
||||
in {
|
||||
imports = lib.flatten [
|
||||
(map lib.custom.relativeToRoot [
|
||||
"modules/common/host-spec.nix"
|
||||
#"modules/home"
|
||||
])
|
||||
#./${platform.nix}
|
||||
];
|
||||
|
||||
inherit hostSpec;
|
||||
|
||||
home = {
|
||||
username = lib.mkDefault config.hostSpec.username;
|
||||
homeDirectory = lib.mkDefault config.hostSpec.home;
|
||||
stateVersion = lib.mkDefault "24.05";
|
||||
|
||||
sessionVariables = {
|
||||
SHELL = "zsh";
|
||||
TERM = "konsole";
|
||||
TERMINAL = "konsole";
|
||||
VISUAL = "nvim";
|
||||
EDITOR = "nvim";
|
||||
};
|
||||
};
|
||||
}
|
||||
98
hosts/nixos/Natsirt/default.nix
Normal file
98
hosts/nixos/Natsirt/default.nix
Normal file
|
|
@ -0,0 +1,98 @@
|
|||
#####################
|
||||
# #
|
||||
# Natsirt - Desktop #
|
||||
# #
|
||||
#####################
|
||||
{
|
||||
inputs,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = lib.flatten [
|
||||
# Hardware
|
||||
./hardware-configuration.nix # I want to use factor if possible
|
||||
|
||||
#FIXME: This will require a reinstall so probably hold off on this for now
|
||||
# Disks
|
||||
#inputs.disko.nixosModules.disko
|
||||
#(lib.custom.relativeToRoot "hosts/common/disks/btrfs-disk.nix")
|
||||
#{
|
||||
# _module.args = {
|
||||
# #FIXME: pretty sure this is an ssd
|
||||
# disk = "/dev/nvme0n1";
|
||||
# withSwap = true;
|
||||
# swapSize = 8;
|
||||
# };
|
||||
#}
|
||||
|
||||
# Misc
|
||||
|
||||
(map lib.custom.relativeToRoot [
|
||||
# Required configs
|
||||
"hosts/common/core"
|
||||
|
||||
# Optional configs
|
||||
"hosts/common/optional/audio.nix"
|
||||
"hosts/common/optional/bluetooth.nix"
|
||||
"hosts/common/optional/gaming.nix"
|
||||
])
|
||||
];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
|
||||
hostSpec = {
|
||||
username = lib.mkForce "natsirt";
|
||||
handle = lib.mkForce "natsirt";
|
||||
hostName = "Natsirt";
|
||||
persistFolder = "/persist";
|
||||
};
|
||||
|
||||
networking = {
|
||||
networkmanager.enable = true;
|
||||
enableIPv6 = false;
|
||||
};
|
||||
|
||||
boot.loader = {
|
||||
systemd-boot.enable = true;
|
||||
efi = {
|
||||
canTouchEfiVariables = true;
|
||||
};
|
||||
};
|
||||
|
||||
# FIXME(todo): convert this into a desktop module
|
||||
# Enable the X11 windowing system.
|
||||
# You can disable this if you're only using the Wayland session.
|
||||
services.xserver.enable = true;
|
||||
|
||||
# Enable the KDE Plasma Desktop Environment.
|
||||
services.displayManager.sddm.enable = true;
|
||||
services.desktopManager.plasma6.enable = true;
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver.xkb = {
|
||||
layout = "us";
|
||||
variant = "";
|
||||
};
|
||||
|
||||
services.cups.enable = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
wine
|
||||
krita
|
||||
appimage-run
|
||||
nix-ld
|
||||
(retroarch.override {
|
||||
cores = with libretro; [
|
||||
nestopia
|
||||
dolphin
|
||||
citra
|
||||
bsnes
|
||||
parallel-n64
|
||||
pcsx2
|
||||
pcsx-rearmed
|
||||
];
|
||||
})
|
||||
supermariowar
|
||||
];
|
||||
}
|
||||
53
hosts/nixos/Natsirt/hardware-configuration.nix
Normal file
53
hosts/nixos/Natsirt/hardware-configuration.nix
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
# 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,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod"];
|
||||
boot.initrd.kernelModules = ["amdgpu"];
|
||||
boot.kernelModules = ["kvm-amd"];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/b1a6e175-8510-47d1-94b1-db74d050fe05";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/8082-C66D";
|
||||
fsType = "vfat";
|
||||
options = ["fmask=0077" "dmask=0077"];
|
||||
};
|
||||
|
||||
swapDevices = [];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp4s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
hardware.amdgpu = {
|
||||
initrd.enable = true;
|
||||
legacySupport.enable = true;
|
||||
opencl.enable = true;
|
||||
amdvlk = {
|
||||
enable = true;
|
||||
supportExperimental.enable = true;
|
||||
support32Bit.enable = true;
|
||||
};
|
||||
};
|
||||
hardware.graphics.enable32Bit = true;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue