mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-12-30 12:10:43 -06:00
Compare commits
No commits in common. "f3a5290a80f434ad126e72930862d1be9e935b3f" and "7b04cf627423a278bc9b80c194756d1647e2def5" have entirely different histories.
f3a5290a80
...
7b04cf6274
9 changed files with 132 additions and 106 deletions
|
@ -6,7 +6,7 @@
|
|||
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;
|
||||
inherit (lib.filesystem) listFilesRecursive;
|
||||
|
||||
inherit (import ./find-modules.nix {inherit lib;}) findModulesList;
|
||||
|
@ -29,14 +29,16 @@ in rec {
|
|||
isNixFile
|
||||
(listFilesRecursive (../. + "/hosts/${hostname}"));
|
||||
|
||||
specialArgs = {inherit inputs lib self mkDefaultOizysModule mkOizysModule;};
|
||||
specialArgs = {inherit inputs lib self;};
|
||||
};
|
||||
|
||||
oizysHosts = mapAttrs (name: _: mkSystem name) (readDir ../hosts);
|
||||
oizysPkg = forAllSystems (
|
||||
pkgs: rec {
|
||||
oizys = pkgs.callPackage ../oizys {};
|
||||
default = oizys;
|
||||
pkgs: let
|
||||
pkg = pkgs.callPackage ../oizys {};
|
||||
in {
|
||||
oizys = pkg;
|
||||
default = pkg;
|
||||
}
|
||||
);
|
||||
devShells = forAllSystems (
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
final: prev: let
|
||||
inherit (final) hasSuffix mkEnableOption mkIf mkOption types;
|
||||
inherit (final) hasSuffix mkEnableOption mkIf;
|
||||
runes = import ../modules/runes;
|
||||
in rec {
|
||||
enabled = {enable = true;};
|
||||
|
@ -33,12 +33,4 @@ in rec {
|
|||
options.oizys.${attr}.enable = mkEnableOption "enable ${attr} support";
|
||||
config = mkIf config.oizys.${attr}.enable content;
|
||||
};
|
||||
mkDefaultOizysModule = config: attr: content: {
|
||||
options.oizys.${attr}.enable = mkOption {
|
||||
default = true;
|
||||
description = "enable ${attr} support";
|
||||
type = types.bool;
|
||||
};
|
||||
config = mkIf config.oizys.${attr}.enable content;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -2,9 +2,10 @@
|
|||
inputs,
|
||||
pkgs,
|
||||
config,
|
||||
mkOizysModule,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkOizysModule enabled;
|
||||
lock = pkgs.writeShellApplication {
|
||||
name = "lock";
|
||||
runtimeInputs = with pkgs; [swaylock];
|
||||
|
@ -14,7 +15,7 @@
|
|||
};
|
||||
in
|
||||
mkOizysModule config "hyprland" {
|
||||
programs.hyprland.enable = true;
|
||||
programs.hyprland = enabled;
|
||||
security.pam.services.swaylock = {};
|
||||
# Optional, hint electron apps to use wayland:
|
||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
|
|
|
@ -1,11 +1,20 @@
|
|||
{
|
||||
inputs,
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
mkDefaultOizysModule,
|
||||
...
|
||||
}:
|
||||
mkDefaultOizysModule config "cli" {
|
||||
}: let
|
||||
inherit (lib) mkOption mkIf types;
|
||||
cfg = config.oizys.cli;
|
||||
in {
|
||||
options.oizys.cli.enable = mkOption {
|
||||
default = true;
|
||||
description = "Whether to enable cli.";
|
||||
type = types.bool;
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.direnv.enable = true;
|
||||
environment.sessionVariables = {
|
||||
DIRENV_LOG_FORMAT = "[2mdirenv: %s[0m";
|
||||
|
@ -26,4 +35,5 @@ mkDefaultOizysModule config "cli" {
|
|||
btop
|
||||
inputs.tsm.packages.${pkgs.system}.tsm
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
mkOizysModule,
|
||||
...
|
||||
}:
|
||||
}: let
|
||||
inherit (lib) mkOizysModule;
|
||||
in
|
||||
mkOizysModule config "vpn" {
|
||||
environment.systemPackages = [pkgs.openconnect];
|
||||
}
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
mkOizysModule,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
}: let
|
||||
inherit (lib) mkOizysModule;
|
||||
in
|
||||
mkOizysModule config "chrome" {
|
||||
programs.chromium = {
|
||||
enable = true;
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
mkOizysModule,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
}: let
|
||||
inherit (lib) mkOizysModule;
|
||||
in
|
||||
mkOizysModule config "backups" {
|
||||
environment.systemPackages = with pkgs; [rclone];
|
||||
|
||||
|
|
|
@ -1,12 +1,25 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
mkOizysModule,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
}: 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,8 +1,10 @@
|
|||
{
|
||||
config,
|
||||
mkOizysModule,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
}: let
|
||||
inherit (lib) mkOizysModule;
|
||||
in
|
||||
mkOizysModule config "vbox" {
|
||||
virtualisation.virtualbox = {
|
||||
host.enable = true;
|
||||
|
|
Loading…
Reference in a new issue