qemu + enabled refactor

This commit is contained in:
ari committed 2024-10-03 16:32:41 -04:00
1 parent 61997ac276
commit 25d9e9a52c
23 files changed
+71 -45

No files matched your search

+2 -2
View File
@@ -14,7 +14,7 @@ in
default = [ ];
};
skyg.user = {
enabled = mkEnableOption "";
enable = mkEnableOption "";
name = mkOption {
type = types.str;
};
@@ -45,7 +45,7 @@ in
stateVersion = cfg.home-manager.version;
});
in
mkIf cfg.user.enabled
mkIf cfg.user.enable
{
programs.zsh.enable = true;
home-manager.users.root =
+1 -1
View File
@@ -22,7 +22,7 @@
skyg.core.hostName = hostName;
skyg.home-manager.version = homeManagerVersion;
skyg.core.substituters = localNixCaches;
skyg.networkDrives.enabled = enableNetworkDrives;
skyg.networkDrives.enable = enableNetworkDrives;
skyg.nixos.common.containers = (if os.enable then os.containers else { });
system.stateVersion = systemStateVersion;
nixpkgs.config.allowUnfree = true;
+2 -2
View File
@@ -9,11 +9,11 @@ in
{
options = {
skyg.networkDrives = {
enabled = mkEnableOption
enable = mkEnableOption
"Network Drives";
};
};
config = mkIf cfg.enabled {
config = mkIf cfg.enable {
fileSystems."/torrents" = {
device = "tnas1.lab.internal:/mnt/EightTerra/DownloadedTorrents";
fsType = "nfs";
+1
View File
@@ -8,5 +8,6 @@
./user.nix
./fonts.nix
./ssh-server.nix
./qemu.nix
];
}
+25
View File
@@ -0,0 +1,25 @@
{ config, lib, pkgs, ... }:
let
cfg = config.skyg.core.qemu;
in
{
options = {
skyg.core.qemu = {
enable = lib.mkEnableOption
"Enable qemu";
};
};
config = lib.mkIf cfg.enable {
environment = {
systemPackages = with pkgs; [
qemu
quickemu
spice-vdagent
spice-autorandr
];
services.spice-vdagentd.enable = true;
services.spice-autorandr.enable = true;
};
};
}
+2 -2
View File
@@ -7,7 +7,7 @@ in
{
options = {
skyg.nixos.common.ssh-server = {
enabled = mkEnableOption
enable = mkEnableOption
"enable ssh server";
masterPubKey = mkOption {
type = types.str;
@@ -15,7 +15,7 @@ in
};
};
};
config = mkIf cfg.enabled {
config = mkIf cfg.enable {
services.openssh = {
enable = true;
openFirewall = true;
+2 -2
View File
@@ -5,11 +5,11 @@ in
{
options = {
skyg.nixos.desktop.cosmic = {
enabled = lib.mkEnableOption
enable = lib.mkEnableOption
"Cosmic";
};
};
config = lib.mkIf cfg.enabled {
config = lib.mkIf cfg.enable {
services.desktopManager.cosmic.enable = true;
# services.displayManager.cosmic-greeter.enable = true;
};
+2 -2
View File
@@ -7,11 +7,11 @@ in
{
options = {
skyg.nixos.desktop.crypto = {
enabled = mkEnableOption
enable = mkEnableOption
"Enable crypto wallets";
};
};
config = mkIf cfg.enabled {
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
trezor-suite
trezord
+2 -2
View File
@@ -15,11 +15,11 @@ in
options = {
skyg.nixos.desktop = {
enabled = lib.mkEnableOption
enable = lib.mkEnableOption
"Enable Desktop";
};
};
config = lib.mkIf cfg.desktop.enabled {
config = lib.mkIf cfg.desktop.enable {
services.displayManager.sddm.enable = false;
services.displayManager.sddm.wayland.enable = false;
services.xserver.displayManager.gdm.enable = true;
+1 -1
View File
@@ -10,7 +10,7 @@ in
else pkgs
;
in
lib.mkIf cfg.enabled {
lib.mkIf cfg.enable {
programs.hyprland = {
enable = true;
package = hyprpkgs.hyprland;
+1 -1
View File
@@ -7,7 +7,7 @@
];
options = {
skyg.nixos.desktop.hyprland = with lib; {
enabled = mkEnableOption
enable = mkEnableOption
"Hyprland";
useNWG = mkEnableOption
"nwg-shell experience";
+1 -1
View File
@@ -3,7 +3,7 @@ let
cfg = config.skyg.nixos.desktop.hyprland;
in
{
config = lib.mkIf (cfg.enabled && !cfg.useNWG) {
config = lib.mkIf (cfg.enable && !cfg.useNWG) {
home-manager.users.${config.skyg.user.name}.wayland.windowManager.hyprland = {
enable = true;
xwayland.enable = true;
+1 -1
View File
@@ -5,7 +5,7 @@ let
cfg = config.skyg.nixos.desktop.hyprland;
in
{
config = mkIf (cfg.enabled && cfg.useNWG) {
config = mkIf (cfg.enable && cfg.useNWG) {
programs.hyprlock.enable = true;
environment.systemPackages = with pkgs; [
# general utilities
+2 -2
View File
@@ -5,11 +5,11 @@ in
{
options = {
skyg.nixos.desktop.kde = {
enabled = lib.mkEnableOption
enable = lib.mkEnableOption
"KDE";
};
};
config = lib.mkIf cfg.enabled {
config = lib.mkIf cfg.enable {
services.desktopManager.plasma6.enable = true;
services.desktopManager.plasma6.enableQt5Integration = true;
environment.plasma6.excludePackages = with pkgs.kdePackages; [
+1 -1
View File
@@ -3,7 +3,7 @@ let
cfg = config.skyg.nixos.desktop;
in
{
config = lib.mkIf cfg.enabled {
config = lib.mkIf cfg.enable {
# Flatpak
services.flatpak.enable = true;
# Mobile Connect
+1 -1
View File
@@ -3,7 +3,7 @@ let
cfg = config.skyg.nixos.desktop;
in
{
config = lib.mkIf cfg.enabled {
config = lib.mkIf cfg.enable {
# Flatpak
environment.systemPackages = with pkgs; [
wayland
+1 -1
View File
@@ -3,7 +3,7 @@ let
cfg = config.skyg.nixos.desktop;
in
{
config = lib.mkIf cfg.enabled {
config = lib.mkIf cfg.enable {
services.xserver = {
enable = true;
xkb.layout = "us";