From 88e2379516e6c0330be17d70aeea546ac8e74b88 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Sun, 28 Apr 2024 09:12:56 -0500 Subject: [PATCH] pass enabled down --- flake.nix | 4 +- hosts/algiz/default.nix | 6 +- hosts/algiz/system.nix | 8 ++- hosts/mannaz/default.nix | 6 +- hosts/mannaz/system.nix | 9 ++- hosts/othalan/default.nix | 6 +- hosts/othalan/system.nix | 9 ++- lib/default.nix | 4 +- modules/desktop/window-managers/hyprland.nix | 76 ++++++++++---------- modules/programs/chrome/default.nix | 2 +- 10 files changed, 62 insertions(+), 68 deletions(-) diff --git a/flake.nix b/flake.nix index 3164d09..36b9a42 100644 --- a/flake.nix +++ b/flake.nix @@ -34,13 +34,13 @@ "https://hyprland.cachix.org" "https://nixpkgs-wayland.cachix.org" "https://daylin.cachix.org" - # "https://cache.garnix.io" + # "https://cache.garnix.io" ]; extra-trusted-public-keys = [ "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" "nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA=" "daylin.cachix.org-1:fLdSnbhKjtOVea6H9KqXeir+PyhO+sDSPhEW66ClE/k=" - # "cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g=" + # "cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g=" ]; }; } diff --git a/hosts/algiz/default.nix b/hosts/algiz/default.nix index 82632c7..ca589ba 100644 --- a/hosts/algiz/default.nix +++ b/hosts/algiz/default.nix @@ -1,11 +1,9 @@ { self, pkgs, - lib, + enabled, ... -}: let - inherit (lib) enabled; -in { +}: { imports = with self.nixosModules; [ restic ]; diff --git a/hosts/algiz/system.nix b/hosts/algiz/system.nix index e1381ad..db84bb4 100644 --- a/hosts/algiz/system.nix +++ b/hosts/algiz/system.nix @@ -1,6 +1,8 @@ -{lib, ...}: let - inherit (lib) enabled; -in { +{ + lib, + enabled, + ... +}: { users.motd = lib.mkRune { number = "6"; rune = "algiz"; diff --git a/hosts/mannaz/default.nix b/hosts/mannaz/default.nix index 8321b73..78bdc51 100644 --- a/hosts/mannaz/default.nix +++ b/hosts/mannaz/default.nix @@ -1,10 +1,8 @@ { self, - lib, + enabled, ... -}: let - inherit (lib) enabled; -in { +}: { imports = with self.nixosModules; [ nix-ld ]; diff --git a/hosts/mannaz/system.nix b/hosts/mannaz/system.nix index 5a21d74..5020df3 100644 --- a/hosts/mannaz/system.nix +++ b/hosts/mannaz/system.nix @@ -1,12 +1,11 @@ { config, pkgs, - lib, + enabled, + mkRune, ... -}: let - inherit (lib) enabled; -in { - users.motd = lib.mkRune { +}: { + users.motd = mkRune { number = "2"; rune = "mannaz"; }; diff --git a/hosts/othalan/default.nix b/hosts/othalan/default.nix index a54a0b1..d40712f 100644 --- a/hosts/othalan/default.nix +++ b/hosts/othalan/default.nix @@ -1,10 +1,8 @@ { pkgs, - lib, + enabled, ... -}: let - inherit (lib) enabled; -in { +}: { oizys = { desktop = enabled; hyprland = enabled; diff --git a/hosts/othalan/system.nix b/hosts/othalan/system.nix index b20440b..9b3284a 100644 --- a/hosts/othalan/system.nix +++ b/hosts/othalan/system.nix @@ -1,10 +1,9 @@ { pkgs, - lib, + enabled, + mkRune, ... -}: let - inherit (lib) enabled; -in { +}: { networking.networkmanager = enabled; services.printing = enabled; services.fwupd = enabled; @@ -28,7 +27,7 @@ in { pamixer ]; - services.getty.greetingLine = lib.mkRune { + services.getty.greetingLine = mkRune { rune = "othalan"; runeKind = "ascii"; }; diff --git a/lib/default.nix b/lib/default.nix index efe18e3..e1aa474 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -3,7 +3,7 @@ inputs: let lib = nixpkgs.lib.extend (import ./extended.nix); inherit (builtins) mapAttrs readDir filter listToAttrs; - inherit (lib) nixosSystem genAttrs isNixFile mkDefaultOizysModule mkOizysModule; + inherit (lib) nixosSystem genAttrs isNixFile mkDefaultOizysModule mkOizysModule enabled mkRune; inherit (lib.filesystem) listFilesRecursive; inherit (import ./find-modules.nix {inherit lib;}) findModulesList; @@ -26,7 +26,7 @@ in rec { isNixFile (listFilesRecursive (../. + "/hosts/${hostname}")); - specialArgs = {inherit inputs lib self mkDefaultOizysModule mkOizysModule;}; + specialArgs = {inherit inputs lib self mkDefaultOizysModule mkOizysModule enabled mkRune;}; }; oizysHosts = mapAttrs (name: _: mkSystem name) (readDir ../hosts); diff --git a/modules/desktop/window-managers/hyprland.nix b/modules/desktop/window-managers/hyprland.nix index b944992..516d835 100644 --- a/modules/desktop/window-managers/hyprland.nix +++ b/modules/desktop/window-managers/hyprland.nix @@ -3,9 +3,9 @@ pkgs, config, mkOizysModule, - lib, + enabled, ... -}: +}: # let # lock = pkgs.writeShellApplication { # name = "lock"; @@ -14,49 +14,49 @@ # swaylock -c 1e1e2e # ''; # }; -let inherit (lib) enabled; -in - mkOizysModule config "hyprland" { - programs.hyprland = enabled // { +mkOizysModule config "hyprland" { + programs.hyprland = + enabled + // { package = inputs.hyprland.packages.${pkgs.system}.default; }; - security.pam.services.swaylock = {}; - # Optional, hint electron apps to use wayland: - environment.sessionVariables.NIXOS_OZONE_WL = "1"; + security.pam.services.swaylock = {}; + # Optional, hint electron apps to use wayland: + environment.sessionVariables.NIXOS_OZONE_WL = "1"; - environment.systemPackages = with pkgs; [ - wlr-randr - kanshi + environment.systemPackages = with pkgs; [ + wlr-randr + kanshi - brightnessctl - udiskie - eww + brightnessctl + udiskie + eww - # notifications - libnotify - dunst + # notifications + libnotify + dunst - # utils - grimblast - ksnip - wl-clipboard - rofi-wayland - pavucontrol + # utils + grimblast + ksnip + wl-clipboard + rofi-wayland + pavucontrol - catppuccin-cursors.mochaDark + catppuccin-cursors.mochaDark - #hypr ecosystem - hyprlock - hypridle + #hypr ecosystem + hyprlock + hypridle - swww - ]; + swww + ]; - nixpkgs.overlays = [ - inputs.hyprland-contrib.overlays.default - inputs.nixpkgs-wayland.overlay - # when this was active I was forced to recompile VirtualBox myself, which would just fail to compile... - # Must have been one of the other non-hyprland packages modified in the overlay - # inputs.hyprland.overlays.default - ]; - } + nixpkgs.overlays = [ + inputs.hyprland-contrib.overlays.default + inputs.nixpkgs-wayland.overlay + # when this was active I was forced to recompile VirtualBox myself, which would just fail to compile... + # Must have been one of the other non-hyprland packages modified in the overlay + # inputs.hyprland.overlays.default + ]; +} diff --git a/modules/programs/chrome/default.nix b/modules/programs/chrome/default.nix index 56bdafd..b0325fc 100644 --- a/modules/programs/chrome/default.nix +++ b/modules/programs/chrome/default.nix @@ -22,7 +22,7 @@ mkOizysModule config "chrome" { }; environment.systemPackages = with pkgs; [ - (chromium.override{ + (chromium.override { commandLineArgs = [ "--force-dark-mode" ];