diff options
Diffstat (limited to 'hosts')
-rw-r--r-- | hosts/ades/common.nix | 60 | ||||
-rw-r--r-- | hosts/ades/default.nix | 24 | ||||
-rw-r--r-- | hosts/ades/firefox-prefs.nix | 51 | ||||
-rw-r--r-- | hosts/ades/hardware.nix | 23 | ||||
-rw-r--r-- | hosts/ades/styx.nix | 21 | ||||
-rw-r--r-- | hosts/default.nix | 41 | ||||
-rw-r--r-- | hosts/thyme/default.nix | 41 | ||||
-rw-r--r-- | hosts/thyme/hardware.nix | 41 | ||||
-rw-r--r-- | hosts/thyme/packages.nix | 51 |
9 files changed, 353 insertions, 0 deletions
diff --git a/hosts/ades/common.nix b/hosts/ades/common.nix new file mode 100644 index 0000000..1a32da0 --- /dev/null +++ b/hosts/ades/common.nix @@ -0,0 +1,60 @@ +{ lib, pkgs, ... }: + +{ + this.pc.enable = true; + this.overlays.emacs.enable = lib.mkForce false; + this.gui.enable = true; + + this.locales.default = "us"; + + time.timeZone = "America/Chicago"; + + this.sets = { + arch.tools = true; + cli.tools.full = true; + net.tools.minimal = true; + sound.tools = true; + sys.tools = true; + }; + environment.systemPackages = with pkgs; [ + emacs + jre + rxvt-unicode + nethack + sil-q + ppsspp + wesnoth + minetest + gzdoom + teeworlds + superTuxKart + mindustry + shattered-pixel-dungeon + bzflag + xonotic-glx + mgba + taisei + unvanquished + ]; + + programs.firefox = { + enable = true; + package = pkgs.firefox-esr; + } // + import ./firefox-prefs.nix {}; + + services.xserver = { + enable = true; + windowManager.awesome = { + enable = true; + }; + }; + + services.joycond.enable = true; + + this.hosts = { + mine = true; + }; + + system.stateVersion = "24.11"; +} diff --git a/hosts/ades/default.nix b/hosts/ades/default.nix new file mode 100644 index 0000000..b4cae58 --- /dev/null +++ b/hosts/ades/default.nix @@ -0,0 +1,24 @@ +{ mkHost, hosts, nixpkgs }: + +let inherit (nixpkgs.lib.attrsets) + mergeAttrsList; +in +mergeAttrsList + ((map (h: mkHost "x86_64-linux" h + [ ./common.nix ]) + [ + "acheron" + "asphodel" + "cocytus" + "elysium" + "lethe" + "makaron" + "oneiron" + "tartarus" + ]) + ++ + (map (h: mkHost "x86_64-linux" h + [ ./common.nix ./${h}.nix ]) + [ + "styx" + ])) diff --git a/hosts/ades/firefox-prefs.nix b/hosts/ades/firefox-prefs.nix new file mode 100644 index 0000000..47a10c6 --- /dev/null +++ b/hosts/ades/firefox-prefs.nix @@ -0,0 +1,51 @@ +{ ... }: + +{ + policies = { + SearchBar = "separate"; + SearchEngines = { + Remove = ["Google" "Amazon.com" "Bing" "EBay"]; + Default = "DuckDuckGo"; + }; + DisableTelemetry = true; + EnableTrackingProtection = { Value = true; }; + OverrideFirstRunPage = ""; + OverridePostUpdatePage = ""; + NoDefaultBookmarks = true; + FirefoxSuggest = { + WebSuggestions = false; + SponsoredSuggestions = false; + ImproveSuggest = false; + }; + FirefoxHome = { + Search = true; + TopSites = false; + SponsoredTopSites = false; + Highlights = false; + Pocket = false; + SponsoredPocket = false; + Snippets = false; + }; + UserMessaging = { + WhatsNew = false; + ExtensionRecommendations = false; + FeatureRecommendations = false; + UrlbarInterventions = false; + SkipOnboarding = true; + MoreFromMozilla = false; + }; + ExtensionSettings."uBlock@raymondhill.net" = { + installation_mode = "force_installed"; + install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi"; + }; + }; + + preferencesStatus = "default"; + preferences = { + "browser.aboutConfig.showWarning" = false; + "browser.uidensity" = 1; + "browser.backspace_action" = 1; + "browser.ctrlTab.sortByRecentlyUsed" = true; + "browser.startup.page" = 3; + }; +} diff --git a/hosts/ades/hardware.nix b/hosts/ades/hardware.nix new file mode 100644 index 0000000..4698ae8 --- /dev/null +++ b/hosts/ades/hardware.nix @@ -0,0 +1,23 @@ +{ pkgs, ... }: + +{ + boot.initrd.availableKernelModules = []; + boot.initrd.kernelModules = [ + "iwlwifi" + ]; + boot.kernelModules = [ + "kvm-intel" + ]; + boot.extraModulePackages = []; + + hardware.graphics.extraPackages = [pkgs.intel-vaapi-driver]; + services.xserver.videoDrivers = ["intel"]; + + hardware.firmware = with pkgs; [ + linux-firmware + ]; + + hardware.bluetooth.enable = true; + + nixpkgs.hostPlatform = "x86_64-linux"; +} diff --git a/hosts/ades/styx.nix b/hosts/ades/styx.nix new file mode 100644 index 0000000..ba35edd --- /dev/null +++ b/hosts/ades/styx.nix @@ -0,0 +1,21 @@ +{ lib, ... }: + +let swapPart = "/dev/sda2"; +in +{ + boot.resumeDevice = swapPart; + + fileSystems."/" = lib.mkForce { + device = "/dev/sda1"; + fsType = "ext4"; + }; + + fileSystems."/home" = lib.mkForce { + device = "/dev/sda3"; + fsType = "ext4"; + }; + + swapDevices = [ + { device = swapPart; } + ]; +} diff --git a/hosts/default.nix b/hosts/default.nix new file mode 100644 index 0000000..deba17c --- /dev/null +++ b/hosts/default.nix @@ -0,0 +1,41 @@ +{ nixpkgs }: + +let + mkHost = system: hostname: modules: { + "${hostname}" = nixpkgs.lib.nixosSystem { + inherit system; + modules = [ ../modules ../users ] ++ modules; + specialArgs = { + inherit hostname nixpkgs; + }; + }; + }; + + inherit (nixpkgs.lib.attrsets) + mergeAttrsList; + inherit (builtins) + concatLists + attrValues + mapAttrs + map; + + hosts = systemsHosts: + mergeAttrsList + (concatLists + (attrValues + (mapAttrs + (system: hostnames: + map (h: mkHost system h [./${h}]) hostnames) + systemsHosts))); + + hostsImport = file: + import file { + inherit nixpkgs mkHost hosts; + }; +in +hosts { + "x86_64-linux" = [ + "thyme" + ]; +} // +hostsImport ./ades diff --git a/hosts/thyme/default.nix b/hosts/thyme/default.nix new file mode 100644 index 0000000..adc65e7 --- /dev/null +++ b/hosts/thyme/default.nix @@ -0,0 +1,41 @@ +{ pkgs, ... }: + +{ + imports = [ + ./hardware.nix + ./packages.nix + ]; + + this.pc.enable = true; + this.laptop.enable = true; + this.gui.enable = true; + + networking.domain = "alef.zoar.cx"; + + this.locales = { + default = "us"; + extra = ["it" "jp"]; + dictionaries.extra = ["grc" "la"]; + }; + + boot.loader.grub.enable = true; + boot.loader.grub.device = "nodev"; + + time.timeZone = "America/Chicago"; + + this.users.enabled = ["simon"]; + + fonts.fontconfig.defaultFonts = { + serif = []; + sansSerif = []; + monospace = []; + emoji = []; + }; + + this.hosts = { + lan.home = true; + mine = true; + }; + + system.stateVersion = "24.11"; +} diff --git a/hosts/thyme/hardware.nix b/hosts/thyme/hardware.nix new file mode 100644 index 0000000..50956c6 --- /dev/null +++ b/hosts/thyme/hardware.nix @@ -0,0 +1,41 @@ +{ pkgs, ... }: + +let swapPart = "/dev/sda5"; +in +{ + boot.initrd.availableKernelModules = []; + boot.initrd.kernelModules = []; + boot.kernelModules = [ + "kvm-intel" + "uinput" # work around rules bug + ]; + boot.extraModulePackages = []; + boot.resumeDevice = swapPart; + + fileSystems."/" = { + device = "/dev/sda1"; + fsType = "ext4"; + }; + + fileSystems."/home" = { + device = "/dev/sda6"; + fsType = "ext4"; + }; + + swapDevices = [ + { device = swapPart; } + ]; + + hardware.enableAllFirmware = false; + + this.overlays.g45_h264.enable = true; + hardware.graphics.extraPackages = [pkgs.intel-vaapi-driver]; + services.xserver.videoDrivers = ["intel"]; + + hardware.firmware = with pkgs; [ + alsa-firmware + ath9k-htc-blobless-firmware + ]; + + nixpkgs.hostPlatform = "x86_64-linux"; +} diff --git a/hosts/thyme/packages.nix b/hosts/thyme/packages.nix new file mode 100644 index 0000000..13fc13e --- /dev/null +++ b/hosts/thyme/packages.nix @@ -0,0 +1,51 @@ +{ pkgs, ... }: + +{ + this.sets = { + arch.tools = true; + cli.tools.full = true; + cli.shell = true; + comm.im = true; + de.utils = true; + gui.full = true; + gui.theme = true; + gui.fonts = true; + image.utils = true; + image.tools = true; + manga.dl = true; + media.tools = true; + net.tools.full = true; + script.utils = true; + sound.tools = true; + sys.tools = true; + writing.tools = true; + }; + + environment.systemPackages = with pkgs; [ + emacs + emacsPackages.pdf-tools + jre + ruby + sbcl + python3 + rclone + keymapper + nethack + sil-q + notmuch + emacsPackages.notmuch + mu + emacsPackages.mu4e + isync + ppsspp + wesnoth + ]; + + programs.firefox = { + enable = true; + package = pkgs.firefox-esr; + nativeMessagingHosts.packages = with pkgs; [ + passff-host + ]; + }; +} |