task | convert some files to modules

This commit is contained in:
Don Harper 2024-12-24 19:26:56 -06:00
parent 03921b35d7
commit 37828b6801
15 changed files with 222 additions and 109 deletions

View file

@ -1,4 +1,9 @@
{ pkgs, inputs, ... }: {
{ pkgs, inputs, config, lib, ... }:
with lib;
let cfg = config.roles.gui;
in {
options.roles.gui = { enable = mkEnableOption "roles gui"; };
config = mkIf cfg.enable {
home-manager.users.don = {
imports = [
./alacritty.nix
@ -160,4 +165,5 @@
configFile = { "shikane/config.toml".source = files/shikane.toml; };
};
};
};
}

View file

@ -1,18 +1,24 @@
{ config, pkgs, inputs, ... }: {
home.packages = with pkgs;
{ lib, config, pkgs, inputs, outputs, home-manager, ... }:
with lib;
let cfg = config.roles.citrix;
in {
options.roles.citrix = { enable = lib.mkEnableOption "citrix tools"; };
config = mkIf cfg.enable {
home-manager.users.don.home.packages = with pkgs;
[
(pkgs.citrix_workspace.override {
libvorbis = pkgs.libvorbis.override {
libogg = pkgs.libogg.overrideAttrs (prevAttrs: {
cmakeFlags = (prevAttrs.cmakeFlags or [ ])
++ [ (lib.cmakeBool "BUILD_SHARED_LIBS" true) ];
});
};
})
libvorbis = pkgs.libvorbis.override {
libogg = pkgs.libogg.overrideAttrs (prevAttrs: {
cmakeFlags = (prevAttrs.cmakeFlags or [ ])
++ [ (lib.cmakeBool "BUILD_SHARED_LIBS" true) ];
});
};
})
];
home.file."ICAClient" = {
recursive = true;
source = ./files/citrix;
target = ".ICAClient";
home-manager.users.don.home.file."ICAClient" = {
recursive = true;
source = ./files/citrix;
target = ".ICAClient";
};
};
}

View file

@ -1,3 +1,3 @@
{ pkgs, inputs, ... }: {
home-manager.users.don = { imports = [ ./citrix.nix ./zoom.nix ]; };
{ pkgs, inputs, lib, config, home-manager, outputs, ... }: {
imports = [ ./citrix.nix ./zoom.nix ];
}

View file

@ -1,19 +1,9 @@
{ config, pkgs, ... }: {
home.packages = with pkgs; [ zoom-us ];
# xdg = {
# configFile."zoom.conf".source = files/zoom.conf;
# configFile."zoomus.conf".source = files/zoomus.conf;
# desktopEntries = {
# myzoom = {
# name = "My Zoom-Zoom";
# exec = "/home/don/bin/myzoom %u";
# terminal = false;
# type = "Application";
# icon = "Zoom";
# comment = "Zoom Video";
# mimeType = ["x-scheme-handler/zoommtg" "x-scheme-handler/zoomus" "x-scheme-handler/tel" "x-scheme-handler/callto" "x-scheme-handler/zoomphonecall" "application/x-zoom"];
# categories = ["Network" "Application" "Application"];
# };
# };
# };
{ lib, config, pkgs, inputs, outputs, home-manager, ... }:
with lib;
let cfg = config.roles.zoom;
in {
options.roles.zoom = { enable = lib.mkEnableOption "citrix tools"; };
config = mkIf cfg.enable {
home-manager.users.don.home.packages = with pkgs; [ zoom-us ];
};
}

View file

@ -3,7 +3,23 @@
./hardware-configuration.nix
# ../disko/mmcblk.nix
../workstation
../workstation/kvm.nix
../workstation/games
../wm
../../home/work
];
networking.hostName = "ace";
roles = {
citrix.enable = false;
zoom.enable = false;
gui.enable = true;
kvm.enable = false;
games.enable = false;
};
wm = {
sway.enable = true;
kde.enable = false;
# cosmic.enable = false;
};
}

View file

@ -6,7 +6,23 @@
inputs.nixos-hardware.nixosModules.common-pc-laptop
inputs.nixos-hardware.nixosModules.common-pc-laptop-ssd
../workstation
../workstation/kvm.nix
../workstation/games
../wm
../../home/work
];
networking.hostName = "dragon";
roles = {
citrix.enable = false;
zoom.enable = false;
gui.enable = true;
kvm.enable = false;
games.enable = false;
};
wm = {
sway.enable = true;
kde.enable = false;
# cosmic.enable = false;
};
}

View file

@ -4,9 +4,23 @@
./hardware-configuration.nix
# ../disko/mmcblk.nix
../workstation
../workstation/kvm.nix
../workstation/games
../wm
../../home/work
];
networking.hostName = "eve";
roles = {
citrix.enable = false;
zoom.enable = false;
gui.enable = true;
kvm.enable = false;
games.enable = false;
};
wm = {
sway.enable = true;
kde.enable = false;
# cosmic.enable = false;
};
}

View file

@ -10,4 +10,17 @@
../../home/work
];
networking.hostName = "loki";
roles = {
citrix.enable = true;
zoom.enable = true;
gui.enable = true;
kvm.enable = true;
games.enable = true;
};
wm = {
sway.enable = true;
kde.enable = false;
# cosmic.enable = false;
};
}

View file

@ -6,7 +6,23 @@
inputs.nixos-hardware.nixosModules.common-pc-laptop
inputs.nixos-hardware.nixosModules.common-pc-laptop-ssd
../workstation
../workstation/kvm.nix
../workstation/games
../wm
../../home/work
];
networking.hostName = "pocket2";
roles = {
citrix.enable = false;
zoom.enable = false;
gui.enable = true;
kvm.enable = false;
games.enable = false;
};
wm = {
sway.enable = true;
kde.enable = false;
# cosmic.enable = false;
};
}

View file

@ -4,8 +4,23 @@
./hardware-configuration.nix
# ../disko/sda.nix
../workstation
../workstation/kvm.nix
../workstation/games
../wm
../../home/work
];
networking.hostName = "smaug";
roles = {
citrix.enable = true;
zoom.enable = false;
gui.enable = true;
kvm.enable = true;
games.enable = true;
};
wm = {
sway.enable = true;
kde.enable = false;
# cosmic.enable = false;
};
}

View file

@ -1 +1 @@
{ pkgs, ... }: { imports = [ ./sway ]; }
{ pkgs, ... }: { imports = [ ./sway ./kde ]; }

View file

@ -1,32 +1,37 @@
{ config, pkgs, lib, ... }: {
environment.systemPackages = with pkgs; [
alacritty
bemenu
dracula-theme # gtk theme
glib
grim
kaddressbook
kalendar
kdeconnect
#kmail-account-wizard
kmail
#kdepim-runtime
#kdepim
#kdepim-addons
kitinerary
mako
plasma-desktop
slurp
wl-clipboard
];
{ config, pkgs, lib, ... }:
with lib;
let cfg = config.wm.kde;
in {
options.wm.kde = { enable = mkEnableOption "wm: kde"; };
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
alacritty
bemenu
dracula-theme # gtk theme
glib
grim
kaddressbook
kalendar
kdeconnect
# kmail-account-wizard
kmail
# kdepim-runtime
# kdepim
# kdepim-addons
kitinerary
mako
plasma-desktop
slurp
wl-clipboard
];
services.pipewire = {
enable = true;
alsa.enable = true;
pulse.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
pulse.enable = true;
};
services.displayManager.sddm.enable = true;
services.desktopManager.plasma6.enable = true;
};
services.enable = true;
services.displayManager.sddm.enable = true;
services.desktopManager.plasma6.enable = true;
}

View file

@ -1,5 +1,7 @@
{ pkgs, ... }:
{ pkgs, lib, config, ... }:
with lib;
let
cfg = config.wm.sway;
dbus-sway-environment = pkgs.writeTextFile {
name = "dbus-sway-environment";
destination = "/bin/dbus-sway-environment";
@ -24,36 +26,39 @@ let
'';
};
in {
environment.systemPackages = with pkgs; [
adwaita-icon-theme
alacritty
bemenu
configure-gtk
dbus-sway-environment
dmenu-wayland
dracula-theme # gtk theme
glib
grim
mako
rofi
slurp
sway
sway-audio-idle-inhibit
swayidle
swayimg
swaynotificationcenter
waybar
wayland
wayland-pipewire-idle-inhibit
wl-clipboard
wofi
];
services.dbus.enable = true;
programs = {
sway = {
enable = true;
wrapperFeatures.gtk = true;
options.wm.sway = { enable = mkEnableOption "wm: sway"; };
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
adwaita-icon-theme
alacritty
bemenu
configure-gtk
dbus-sway-environment
dmenu-wayland
dracula-theme # gtk theme
glib
grim
mako
rofi
slurp
sway
sway-audio-idle-inhibit
swayidle
swayimg
swaynotificationcenter
waybar
wayland
wayland-pipewire-idle-inhibit
wl-clipboard
wofi
];
services.dbus.enable = true;
programs = {
sway = {
enable = true;
wrapperFeatures.gtk = true;
};
};
services.greetd.package = "greetd.wlgreet";
};
services.greetd.package = "greetd.wlgreet";
}

View file

@ -1,14 +1,19 @@
{ inputs, outputs, lib, config, pkgs, ... }: {
programs = {
# GAMES!
steam = {
enable = true;
gamescopeSession.enable = true;
# # Open ports in the firewall for Steam Remote Play
# remotePlay.openFirewall = true;
# # Open ports in the firewall for Source Dedicated Server
# dedicatedServer.openFirewall = true;
{ inputs, outputs, lib, config, pkgs, ... }:
with lib;
let cfg = config.roles.games;
in {
options.roles.games = { enable = mkEnableOption "roles games"; };
config = mkIf cfg.enable {
programs = {
steam = {
enable = true;
gamescopeSession = { enable = true; };
# Open ports in the firewall for Steam Remote Play
# remotePlay.openFirewall = true;
# Open ports in the firewall for Source Dedicated Server
# dedicatedServer.openFirewall = true;
};
gamemode = { enable = true; };
};
gamemode = { enable = true; };
};
}

View file

@ -1,4 +1,10 @@
{ pkgs, inputs, ... }: {
virtualisation.libvirtd.enable = true;
environment.systemPackages = with pkgs; [ gnome-boxes ];
{ pkgs, inputs, config, lib, ... }:
with lib;
let cfg = config.roles.kvm;
in {
options.roles.kvm = { enable = mkEnableOption "roles kvm"; };
config = mkIf cfg.enable {
virtualisation.libvirtd.enable = true;
environment.systemPackages = with pkgs; [ gnome-boxes ];
};
}