summaryrefslogtreecommitdiff
path: root/hosts/yashinoki
diff options
context:
space:
mode:
authorAndrew Opalach <andrew@akon.city> 2024-11-12 22:26:02 -0500
committerAndrew Opalach <andrew@akon.city> 2024-11-12 22:36:49 -0500
commit53a0a5473f45d37027af9663638adbf56667e4ca (patch)
tree05c6c39678a9005f95c00e0fdf31193657bd4d3d /hosts/yashinoki
downloaddotfiles-53a0a5473f45d37027af9663638adbf56667e4ca.tar.gz
dotfiles-53a0a5473f45d37027af9663638adbf56667e4ca.tar.bz2
dotfiles-53a0a5473f45d37027af9663638adbf56667e4ca.zip
Hopefully no leaks
Diffstat (limited to 'hosts/yashinoki')
-rw-r--r--hosts/yashinoki/configuration.nix213
-rw-r--r--hosts/yashinoki/hardware-configuration.nix40
-rw-r--r--hosts/yashinoki/programs.nix11
3 files changed, 264 insertions, 0 deletions
diff --git a/hosts/yashinoki/configuration.nix b/hosts/yashinoki/configuration.nix
new file mode 100644
index 0000000..8df933e
--- /dev/null
+++ b/hosts/yashinoki/configuration.nix
@@ -0,0 +1,213 @@
+{ config, lib, pkgs, ... }:
+let
+ s = config.local;
+ inherit (import ../../nix/utils.nix) disks;
+in {
+ imports = [
+ ./hardware-configuration.nix
+ ../../nix/scripts.nix
+ ../../nix/user.nix
+ ../../nix/system.nix
+ ../../nix/audio.nix
+ ../../nix/bluetooth.nix
+ ../../nix/email.nix
+ ../../nix/intel.nix
+ ../../nix/programs/zsh.nix
+ ../../nix/programs/nvim.nix
+ ../../nix/programs/sway.nix
+ ../../nix/programs/kitty.nix
+ ../../nix/programs/firefox.nix
+ ../../nix/programs/obs.nix
+ ../../nix/programs/waydroid.nix
+ ../../nix/programs/kdeconnect.nix
+ ./programs.nix
+ ];
+
+ local = rec {
+ font = {
+ name = "Comic Code";
+ size = 13;
+ baseline = -2;
+ };
+ ui-font = {
+ name = "M+ 2p";
+ size = 11;
+ baseline = 0;
+ };
+ emoji-font = {
+ name = "Blobmoji";
+ size = ui-font.size;
+ baseline = 0;
+ };
+ scheme = import ../../themes/zelda_summer/zelda_summer.nix;
+ starter = {
+ picture = ../../themes/zelda_summer/splash_alt.png;
+ width = 38;
+ #width = 40;
+ padding = { top = -1; left = -9; text = 0; };
+ #padding = { top = -6; left = 0; text = 0; };
+ position = "left";
+ footer = "Thinking about the next power move.\\n - Soulja Boy, 2014";
+ footer_offset = 1;
+ };
+ monitors = {
+ monitor1 = "eDP-1";
+ };
+ };
+
+ nix.settings.system-features = [ "gccarch-skylake" ];
+# nixpkgs.hostPlatform = {
+# gcc.arch = "skylake";
+# gcc.tune = "skylake";
+# system = "x86_64-linux";
+# };
+
+ boot.kernelPackages = pkgs.linuxPackages_latest;
+ boot.supportedFilesystems = [ ];
+ boot.loader.systemd-boot.enable = true;
+ boot.kernelParams = [ "mitigations=off" "file_caps=1" ];
+ boot.extraModulePackages = [
+ config.boot.kernelPackages.v4l2loopback.out
+ ];
+ boot.kernelModules = [ "v4l2loopback" ];
+ boot.initrd.kernelModules = [ ];
+ services.fwupd.enable = true;
+
+ services.thermald.enable = true;
+ services.tlp = {
+ enable = true;
+ settings = {
+ CPU_SCALING_GOVERNOR_ON_AC = "performance";
+ CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
+
+ CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
+ CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
+
+ CPU_MIN_PERF_ON_AC = 0;
+ CPU_MAX_PERF_ON_AC = 100;
+ CPU_MIN_PERF_ON_BAT = 0;
+ CPU_MAX_PERF_ON_BAT = 20;
+
+ START_CHARGE_THRESH_BAT0 = 40;
+ STOP_CHARGE_THRESH_BAT0 = 85;
+ };
+ };
+ programs.light.enable = true;
+
+ networking = {
+ hostName = "yashinoki";
+ useNetworkd = true;
+ wireless = {
+ enable = true;
+ userControlled.enable = true;
+ fallbackToWPA2 = false;
+ networks."Verizon_TMKS9N" = {
+ pskRaw = "794b2c76b39a7f83d08e028e20fb980cef890424ae0b69acdf2e37c590a9fb6a";
+ authProtocols = [ "WPA-PSK" "WPA-EAP" "FT-PSK" "FT-EAP" ];
+ };
+ };
+ nameservers = [ "9.9.9.9" "149.112.112.112" ];
+ firewall = {
+ enable = true;
+ allowedTCPPorts = [];
+ };
+ extraHosts = ''
+ 192.168.1.192 iroha
+ 192.168.1.206 moyo
+ 192.168.1.207 denpa
+ 66.135.26.42 rod
+ 173.62.191.72 boomerang
+ '';
+ };
+ systemd.network = {
+ enable = true;
+ networks."wlp3s0" = {
+ enable = true;
+ name = "wlp3s0";
+ dhcpV6Config.UseDNS = false;
+ dhcpV4Config.UseDNS = false;
+ };
+ };
+ services.resolved = {
+ enable = true;
+ dnssec = "true";
+ domains = [ "~." ];
+ fallbackDns = [ "1.1.1.1" "1.0.0.1" ];
+ extraConfig = ''
+ DNSOverTLS=yes
+ '';
+ };
+
+ fileSystems."/home/andrew/c" = {
+ device = "192.168.1.206:/home/andrew/c";
+ fsType = "nfs4";
+ options = disks.nfs_options;
+ };
+
+ environment.systemPackages = with pkgs; [
+ linuxPackages_latest.perf
+ linuxPackages_latest.cpupower
+ (pkgs.writeShellScriptBin "run-sway" ''
+ export WLR_RENDERER=vulkan
+ export WLR_DRM_DEVICES=/dev/dri/card1
+ cd $HOME
+ exec ${pkgs.sway}/bin/sway
+ '')
+ ];
+
+ home-manager.users.andrew = let
+ homeDir = "${config.users.users.andrew.home}";
+ in {
+ programs.kitty = {
+ extraConfig = ''
+ repaint_delay 15
+ input_delay 3
+ '';
+ };
+ wayland.windowManager.sway = {
+ checkConfig = false;
+ config = {
+ output = {
+ "${s.monitors.monitor1}" = {
+ mode = "3000x2000@59.999Hz";
+ render_bit_depth = "10";
+ adaptive_sync = "on";
+ scale = "2";
+ bg = "${../../themes/zelda_summer/wallpaper1.png} fit";
+ };
+ };
+ workspaceOutputAssign = [
+ { workspace = "1"; output = "${s.monitors.monitor1}"; }
+ { workspace = "2"; output = "${s.monitors.monitor1}"; }
+ { workspace = "3"; output = "${s.monitors.monitor1}"; }
+ { workspace = "4"; output = "${s.monitors.monitor1}"; }
+ { workspace = "5"; output = "${s.monitors.monitor1}"; }
+ ];
+ keybindings = let
+ mod1 = "Mod1";
+ mod4 = "Mod4";
+ in {
+ "${mod1}+1" = "workspace 1";
+ "${mod1}+2" = "workspace 2";
+ "${mod1}+3" = "workspace 3";
+ "${mod1}+4" = "workspace 4";
+ "${mod1}+5" = "workspace 5";
+ "${mod1}+Shift+1" = "move container to workspace 1";
+ "${mod1}+Shift+2" = "move container to workspace 2";
+ "${mod1}+Shift+3" = "move container to workspace 3";
+ "${mod1}+Shift+4" = "move container to workspace 4";
+ "${mod1}+Shift+5" = "move container to workspace 5";
+ "${mod4}+r" = "exec swaymsg -- output ${s.monitors.monitor1} transform 270";
+ "${mod4}+Shift+r" = "exec swaymsg -- output ${s.monitors.monitor1} transform 0";
+ "${mod4}+F1" = "exec swaymsg -- output ${s.monitors.monitor1} bg \\#${s.scheme.background-alt} solid_color";
+ "${mod4}+F2" = "exec swaymsg -- output ${s.monitors.monitor1} bg ${../../themes/zelda_summer/wallpaper1.png} fill";
+ "${mod4}+F3" = "exec swaymsg -- output ${s.monitors.monitor1} bg ${../../themes/zelda_summer/wallpaper_alt1.png} fill";
+ };
+ };
+ };
+
+ home.stateVersion = "${config.system.stateVersion}";
+ };
+
+ system.stateVersion = "24.11";
+}
diff --git a/hosts/yashinoki/hardware-configuration.nix b/hosts/yashinoki/hardware-configuration.nix
new file mode 100644
index 0000000..678dcb5
--- /dev/null
+++ b/hosts/yashinoki/hardware-configuration.nix
@@ -0,0 +1,40 @@
+{ config, lib, pkgs, modulesPath, ... }:
+{
+ imports =
+ [ (modulesPath + "/installer/scan/not-detected.nix")
+ ];
+
+ boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" ];
+ boot.initrd.kernelModules = [ "dm-snapshot" ];
+ boot.kernelModules = [ "kvm-intel" ];
+ boot.extraModulePackages = [ ];
+
+ fileSystems."/" =
+ { device = "/dev/yashinoki-vg0/root";
+ fsType = "ext4";
+ };
+
+ fileSystems."/boot" =
+ { device = "/dev/disk/by-uuid/05A6-59CE";
+ fsType = "vfat";
+ };
+
+ boot.initrd.luks.devices."home" =
+ { device = "/dev/yashinoki-vg0/home";
+ preLVM = false;
+ };
+
+ fileSystems."/home/andrew" =
+ { device = "/dev/mapper/home";
+ fsType = "ext4";
+ };
+
+ swapDevices =
+ [ { device = "/dev/yashinoki-vg0/swap"; }
+ ];
+
+ nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
+
+ powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
+ hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
+}
diff --git a/hosts/yashinoki/programs.nix b/hosts/yashinoki/programs.nix
new file mode 100644
index 0000000..0b09229
--- /dev/null
+++ b/hosts/yashinoki/programs.nix
@@ -0,0 +1,11 @@
+{ pkgs, ... }: {
+ environment.systemPackages = with pkgs; [
+ krita
+ yt-dlp
+ wineWowPackages.staging
+ winetricks
+ cabextract
+ (pkgs.discord.override { withOpenASAR = true; })
+ gftp
+ ];
+}