refactor for preparation of flake based systems
This commit is contained in:
parent
6527f67145
commit
25e9d06354
121 changed files with 449 additions and 40 deletions
102
configs/gpdPocket3/configuration.nix
Normal file
102
configs/gpdPocket3/configuration.nix
Normal file
|
@ -0,0 +1,102 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
settings,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
# Users this machine has
|
||||
(settings.usersDir + "/root/configuration.nix")
|
||||
(settings.usersDir + "/josh/configuration.nix")
|
||||
];
|
||||
|
||||
# My custom modules
|
||||
mods = {
|
||||
boot_systemd.enable = true;
|
||||
shell_common.enable = true;
|
||||
de_cosmic.enable = true;
|
||||
neovim.enable = true;
|
||||
tty_caps_esc.enable = true;
|
||||
docker.enable = true;
|
||||
fonts.enable = true;
|
||||
stormd.enable = true;
|
||||
nebula.enable = true;
|
||||
ssh.enable = true;
|
||||
rustdesk.enable = true;
|
||||
};
|
||||
|
||||
|
||||
# machine specific configuration
|
||||
# ==============================
|
||||
hardware.enableAllFirmware = true;
|
||||
# Connectivity
|
||||
networking.networkmanager.enable = true;
|
||||
hardware.bluetooth.enable = true;
|
||||
environment.shellAliases = {
|
||||
wifi = "nmtui";
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
# [Laptop] Battery status
|
||||
acpi
|
||||
];
|
||||
environment.shellAliases = {
|
||||
battery = "acpi";
|
||||
};
|
||||
# [Laptop] screens with brightness settings
|
||||
programs.light.enable = true;
|
||||
|
||||
console = {
|
||||
# We want to be able to read the screen so use a 32 sized font on this tiny panel
|
||||
font = "${pkgs.terminus_font}/share/consolefonts/ter-132n.psf.gz";
|
||||
};
|
||||
|
||||
# ========
|
||||
|
||||
# FINGERPRINTS for the sensor on GPD P3 do not work on linux yet: todo find the source of this again online for tracking...
|
||||
# Attempting to get fingerprint scanner to work... having issues though, no device detected with all methods
|
||||
# services.fprintd = {
|
||||
# enable = true;
|
||||
# tod = {
|
||||
# enable = true;
|
||||
# driver = pkgs.libfprint-2-tod1-elan;
|
||||
# };
|
||||
# };
|
||||
|
||||
# TODO evaluate if any of this kernal/hardware stuff is actually needed for our pocket. This is a hodge podge of shit from online
|
||||
# The GPD Pocket3 uses a tablet OLED display, that is mounted rotated 90° counter-clockwise.
|
||||
# This requires cusotm kernal params.
|
||||
boot.kernelParams = [
|
||||
"video=DSI-1:panel_orientation=right_side_up"
|
||||
"fbcon=rotate:1"
|
||||
"mem_sleep_default=s2idel"
|
||||
];
|
||||
boot.kernelModules = [ "btusb" ];
|
||||
boot.initrd.availableKernelModules = [
|
||||
"nvme"
|
||||
"xhci_pci"
|
||||
"usbhid"
|
||||
];
|
||||
services.xserver.videoDrivers = [ "intel" ];
|
||||
hardware.graphics.enable = true;
|
||||
hardware.graphics.extraPackages = with pkgs; [
|
||||
intel-media-driver
|
||||
intel-vaapi-driver
|
||||
];
|
||||
# Stuff from https://github.com/NixOS/nixos-hardware/blob/9a763a7acc4cfbb8603bb0231fec3eda864f81c0/gpd/pocket-3/default.nix
|
||||
services.fstrim.enable = true;
|
||||
services.libinput.enable = true;
|
||||
services.tlp.enable = lib.mkDefault (
|
||||
(lib.versionOlder (lib.versions.majorMinor lib.version) "21.05")
|
||||
|| !config.services.power-profiles-daemon.enable
|
||||
);
|
||||
|
||||
# KVM module video
|
||||
environment.shellAliases = {
|
||||
kvm = "ffplay -i /dev/video2";
|
||||
};
|
||||
|
||||
system.stateVersion = "23.11";
|
||||
}
|
0
configs/gpdPocket3/flake.nix
Normal file
0
configs/gpdPocket3/flake.nix
Normal file
37
configs/gpdPocket3/hardware-configuration.nix
Normal file
37
configs/gpdPocket3/hardware-configuration.nix
Normal file
|
@ -0,0 +1,37 @@
|
|||
# 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" "nvme" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-label/NIXBOOT";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-label/NIXROOT";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
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.enp175s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
41
configs/h002/configuration.nix
Normal file
41
configs/h002/configuration.nix
Normal file
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
pkgs,
|
||||
settings,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
# Users this machine has
|
||||
(settings.usersDir + "/root/configuration.nix")
|
||||
(settings.usersDir + "/luser/configuration.nix")
|
||||
];
|
||||
|
||||
# My custom modules
|
||||
mods = {
|
||||
boot_grub.enable = true;
|
||||
shell_common.enable = true;
|
||||
# de_gnome_xorg.enable = true;
|
||||
# audio.enable = true;
|
||||
de_cosmic.enable = true;
|
||||
neovim.enable = true;
|
||||
tty_caps_esc.enable = true;
|
||||
docker.enable = true;
|
||||
stormd.enable = true;
|
||||
nebula.enable = true;
|
||||
ssh.enable = true;
|
||||
};
|
||||
|
||||
# machine specific configuration
|
||||
# ==============================
|
||||
hardware.enableAllFirmware = true;
|
||||
# Connectivity
|
||||
networking.networkmanager.enable = true;
|
||||
hardware.bluetooth.enable = true;
|
||||
environment.shellAliases = {
|
||||
wifi = "nmtui";
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [ nvtopPackages.full ];
|
||||
|
||||
system.stateVersion = "23.11";
|
||||
}
|
0
configs/h002/flake.nix
Normal file
0
configs/h002/flake.nix
Normal file
37
configs/h002/hardware-configuration.nix
Normal file
37
configs/h002/hardware-configuration.nix
Normal file
|
@ -0,0 +1,37 @@
|
|||
# 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 = [ "ehci_pci" "ahci" "xhci_pci" "firewire_ohci" "usb_storage" "usbhid" "sd_mod" "sr_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-label/NIXROOT";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-label/NIXBOOT";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
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.eno1.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
50
configs/lio/configuration.nix
Normal file
50
configs/lio/configuration.nix
Normal file
|
@ -0,0 +1,50 @@
|
|||
{
|
||||
settings,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
# Users this machine has
|
||||
(settings.usersDir + "/root/configuration.nix")
|
||||
(settings.usersDir + "/josh/configuration.nix")
|
||||
];
|
||||
|
||||
# My custom modules
|
||||
mods = {
|
||||
boot_systemd.enable = true;
|
||||
shell_common.enable = true;
|
||||
# de_cosmic.enable = true;
|
||||
audio.enable = true;
|
||||
de_gnome_xorg.enable = true;
|
||||
# de_gnome_wayland.enable = true;
|
||||
neovim.enable = true;
|
||||
tty_caps_esc.enable = true;
|
||||
docker.enable = true;
|
||||
fonts.enable = true;
|
||||
ssh.enable = true;
|
||||
stormd.enable = true;
|
||||
nebula.enable = true;
|
||||
rustdesk.enable = true;
|
||||
saber.enable = true;
|
||||
};
|
||||
|
||||
# opening this port for dev purposes
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
5173 # Vite
|
||||
];
|
||||
|
||||
# machine specific configuration
|
||||
# ==============================
|
||||
hardware.enableAllFirmware = true;
|
||||
# Connectivity
|
||||
networking.networkmanager.enable = true;
|
||||
hardware.bluetooth.enable = true;
|
||||
environment.shellAliases = {
|
||||
wifi = "nmtui";
|
||||
};
|
||||
|
||||
# System76
|
||||
hardware.system76.enableAll = true;
|
||||
|
||||
system.stateVersion = "23.11";
|
||||
}
|
0
configs/lio/flake.nix
Normal file
0
configs/lio/flake.nix
Normal file
65
configs/lio/hardware-configuration.nix
Normal file
65
configs/lio/hardware-configuration.nix
Normal file
|
@ -0,0 +1,65 @@
|
|||
# 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"
|
||||
"usbhid"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-label/NIXROOT";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-label/NIXBOOT";
|
||||
fsType = "vfat";
|
||||
options = [
|
||||
"fmask=0077"
|
||||
"dmask=0077"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/mnt/nvme1tb" = {
|
||||
device = "/dev/disk/by-uuid/7ddb48bd-160c-4049-a4fa-a5ac2b6a5402";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{
|
||||
device = "/.swapfile";
|
||||
size = 64 * 1024; # 64GB
|
||||
}
|
||||
];
|
||||
|
||||
# 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.eno1.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp11s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
29
configs/oren/configuration.nix
Normal file
29
configs/oren/configuration.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
settings,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
# Users this machine has
|
||||
(settings.usersDir + "/root/configuration.nix")
|
||||
(settings.usersDir + "/josh/configuration.nix")
|
||||
];
|
||||
|
||||
# My custom modules
|
||||
mods = {
|
||||
boot_systemd.enable = true;
|
||||
shell_common.enable = true;
|
||||
de_cosmic.enable = true;
|
||||
neovim.enable = true;
|
||||
tty_caps_esc.enable = true;
|
||||
docker.enable = true;
|
||||
fonts.enable = true;
|
||||
stormd.enable = true;
|
||||
nebula.enable = true;
|
||||
ssh.enable = true;
|
||||
# rustdesk.enable = true;
|
||||
};
|
||||
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
system.stateVersion = "24.11"; # Did you read the comment?
|
||||
}
|
0
configs/oren/flake.nix
Normal file
0
configs/oren/flake.nix
Normal file
60
configs/oren/hardware-configuration.nix
Normal file
60
configs/oren/hardware-configuration.nix
Normal file
|
@ -0,0 +1,60 @@
|
|||
# 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"
|
||||
"thunderbolt"
|
||||
"usbhid"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-label/NIXROOT";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-label/NIXBOOT";
|
||||
fsType = "vfat";
|
||||
options = [
|
||||
"fmask=0077"
|
||||
"dmask=0077"
|
||||
];
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{
|
||||
device = "/.swapfile";
|
||||
size = 64 * 1024; # 64GB
|
||||
}
|
||||
];
|
||||
|
||||
# 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.enp196s0f4u1.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
|
@ -167,7 +167,7 @@
|
|||
settings.home-manager.nixosModules.home-manager
|
||||
]
|
||||
++ ylib.umport {
|
||||
path = lib.fileset.maybeMissing ./modules;
|
||||
path = lib.fileset.maybeMissing ./modules_old;
|
||||
recursive = true;
|
||||
}
|
||||
++ [ ./hosts/configuration.nix ];
|
||||
|
|
|
@ -1,39 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
name = "audio";
|
||||
cfg = config.mods.${name};
|
||||
in
|
||||
{
|
||||
options = {
|
||||
mods.${name} = {
|
||||
enable = mkEnableOption (lib.mdDoc "Enable ${name}");
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# Enable sound.
|
||||
# sound.enable = true;
|
||||
# services.pipewire.pulse.enable = false;
|
||||
# services.pipewire.enable = false;
|
||||
# services.pipewire.audio.enable =false;
|
||||
# hardware.pulseaudio.enable = true;
|
||||
# hardware.pulseaudio.package = pkgs.pulseaudioFull;
|
||||
# environment.systemPackages = [ pkgs.pavucontrol ];
|
||||
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
# If you want to use JACK applications, uncomment this
|
||||
#jack.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
27
modules_old/audio.nix
Normal file
27
modules_old/audio.nix
Normal file
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
name = "audio";
|
||||
cfg = config.mods.${name};
|
||||
in
|
||||
{
|
||||
options = {
|
||||
mods.${name} = {
|
||||
enable = mkEnableOption (lib.mdDoc "Enable ${name}");
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue