mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-11-09 20:33:15 -06:00
more refactoring
This commit is contained in:
parent
bfd738d942
commit
0704db6405
7 changed files with 54 additions and 41 deletions
|
@ -1,31 +1,28 @@
|
||||||
{ pkgs, enabled, ... }:
|
{ enableAttrs, ... }:
|
||||||
{
|
{
|
||||||
oizys = {
|
oizys =
|
||||||
desktop = enabled;
|
(enableAttrs [
|
||||||
hyprland = enabled;
|
"vpn"
|
||||||
chrome = enabled;
|
"desktop"
|
||||||
docker = enabled;
|
"hyprland"
|
||||||
nix-ld = enabled;
|
"chrome"
|
||||||
vbox = enabled;
|
"docker"
|
||||||
vpn = enabled;
|
"nix-ld"
|
||||||
backups = enabled;
|
"vbox"
|
||||||
languages = [
|
"backups"
|
||||||
"misc"
|
])
|
||||||
"nim"
|
// {
|
||||||
"node"
|
languages = [
|
||||||
"nushell"
|
"misc"
|
||||||
"python"
|
"nim"
|
||||||
"roc"
|
"node"
|
||||||
"tex"
|
"nushell"
|
||||||
"zig"
|
"python"
|
||||||
];
|
"roc"
|
||||||
};
|
"tex"
|
||||||
|
"zig"
|
||||||
environment.systemPackages = with pkgs; [
|
];
|
||||||
zk
|
};
|
||||||
quarto
|
|
||||||
cachix
|
|
||||||
];
|
|
||||||
|
|
||||||
services.restic.backups.gdrive = {
|
services.restic.backups.gdrive = {
|
||||||
user = "daylin";
|
user = "daylin";
|
||||||
|
@ -37,8 +34,5 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
users.users.daylin.extraGroups = [
|
users.users.daylin.extraGroups = [ "audio" ];
|
||||||
"docker"
|
|
||||||
"audio"
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
10
hosts/othalan/pkgs.nix
Normal file
10
hosts/othalan/pkgs.nix
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
zk
|
||||||
|
quarto
|
||||||
|
cachix
|
||||||
|
graphviz
|
||||||
|
nix-du
|
||||||
|
];
|
||||||
|
}
|
|
@ -16,6 +16,7 @@ let
|
||||||
mkDefaultOizysModule
|
mkDefaultOizysModule
|
||||||
mkOizysModule
|
mkOizysModule
|
||||||
enabled
|
enabled
|
||||||
|
enableAttrs
|
||||||
;
|
;
|
||||||
inherit (lib.filesystem) listFilesRecursive;
|
inherit (lib.filesystem) listFilesRecursive;
|
||||||
|
|
||||||
|
@ -43,6 +44,7 @@ let
|
||||||
mkDefaultOizysModule
|
mkDefaultOizysModule
|
||||||
mkOizysModule
|
mkOizysModule
|
||||||
enabled
|
enabled
|
||||||
|
enableAttrs
|
||||||
hostName
|
hostName
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
|
|
|
@ -10,7 +10,7 @@ let
|
||||||
cfg = config.oizys.languages;
|
cfg = config.oizys.languages;
|
||||||
zig = inputs.zig2nix.outputs.packages.${pkgs.system}.zig.default.bin;
|
zig = inputs.zig2nix.outputs.packages.${pkgs.system}.zig.default.bin;
|
||||||
zls = inputs.zls.outputs.packages.${pkgs.system}.default.overrideAttrs {
|
zls = inputs.zls.outputs.packages.${pkgs.system}.default.overrideAttrs {
|
||||||
nativeBuildInputs = [zig];
|
nativeBuildInputs = [ zig ];
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
|
@ -40,6 +40,7 @@ in
|
||||||
];
|
];
|
||||||
|
|
||||||
options.oizys.desktop.enable = mkEnableOption "is desktop";
|
options.oizys.desktop.enable = mkEnableOption "is desktop";
|
||||||
|
options.oizys.docker.enable = mkEnableOption "enable docker support";
|
||||||
config = {
|
config = {
|
||||||
networking.hostName = hostName;
|
networking.hostName = hostName;
|
||||||
time.timeZone = "US/Central";
|
time.timeZone = "US/Central";
|
||||||
|
|
|
@ -5,8 +5,10 @@
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
inherit (lib) mkOption mkIf types;
|
inherit (lib) mkOption mkIf types optional;
|
||||||
cfg = config.users.defaultUser;
|
cfg = config.users.defaultUser;
|
||||||
|
isDocker = config.oizys.docker.enable;
|
||||||
|
isDesktop = config.oizys.desktop.enable;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.users.defaultUser = mkOption {
|
options.users.defaultUser = mkOption {
|
||||||
|
@ -22,10 +24,8 @@ in
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
|
|
||||||
shell = pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
extraGroups = [
|
extraGroups = [ "wheel" ] ++ optional isDesktop "audio" ++ optional isDocker "docker";
|
||||||
"wheel" # sudo
|
|
||||||
"docker"
|
|
||||||
];
|
|
||||||
initialHashedPassword = "$2b$05$mGMrDFzf2cXLaoOlVQbGvOBV7UZlDt9dLg9Xqxutb/uHpjF5VrTBO";
|
initialHashedPassword = "$2b$05$mGMrDFzf2cXLaoOlVQbGvOBV7UZlDt9dLg9Xqxutb/uHpjF5VrTBO";
|
||||||
openssh.authorizedKeys.keys = [
|
openssh.authorizedKeys.keys = [
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKkezPIhB+QW37G15ZV3bewydpyEcNlYxfHLlzuk3PH9"
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKkezPIhB+QW37G15ZV3bewydpyEcNlYxfHLlzuk3PH9"
|
||||||
|
|
|
@ -1,10 +1,16 @@
|
||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
config,
|
config,
|
||||||
mkOizysModule,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
mkOizysModule config "docker" {
|
let
|
||||||
virtualisation.docker.enable = true;
|
inherit (lib) mkIf;
|
||||||
environment.systemPackages = with pkgs; [ lazydocker ];
|
cfg = config.oizys.docker;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
virtualisation.docker.enable = true;
|
||||||
|
environment.systemPackages = with pkgs; [ lazydocker ];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue