diff options
author | Mark Nipper <nipsy@bitgnome.net> | 2024-04-13 15:52:28 -0700 |
---|---|---|
committer | Mark Nipper <nipsy@bitgnome.net> | 2024-04-13 15:52:28 -0700 |
commit | ed68e6541c89e65ee654c1eb9ed9dce64ac1613e (patch) | |
tree | 5c0c3f2019dcec34d0050afee8f5c8f60b5d4473 /hosts | |
parent | 8f4ff719d0c17d294e7917eef418a4b13f7466b3 (diff) | |
download | nix-ed68e6541c89e65ee654c1eb9ed9dce64ac1613e.tar nix-ed68e6541c89e65ee654c1eb9ed9dce64ac1613e.tar.gz nix-ed68e6541c89e65ee654c1eb9ed9dce64ac1613e.tar.bz2 nix-ed68e6541c89e65ee654c1eb9ed9dce64ac1613e.tar.lz nix-ed68e6541c89e65ee654c1eb9ed9dce64ac1613e.tar.xz nix-ed68e6541c89e65ee654c1eb9ed9dce64ac1613e.tar.zst nix-ed68e6541c89e65ee654c1eb9ed9dce64ac1613e.zip |
Update ginaz to be heavily modular
Diffstat (limited to '')
-rw-r--r-- | hosts/common/core/default.nix | 83 | ||||
-rw-r--r-- | hosts/common/optional/db.nix | 8 | ||||
-rw-r--r-- | hosts/common/optional/dev.nix | 13 | ||||
-rw-r--r-- | hosts/common/optional/games.nix | 22 | ||||
-rw-r--r-- | hosts/common/optional/pipewire.nix | 17 | ||||
-rw-r--r-- | hosts/common/optional/sdr.nix | 16 | ||||
-rw-r--r-- | hosts/common/optional/services/xorg.nix | 81 | ||||
-rw-r--r-- | hosts/common/optional/sound.nix | 31 | ||||
-rw-r--r-- | hosts/ginaz/default.nix | 216 |
9 files changed, 273 insertions, 214 deletions
diff --git a/hosts/common/core/default.nix b/hosts/common/core/default.nix index 5fefe2d..d7edaaf 100644 --- a/hosts/common/core/default.nix +++ b/hosts/common/core/default.nix @@ -1,4 +1,4 @@ -{ inputs, outputs, ... }: { +{ inputs, outputs, pkgs, ... }: { imports = [ ./locale.nix ./nix.nix @@ -6,5 +6,86 @@ ./zsh.nix ]; + documentation.dev.enable = true; + documentation.man.enable = true; + + environment.systemPackages = builtins.attrValues { + inherit (pkgs) + bc + binutils + conntrack-tools + coreutils + curl + dict + diffutils + dig + dmidecode + encfs + enscript + ffmpeg + file + findutils + flac + fortune + fping + git + imagemagick + inxi + iotop + ipcalc + iperf + iputils + jq + lame + lshw + lsof + mkvtoolnix + mutt + netcat-openbsd + nix-index + nmap + ntfs3g + oath-toolkit + openldap + openssl + patchelf + pciutils + poppler_utils + powertop + psmisc + pv + pwgen + qemu_kvm + qrencode + radeontop + recode + sg3_utils + socat + speedtest-cli + sqlite + sshfs + stoken + sysstat + tcpdump + traceroute + tree + tshark + unrar + unzip + usbutils + vim + wget + whois + wireguard-tools + x265 + zip; + }; + hardware.enableRedistributableFirmware = true; + + programs.atop.enable = true; + programs.iftop.enable = true; + programs.mtr.enable = true; + programs.tmux.enable = true; + programs.zsh.enable = true; } diff --git a/hosts/common/optional/db.nix b/hosts/common/optional/db.nix new file mode 100644 index 0000000..af6766e --- /dev/null +++ b/hosts/common/optional/db.nix @@ -0,0 +1,8 @@ +{ pkgs, ... }: +{ + environment.systemPackages = builtins.attrValues { + inherit (pkgs) + mariadb + postgresql; + }; +} diff --git a/hosts/common/optional/dev.nix b/hosts/common/optional/dev.nix new file mode 100644 index 0000000..8278387 --- /dev/null +++ b/hosts/common/optional/dev.nix @@ -0,0 +1,13 @@ +{ pkgs, ... }: +{ + environment.systemPackages = builtins.attrValues { + inherit (pkgs) + cargo + gcc + go + nasm + rustc + yasm + zig; + }; +} diff --git a/hosts/common/optional/games.nix b/hosts/common/optional/games.nix new file mode 100644 index 0000000..9a43c00 --- /dev/null +++ b/hosts/common/optional/games.nix @@ -0,0 +1,22 @@ +{ pkgs, ... }: +{ + #environment.systemPackages = builtins.attrValues { + # inherit (pkgs) + # godot_4 + # mame + # mednafen + # mednaffe + # winetricks; + #}; + + environment.systemPackages = with pkgs; [ + godot_4 + mame + mednafen + mednaffe + winetricks + wineWowPackages.stagingFull + ]; + + programs.steam.enable = true; +} diff --git a/hosts/common/optional/pipewire.nix b/hosts/common/optional/pipewire.nix index 27b2a09..9d5b644 100644 --- a/hosts/common/optional/pipewire.nix +++ b/hosts/common/optional/pipewire.nix @@ -1,8 +1,17 @@ { pkgs, ... }: { - sound.enable = true; + environment.systemPackages = builtins.attrValues { + inherit (pkgs) + easyeffects + pamixer + pavucontrol + qpwgraph; + }; + hardware.pulseaudio.enable = false; + security.rtkit.enable = true; + services.pipewire = { enable = true; alsa.enable = true; @@ -16,9 +25,5 @@ # media-session.enable = true; }; - environment.systemPackages = builtins.attrValues { - inherit (pkgs) - pamixer - pavucontrol; - }; + sound.enable = true; } diff --git a/hosts/common/optional/sdr.nix b/hosts/common/optional/sdr.nix new file mode 100644 index 0000000..8e1e5d2 --- /dev/null +++ b/hosts/common/optional/sdr.nix @@ -0,0 +1,16 @@ +{ pkgs, ... }: +{ + environment.systemPackages = builtins.attrValues { + inherit (pkgs) + fldigi + sdrconnect; + }; + + 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" + ''; +} diff --git a/hosts/common/optional/services/xorg.nix b/hosts/common/optional/services/xorg.nix index e513c74..ae8eb13 100644 --- a/hosts/common/optional/services/xorg.nix +++ b/hosts/common/optional/services/xorg.nix @@ -1,10 +1,74 @@ +{ pkgs, ... }: { + #environment.systemPackages = builtins.attrValues { + # inherit (pkgs) + environment.systemPackages = with pkgs; [ + evince + feh + gcr + geeqie + #gimp-with-plugins + gimp + google-chrome + gv + inkscape + libreoffice + libva-utils + mesa-demos + mpv + polkit_gnome + rdesktop + read-edid + signal-desktop + st + sxiv + tigervnc + turbovnc + vdpauinfo + vlc + vulkan-tools + x11vnc + xclip + xdotool + xorg.xdpyinfo + xorg.xev + xscreensaver + xsnow + xterm#; + ]; + #}; + + programs.firefox.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.displayManager.defaultSession = "xsession"; services.xserver = { displayManager.lightdm = { enable = true; extraSeatDefaults = ''greeter-hide-users=true''; }; + displayManager.session = [ { manage = "desktop"; @@ -12,10 +76,27 @@ start = ''exec $HOME/.xsession''; } ]; + enable = true; libinput.enable = true; videoDrivers = [ "amdgpu" ]; xkb.layout = "us"; xkb.options = "caps:super,compose:ralt"; }; + + 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; + }; + }; + }; } diff --git a/hosts/common/optional/sound.nix b/hosts/common/optional/sound.nix new file mode 100644 index 0000000..e3b5ac1 --- /dev/null +++ b/hosts/common/optional/sound.nix @@ -0,0 +1,31 @@ +{ pkgs, ... }: +{ + #environment.systemPackages = builtins.attrValues { + # inherit (pkgs) + environment.systemPackages = with pkgs; [ + bespokesynth + cardinal + fluidsynth + geonkick + lilypond-unstable-with-fonts + polyphone + qsynth + reaper + rosegarden + samplv1 + sfizz + surge-XT + synthv1 + vapoursynth + vmpk + vocproc + wavpack + winetricks + wineWowPackages.stagingFull + yabridge + yabridgectl + yoshimi + zynaddsubfx#; + ]; + #}; +} diff --git a/hosts/ginaz/default.nix b/hosts/ginaz/default.nix index 9b306d1..97f14d9 100644 --- a/hosts/ginaz/default.nix +++ b/hosts/ginaz/default.nix @@ -11,163 +11,23 @@ zfs.devNodes = "/dev/disk/by-label"; }; - documentation.dev.enable = true; - documentation.man.enable = true; - - environment.systemPackages = with pkgs; [ - bc - bespokesynth - binutils - cardinal - cargo - conntrack-tools - coreutils - curl - dmenu - dict - diffutils - dig - dmidecode - easyeffects - encfs - enscript - evince - feh - ffmpeg - file - findutils - flac - fldigi - fluidsynth - foot - fortune - fping - gcc - 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 - iputils - 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 - sdrconnect - 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 - ]; + #environment.systemPackages = with pkgs; [ + # something + # somethingelse + #]; imports = [ ./hardware-configuration.nix ../common/core + ../common/optional/db.nix + ../common/optional/dev.nix + ../common/optional/games.nix ../common/optional/google-authenticator.nix ../common/optional/pipewire.nix + ../common/optional/sdr.nix ../common/optional/services/openssh.nix ../common/optional/services/xorg.nix + ../common/optional/sound.nix ../common/optional/zfs.nix ../common/users/nipsy ../common/users/root @@ -180,63 +40,5 @@ 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"; } |