diff options
author | Mark Nipper <nipsy@bitgnome.net> | 2024-03-31 02:40:11 -0700 |
---|---|---|
committer | Mark Nipper <nipsy@bitgnome.net> | 2024-03-31 02:40:11 -0700 |
commit | 76b3b07e7329be637b37f92e767595143d3b03fa (patch) | |
tree | ff674a9bc8d8e1cdba94cb0d1c13de28b75c1e74 /hosts/ginaz | |
parent | 04fd53819ffce3e1275ec48bcdf71769414fdea1 (diff) | |
download | nix-76b3b07e7329be637b37f92e767595143d3b03fa.tar nix-76b3b07e7329be637b37f92e767595143d3b03fa.tar.gz nix-76b3b07e7329be637b37f92e767595143d3b03fa.tar.bz2 nix-76b3b07e7329be637b37f92e767595143d3b03fa.tar.lz nix-76b3b07e7329be637b37f92e767595143d3b03fa.tar.xz nix-76b3b07e7329be637b37f92e767595143d3b03fa.tar.zst nix-76b3b07e7329be637b37f92e767595143d3b03fa.zip |
Migrate to more modular layout
Diffstat (limited to 'hosts/ginaz')
-rw-r--r-- | hosts/ginaz/default.nix | 238 | ||||
-rw-r--r-- | hosts/ginaz/hardware-configuration.nix | 49 |
2 files changed, 287 insertions, 0 deletions
diff --git a/hosts/ginaz/default.nix b/hosts/ginaz/default.nix new file mode 100644 index 0000000..d5fa16c --- /dev/null +++ b/hosts/ginaz/default.nix @@ -0,0 +1,238 @@ +{ config, inputs, pkgs, ... }: { + boot = { + initrd.kernelModules = [ "amdgpu" "zfs" ]; + kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages; + loader = { + efi.canTouchEfiVariables = true; + systemd-boot.enable = true; + timeout = 3; + }; + supportedFilesystems = [ "zfs" ]; + zfs.devNodes = "/dev/disk/by-label"; + }; + + documentation.dev.enable = true; + documentation.man.enable = true; + + environment.systemPackages = with pkgs; [ + bc + bespokesynth + bintools + cardinal + cargo + conntrack-tools + curl + dmenu + dict + dig + dmidecode + easyeffects + encfs + enscript + evince + feh + ffmpeg + file + flac + fldigi + fluidsynth + foot + fortune + fping + gcr + geeqie + geonkick + #gimp-with-plugins + gimp + git + go + godot_4 + google-authenticator + google-chrome + gv + helm + i3 + i3status + imagemagick + inkscape + inxi + iotop + ipcalc + iperf + jq + lame + libreoffice + libva-utils + lilypond-unstable-with-fonts + lshw + lsof + mame + mariadb + mednafen + mednaffe + mesa-demos + mkvtoolnix + mpv + mutt + netcat-openbsd + nix-index + nmap + ntfs3g + oath-toolkit + openldap + openssl + (pass.withExtensions (ext: with ext; [pass-otp])) + pass + patchelf + pavucontrol + pciutils + picom + polkit_gnome + polyphone + poppler_utils + powertop + psmisc + pv + pwgen + qemu_kvm + qpwgraph + qrencode + qsynth + radeontop + rdesktop + read-edid + reaper + recode + rosegarden + rustc + samplv1 + sfizz + sg3_utils + signal-desktop + speedtest-cli + sqlite + sshfs + st + stoken + surge-XT + sxiv + synthv1 + sysstat + tcpdump + tigervnc + traceroute + tree + tshark + turbovnc + unrar + unzip + usbutils + vapoursynth + vdpauinfo + vim + vlc + vmpk + vocproc + vulkan-tools + wavpack + wget + whois + winetricks + wineWowPackages.stagingFull + wireguard-tools + x11vnc + x265 + xclip + xdotool + xorg.xdpyinfo + xscreensaver + xsnow + yabridge + yabridgectl + yoshimi + zig + zip + zynaddsubfx + ]; + + imports = [ + inputs.hardware.nixosModules.lenovo-yoga-7-14ARH7.amdgpu + + ./hardware-configuration.nix + ../common/core + ../common/optional/google-authenticator.nix + ../common/optional/pipewire.nix + ../common/optional/services/openssh.nix + ../common/optional/services/xorg.nix + ../common/optional/zfs.nix + ../common/users/nipsy + ../common/users/root + ]; + + networking = { + hostId = "8425e349"; + hostName = "ginaz"; + networkmanager.enable = true; + nftables.enable = true; + }; + + programs.atop.enable = true; + programs.firefox.enable = true; + programs.gnupg.agent = { + enable = true; + enableSSHSupport = true; + }; + programs.iftop.enable = true; + programs.mtr.enable = true; + programs.nm-applet.enable = true; + programs.steam.enable = true; + programs.tmux.enable = true; + programs.zsh.enable = true; + + security.polkit = { + enable = true; + extraConfig = '' + polkit.addRule(function(action, subject) { + if ( + subject.isInGroup("users") + && ( + action.id == "org.freedesktop.login1.reboot" || + action.id == "org.freedesktop.login1.reboot-multiple-sessions" || + action.id == "org.freedesktop.login1.power-off" || + action.id == "org.freedesktop.login1.power-off-multiple-sessions" + ) + ) + { + return polkit.Result.YES; + } + }) + ''; + }; + services.blueman.enable = true; + services.printing.enable = true; + services.udev.extraRules = '' + SUBSYSTEM=="usb",ENV{DEVTYPE}=="usb_device",ATTRS{idVendor}=="1df7",ATTRS{idProduct}=="2500",MODE:="0666" + SUBSYSTEM=="usb",ENV{DEVTYPE}=="usb_device",ATTRS{idVendor}=="1df7",ATTRS{idProduct}=="3000",MODE:="0666" + SUBSYSTEM=="usb",ENV{DEVTYPE}=="usb_device",ATTRS{idVendor}=="1df7",ATTRS{idProduct}=="3010",MODE:="0666" + SUBSYSTEM=="usb",ENV{DEVTYPE}=="usb_device",ATTRS{idVendor}=="1df7",ATTRS{idProduct}=="3020",MODE:="0666" + SUBSYSTEM=="usb",ENV{DEVTYPE}=="usb_device",ATTRS{idVendor}=="1df7",ATTRS{idProduct}=="3030",MODE:="0666" + ''; + + systemd = { + user.services.polkit-gnome-authentication-agent-1 = { + description = "polkit-gnome-authentication-agent-1"; + wantedBy = [ "graphical-session.target" ]; + wants = [ "graphical-session.target" ]; + after = [ "graphical-session.target" ]; + serviceConfig = { + Type = "simple"; + ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"; + Restart = "on-failure"; + RestartSec = 1; + TimeoutStopSec = 10; + }; + }; + }; + + system.stateVersion = "23.11"; +} diff --git a/hosts/ginaz/hardware-configuration.nix b/hosts/ginaz/hardware-configuration.nix new file mode 100644 index 0000000..a5ae455 --- /dev/null +++ b/hosts/ginaz/hardware-configuration.nix @@ -0,0 +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, ... }: + +{ + imports = + [ #(modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "rpool/local/root"; + fsType = "zfs"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-label/boot"; + fsType = "vfat"; + }; + + fileSystems."/nix" = + { device = "rpool/local/nix"; + fsType = "zfs"; + }; + + fileSystems."/root" = + { device = "rpool/user/home/root"; + fsType = "zfs"; + }; + + fileSystems."/home/nipsy" = + { device = "rpool/user/home/nipsy"; + fsType = "zfs"; + }; + + swapDevices = + [ { device = "/dev/disk/by-label/swap"; } + ]; + + hardware.bluetooth.enable = true; + #hardware.bluetooth.powerOnBoot = true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; +} |