settings for the NVME baremetal install

This commit is contained in:
Danilo Reyes 2023-05-05 21:47:14 -06:00
parent 06a03c8abe
commit 16bff540f8
3 changed files with 631 additions and 560 deletions

File diff suppressed because it is too large Load Diff

View File

@ -141,6 +141,7 @@ services = {
videoDrivers = [ "nvidia" ]; videoDrivers = [ "nvidia" ];
displayManager.gdm.enable = true; displayManager.gdm.enable = true;
desktopManager.gnome.enable = true; desktopManager.gnome.enable = true;
# wacom.enable = true;
layout = "us"; layout = "us";
libinput.enable = true; # Wacom required? libinput.enable = true; # Wacom required?
}; };
@ -151,10 +152,11 @@ environment.gnome.excludePackages = (with pkgs; [
gnome-tour gnome-tour
gnome-text-editor gnome-text-editor
gnome-connections gnome-connections
# gnome-shell-extensions
baobab baobab
]) ])
++ (with pkgs.gnome; [ ++ (with pkgs.gnome; [
totem # totem
gedit gedit
gnome-music gnome-music
epiphany epiphany
@ -306,6 +308,7 @@ metadata-cleaner # remove any metadata and geolocation from files
gnome-recipes # migrate these to mealie and delete gnome-recipes # migrate these to mealie and delete
unstable.denaro # manage your finances unstable.denaro # manage your finances
# unstable.celeste # sync tool for any cloud provider # unstable.celeste # sync tool for any cloud provider
# libgda # for pano shell extension
#+end_src #+end_src
*** MULTIMEDIA *** MULTIMEDIA
@ -326,6 +329,7 @@ tagger # tag music files
# bottles # wine prefix manager # bottles # wine prefix manager
obs-studio # screen recorder & streamer obs-studio # screen recorder & streamer
shortwave # listen to world radio shortwave # listen to world radio
nextcloud-client # teehee
#+end_src #+end_src
*** Web *** Web
@ -340,6 +344,7 @@ tor-browser-bundle-bin # dark web, so dark!
# hugo # website engine # hugo # website engine
nicotine-plus # remember Ares? nicotine-plus # remember Ares?
warp # never used, but supposedly cool for sharing files warp # never used, but supposedly cool for sharing files
HentaiAtHome # uh-oh
#+end_src #+end_src
** COMMAND-LINE PACKAGES ** COMMAND-LINE PACKAGES
@ -355,12 +360,14 @@ ffmpeg_5 # coolest video converter!
neofetch # use once for brag, never again neofetch # use once for brag, never again
rmlint # probably my favourite app, amazing dupe finder that integrates well with BTRFS rmlint # probably my favourite app, amazing dupe finder that integrates well with BTRFS
tldr # man for retards tldr # man for retards
ffmpegthumbnailer # create video thumbnails for nautilus, in absence of totem # ffmpegthumbnailer # create video thumbnails for nautilus, in absence of totem
vcsi # video thumbnails for torrents, can I replace it with ^? vcsi # video thumbnails for torrents, can I replace it with ^?
mediainfo # technical info about videos, needed by some of my scripts mediainfo # technical info about videos, needed by some of my scripts
tree-sitter # code parsing, required by Doom emacs tree-sitter # code parsing, required by Doom emacs
xdg-ninja # help declutter $HOME xdg-ninja # help declutter $HOME
torrenttools # create torrent files from the terminal! torrenttools # create torrent files from the terminal!
lm_sensors # for extension, displays cpu temp
# unstable.pokemon-colorscripts-mac # pokemon on your terminal!
#+end_src #+end_src
** DEVELOPMENT PACKAGES ** DEVELOPMENT PACKAGES
@ -409,15 +416,6 @@ omnisharp-roslyn # c# linter and code formatter
nodejs # not as bad as I thought nodejs # not as bad as I thought
#+end_src #+end_src
** GNOME EXTENSIONS
#+begin_src nix
gnome.gnome-tweaks # tweaks for the gnome desktop environment
gnomeExtensions.appindicator
gnomeExtensions.gsconnect
#+end_src
** HUNSPELL ** HUNSPELL
These dictionaries work with Firefox, Doom Emacs and LibreOffice. These dictionaries work with Firefox, Doom Emacs and LibreOffice.
@ -437,6 +435,7 @@ main draws of Linux for me.
adwaita-qt adwaita-qt
unstable.adw-gtk3 unstable.adw-gtk3
unstable.gradience # theme customizer, allows you to modify adw-gtk3 themes unstable.gradience # theme customizer, allows you to modify adw-gtk3 themes
gnome.gnome-tweaks # tweaks for the gnome desktop environment
# Fonts # Fonts
(nerdfonts.override { (nerdfonts.override {
@ -444,9 +443,9 @@ unstable.gradience # theme customizer, allows you to modify adw-gtk3 themes
}) })
symbola symbola
# (papirus-icon-theme.override { (papirus-icon-theme.override {
# color = "grey"; color = "adwaita";
# }) })
#+end_src #+end_src
** PYTHON ** PYTHON
@ -477,7 +476,20 @@ symbola
bass # integrate bash utilities on fish bass # integrate bash utilities on fish
#+end_src #+end_src
** NODE JS PACKAGES ** GNOME EXTENSIONS
#+begin_src nix
]) ++ (with pkgs.gnomeExtensions; [
appindicator
gsconnect
freon
panel-scroll
reading-strip
tactile
pano
#+end_src
** NODEJS PACKAGES
#+begin_src nix #+begin_src nix
]) ++ (with pkgs.nodePackages; [ ]) ++ (with pkgs.nodePackages; [
@ -558,8 +570,9 @@ programs.fish = {
#+end_src #+end_src
#+begin_src fish #+begin_src fish
function fish_greeting
set fish_greeting "pika pika chu!!!! also remember fisher!" pokemon-colorscripts -r
end
# Lists # Lists
set -l list_root ${config.home.homeDirectory}/.config/jawz/lists/jawz set -l list_root ${config.home.homeDirectory}/.config/jawz/lists/jawz
set lw $list_root/watch.txt set lw $list_root/watch.txt
@ -574,7 +587,6 @@ function fish_user_key_bindings
# fish_default_key_bindings # fish_default_key_bindings
fish_vi_key_bindings fish_vi_key_bindings
end end
#+end_src #+end_src
@ -590,8 +602,9 @@ functions = {
#+begin_src fish #+begin_src fish
set -l nix_file "$HOME/Development/NixOS/configuration.nix" set -l nix_file "$HOME/Development/NixOS/configuration.nix"
echo $nix_file set -l hardware_file "$HOME/Development/NixOS/hardware-configuration.nix"
nixfmt $nix_file nixfmt $nix_file
nixfmt $hardware_file
sudo nixos-rebuild switch -I nixos-config=$nix_file sudo nixos-rebuild switch -I nixos-config=$nix_file
#+end_src #+end_src
#+begin_src nix #+begin_src nix
@ -624,10 +637,10 @@ programs = {
userName = "Danilo Reyes"; userName = "Danilo Reyes";
userEmail = "CaptainJawZ@outlook.com"; userEmail = "CaptainJawZ@outlook.com";
}; };
gpg = { # gpg = {
enable = true; # enable = true;
homedir = "${config.xdg.dataHome}/gnupg"; # homedir = "${config.xdg.dataHome}/gnupg";
}; # };
htop = { htop = {
enable = true; enable = true;
package = pkgs.htop-vim; package = pkgs.htop-vim;
@ -665,13 +678,13 @@ xdg = {
** USER-SERVICES ** USER-SERVICES
#+begin_src nix #+begin_src nix
# services = { services = {
# emacs = { emacs = {
# enable = true; enable = true;
# defaultEditor = true; defaultEditor = true;
# package = pkgs.emacs; package = pkgs.emacs;
# }; };
# }; };
#+end_src #+end_src
** CLOSING HOME-MANAGER ** CLOSING HOME-MANAGER
@ -716,12 +729,14 @@ environment.variables = rec {
NPM_CONFIG_USERCONFIG = "\${XDG_CONFIG_HOME}/npm/npmrc"; NPM_CONFIG_USERCONFIG = "\${XDG_CONFIG_HOME}/npm/npmrc";
PNPM_HOME = "\${XDG_DATA_HOME}/pnpm"; PNPM_HOME = "\${XDG_DATA_HOME}/pnpm";
# OPTIONS # OPTIONS
HISTFILE = "\${XDG_STATE_HOME}/bash/history";
LESSHISTFILE = "-"; LESSHISTFILE = "-";
GHCUP_USE_XDG_DIRS = "true"; GHCUP_USE_XDG_DIRS = "true";
RIPGREP_CONFIG_PATH = "\${XDG_CONFIG_HOME}/ripgrep/ripgreprc"; RIPGREP_CONFIG_PATH = "\${XDG_CONFIG_HOME}/ripgrep/ripgreprc";
ELECTRUMDIR = "\${XDG_DATA_HOME}/electrum"; ELECTRUMDIR = "\${XDG_DATA_HOME}/electrum";
VISUAL = "emacsclient -ca emacs"; VISUAL = "emacsclient -ca emacs";
WGETRC = "\${XDG_CONFIG_HOME}/wgetrc"; WGETRC = "\${XDG_CONFIG_HOME}/wgetrc";
XCOMPOSECACHE = "${XDG_CACHE_HOME}/X11/xcompose";
"_JAVA_OPTIONS" = "-Djava.util.prefs.userRoot=\${XDG_CONFIG_HOME}/java"; "_JAVA_OPTIONS" = "-Djava.util.prefs.userRoot=\${XDG_CONFIG_HOME}/java";
# NVIDIA # NVIDIA
CUDA_CACHE_PATH = "\${XDG_CACHE_HOME}/nv"; CUDA_CACHE_PATH = "\${XDG_CACHE_HOME}/nv";
@ -730,16 +745,15 @@ environment.variables = rec {
# Themes # Themes
# GTK_THEME = "Adwaita:light"; # GTK_THEME = "Adwaita:light";
# QT_QPA_PLATFORMTHEME = "adwaita-dark"; # QT_QPA_PLATFORMTHEME = "adwaita";
# QT_STYLE_OVERRIDE = "adwaita"; # QT_STYLE_OVERRIDE = "adwaita";
# CALIBRE_USE_SYSTEM_THEME = "1"; CALIBRE_USE_SYSTEM_THEME = "1";
PATH = [ PATH = [
"\${XDG_BIN_HOME}" "\${HOME}/.local/bin"
"\${XDG_CONFIG_HOME}/emacs/bin" "\${XDG_CONFIG_HOME}/emacs/bin"
"\${XDG_DATA_HOME}/npm/bin" "\${XDG_DATA_HOME}/npm/bin"
"\${PNPM_HOME}" "\${XDG_DATA_HOME}/pnpm"
"\${SCRIPTS}"
]; ];
}; };
#+end_src #+end_src
@ -784,6 +798,7 @@ snapraid = {
"/lost+found/" "/lost+found/"
"/multimedia/downloads/" "/multimedia/downloads/"
"/scrapping/nextcloud/" "/scrapping/nextcloud/"
"/backups/"
]; ];
dataDisks = { dataDisks = {
d1 = "/mnt/disk1/"; d1 = "/mnt/disk1/";
@ -833,7 +848,7 @@ services = {
enable = true; enable = true;
ports = [ 25152 ]; ports = [ 25152 ];
}; };
udev.packages = with pkgs; [ gnome.gnome-settings-daemon ]; # udev.packages = with pkgs; [ gnome.gnome-settings-daemon ];
emacs = { emacs = {
enable = true; enable = true;
defaultEditor = true; defaultEditor = true;
@ -866,7 +881,24 @@ systemd.services = {
# Type = "simple"; # Type = "simple";
RestartSec = 30; RestartSec = 30;
ExecStart = "${pkgs.docker-compose}/bin/docker-compose -f \${FILE} up --remove-orphans"; ExecStart = "${pkgs.docker-compose}/bin/docker-compose -f \${FILE} up --remove-orphans";
ExecStop = "${pkgs.docker-compose}docker-compose -f \${FILE} down"; ExecStop = "${pkgs.docker-compose}/bin/docker-compose -f \${FILE} down";
};
};
};
systemd.user.services = {
"HentaiAtHome" = {
enable = true;
restartIfChanged = true;
description = "Run hentai@home server";
wantedBy = [ "multi-user.target" ];
path = [
pkgs.HentaiAtHome
];
serviceConfig = {
Restart = "on-failure";
RestartSec = 30;
WorkingDirectory="/mnt/hnbox";
ExecStart = "${pkgs.HentaiAtHome}/bin/HentaiAtHome";
}; };
}; };
}; };

View File

@ -19,12 +19,8 @@
}; };
}; };
initrd.luks.devices = { initrd.luks.devices = {
root = { nvme = {
device = "/dev/disk/by-uuid/2dc90b31-2a37-46a9-92e5-a648cd74a860"; device = "/dev/disk/by-uuid/af72f45c-cf7c-4e7d-8eab-2a95ab754921";
preLVM = true;
};
root2 = {
device = "/dev/disk/by-uuid/b0414af9-bca9-44d0-9fe3-a6e4f0b1c28c";
preLVM = true; preLVM = true;
}; };
disk1 = { disk1 = {
@ -35,23 +31,31 @@
device = "/dev/disk/by-uuid/0ed12b83-4c56-4ba8-b4ea-75a9e927d771"; device = "/dev/disk/by-uuid/0ed12b83-4c56-4ba8-b4ea-75a9e927d771";
preLVM = true; preLVM = true;
}; };
hnbox = {
device = "/dev/disk/by-uuid/c7dd2d5a-b0b3-46a0-aca9-3d4975c1f0bc";
preLVM = true;
};
seedbox = {
device = "/dev/disk/by-uuid/04f06a3e-a91f-476b-9a4b-b9c722ba99e7";
preLVM = true;
};
}; };
kernelModules = [ "kvm-intel" ]; kernelModules = [ "kvm-intel" ];
kernel.sysctl = { "vm.swappiness" = 90; }; kernel.sysctl = { "vm.swappiness" = 100; };
extraModulePackages = [ ]; extraModulePackages = [ ];
initrd = { initrd = {
availableKernelModules = availableKernelModules =
[ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; [ "xhci_pci" "ahci" "usbhid" "nvme" "usb_storage" "sd_mod" ];
kernelModules = [ ]; kernelModules = [ ];
}; };
}; };
fileSystems."/" = { fileSystems."/" = {
device = "/dev/mapper/root"; device = "/dev/mapper/nvme";
fsType = "btrfs"; fsType = "btrfs";
options = [ options = [
"subvol=nix" "subvol=nix"
"ssd" # "ssd"
"compress=zstd:3" "compress=zstd:3"
"x-systemd.device-timeout=0" "x-systemd.device-timeout=0"
"space_cache=v2" "space_cache=v2"
@ -61,11 +65,11 @@
}; };
fileSystems."/home" = { fileSystems."/home" = {
device = "/dev/mapper/root"; device = "/dev/mapper/nvme";
fsType = "btrfs"; fsType = "btrfs";
options = [ options = [
"subvol=home" "subvol=home"
"ssd" # "ssd"
"compress=zstd:3" "compress=zstd:3"
"x-systemd.device-timeout=0" "x-systemd.device-timeout=0"
"space_cache=v2" "space_cache=v2"
@ -84,6 +88,19 @@
fsType = "btrfs"; fsType = "btrfs";
options = [ "compress=zstd:3" "space_cache=v2" "commit=120" "datacow" ]; options = [ "compress=zstd:3" "space_cache=v2" "commit=120" "datacow" ];
}; };
fileSystems."/mnt/hnbox" = {
device = "/dev/mapper/hnbox";
fsType = "btrfs";
options = [ "compress=zstd:3" "space_cache=v2" "commit=120" "datacow" ];
};
fileSystems."/mnt/seedbox" = {
device = "/dev/mapper/seedbox";
fsType = "btrfs";
options = [ "compress=zstd:3" "space_cache=v2" "commit=120" "datacow" ];
};
fileSystems."/mnt/parity" = { fileSystems."/mnt/parity" = {
device = "/dev/disk/by-uuid/643b727a-555d-425c-943c-62f5b93631c9"; device = "/dev/disk/by-uuid/643b727a-555d-425c-943c-62f5b93631c9";
fsType = "xfs"; fsType = "xfs";
@ -91,17 +108,17 @@
}; };
fileSystems."/boot" = { fileSystems."/boot" = {
device = "/dev/disk/by-uuid/eb5b3650-f709-46a1-8d63-7f05ffd5e6d4"; device = "/dev/disk/by-uuid/c574cb53-dc40-46db-beff-0fe8a4787156";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot/efi" = { fileSystems."/boot/efi" = {
device = "/dev/disk/by-uuid/78B5-4717"; device = "/dev/disk/by-uuid/CBE7-5DEB";
fsType = "vfat"; fsType = "vfat";
}; };
swapDevices = swapDevices =
[{ device = "/dev/disk/by-uuid/7b9f7369-d24d-4b54-95a6-853626eb45a7"; }]; [{ device = "/dev/disk/by-uuid/f41cc85e-9963-46c1-9385-0748e670638d"; }];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # 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 # (the default) this is the recommended approach. When using systemd-networkd it's
@ -117,10 +134,10 @@
cpu.intel.updateMicrocode = lib.mkDefault true; cpu.intel.updateMicrocode = lib.mkDefault true;
bluetooth.enable = true; bluetooth.enable = true;
# huion driver # huion driver
opentabletdriver = { # opentabletdriver = {
enable = true; # enable = true;
daemon.enable = true; # daemon.enable = true;
}; # };
# nvidia driver # nvidia driver
nvidia.modesetting.enable = true; nvidia.modesetting.enable = true;
opengl = { opengl = {
@ -132,4 +149,3 @@
# lib.mkDefault config.hardware.enableRedistributableFirmware; # lib.mkDefault config.hardware.enableRedistributableFirmware;
} }