initial commit
This commit is contained in:
107
hosts/nixos/Bellerophon/default.nix
Normal file
107
hosts/nixos/Bellerophon/default.nix
Normal file
@@ -0,0 +1,107 @@
|
||||
# This is an example nixos hosts module.
|
||||
# They will automatically be imported below.
|
||||
|
||||
#############################################################
|
||||
#
|
||||
# Bellerophon - Example Desktop
|
||||
#
|
||||
###############################################################
|
||||
|
||||
{
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = lib.flatten [
|
||||
#
|
||||
# ========== Hardware ==========
|
||||
#
|
||||
inputs.nixos-hardware.nixosModules.common-cpu-intel
|
||||
inputs.nixos-hardware.nixosModules.common-hidpi
|
||||
inputs.nixos-hardware.nixosModules.common-pc-laptop
|
||||
inputs.nixos-hardware.nixosModules.common-pc-laptop-ssd
|
||||
|
||||
./hardware-configuration.nix
|
||||
|
||||
#
|
||||
# ========== Disk Layout ==========
|
||||
#
|
||||
inputs.disko.nixosModules.disko
|
||||
# FIXME(starter): modify with the disko spec file you want to use.
|
||||
(lib.custom.relativeToRoot "hosts/common/disks/luks-btrfs-disk.nix")
|
||||
# FIXME(starter): modify the options below to inform disko of the host's disk path and swap requirements.
|
||||
# IMPORTANT: nix-config-starter assumes a single disk per host. If you require more disks, you
|
||||
# must modify or create new dikso specs.
|
||||
{
|
||||
_module.args = {
|
||||
disk = "/dev/nvme0n1";
|
||||
withSwap = true;
|
||||
swapSize = "64";
|
||||
};
|
||||
}
|
||||
|
||||
(map lib.custom.relativeToRoot [
|
||||
#
|
||||
# ========== Required Configs ==========
|
||||
#
|
||||
"hosts/common/core"
|
||||
|
||||
#
|
||||
# ========== Non-Primary Users to Create ==========
|
||||
#
|
||||
# FIXME(starter): the primary user, defined in `nix-config/hosts/common/users`, is added by default, via
|
||||
# `hosts/common/core` above.
|
||||
# To create additional users, specify the path to their config file, as shown in the commented line below, and create/modify
|
||||
# the specified file as required. See `nix-config/hosts/common/users/exampleSecondUser` for more info.
|
||||
|
||||
#"hosts/common/users/exampleSecondUser"
|
||||
|
||||
#
|
||||
# ========== Optional Configs ==========
|
||||
#
|
||||
# FIXME(starter): add or remove any optional host-level configuration files the host will use
|
||||
# The following are for example sake only and are not necessarily required.
|
||||
"hosts/common/optional/services/openssh.nix" # allow remote SSH access
|
||||
"hosts/common/optional/audio.nix" # pipewire and cli controls
|
||||
"hosts/common/optional/kde.nix"
|
||||
"hosts/common/optional/sddm.nix"
|
||||
])
|
||||
];
|
||||
|
||||
#
|
||||
# ========== Host Specification ==========
|
||||
#
|
||||
|
||||
# FIXME(starter): declare any host-specific hostSpec options. Note that hostSpec options pertaining to
|
||||
# more than one host can be declared in `nix-config/hosts/common/core/` see the default.nix file there
|
||||
# for examples.
|
||||
hostSpec = {
|
||||
hostName = "Bellerophon";
|
||||
};
|
||||
|
||||
networking = {
|
||||
networkmanager.enable = true;
|
||||
enableIPv6 = false;
|
||||
};
|
||||
|
||||
boot.loader = {
|
||||
systemd-boot = {
|
||||
enable = true;
|
||||
# When using plymouth, initrd can expand by a lot each time, so limit how many we keep around
|
||||
configurationLimit = lib.mkDefault 10;
|
||||
};
|
||||
efi.canTouchEfiVariables = true;
|
||||
timeout = 3;
|
||||
};
|
||||
|
||||
boot.initrd = {
|
||||
systemd.enable = true;
|
||||
};
|
||||
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
};
|
||||
# https://wiki.nixos.org/wiki/FAQ/When_do_I_update_stateVersion
|
||||
system.stateVersion = "24.11";
|
||||
}
|
||||
49
hosts/nixos/Bellerophon/hardware-configuration.nix
Normal file
49
hosts/nixos/Bellerophon/hardware-configuration.nix
Normal file
@@ -0,0 +1,49 @@
|
||||
# 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 = ["xhci_pci" "thunderbolt" "vmd" "nvme" "usbhid"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelPackages = pkgs.linuxPackages_6_12;
|
||||
boot.kernelModules = ["kvm-intel"];
|
||||
boot.kernelPatches = [
|
||||
/*
|
||||
{
|
||||
name = "zenbook-asus-wmi";
|
||||
patch = ./zenbook-asus-wmi.patch;
|
||||
}
|
||||
*/
|
||||
];
|
||||
|
||||
|
||||
# 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.docker0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlo1.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
sof-firmware
|
||||
|
||||
#rotation stuff
|
||||
pkgs.gnome-monitor-config
|
||||
pkgs.usbutils
|
||||
pkgs.inotify-tools
|
||||
pkgs.kdePackages.libkscreen
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user