diff options
Diffstat (limited to 'hosts')
| -rw-r--r-- | hosts/common.nix | 96 | ||||
| -rw-r--r-- | hosts/niuwux/default.nix | 13 | ||||
| -rw-r--r-- | hosts/niuwux/hardware-configuration.nix | 103 |
3 files changed, 101 insertions, 111 deletions
diff --git a/hosts/common.nix b/hosts/common.nix index 45bdfb6..5d3e05c 100644 --- a/hosts/common.nix +++ b/hosts/common.nix @@ -97,22 +97,8 @@ nixpkgs = { config = { allowUnfree = true; - doCheckByDefault = false; # doInstallCheckByDefault = false; }; - overlays = [ - (final: prev: { - stdenv = prev.stdenv // { - mkDerivation = args: - prev.stdenv.mkDerivation - (args - // { - doCheck = false; - # doInstallCheck = false; - }); - }; - }) - ]; }; # nix.registry.${user}.flake = inputs.self; # nix.registry.nixpkgs.flake = inputs.nixpkgs; @@ -149,23 +135,24 @@ security.rtkit.enable = true; security.polkit.enable = true; - fonts.fontconfig = { - enable = true; - antialias = true; - hinting = { - enable = true; - style = "slight"; - }; - subpixel = { - rgba = "rgb"; - lcdfilter = "default"; - }; - }; + # fonts.fontconfig = { + # enable = true; + # antialias = true; + # hinting = { + # enable = true; + # style = "slight"; + # }; + # subpixel = { + # rgba = "rgb"; + # lcdfilter = "default"; + # }; + # }; fonts.fontDir.enable = true; fonts.packages = with pkgs; [ ioskeley-input - nerd-fonts.symbols-only + ioskeley-mono.normal-NF + # nerd-fonts.symbols-only # nerd-fonts.jetbrains-mono # ioskeley-mono # maple-mono.NF @@ -173,11 +160,57 @@ fonts.fontconfig.defaultFonts.monospace = [ "IosevkaInput" - "JetBrainsMono Nerd Font" + # "JetBrainsMono Nerd Font" "Symbols Nerd Font" ]; - programs.zsh.enable = true; + programs.bash = { + enable = true; + interactiveShellInit = '' + # --- History Configuration --- + # HISTSIZE: Number of lines to keep in memory + # HISTFILESIZE: Number of lines to keep in the file + export HISTSIZE=5000 + export HISTFILESIZE=5000 + export HISTFILE="$HOME/.bash_history" + + # Append to history file rather than overwriting + shopt -s histappend + + # Ignore commands starting with space + export HISTCONTROL=ignorespace:erasedups + + # --- Completion Configuration --- + # Bash completion is usually handled by the 'bash-completion' package + # Ensure it is enabled in your nixos config: programs.bash.completion.enable = true; + bind "set completion-ignore-case on" + bind "set show-all-if-ambiguous on" + + # Correct way to enable menu-complete: + # bind '"\t": menu-complete' + bind '"\e[Z": menu-complete-backward' + + bind "set show-all-if-ambiguous on" + ''; + promptInit = '' + if [ "$TERM" != "dumb" ] || [ -n "$INSIDE_EMACS" ]; then + # Removed the '1;' prefix to disable bold + PROMPT_COLOR="31m" + ((UID)) && PROMPT_COLOR="32m" + + # Removed \n (newline) and [ ] brackets + if [ -n "$INSIDE_EMACS" ]; then + PS1="\[\033[$PROMPT_COLOR\]\u@\h:\w\\$\[\033[0m\] " + else + PS1="\[\033[$PROMPT_COLOR\]\[\e]0;\u@\h: \w\a\]\u@\h:\w\\$\[\033[0m\] " + fi + + if test "$TERM" = "xterm"; then + PS1="\[\033]2;\h:\u:\w\007\]$PS1" + fi + fi + ''; + }; programs.nano.enable = false; programs.gnupg.agent = { enable = true; @@ -187,7 +220,8 @@ sops = { defaultSopsFile = ../secrets/secrets.yaml; - age.keyFile = "/home/bee/.config/sops/age/keys.txt"; + defaultSopsFormat = "yaml"; + age.keyFile = "/home/${user}/.config/sops/age/keys.txt"; secrets.gpg_private_key = { owner = user; mode = "0400"; @@ -197,8 +231,6 @@ systemd.services.import-gpg-key = { description = "Import GPG key from sops secret"; wantedBy = [ "multi-user.target" ]; - after = [ "sops-nix.service" ]; - wants = [ "sops-nix.service" ]; serviceConfig = { Type = "oneshot"; RemainAfterExit = true; diff --git a/hosts/niuwux/default.nix b/hosts/niuwux/default.nix index 44674dd..265769e 100644 --- a/hosts/niuwux/default.nix +++ b/hosts/niuwux/default.nix @@ -31,8 +31,6 @@ beeMods = { windowManagers = { mango.enable = true; - hyprland.enable = false; - dwm.enable = false; }; }; @@ -80,7 +78,7 @@ users.users.${user} = { isNormalUser = true; - shell = pkgs.fish; + shell = pkgs.bash; extraGroups = [ "networkmanager" "wheel" @@ -88,7 +86,9 @@ ]; }; - environment.sessionVariables = { }; + environment.sessionVariables = { + EDITOR = "nvim"; + }; networking.hostName = hostname; networking.firewall.allowedTCPPorts = [ ]; @@ -101,14 +101,13 @@ pciutils direnv # mangohud - neovim ]; services.xserver.videoDrivers = [ "nvidia" ]; hardware = { graphics = { enable = true; - enable32Bit = config.programs.steam.enable; + enable32Bit = false; extraPackages = with pkgs; [ libvdpau-va-gl nvidia-vaapi-driver @@ -118,7 +117,7 @@ nvidia = { modesetting.enable = true; powerManagement.enable = true; - powerManagement.finegrained = true; + powerManagement.finegrained = false; open = true; nvidiaSettings = false; diff --git a/hosts/niuwux/hardware-configuration.nix b/hosts/niuwux/hardware-configuration.nix index 96c39c3..4c20a84 100644 --- a/hosts/niuwux/hardware-configuration.nix +++ b/hosts/niuwux/hardware-configuration.nix @@ -1,90 +1,49 @@ # 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, - ... -}: +{ config, lib, pkgs, modulesPath, ... }: { - imports = [ - (modulesPath + "/installer/scan/not-detected.nix") - ]; + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; - boot.initrd.availableKernelModules = [ - "nvme" - "xhci_pci" - "usb_storage" - "usbhid" - "sd_mod" - ]; + boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usbhid" "usb_storage" "sd_mod" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; - fileSystems."/" = { - device = "/dev/disk/by-uuid/85c4da5f-b234-498f-bf47-f2d3b26bf0cc"; - fsType = "btrfs"; - options = [ - "subvol=@" - "compress=zstd" - "noatime" - "discard=async" - "space_cache=v2" - ]; - }; + fileSystems."/" = + { device = "/dev/disk/by-uuid/933658d7-eaf2-4e75-a23d-c80d8a1cf8c6"; + fsType = "btrfs"; + options = [ "subvol=@" "noatime" "space_cache=v2" "nodiscard" "ssd" "compress=zstd:3" ]; + }; - fileSystems."/home" = { - device = "/dev/disk/by-uuid/85c4da5f-b234-498f-bf47-f2d3b26bf0cc"; - fsType = "btrfs"; - options = [ - "subvol=@home" - "compress=zstd" - "noatime" - "discard=async" - "space_cache=v2" - ]; - }; + fileSystems."/home" = + { device = "/dev/disk/by-uuid/933658d7-eaf2-4e75-a23d-c80d8a1cf8c6"; + fsType = "btrfs"; + options = [ "subvol=@home" "noatime" "space_cache=v2" "nodiscard" "ssd" "compress=zstd:3" ]; + }; - fileSystems."/nix" = { - device = "/dev/disk/by-uuid/85c4da5f-b234-498f-bf47-f2d3b26bf0cc"; - fsType = "btrfs"; - options = [ - "subvol=@nix" - "compress=zstd" - "noatime" - "discard=async" - "space_cache=v2" - ]; - }; + fileSystems."/nix" = + { device = "/dev/disk/by-uuid/933658d7-eaf2-4e75-a23d-c80d8a1cf8c6"; + fsType = "btrfs"; + options = [ "subvol=@nix" "noatime" "space_cache=v2" "nodiscard" "ssd" "compress=zstd:3" ]; + }; - fileSystems."/var/log" = { - device = "/dev/disk/by-uuid/85c4da5f-b234-498f-bf47-f2d3b26bf0cc"; - fsType = "btrfs"; - options = [ - "subvol=@log" - "compress=zstd" - "noatime" - "discard=async" - "space_cache=v2" - ]; - }; + fileSystems."/var" = + { device = "/dev/disk/by-uuid/933658d7-eaf2-4e75-a23d-c80d8a1cf8c6"; + fsType = "btrfs"; + options = [ "subvol=@var" "noatime" "space_cache=v2" "nodiscard" "ssd" "compress=zstd:3" ]; + }; - fileSystems."/boot" = { - device = "/dev/disk/by-uuid/DD2D-BC85"; - fsType = "vfat"; - options = [ - "fmask=0022" - "dmask=0022" - ]; - }; + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/59FA-D495"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; - swapDevices = [ - { device = "/dev/disk/by-uuid/247afe44-bbc1-4931-bf26-29a540e9d7df"; } - ]; + swapDevices = [ ]; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; |
