From 37a11e11ff82f9e1fd551b4a1d7a991dd57f968c Mon Sep 17 00:00:00 2001 From: atagen Date: Fri, 2 Dec 2022 11:51:00 +1100 Subject: [PATCH] god only knows --- .p10k.zsh | 0 home/bolt.nix | 16 +++++ home/config.nix | 1 + home/fossil.nix | 0 home/home.nix | 17 +++-- home/homepkgs/bismuth.nix | 0 home/homepkgs/culr.nix | 0 home/homepkgs/git-credential-keepassxc.nix | 0 home/homepkgs/slice.nix | 28 +++++++++ home/nixpkgs | 1 + home/plank.nix | 0 kdekeys | 0 system/adrift.nix | 0 system/cachix.nix | 0 system/cachix/cuda-maintainers.nix | 11 ++++ system/cachix/nix-community.nix | 4 +- system/configuration.nix | 26 +++----- system/docker.nix | 13 ++++ system/hardware-configuration.nix | 40 ++++++++++++ system/quiver.nix | 73 ++++++++++++++++++++++ system/wollomi.nix | 49 +++++++-------- top n bottom.layout.latte | 0 wollomi-xorg.conf | 0 23 files changed, 230 insertions(+), 49 deletions(-) mode change 100644 => 100755 .p10k.zsh create mode 100644 home/bolt.nix create mode 100644 home/config.nix mode change 100644 => 100755 home/fossil.nix mode change 100644 => 100755 home/home.nix mode change 100644 => 100755 home/homepkgs/bismuth.nix mode change 100644 => 100755 home/homepkgs/culr.nix mode change 100644 => 100755 home/homepkgs/git-credential-keepassxc.nix create mode 100755 home/homepkgs/slice.nix create mode 120000 home/nixpkgs mode change 100644 => 100755 home/plank.nix mode change 100644 => 100755 kdekeys mode change 100644 => 100755 system/adrift.nix mode change 100644 => 100755 system/cachix.nix create mode 100755 system/cachix/cuda-maintainers.nix mode change 100644 => 100755 system/cachix/nix-community.nix mode change 100644 => 100755 system/configuration.nix create mode 100755 system/docker.nix create mode 100755 system/hardware-configuration.nix create mode 100755 system/quiver.nix mode change 100644 => 100755 system/wollomi.nix mode change 100644 => 100755 top n bottom.layout.latte mode change 100644 => 100755 wollomi-xorg.conf diff --git a/.p10k.zsh b/.p10k.zsh old mode 100644 new mode 100755 diff --git a/home/bolt.nix b/home/bolt.nix new file mode 100644 index 0000000..09f1f19 --- /dev/null +++ b/home/bolt.nix @@ -0,0 +1,16 @@ +{ config, pkgs, ... }: + +{ + + home.username = "bolt"; + home.homeDirectory = "/home/bolt"; + + home.packages = with pkgs; [ + cmus + zellij + steam + xonotic + nicotine-plus + ]; + +} diff --git a/home/config.nix b/home/config.nix new file mode 100644 index 0000000..69baf10 --- /dev/null +++ b/home/config.nix @@ -0,0 +1 @@ +{ allowUnfree = true; } diff --git a/home/fossil.nix b/home/fossil.nix old mode 100644 new mode 100755 diff --git a/home/home.nix b/home/home.nix old mode 100644 new mode 100755 index 7746021..551f90d --- a/home/home.nix +++ b/home/home.nix @@ -3,7 +3,8 @@ { imports = [ # who are you? - ./fossil.nix + ./bolt.nix + # ./fossil.nix # ./plank.nix ]; @@ -17,6 +18,9 @@ nixpkgs.config.allowUnfree = true; home.packages = with pkgs; [ + + rustup + kitty thunderbird @@ -46,6 +50,7 @@ libsForQt5.ark libsForQt5.qtstyleplugin-kvantum + libsForQt5.bismuth gtk-engine-murrine @@ -53,15 +58,15 @@ (callPackage ./homepkgs/git-credential-keepassxc.nix { }) (callPackage ./homepkgs/culr.nix { }) - (libsForQt5.callPackage ./homepkgs/bismuth.nix { }) + # (libsForQt5.callPackage ./homepkgs/bismuth.nix { }) ]; gtk = { enable = true; theme = { - package = pkgs.arc-theme; - name = "Arc-Dark"; + #package = pkgs.arc-theme; + name = "Simplewaita"; }; }; @@ -112,7 +117,7 @@ programs.kitty = { enable = true; font = { - name = "MesloLGS NF Regular"; + name = "Ellograph CF"; size = 10; }; settings = { @@ -292,7 +297,7 @@ fresh theme = "bogster"; }; - home.stateVersion = "22.05"; + home.stateVersion ="22.11"; programs.home-manager.enable = true; } diff --git a/home/homepkgs/bismuth.nix b/home/homepkgs/bismuth.nix old mode 100644 new mode 100755 diff --git a/home/homepkgs/culr.nix b/home/homepkgs/culr.nix old mode 100644 new mode 100755 diff --git a/home/homepkgs/git-credential-keepassxc.nix b/home/homepkgs/git-credential-keepassxc.nix old mode 100644 new mode 100755 diff --git a/home/homepkgs/slice.nix b/home/homepkgs/slice.nix new file mode 100755 index 0000000..9b0117e --- /dev/null +++ b/home/homepkgs/slice.nix @@ -0,0 +1,28 @@ +{ lib +, stdenv +, fetchFromGitHub +}: +stdenv.mkDerivation rec { + pname = "sddm-slice"; + version = "1.5.1"; + + src = fetchFromGitHub { + owner = "EricKotato"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-IWwFsYqoqW3924+pf8L+acIt31aU/mhqakXbT9Q4Bqw="; + }; + + deployPhase = " + cp -r ./* /usr/share/sddm/themes/slice/ + "; + + meta = with lib; { + description = "an sddm theme"; + homepage = "somewhere.else"; + license = licenses.mit; + maintainers = []; + platforms = platforms.all; + }; + +} diff --git a/home/nixpkgs b/home/nixpkgs new file mode 120000 index 0000000..afa8aff --- /dev/null +++ b/home/nixpkgs @@ -0,0 +1 @@ +/home/fossil/.config/nixpkgs \ No newline at end of file diff --git a/home/plank.nix b/home/plank.nix old mode 100644 new mode 100755 diff --git a/kdekeys b/kdekeys old mode 100644 new mode 100755 diff --git a/system/adrift.nix b/system/adrift.nix old mode 100644 new mode 100755 diff --git a/system/cachix.nix b/system/cachix.nix old mode 100644 new mode 100755 diff --git a/system/cachix/cuda-maintainers.nix b/system/cachix/cuda-maintainers.nix new file mode 100755 index 0000000..be053ee --- /dev/null +++ b/system/cachix/cuda-maintainers.nix @@ -0,0 +1,11 @@ + +{ + nix = { + binaryCaches = [ + "https://cuda-maintainers.cachix.org" + ]; + binaryCachePublicKeys = [ + "cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E=" + ]; + }; +} diff --git a/system/cachix/nix-community.nix b/system/cachix/nix-community.nix old mode 100644 new mode 100755 index 427a518..9eacfa3 --- a/system/cachix/nix-community.nix +++ b/system/cachix/nix-community.nix @@ -1,10 +1,10 @@ { nix = { - binaryCaches = [ + settings.substituters = [ "https://nix-community.cachix.org" ]; - binaryCachePublicKeys = [ + settings.trusted-public-keys = [ "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" ]; }; diff --git a/system/configuration.nix b/system/configuration.nix old mode 100644 new mode 100755 index b9270d8..e543120 --- a/system/configuration.nix +++ b/system/configuration.nix @@ -6,8 +6,10 @@ imports = [ # where are we ? - # ./wollomi.nix + #./wollomi.nix # ./adrift.nix + ./quiver.nix + ./docker.nix # home manager should exist for users @@ -30,8 +32,6 @@ boot.loader.systemd-boot.configurationLimit = 2; boot.loader.systemd-boot.consoleMode = "max"; boot.loader.timeout = 3; - #boot.loader.efi.canTouchEfiVariables = true; - #boot.plymouth.enable = true; boot.kernelPackages = pkgs.linuxPackages_xanmod_latest; @@ -88,25 +88,15 @@ services.tailscale.enable = true; - # rust - nixpkgs.overlays = [ - (import "${fetchTarball "https://github.com/nix-community/fenix/archive/main.tar.gz"}/overlay.nix") - ]; - environment.systemPackages = with pkgs; [ + + rnix-lsp - rust-analyzer-nightly - (fenix.complete.withComponents [ - "clippy" - "rustfmt" - ]) - tailscale cachix helix - rnix-lsp ark curl @@ -116,11 +106,15 @@ zsh + libsForQt5.sddm-kcm + + ]; networking.firewall = { - allowedUDPPorts = [ 41641 ]; + # allowedUDPPorts = [ 41641 ]; + trustedInterfaces = [ "tailscale0" ]; checkReversePath = "loose"; }; diff --git a/system/docker.nix b/system/docker.nix new file mode 100755 index 0000000..42997d2 --- /dev/null +++ b/system/docker.nix @@ -0,0 +1,13 @@ + +{ config, lib, pkgs, ... }: + +{ + virtualisation.docker.enable = true; + # virtualisation.docker.enableOnBoot = true; + + # Nvidia Docker + virtualisation.docker.enableNvidia = true; + # libnvidia-container does not support cgroups v2 (prior to 1.8.0) + # https://github.com/NVIDIA/nvidia-docker/issues/1447 + systemd.enableUnifiedCgroupHierarchy = false; +} \ No newline at end of file diff --git a/system/hardware-configuration.nix b/system/hardware-configuration.nix new file mode 100755 index 0000000..a6fca03 --- /dev/null +++ b/system/hardware-configuration.nix @@ -0,0 +1,40 @@ +# 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" "ahci" "usbcore" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/06f59431-d939-4b48-9d91-e23606dd3ce0"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/5008-1946"; + fsType = "vfat"; + }; + + fileSystems."/data" = { + device = "/dev/sdb1"; + fsType = "ntfs"; + }; + 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..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.eno1.useDHCP = lib.mkDefault true; + + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/system/quiver.nix b/system/quiver.nix new file mode 100755 index 0000000..496a689 --- /dev/null +++ b/system/quiver.nix @@ -0,0 +1,73 @@ +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbcore" "sd_mod" ]; + boot.initrd.kernelModules = []; + boot.kernelModules = [ "kvm-amd" "i2c-dev" ]; + boot.extraModulePackages = [ ]; + boot.kernelParams = [ "mitigations=off" "acpi_enforce_resources=lax" ]; + + boot.loader.efi.canTouchEfiVariables = true; + boot.plymouth.enable = true; + + boot.supportedFilesystems = [ "ntfs" ]; + + networking.useDHCP = lib.mkDefault true; + + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + + # dlna + services.minidlna = { + enable = true; + announceInterval = 120; + friendlyName = "PC"; + mediaDirs = [ "A,/data/Music/Slsk" ]; + }; + + services.xserver.videoDrivers = [ "nvidia" ]; + hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable; + hardware.ckb-next.enable = true; + environment.systemPackages = with pkgs; [ + ckb-next + openrgb + ]; + + networking.hostName = "quiver"; # Define your hostname. + users.users.bolt = { + isNormalUser = true; + extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user. + }; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/06f59431-d939-4b48-9d91-e23606dd3ce0"; + fsType = "ext4"; + }; + + fileSystems."/home" = + { device = "/dev/disk/by-uuid/f063e0c7-8590-4ed4-860c-5ae0c9b66898"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/5008-1946"; + fsType = "vfat"; + }; + + fileSystems."/data" = { + device = "/dev/disk/by-uuid/39D4F78C658E8B56"; + fsType = "ntfs"; + options = [ "rw" "uid=1001" "gid=100" ]; + }; + + swapDevices = [ ]; + + networking.firewall = { + allowedUDPPorts = [ 1900 ]; + allowedTCPPorts = [ 8200 ]; + }; + +} diff --git a/system/wollomi.nix b/system/wollomi.nix old mode 100644 new mode 100755 index c9f4520..cde4ae9 --- a/system/wollomi.nix +++ b/system/wollomi.nix @@ -5,23 +5,16 @@ [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ "ata_generic" "ehci_pci" "ahci" "isci" "xhci_pci" "usb_storage" "usbhid" "sd_mod" "sr_mod" ]; - boot.initrd.kernelModules = [ "dm-snapshot" ]; - boot.kernelModules = [ "kvm-intel" ]; + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbcore" "sd_mod" ]; + boot.initrd.kernelModules = []; + boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; boot.supportedFilesystems = [ "ntfs" ]; - fileSystems."/boot" = { - device = "/dev/disk/by-uuid/5008-1946"; - fsType = "vfat"; - }; - - swapDevices = [ ]; - networking.useDHCP = lib.mkDefault true; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; # dlna services.minidlna = { @@ -38,27 +31,33 @@ ckb-next ]; - networking.hostName = "wollomi"; # Define your hostname. - users.users.fossil = { + networking.hostName = "quiver"; # Define your hostname. + users.users.bolt = { isNormalUser = true; extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user. }; - fileSystems."/" = { - device = "/dev/mapper/nix-os"; - fsType = "ext4"; - }; + fileSystems."/" = + { device = "/dev/disk/by-uuid/06f59431-d939-4b48-9d91-e23606dd3ce0"; + fsType = "ext4"; + }; - fileSystems."/home" = { - device = "/dev/mapper/nix-home"; - fsType = "ext4"; - }; + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/5008-1946"; + fsType = "vfat"; + }; fileSystems."/data" = { - device = "/dev/disk/by-uuid/39D4F78C658E8B56"; - fsType = "ntfs"; - options = [ "rw" "uid=1000" "gid=100" ]; + device = "/dev/disk/by-uuid/39D4F78C658E8B56"; + fsType = "ntfs"; + options = [ "rw" "uid=1000" "gid=100" ]; + }; + + swapDevices = [ ]; + + networking.firewall = { + allowedUDPPorts = [ 1900 ]; + allowedTCPPorts = [ 8200 ]; }; - # networking.firewall.enable = false; } diff --git a/top n bottom.layout.latte b/top n bottom.layout.latte old mode 100644 new mode 100755 diff --git a/wollomi-xorg.conf b/wollomi-xorg.conf old mode 100644 new mode 100755