From ec1e48b79366d075c37e1219d6ffee16f3600ad8 Mon Sep 17 00:00:00 2001 From: Donovan Glover Date: Sun, 15 Dec 2024 18:56:39 -0500 Subject: [PATCH] chore: improve formatting --- example/flake.nix | 2 ++ flake.nix | 5 +++++ home/dwm.nix | 1 + modules/containers.nix | 1 + tests/neovim.nix | 1 + 5 files changed, 10 insertions(+) diff --git a/example/flake.nix b/example/flake.nix index e675b398..f1ec9ae2 100644 --- a/example/flake.nix +++ b/example/flake.nix @@ -7,6 +7,7 @@ outputs = { nix-config, ... }@attrs: + let inherit (nix-config.inputs) nixpkgs; inherit (nixpkgs.lib) nixosSystem optional; @@ -17,6 +18,7 @@ hyprland = nixosSystem { system = "x86_64-linux"; specialArgs = attrs; + modules = [ ./configuration.nix ] ++ optional (pathExists ./hardware-configuration.nix) ./hardware-configuration.nix; diff --git a/flake.nix b/flake.nix index c67f61b2..3209930c 100644 --- a/flake.nix +++ b/flake.nix @@ -29,12 +29,14 @@ outputs = { self, nixpkgs, ... }: + let inherit (nixpkgs.lib) nixosSystem genAttrs replaceStrings; inherit (nixpkgs.lib.filesystem) packagesFromDirectoryRecursive listFilesRecursive; forAllSystems = function: + genAttrs [ "x86_64-linux" "aarch64-linux" @@ -45,6 +47,7 @@ { packages = forAllSystems ( pkgs: + packagesFromDirectoryRecursive { inherit (pkgs) callPackage; @@ -64,8 +67,10 @@ checks = forAllSystems ( pkgs: + genAttrs (map nameOf (listFilesRecursive ./tests)) ( name: + import ./tests/${name}.nix { inherit self pkgs; } diff --git a/home/dwm.nix b/home/dwm.nix index d364220e..9b0b0ba2 100644 --- a/home/dwm.nix +++ b/home/dwm.nix @@ -37,6 +37,7 @@ in static const int user_bh = 10; static const int showbar = 1; static const int topbar = 1; + static const char *fonts[] = { "Maple Mono:size=10", "Noto Sans Mono CJK JP:size=10", diff --git a/modules/containers.nix b/modules/containers.nix index ea8f0724..de95cd4a 100644 --- a/modules/containers.nix +++ b/modules/containers.nix @@ -61,6 +61,7 @@ in localAddress = "192.168.100.49"; config = { nix-config, pkgs, ... }: + { imports = with nix-config.nixosModules; diff --git a/tests/neovim.nix b/tests/neovim.nix index 0ef61f76..2cc76069 100644 --- a/tests/neovim.nix +++ b/tests/neovim.nix @@ -7,6 +7,7 @@ self.inputs.nixpkgs.lib.nixos.runTest { nodes.machine = { nix-config, config, ... }: + { imports = with nix-config.nixosModules; [ shell