diff options
author | Freya Murphy <freya@freyacat.org> | 2025-06-23 23:26:25 -0400 |
---|---|---|
committer | Freya Murphy <freya@freyacat.org> | 2025-06-23 23:26:25 -0400 |
commit | fc6f6b052c47dc0c59746b820df73a1ff5dc0c14 (patch) | |
tree | e745f9eb0176c223d84e98397aa703a1ce4e4923 | |
parent | fix hypridle config (diff) | |
download | dotfiles-nix-fc6f6b052c47dc0c59746b820df73a1ff5dc0c14.tar.gz dotfiles-nix-fc6f6b052c47dc0c59746b820df73a1ff5dc0c14.tar.bz2 dotfiles-nix-fc6f6b052c47dc0c59746b820df73a1ff5dc0c14.zip |
move duplicate mkNixosSystem hosts conf into flake
-rw-r--r-- | flake.nix | 18 | ||||
-rw-r--r-- | hosts/kaworu/default.nix | 87 | ||||
-rw-r--r-- | hosts/shinji/default.nix | 130 | ||||
-rw-r--r-- | hosts/thinkpad/default.nix | 75 |
4 files changed, 138 insertions, 172 deletions
@@ -46,11 +46,23 @@ } ) systems); + buildSystem = file: system: + inputs.nixpkgs.lib.nixosSystem { + inherit system; + specialArgs = {inherit inputs;}; + modules = [ + options + ./home + ./modules + ./system + file + ]; + }; in rec { nixosConfigurations = { - shinji = import ./hosts/shinji {inherit inputs options;}; - kaworu = import ./hosts/kaworu {inherit inputs options;}; - thinkpad = import ./hosts/thinkpad {inherit inputs options;}; + shinji = buildSystem ./hosts/shinji "x86_64-linux"; + kaworu = buildSystem ./hosts/kaworu "x86_64-linux"; + thinkpad = buildSystem ./hosts/thinkpad "x86_64-linux"; }; homeConfigurations = { diff --git a/hosts/kaworu/default.nix b/hosts/kaworu/default.nix index 7d09423..8b7e089 100644 --- a/hosts/kaworu/default.nix +++ b/hosts/kaworu/default.nix @@ -1,57 +1,42 @@ # Kaworu # System configuration for my desktop -{ - inputs, - options, - ... -}: -inputs.nixpkgs.lib.nixosSystem rec { - system = "x86_64-linux"; - specialArgs = {inherit inputs;}; - modules = [ - options - ../../home - ../../modules - ../../system - { - imports = [ - ./hardware.nix - ]; - - # options - hostName = "kaworu"; - monitors = [ - { - name = "HDMI-A-1"; - scale = 1.0; - } - ]; +{...}: { + imports = [ + ./hardware.nix + ]; - # modules - browser = { - firefox = true; - }; - desktop = { - enable = true; - astal = true; - hyprland = true; - hyprlock = true; - hypridle = true; - hyprpaper = true; - }; - development = { - c = true; - rust = true; - web = true; - }; - gaming = { - homestuck = true; - minecraft = true; - steam = true; - }; - terminal = { - kitty = true; - }; + # options + hostName = "kaworu"; + monitors = [ + { + name = "HDMI-A-1"; + scale = 1.0; } ]; + + # modules + browser = { + firefox = true; + }; + desktop = { + enable = true; + astal = true; + hyprland = true; + hyprlock = true; + hypridle = true; + hyprpaper = true; + }; + development = { + c = true; + rust = true; + web = true; + }; + gaming = { + homestuck = true; + minecraft = true; + steam = true; + }; + terminal = { + kitty = true; + }; } diff --git a/hosts/shinji/default.nix b/hosts/shinji/default.nix index 776b87b..74f3052 100644 --- a/hosts/shinji/default.nix +++ b/hosts/shinji/default.nix @@ -1,80 +1,64 @@ # Shinji # System configuration for my laptop -{ - inputs, - options, - ... -}: -inputs.nixpkgs.lib.nixosSystem rec { - system = "x86_64-linux"; - specialArgs = {inherit inputs;}; - modules = [ - options - ../../home - ../../modules - ../../system - { - # imports - imports = [ - ./hardware.nix - ./sops.nix - ./wireguard.nix - ]; - - # options - hostName = "shinji"; - monitors = [ - { - name = "eDP-1"; - scale = 1.25; - bitdepth = 10; - } - ]; +{pkgs, ...}: { + imports = [ + ./hardware.nix + ./sops.nix + ./wireguard.nix + ]; - # set power btn to suspend - services.logind.extraConfig = '' - HandlePowerKey=suspend - ''; + # options + hostName = "shinji"; + monitors = [ + { + name = "eDP-1"; + scale = 1.25; + bitdepth = 10; + } + ]; - # packages - environment.systemPackages = with pkgs; [ - # wine - winetricks - wineWowPackages.staging - # android - android-tools - scrcpy - # misc - foliate - jami - qbittorrent - ]; + # set power btn to suspend + services.logind.extraConfig = '' + HandlePowerKey=suspend + ''; - # modules - browser = { - firefox = true; - }; - desktop = { - enable = true; - astal = true; - hyprland = true; - hyprlock = true; - hypridle = true; - hyprpaper = true; - }; - development = { - c = true; - rust = true; - web = true; - }; - gaming = { - homestuck = true; - minecraft = true; - steam = true; - }; - terminal = { - kitty = true; - }; - } + # packages + environment.systemPackages = with pkgs; [ + # wine + winetricks + wineWowPackages.staging + # android + android-tools + scrcpy + # misc + foliate + jami + qbittorrent ]; + + # modules + browser = { + firefox = true; + }; + desktop = { + enable = true; + astal = true; + hyprland = true; + hyprlock = true; + hypridle = true; + hyprpaper = true; + }; + development = { + c = true; + rust = true; + web = true; + }; + gaming = { + homestuck = true; + minecraft = true; + steam = true; + }; + terminal = { + kitty = true; + }; } diff --git a/hosts/thinkpad/default.nix b/hosts/thinkpad/default.nix index 5167074..4d764c0 100644 --- a/hosts/thinkpad/default.nix +++ b/hosts/thinkpad/default.nix @@ -1,51 +1,36 @@ # Thinkpad #System configuration for my thinkpad -{ - inputs, - options, - ... -}: -inputs.nixpkgs.lib.nixosSystem rec { - system = "x86_64-linux"; - specialArgs = {inherit inputs;}; - modules = [ - options - ../../home - ../../modules - ../../system - { - imports = [ - ./hardware.nix - ]; - - # options - hostName = "thinkpad"; - monitors = [ - { - name = "eDP-1"; - scale = 1.0; - } - ]; +{...}: { + imports = [ + ./hardware.nix + ]; - # modules - browser = { - firefox = true; - }; - desktop = { - enable = true; - astal = true; - hyprland = true; - hyprlock = true; - hypridle = true; - hyprpaper = true; - }; - gaming = { - homestuck = true; - minecraft = true; - }; - terminal = { - kitty = true; - }; + # options + hostName = "thinkpad"; + monitors = [ + { + name = "eDP-1"; + scale = 1.0; } ]; + + # modules + browser = { + firefox = true; + }; + desktop = { + enable = true; + astal = true; + hyprland = true; + hyprlock = true; + hypridle = true; + hyprpaper = true; + }; + gaming = { + homestuck = true; + minecraft = true; + }; + terminal = { + kitty = true; + }; } |