new host and other things !
This commit is contained in:
parent
2546a8d08e
commit
1625a54459
12 changed files with 216 additions and 15 deletions
|
|
@ -36,6 +36,8 @@ in {
|
|||
useXkbConfig = mkDefault true;
|
||||
};
|
||||
|
||||
services.earlyoom.enable = true;
|
||||
|
||||
services.automatic-timezoned.enable = mkDefault true;
|
||||
time.timeZone = mkDefault null; # handled by automatic-timezoned
|
||||
|
||||
|
|
|
|||
113
hosts/flubber-machine/default.nix
Executable file
113
hosts/flubber-machine/default.nix
Executable file
|
|
@ -0,0 +1,113 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./hardware.nix
|
||||
];
|
||||
|
||||
hm.home.packages = with pkgs; [
|
||||
# archives
|
||||
zip xz unrar unzip p7zip zstd lrzip
|
||||
# utils
|
||||
ffmpeg ripgrep ripgrep-all jq libqalculate imagemagick pandoc
|
||||
# dev
|
||||
sqlitebrowser sqlite-analyzer
|
||||
# nix
|
||||
nix-output-monitor nix-prefetch-scripts nix-top
|
||||
# system
|
||||
btop duf lm_sensors ethtool pciutils usbutils powertop killall
|
||||
# debug
|
||||
strace ltrace lsof helvum
|
||||
# apps
|
||||
firefox qalculate-gtk krita inkscape onlyoffice-desktopeditors vlc nicotine-plus transmission_4-gtk font-manager obs-studio imhex pwvucontrol nautilus gnome-disk-utility gnome-text-editor baobab file-roller gnome-system-monitor loupe gnome-weather kdePackages.kdenlive video-trimmer blanket
|
||||
# compatibility
|
||||
wineWowPackages.waylandFull winetricks
|
||||
# misc
|
||||
bat file which packwiz yt-dlp fastfetch hyfetch trashy wev
|
||||
# games
|
||||
prismlauncher
|
||||
] ++ (with pkgs.my; [
|
||||
# none yet
|
||||
]);
|
||||
|
||||
boot.kernelPackages = pkgs.linuxPackages_xanmod_latest;
|
||||
|
||||
modules = {
|
||||
security.useDoas = true;
|
||||
|
||||
hardware = {
|
||||
bluetooth.enable = true;
|
||||
pipewire.enable = true;
|
||||
print.enable = true;
|
||||
pointer.enable = true;
|
||||
tablet.enable = true;
|
||||
networking.enable = true;
|
||||
};
|
||||
dev = {
|
||||
enable = true;
|
||||
};
|
||||
desktop = {
|
||||
# set to `x11` or `wayland`, improves compat
|
||||
envProto = "wayland";
|
||||
|
||||
# window manager / desktop environment
|
||||
niri.enable = true;
|
||||
|
||||
# accessories
|
||||
hyprlock.enable = true;
|
||||
hypridle.enable = true;
|
||||
hypridle.desktop = true;
|
||||
swww.enable = true;
|
||||
gnome-keyring.enable = true;
|
||||
mate-polkit.enable = true;
|
||||
dunst.enable = true;
|
||||
rofi.enable = true;
|
||||
waybar.enable = true;
|
||||
batsignal.enable = true;
|
||||
wob.enable = true;
|
||||
gammastep.enable = true;
|
||||
# fuzzel.enable = true;
|
||||
# cliphist.enable = true;
|
||||
wl-clip-persist.enable = true;
|
||||
vicinae.enable = true;
|
||||
|
||||
# display manager
|
||||
regreet.enable = true;
|
||||
|
||||
# theme, see `modules/desktop/themes`
|
||||
themes.active = "catppuccin";
|
||||
|
||||
# monitors, see `modules/desktop/monitors`
|
||||
monitors.enable = true;
|
||||
monitors.monitors = [
|
||||
{ name = "DP-2"; scale = 1.0; }
|
||||
{ name = "DP-3"; scale = 2.0; vrr = true; }
|
||||
];
|
||||
};
|
||||
software = {
|
||||
# system
|
||||
system.eza.enable = true;
|
||||
system.wezterm.enable = true;
|
||||
system.fish.enable = true;
|
||||
system.syncthing.enable = true;
|
||||
system.flatpak.enable = true;
|
||||
system.mpv.enable = true;
|
||||
system.ananicy.enable = true;
|
||||
system.kdeconnect.enable = true;
|
||||
# editors
|
||||
editors.micro.enable = true;
|
||||
editors.vscode.enable = true;
|
||||
# dev
|
||||
dev.git.enable = true;
|
||||
# distractions
|
||||
distractions.discord.enable = true;
|
||||
distractions.discord.vesktop = true;
|
||||
distractions.steam.enable = true;
|
||||
distractions.steam.useGamescope = true;
|
||||
# tools
|
||||
tools.gpg.enable = true;
|
||||
tools.rbw.enable = true;
|
||||
tools.noisetorch.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
49
hosts/flubber-machine/hardware.nix
Executable file
49
hosts/flubber-machine/hardware.nix
Executable file
|
|
@ -0,0 +1,49 @@
|
|||
{ inputs, config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
inputs.hardware.nixosModules.common-cpu-amd
|
||||
inputs.hardware.nixosModules.common-gpu-amd
|
||||
inputs.hardware.nixosModules.common-pc-ssd
|
||||
inputs.hardware.nixosModules.common-pc
|
||||
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
|
||||
./omen-30l-gt13-1xxx.nix
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" "amdgpu" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/5da6bab0-856a-4e65-8ff6-5b70fe3764b8";
|
||||
fsType = "btrfs";
|
||||
options = [ "noatime" ];
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/AA0D-269D";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/d937e754-ba63-4fc0-be78-60f456392373"; }
|
||||
];
|
||||
|
||||
# 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.end0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlan0.useDHCP = lib.mkDefault true;
|
||||
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
3
hosts/flubber-machine/meta.nix
Normal file
3
hosts/flubber-machine/meta.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
system = "x86_64-linux";
|
||||
}
|
||||
19
hosts/flubber-machine/omen-30l-gt13-1xxx.nix
Normal file
19
hosts/flubber-machine/omen-30l-gt13-1xxx.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{ pkgs, lib, ... }:
|
||||
{
|
||||
# support power features such as suspend to ram
|
||||
powerManagement.enable = true;
|
||||
|
||||
environment.variables = {
|
||||
AMD_VULKAN_ICD = "RADV";
|
||||
LIBVA_DRIVER_NAME= "radeonsi";
|
||||
VDPAU_DRIVER = "radeonsi";
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [ amdgpu_top ];
|
||||
|
||||
# fix audio issues
|
||||
# Is this even needed. I'm losing my mindddddd
|
||||
# https://forums.linuxmint.com/viewtopic.php?t=445461
|
||||
# https://help.ubuntu.com/community/HdaIntelSoundHowto
|
||||
boot.extraModprobeConfig = ''options snd_hda_intel model=generic'';
|
||||
}
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
# debug
|
||||
strace ltrace lsof helvum
|
||||
# apps
|
||||
firefox qalculate-gtk krita inkscape onlyoffice-desktopeditors vlc nicotine-plus transmission_4-gtk font-manager obs-studio imhex pwvucontrol nautilus gnome-disk-utility gnome-text-editor baobab file-roller gnome-system-monitor loupe gnome-weather kdePackages.kdenlive blanket
|
||||
firefox qalculate-gtk krita inkscape onlyoffice-desktopeditors vlc nicotine-plus transmission_4-gtk font-manager obs-studio imhex pwvucontrol nautilus gnome-disk-utility gnome-text-editor baobab file-roller gnome-system-monitor loupe gnome-weather kdePackages.kdenlive video-trimmer blanket
|
||||
# compatibility
|
||||
wineWowPackages.waylandFull winetricks
|
||||
# misc
|
||||
|
|
@ -38,7 +38,6 @@
|
|||
pipewire.enable = true;
|
||||
print.enable = true;
|
||||
pointer.enable = true;
|
||||
tablet.enable = true;
|
||||
networking.enable = true;
|
||||
};
|
||||
dev = {
|
||||
|
|
@ -59,12 +58,12 @@
|
|||
mate-polkit.enable = true;
|
||||
dunst.enable = true;
|
||||
rofi.enable = true;
|
||||
fuzzel.enable = true;
|
||||
waybar.enable = true;
|
||||
batsignal.enable = true;
|
||||
wob.enable = true;
|
||||
gammastep.enable = true;
|
||||
# cliphist.enable = true;
|
||||
# fuzzel.enable = true;
|
||||
wl-clip-persist.enable = true;
|
||||
vicinae.enable = true;
|
||||
|
||||
|
|
@ -97,7 +96,7 @@
|
|||
dev.git.enable = true;
|
||||
# distractions
|
||||
distractions.discord.enable = true;
|
||||
distractions.discord.equibop = true;
|
||||
distractions.discord.vesktop = true;
|
||||
distractions.steam.enable = true;
|
||||
distractions.steam.useGamescope = true;
|
||||
# tools
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/0f09afdc-88e4-4764-818b-77828931278f";
|
||||
fsType = "ext4";
|
||||
options = [ "noatime" "nodiratime" "discard" ];
|
||||
options = [ "noatime" ];
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ in {
|
|||
a list of monitor configurations. each entry should be an attribute set with the following keys:
|
||||
- `name`: The name of the monitor to configure
|
||||
- `scale`: The scale factor to apply to the monitor
|
||||
- `vrr`?: Whether or not the display supports variable refresh rate. Defaults to false
|
||||
note: the first monitor in the list will be considered the "primary" monitor
|
||||
'';
|
||||
example = [
|
||||
|
|
@ -26,6 +27,7 @@ in {
|
|||
name = monitor.name;
|
||||
value = {
|
||||
scale = monitor.scale;
|
||||
variable-refresh-rate = monitor.vrr or false;
|
||||
};
|
||||
}) cfg.monitors);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ with lib;
|
|||
interval = "weekly";
|
||||
};
|
||||
|
||||
# tweak fstim service to run only when on AC power
|
||||
# tweak fstrim service to run only when on AC power
|
||||
# and to be nice to other processes
|
||||
# (this is a good idea for any service that runs periodically)
|
||||
systemd.services.fstrim = {
|
||||
7
modules/hardware/fs/lvm.nix
Normal file
7
modules/hardware/fs/lvm.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
{
|
||||
# i don't use lvm, can be disabled
|
||||
services.lvm.enable = mkDefault false;
|
||||
}
|
||||
16
modules/hardware/fs/scrub.nix
Normal file
16
modules/hardware/fs/scrub.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
supportedFilesystems = builtins.map (builtins.getAttr "fsType") (builtins.attrValues config.fileSystems);
|
||||
mkScrubConfig = fsType: {
|
||||
enable = builtins.elem fsType supportedFilesystems;
|
||||
interval = "weekly";
|
||||
};
|
||||
in {
|
||||
services.btrfs.autoScrub = mkScrubConfig "btrfs";
|
||||
services.zfs.autoScrub = mkScrubConfig "zfs";
|
||||
|
||||
# bcachefs exists but it was "ejected from the kernel" for "repeated violations of kernel dev. guidelines"
|
||||
# linus "tech tips" torvalds said himself "nobody sane uses bcachefs and expects it to be stable" (https://en.wikipedia.org/wiki/Bcachefs#Stability)
|
||||
}
|
||||
|
|
@ -8,24 +8,15 @@ let
|
|||
withVencord = true;
|
||||
};
|
||||
finalPackage =
|
||||
if cfg.equibop then pkgs.equibop else
|
||||
if cfg.vesktop then pkgs.vesktop else
|
||||
vanillaDiscordPackage;
|
||||
in {
|
||||
options.modules.software.distractions.discord = {
|
||||
enable = mkEnableOption "Enable Discord, a social messaging app";
|
||||
vesktop = mkEnableOption "Use Vesktop, an alternative Electron client with Vencord preinstalled";
|
||||
equibop = mkEnableOption "Use Equibop, a fork of Vesktop with Equicord preinstalled";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
assertions = [
|
||||
{
|
||||
assertion = !(cfg.vesktop && cfg.equibop);
|
||||
message = "You must either enable Vesktop or Equibop, not both";
|
||||
}
|
||||
];
|
||||
|
||||
user.packages = [
|
||||
finalPackage
|
||||
];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue