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);
|
lib = nixpkgs.lib.extend (import ./extended.nix);
|
||||||
|
|
||||||
inherit (builtins) mapAttrs readDir filter listToAttrs;
|
inherit (builtins) mapAttrs readDir filter listToAttrs;
|
||||||
inherit (lib) nixosSystem genAttrs isNixFile mkDefaultOizysModule mkOizysModule;
|
inherit (lib) nixosSystem genAttrs isNixFile;
|
||||||
inherit (lib.filesystem) listFilesRecursive;
|
inherit (lib.filesystem) listFilesRecursive;
|
||||||
|
|
||||||
inherit (import ./find-modules.nix {inherit lib;}) findModulesList;
|
inherit (import ./find-modules.nix {inherit lib;}) findModulesList;
|
||||||
|
@ -29,14 +29,16 @@ in rec {
|
||||||
isNixFile
|
isNixFile
|
||||||
(listFilesRecursive (../. + "/hosts/${hostname}"));
|
(listFilesRecursive (../. + "/hosts/${hostname}"));
|
||||||
|
|
||||||
specialArgs = {inherit inputs lib self mkDefaultOizysModule mkOizysModule;};
|
specialArgs = {inherit inputs lib self;};
|
||||||
};
|
};
|
||||||
|
|
||||||
oizysHosts = mapAttrs (name: _: mkSystem name) (readDir ../hosts);
|
oizysHosts = mapAttrs (name: _: mkSystem name) (readDir ../hosts);
|
||||||
oizysPkg = forAllSystems (
|
oizysPkg = forAllSystems (
|
||||||
pkgs: rec {
|
pkgs: let
|
||||||
oizys = pkgs.callPackage ../oizys {};
|
pkg = pkgs.callPackage ../oizys {};
|
||||||
default = oizys;
|
in {
|
||||||
|
oizys = pkg;
|
||||||
|
default = pkg;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
devShells = forAllSystems (
|
devShells = forAllSystems (
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
final: prev: let
|
final: prev: let
|
||||||
inherit (final) hasSuffix mkEnableOption mkIf mkOption types;
|
inherit (final) hasSuffix mkEnableOption mkIf;
|
||||||
runes = import ../modules/runes;
|
runes = import ../modules/runes;
|
||||||
in rec {
|
in rec {
|
||||||
enabled = {enable = true;};
|
enabled = {enable = true;};
|
||||||
|
@ -33,12 +33,4 @@ in rec {
|
||||||
options.oizys.${attr}.enable = mkEnableOption "enable ${attr} support";
|
options.oizys.${attr}.enable = mkEnableOption "enable ${attr} support";
|
||||||
config = mkIf config.oizys.${attr}.enable content;
|
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,
|
inputs,
|
||||||
pkgs,
|
pkgs,
|
||||||
config,
|
config,
|
||||||
mkOizysModule,
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
|
inherit (lib) mkOizysModule enabled;
|
||||||
lock = pkgs.writeShellApplication {
|
lock = pkgs.writeShellApplication {
|
||||||
name = "lock";
|
name = "lock";
|
||||||
runtimeInputs = with pkgs; [swaylock];
|
runtimeInputs = with pkgs; [swaylock];
|
||||||
|
@ -14,7 +15,7 @@
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
mkOizysModule config "hyprland" {
|
mkOizysModule config "hyprland" {
|
||||||
programs.hyprland.enable = true;
|
programs.hyprland = enabled;
|
||||||
security.pam.services.swaylock = {};
|
security.pam.services.swaylock = {};
|
||||||
# Optional, hint electron apps to use wayland:
|
# Optional, hint electron apps to use wayland:
|
||||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||||
|
|
|
@ -1,29 +1,39 @@
|
||||||
{
|
{
|
||||||
inputs,
|
inputs,
|
||||||
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
config,
|
config,
|
||||||
mkDefaultOizysModule,
|
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
mkDefaultOizysModule config "cli" {
|
inherit (lib) mkOption mkIf types;
|
||||||
programs.direnv.enable = true;
|
cfg = config.oizys.cli;
|
||||||
environment.sessionVariables = {
|
in {
|
||||||
DIRENV_LOG_FORMAT = "[2mdirenv: %s[0m";
|
options.oizys.cli.enable = mkOption {
|
||||||
|
default = true;
|
||||||
|
description = "Whether to enable cli.";
|
||||||
|
type = types.bool;
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
config = mkIf cfg.enable {
|
||||||
chezmoi
|
programs.direnv.enable = true;
|
||||||
zoxide
|
environment.sessionVariables = {
|
||||||
lsd
|
DIRENV_LOG_FORMAT = "[2mdirenv: %s[0m";
|
||||||
fzf
|
};
|
||||||
|
|
||||||
# utils
|
environment.systemPackages = with pkgs; [
|
||||||
fd
|
chezmoi
|
||||||
bat
|
zoxide
|
||||||
delta
|
lsd
|
||||||
ripgrep
|
fzf
|
||||||
|
|
||||||
btop
|
# utils
|
||||||
inputs.tsm.packages.${pkgs.system}.tsm
|
fd
|
||||||
];
|
bat
|
||||||
|
delta
|
||||||
|
ripgrep
|
||||||
|
|
||||||
|
btop
|
||||||
|
inputs.tsm.packages.${pkgs.system}.tsm
|
||||||
|
];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
mkOizysModule,
|
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
mkOizysModule config "vpn" {
|
inherit (lib) mkOizysModule;
|
||||||
environment.systemPackages = [pkgs.openconnect];
|
in
|
||||||
}
|
mkOizysModule config "vpn" {
|
||||||
|
environment.systemPackages = [pkgs.openconnect];
|
||||||
|
}
|
||||||
|
|
|
@ -1,28 +1,30 @@
|
||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
config,
|
config,
|
||||||
mkOizysModule,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
mkOizysModule config "chrome" {
|
inherit (lib) mkOizysModule;
|
||||||
programs.chromium = {
|
in
|
||||||
enable = true;
|
mkOizysModule config "chrome" {
|
||||||
|
programs.chromium = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
extensions = [
|
extensions = [
|
||||||
"nngceckbapebfimnlniiiahkandclblb" # bitwarden
|
"nngceckbapebfimnlniiiahkandclblb" # bitwarden
|
||||||
"gfbliohnnapiefjpjlpjnehglfpaknnc" # surfingkeys
|
"gfbliohnnapiefjpjlpjnehglfpaknnc" # surfingkeys
|
||||||
"pbmlfaiicoikhdbjagjbglnbfcbcojpj" # simplify gmail
|
"pbmlfaiicoikhdbjagjbglnbfcbcojpj" # simplify gmail
|
||||||
"oemmndcbldboiebfnladdacbdfmadadm" # pdf viewer
|
"oemmndcbldboiebfnladdacbdfmadadm" # pdf viewer
|
||||||
"clngdbkpkpeebahjckkjfobafhncgmne" # stylus
|
"clngdbkpkpeebahjckkjfobafhncgmne" # stylus
|
||||||
"cjpalhdlnbpafiamejdnhcphjbkeiagm" # ublock origin
|
"cjpalhdlnbpafiamejdnhcphjbkeiagm" # ublock origin
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
(google-chrome.override {
|
|
||||||
commandLineArgs = [
|
|
||||||
"--force-dark-mode"
|
|
||||||
];
|
];
|
||||||
})
|
};
|
||||||
];
|
|
||||||
}
|
environment.systemPackages = with pkgs; [
|
||||||
|
(google-chrome.override {
|
||||||
|
commandLineArgs = [
|
||||||
|
"--force-dark-mode"
|
||||||
|
];
|
||||||
|
})
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
|
@ -1,35 +1,37 @@
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
mkOizysModule,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
mkOizysModule config "backups" {
|
inherit (lib) mkOizysModule;
|
||||||
environment.systemPackages = with pkgs; [rclone];
|
in
|
||||||
|
mkOizysModule config "backups" {
|
||||||
|
environment.systemPackages = with pkgs; [rclone];
|
||||||
|
|
||||||
services.restic.backups.gdrive = {
|
services.restic.backups.gdrive = {
|
||||||
# BUG: if .conda/environments.txt doesn't exist then this won't work
|
# BUG: if .conda/environments.txt doesn't exist then this won't work
|
||||||
# workaround for now `mkdir ~/.conda && touch ~/.conda/environments.txt`
|
# workaround for now `mkdir ~/.conda && touch ~/.conda/environments.txt`
|
||||||
|
|
||||||
extraBackupArgs = [
|
extraBackupArgs = [
|
||||||
"--exclude-file /home/daylin/.config/restic/excludes.txt"
|
"--exclude-file /home/daylin/.config/restic/excludes.txt"
|
||||||
"--exclude-file /home/daylin/.conda/environments.txt"
|
"--exclude-file /home/daylin/.conda/environments.txt"
|
||||||
"--verbose"
|
"--verbose"
|
||||||
"--one-file-system"
|
"--one-file-system"
|
||||||
"--tag systemd.timer"
|
"--tag systemd.timer"
|
||||||
];
|
];
|
||||||
pruneOpts = [
|
pruneOpts = [
|
||||||
"--verbose"
|
"--verbose"
|
||||||
"--tag systemd.timer"
|
"--tag systemd.timer"
|
||||||
"--keep-daily 7"
|
"--keep-daily 7"
|
||||||
"--keep-weekly 4"
|
"--keep-weekly 4"
|
||||||
"--keep-monthly 12"
|
"--keep-monthly 12"
|
||||||
"--keep-yearly 3"
|
"--keep-yearly 3"
|
||||||
];
|
];
|
||||||
timerConfig = {
|
timerConfig = {
|
||||||
OnCalendar = "00:05";
|
OnCalendar = "00:05";
|
||||||
Persistent = true;
|
Persistent = true;
|
||||||
RandomizedDelaySec = "5h";
|
RandomizedDelaySec = "5h";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -1,12 +1,25 @@
|
||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
config,
|
config,
|
||||||
mkOizysModule,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
mkOizysModule config "docker" {
|
inherit (lib) mkOizysModule;
|
||||||
virtualisation.docker.enable = true;
|
in
|
||||||
environment.systemPackages = with pkgs; [
|
mkOizysModule config "docker" {
|
||||||
lazydocker
|
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,11 +1,13 @@
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
mkOizysModule,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
mkOizysModule config "vbox" {
|
inherit (lib) mkOizysModule;
|
||||||
virtualisation.virtualbox = {
|
in
|
||||||
host.enable = true;
|
mkOizysModule config "vbox" {
|
||||||
};
|
virtualisation.virtualbox = {
|
||||||
users.extraGroups.vboxusers.members = ["daylin"];
|
host.enable = true;
|
||||||
}
|
};
|
||||||
|
users.extraGroups.vboxusers.members = ["daylin"];
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue