mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-12-22 14:20:44 -06:00
let's do some inheritance shenanigans
This commit is contained in:
parent
60a6311a0d
commit
f3a5290a80
8 changed files with 96 additions and 120 deletions
|
@ -6,7 +6,7 @@
|
|||
lib = nixpkgs.lib.extend (import ./extended.nix);
|
||||
|
||||
inherit (builtins) mapAttrs readDir filter listToAttrs;
|
||||
inherit (lib) nixosSystem genAttrs isNixFile;
|
||||
inherit (lib) nixosSystem genAttrs isNixFile mkDefaultOizysModule mkOizysModule;
|
||||
inherit (lib.filesystem) listFilesRecursive;
|
||||
|
||||
inherit (import ./find-modules.nix {inherit lib;}) findModulesList;
|
||||
|
@ -29,7 +29,7 @@ in rec {
|
|||
isNixFile
|
||||
(listFilesRecursive (../. + "/hosts/${hostname}"));
|
||||
|
||||
specialArgs = {inherit inputs lib self;};
|
||||
specialArgs = {inherit inputs lib self mkDefaultOizysModule mkOizysModule;};
|
||||
};
|
||||
|
||||
oizysHosts = mapAttrs (name: _: mkSystem name) (readDir ../hosts);
|
||||
|
|
|
@ -2,10 +2,9 @@
|
|||
inputs,
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
mkOizysModule,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkOizysModule enabled;
|
||||
lock = pkgs.writeShellApplication {
|
||||
name = "lock";
|
||||
runtimeInputs = with pkgs; [swaylock];
|
||||
|
@ -15,7 +14,7 @@
|
|||
};
|
||||
in
|
||||
mkOizysModule config "hyprland" {
|
||||
programs.hyprland = enabled;
|
||||
programs.hyprland.enable = true;
|
||||
security.pam.services.swaylock = {};
|
||||
# Optional, hint electron apps to use wayland:
|
||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
{
|
||||
inputs,
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
mkDefaultOizysModule,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkDefaultOizysModule;
|
||||
in
|
||||
}:
|
||||
mkDefaultOizysModule config "cli" {
|
||||
programs.direnv.enable = true;
|
||||
environment.sessionVariables = {
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
mkOizysModule,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkOizysModule;
|
||||
in
|
||||
}:
|
||||
mkOizysModule config "vpn" {
|
||||
environment.systemPackages = [pkgs.openconnect];
|
||||
}
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
mkOizysModule,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkOizysModule;
|
||||
in
|
||||
}:
|
||||
mkOizysModule config "chrome" {
|
||||
programs.chromium = {
|
||||
enable = true;
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
mkOizysModule,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkOizysModule;
|
||||
in
|
||||
}:
|
||||
mkOizysModule config "backups" {
|
||||
environment.systemPackages = with pkgs; [rclone];
|
||||
|
||||
|
|
|
@ -1,25 +1,12 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
mkOizysModule,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkOizysModule;
|
||||
in
|
||||
}:
|
||||
mkOizysModule config "docker" {
|
||||
virtualisation.docker.enable = true;
|
||||
environment.systemPackages = with pkgs; [
|
||||
lazydocker
|
||||
];
|
||||
}
|
||||
# in {
|
||||
# options.oizys.docker.enable = mkEnableOption "enable docker support";
|
||||
#
|
||||
# config = mkIf cfg.enable {
|
||||
# virtualisation.docker.enable = true;
|
||||
# environment.systemPackages = with pkgs; [
|
||||
# lazydocker
|
||||
# ];
|
||||
# };
|
||||
# }
|
||||
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
mkOizysModule,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkOizysModule;
|
||||
in
|
||||
}:
|
||||
mkOizysModule config "vbox" {
|
||||
virtualisation.virtualbox = {
|
||||
host.enable = true;
|
||||
|
|
Loading…
Reference in a new issue