diff options
Diffstat (limited to '')
-rw-r--r-- | hosts/by-name/apzu/configuration.nix (renamed from hosts/apzu/default.nix) | 22 | ||||
-rw-r--r-- | hosts/by-name/apzu/hardware.nix (renamed from hosts/apzu/hardware.nix) | 9 | ||||
-rw-r--r-- | hosts/by-name/tiamat/configuration.nix (renamed from hosts/tiamat/default.nix) | 40 | ||||
-rw-r--r-- | hosts/by-name/tiamat/hardware.nix (renamed from hosts/tiamat/hardware.nix) | 9 | ||||
-rw-r--r-- | hosts/default.nix | 61 | ||||
-rw-r--r-- | hosts/hostinfo.toml | 10 |
6 files changed, 135 insertions, 16 deletions
diff --git a/hosts/apzu/default.nix b/hosts/by-name/apzu/configuration.nix index 133342c3..d4aad0f9 100644 --- a/hosts/apzu/default.nix +++ b/hosts/by-name/apzu/configuration.nix @@ -1,3 +1,12 @@ +# nixos-config - My current NixOS configuration +# +# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> +# SPDX-License-Identifier: GPL-3.0-or-later +# +# This file is part of my nixos-config. +# +# You should have received a copy of the License along with this program. +# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. { lib, pkgs, @@ -9,16 +18,19 @@ ]; soispha = { - services.backup = { - # Apzu should be regularly synced with Tiamat, which performs updates. - enable = false; - }; bluetooth.enable = true; laptop = { backlight = "intel_backlight"; enable = true; }; + + # TODO: Hard-code all the uids/gids <2025-05-13> + impermanence.directories = [ + "/var/lib/nixos" + "/var/log" + ]; + programs = { yambar = { laptop = true; @@ -53,7 +65,7 @@ modes = ["normal" "locked"]; }; "<MEDIA_MUTEVOLUME>" = { - command = ["spawn" "${lib.getExe pkgs.mpc} toggle"]; + command = ["spawn" "${lib.getExe pkgs.mpp} toggle"]; modes = ["normal" "locked"]; }; diff --git a/hosts/apzu/hardware.nix b/hosts/by-name/apzu/hardware.nix index ae204baa..8d481fa6 100644 --- a/hosts/apzu/hardware.nix +++ b/hosts/by-name/apzu/hardware.nix @@ -1,3 +1,12 @@ +# nixos-config - My current NixOS configuration +# +# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> +# SPDX-License-Identifier: GPL-3.0-or-later +# +# This file is part of my nixos-config. +# +# You should have received a copy of the License along with this program. +# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. {modulesPath, ...}: { imports = [ (modulesPath + "/installer/scan/not-detected.nix") # TODO: is this necessary? diff --git a/hosts/tiamat/default.nix b/hosts/by-name/tiamat/configuration.nix index 470f88cb..efb77b96 100644 --- a/hosts/tiamat/default.nix +++ b/hosts/by-name/tiamat/configuration.nix @@ -1,9 +1,18 @@ +# nixos-config - My current NixOS configuration +# +# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> +# SPDX-License-Identifier: GPL-3.0-or-later +# +# This file is part of my nixos-config. +# +# You should have received a copy of the License along with this program. +# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. { lib, pkgs, - baseLib, - qmk_firmware, system, + libraries, + externalBinaries, ... }: { imports = [ @@ -21,11 +30,14 @@ enable = true; systemName = "x86_64-linux"; }; + + # TODO: Hard-code all the uids/gids <2025-05-13> + impermanence.directories = [ + "/var/lib/nixos" + "/var/log" + ]; + services = { - backup = { - backupDiskUuid = "c06ce163-2955-4388-b212-dfec4448fcf4"; - enable = true; - }; unison.foreign.address = "apzu.fritz.box"; }; programs = { @@ -61,7 +73,7 @@ # Audio # "M" = {command = ["spawn" "video-pause toggle"]; modes = ["normal" "locked"]; }; "N" = { - command = ["spawn" "${lib.getExe pkgs.mpc} toggle"]; + command = ["spawn" "${lib.getExe pkgs.mpp} toggle"]; modes = ["normal" "locked"]; }; @@ -80,16 +92,22 @@ # "Y" = {command = ["spawn" "bemenu-run"];}; # Toggle all tags - "0" = {command = ["set-focused-tags" "${builtins.toString ((baseLib.pow 2 32) - 1)}"];}; + "0" = {command = ["set-focused-tags" "${builtins.toString ((libraries.base.pow 2 32) - 1)}"];}; # Support Unicode input - "Z" = {command = ["spawn" "${lib.getExe qmk_firmware.packages.${system}.qmk_unicode_type} 106 65377"];}; + "Z" = {command = ["spawn" "${lib.getExe externalBinaries.qmk_firmware.packages.${system}.qmk_unicode_type} 106 65377"];}; }) // ({ # TODO: add toggle-focus mapping # Toggle all tags - "<Alt+Ctrl+Shift-0>" = {command = ["set-view-tags" "${builtins.toString ((baseLib.pow 2 32) - 1)}"];}; + "<Alt+Ctrl+Shift-0>" = { + command = [ + "set-view-tags" + "${builtins.toString + ((libraries.base.pow 2 32) - 1)}" + ]; + }; # Mouse "<Meta-<MOUSE_LEFT>>" = { @@ -105,7 +123,7 @@ builtins.foldl' (acc: elem: acc // elem) {} ( builtins.map (index: let num = builtins.toString index; - index2tag = input: builtins.toString (baseLib.pow 2 (input - 1)); + index2tag = input: builtins.toString (libraries.base.pow 2 (input - 1)); in { "${map num}" = {command = ["set-focused-tags" (index2tag index)];}; "<Alt+Ctrl+Shift-${num}>" = {command = ["set-view-tags" (index2tag index)];}; diff --git a/hosts/tiamat/hardware.nix b/hosts/by-name/tiamat/hardware.nix index 97600848..2b18a662 100644 --- a/hosts/tiamat/hardware.nix +++ b/hosts/by-name/tiamat/hardware.nix @@ -1,3 +1,12 @@ +# nixos-config - My current NixOS configuration +# +# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> +# SPDX-License-Identifier: GPL-3.0-or-later +# +# This file is part of my nixos-config. +# +# You should have received a copy of the License along with this program. +# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. {modulesPath, ...}: { imports = [ (modulesPath + "/installer/scan/not-detected.nix") # TODO: is this necessary? diff --git a/hosts/default.nix b/hosts/default.nix new file mode 100644 index 00000000..35b2d08b --- /dev/null +++ b/hosts/default.nix @@ -0,0 +1,61 @@ +# nixos-config - My current NixOS configuration +# +# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> +# SPDX-License-Identifier: GPL-3.0-or-later +# +# This file is part of my nixos-config. +# +# You should have received a copy of the License along with this program. +# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. +{ + self, + system, + openPRsNixpkgs, + packageSets, + libraries, + modules, + externalDependencies, + externalBinaries, +}: let + hosts = libraries.extra.mkByName { + useShards = false; + baseDirectory = ./by-name; + fileName = "configuration.nix"; + }; + + generateHost = _: path: + self.inputs.nixpkgs.lib.nixosSystem { + specialArgs = { + inherit + libraries + modules + ; + }; + modules = [ + { + _module.args = { + inherit + # extra package sources + openPRsNixpkgs + packageSets + # extra information + system + # nix registry + self + externalDependencies + # bins + # TODO: Integrate these into `pkgs/by-name` <2024-05-22> + externalBinaries + ; + }; + } + path + + ../modules + ../modules/common + ]; + }; + + generatedHosts = builtins.mapAttrs generateHost hosts; +in + generatedHosts diff --git a/hosts/hostinfo.toml b/hosts/hostinfo.toml index b51c0501..c2523a3a 100644 --- a/hosts/hostinfo.toml +++ b/hosts/hostinfo.toml @@ -1,3 +1,13 @@ +# nixos-config - My current NixOS configuration +# +# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> +# SPDX-License-Identifier: GPL-3.0-or-later +# +# This file is part of my nixos-config. +# +# You should have received a copy of the License along with this program. +# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. + [Tiamat] description = "This is my main desktop" |