diff --git a/hosts/gerg-desktop/main.nix b/hosts/gerg-desktop/main.nix index 2d0eca0..0ada7de 100644 --- a/hosts/gerg-desktop/main.nix +++ b/hosts/gerg-desktop/main.nix @@ -20,7 +20,6 @@ }; allowedUnfree = [ "nvidia-x11" - "nvidia-settings" "steam" "steam-unwrapped" "steam-run" @@ -31,9 +30,9 @@ hardware.nvidia = { package = config.boot.kernelPackages.nvidiaPackages.beta; nvidiaPersistenced = false; - nvidiaSettings = true; + nvidiaSettings = false; modesetting.enable = true; - open = true; + open = false; powerManagement = { enable = lib.mkForce false; finegrained = lib.mkForce false; @@ -41,11 +40,12 @@ prime = { nvidiaBusId = "PCI:1:0:0"; amdgpuBusId = "PCI:15:0:0"; - sync.enable = true; + #sync.enable = true; }; }; services.xserver.videoDrivers = [ "nvidia" + "amdgpu" ]; hardware.amdgpu = { diff --git a/modules/boot/other.nix b/modules/boot.nix similarity index 57% rename from modules/boot/other.nix rename to modules/boot.nix index e4be6fc..ae4ea21 100644 --- a/modules/boot/other.nix +++ b/modules/boot.nix @@ -1,29 +1,55 @@ { - lib, self', - pkgs, + lib, config, + pkgs, }: { options.local.bootConfig.disable = lib.mkEnableOption ""; - config = lib.mkIf (!config.local.bootConfig.disable) { + environment.etc = { + "issue" = { + text = "[?12l[?25h"; + mode = "0444"; + }; + }; boot = { + blacklistedKernelModules = [ "pcspkr" ]; + kernelParams = lib.mkBefore [ + "logo.nologo" + "fbcon=nodefer" + "bgrt_disable" + "vt.global_cursor_default=0" + "quiet" + "systemd.show_status=false" + "rd.udev.log_level=3" + "splash" + ]; + consoleLogLevel = 3; + initrd = { + verbose = false; + systemd.enable = true; + }; + plymouth = { + enable = lib.mkDefault true; + theme = "breeze"; + logo = "${self'.packages.images}/logo.png"; + }; loader = { - grub.configurationLimit = 10; + grub = { + configurationLimit = 10; + extraConfig = '' + GRUB_TIMEOUT_STYLE=hidden + ''; + }; systemd-boot = { configurationLimit = 10; enable = lib.mkDefault true; consoleMode = "max"; editor = false; }; - efi.canTouchEfiVariables = lib.mkDefault true; - }; - plymouth = { - enable = lib.mkDefault true; - theme = "breeze"; - logo = "${self'.packages.images}/logo.png"; + timeout = 0; }; }; systemd.services.efibootmgr = { diff --git a/modules/boot/silent.nix b/modules/boot/silent.nix deleted file mode 100644 index 341a4d6..0000000 --- a/modules/boot/silent.nix +++ /dev/null @@ -1,42 +0,0 @@ -{ lib }: -{ - /* - Lots taken from here - https://wiki.archlinux.org/title/Silent_boot - */ - environment.etc.issue = { - /* - Turns the cursor back on in the TTY - It's the output of this commmand - setterm -cursor on - */ - - text = "[?12l[?25h"; - mode = "0444"; - }; - boot = { - kernelParams = lib.mkBefore [ - "fbcon=nodefer" # Wipes the vendor logo earlier - "vt.global_cursor_default=0" # Stops cursor blinking while booting - "quiet" # Less log messages - "systemd.show_status=auto" # Only show systemd errors - "udev.log_level=3" # Only show udev errors - "splash" # Show splash - ]; - consoleLogLevel = 3; # Only errors - initrd = { - verbose = false; # Less stage1 messages - systemd.enable = true; # Use systemd initrd - }; - # Hide grub (if it's being used) - loader.grub.extraConfig = '' - GRUB_TIMEOUT_STYLE=hidden - GRUB_HIDDEN_TIMEOUT_QUIET=true - ''; - /* - Not recommended - rolling back can be a pain - */ - #timeout = 0; - }; -} diff --git a/modules/shell.nix b/modules/shell.nix index 66799e7..f3950b8 100644 --- a/modules/shell.nix +++ b/modules/shell.nix @@ -2,6 +2,7 @@ fetch-rs, pkgs, config, + lib, }: { systemd.tmpfiles.rules = [ "d /tmp/neovim-page 0777 root root - -" ]; @@ -18,7 +19,6 @@ MANPAGER = "page -t man"; }; shellAliases = { - sudo = "sudo "; #make run0 use aliases run0 = "run0 --background='' "; s = "run0"; @@ -45,13 +45,10 @@ interactiveShellInit = "fetch-rs"; }; - security.sudo = { - execWheelOnly = true; - extraConfig = '' - Defaults timestamp_timeout=1 - Defaults env_keep += "EDITOR VISUAL PAGER SYSTEMD_PAGERSECURE MANPAGER" - Defaults lecture = never - ''; + #begone sudo + security = { + sudo.enable = lib.mkForce false; + wrappers.su.setuid = lib.mkForce false; }; #zsh stuff @@ -117,7 +114,7 @@ format = '' $cmd_duration$git_metrics$git_state$git_branch $status$directory$character''; - right_format = "$sudo$nix_shell\${custom.direnv} $time"; + right_format = "$nix_shell\${custom.direnv} $time"; continuation_prompt = "▶▶ "; character = { success_symbol = "[\\$](#9ece6a bold)"; @@ -157,10 +154,6 @@ time_format = "%I:%M %p"; disabled = false; }; - sudo = { - format = "[ ](#7aa2f7)"; - disabled = false; - }; }; }; };