From 352c46cf33a8764ea037624b3de6b80b186bed22 Mon Sep 17 00:00:00 2001 From: uttarayan21 Date: Sat, 28 Dec 2024 20:22:34 +0530 Subject: [PATCH] feat: Added ddcutil and changed stuff around ryu.nix and configuration.nix --- nixos/ryu/configuration.nix | 91 ++++++++++++++++--------------------- nixos/ryu/ryu.nix | 25 +++++----- 2 files changed, 53 insertions(+), 63 deletions(-) diff --git a/nixos/ryu/configuration.nix b/nixos/ryu/configuration.nix index 15d70a4d..6d448055 100644 --- a/nixos/ryu/configuration.nix +++ b/nixos/ryu/configuration.nix @@ -8,6 +8,32 @@ ./ryu.nix ]; + programs = { + _1password.enable = true; + _1password-gui = { + enable = true; + polkitPolicyOwners = ["servius"]; + }; + adb.enable = true; + alvr.enable = true; + alvr.openFirewall = true; + hyprland.enable = true; + hyprland.xwayland.enable = true; + yubikey-touch-detector.enable = true; + steam = { + enable = true; + gamescopeSession.enable = true; + remotePlay.openFirewall = true; + dedicatedServer.openFirewall = true; + }; + nix-ld = { + enable = true; + libraries = with pkgs; [ + libglvnd + ]; + }; + }; + systemd.services.NetworkManager-wait-online.enable = lib.mkForce false; security = { sudo.wheelNeedsPassword = false; @@ -36,13 +62,13 @@ }; package = pkgs.nixVersions.latest; buildMachines = [ - { - hostName = "sh.darksailor.dev"; - sshUser = "fs0c131y"; - system = "x86_64-linux"; - protocol = "ssh-ng"; - supportedFeatures = ["nixos-test" "benchmark" "big-parallel" "kvm"]; - } + # { + # hostName = "sh.darksailor.dev"; + # sshUser = "fs0c131y"; + # system = "x86_64-linux"; + # protocol = "ssh-ng"; + # supportedFeatures = ["nixos-test" "benchmark" "big-parallel" "kvm"]; + # } ]; distributedBuilds = true; }; @@ -78,9 +104,6 @@ # }; # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. - udev.packages = [pkgs.yubikey-personalization pkgs.yubikey-personalization-gui pkgs.via]; - yubikey-agent.enable = true; - # Configure keymap in X11 xserver.xkb = { layout = "us"; @@ -98,7 +121,7 @@ boot = { lanzaboote = { enable = true; - pkiBundle = "/etc/secureboot"; + pkiBundle = "/var/lib/sbctl"; }; plymouth = { enable = true; @@ -156,29 +179,16 @@ nameservers = ["1.1.1.1#one.one.one.one" "1.0.0.1#one.one.one.one"]; # Configure network proxy if necessary - # networking.proxy.default = "http://user:password@proxy:port/"; - # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; + # proxy.default = "http://user:password@proxy:port/"; + # proxy.noProxy = "127.0.0.1,localhost,internal.domain"; # Enable networking networkmanager.enable = true; - # Some programs need SUID wrappers, can be configured further or are - # started in user sessions. - # programs.mtr.enable = true; - # programs.gnupg.agent = { - # enable = true; - # enableSSHSupport = true; - # }; - - # List services that you want to enable: - - # Enable the OpenSSH daemon. - # Open ports in the firewall. - # networking.firewall.allowedTCPPorts = [ ... ]; - # networking.firewall.allowedUDPPorts = [ ... ]; - # Or disable the firewall altogether. - # networking.firewall.enable = false; + # firewall.allowedTCPPorts = [ ... ]; + # firewall.allowedUDPPorts = [ ... ]; + # firewall.enable = false; firewall = { enable = true; allowedTCPPortRanges = [ @@ -219,11 +229,6 @@ }; # Define a user account. Don't forget to set a password with ‘passwd’. - users.users.servius = { - isNormalUser = true; - description = "Uttarayan"; - extraGroups = ["networkmanager" "wheel" "audio"]; - }; # Allow unfree packages nixpkgs.config.allowUnfree = true; @@ -251,6 +256,7 @@ nerd-fonts.hasklug nerd-fonts.symbols-only monaspace + ddcutil ]; sessionVariables = { WLR_NO_HARDWARE_CURSORS = "1"; @@ -260,23 +266,6 @@ }; musnix.enable = true; - programs = { - hyprland.enable = true; - hyprland.xwayland.enable = true; - yubikey-touch-detector.enable = true; - steam = { - enable = true; - gamescopeSession.enable = true; - remotePlay.openFirewall = true; - dedicatedServer.openFirewall = true; - }; - nix-ld = { - enable = true; - libraries = with pkgs; [ - libglvnd - ]; - }; - }; # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions diff --git a/nixos/ryu/ryu.nix b/nixos/ryu/ryu.nix index 23f84b90..0436c64e 100644 --- a/nixos/ryu/ryu.nix +++ b/nixos/ryu/ryu.nix @@ -9,17 +9,6 @@ ... }: { imports = [(modulesPath + "/installer/scan/not-detected.nix")]; - programs = { - _1password.enable = true; - _1password-gui = { - enable = true; - polkitPolicyOwners = ["servius"]; - }; - alvr.enable = true; - alvr.openFirewall = true; - adb.enable = true; - steam.enable = true; - }; hardware.graphics = { enable = true; @@ -75,8 +64,20 @@ boot.initrd.availableKernelModules = ["vmd" "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod"]; boot.initrd.kernelModules = []; - boot.kernelModules = ["kvm-intel"]; + boot.kernelModules = ["kvm-intel" "i2c-dev"]; boot.extraModulePackages = []; + # services.udev.packages = [pkgs.yubikey-personalization pkgs.yubikey-personalization-gui pkgs.via]; + services.udev.packages = [pkgs.via]; + services.yubikey-agent.enable = true; + services.udev.extraRules = '' + KERNEL=="i2c-[0-9]*", GROUP="i2c", MODE="0660" + ''; + + users.users.servius = { + isNormalUser = true; + description = "Uttarayan"; + extraGroups = ["networkmanager" "wheel" "audio" "i2c"]; + }; fileSystems."/" = { device = "/dev/disk/by-uuid/11d8beef-2a63-4231-af35-b9b8d3a17e9b";