diff --git a/hosts/iris/default.nix b/hosts/iris/default.nix index 56df25e..84fd5e4 100644 --- a/hosts/iris/default.nix +++ b/hosts/iris/default.nix @@ -9,7 +9,7 @@ imports = [ ./hardware-configuration.nix ./../../modules/core - # ./../../modules/home/nfs.nix + ./../../modules/home/steam.nix ./../../modules/core/virtualization.nix ./../../modules/services/tailscale.nix ./../../modules/services/mpd.nix diff --git a/modules/core/default.nix b/modules/core/default.nix index f4d87d3..96f0236 100644 --- a/modules/core/default.nix +++ b/modules/core/default.nix @@ -3,7 +3,7 @@ imports = [ (import ./docker.nix) ] ++ [ (import ./hardware.nix) ] - ++ [ (import ./displaylink.nix) ] + # ++ [ (import ./displaylink.nix) ] # ++ [(import ./printing.nix)] ++ [ (import ./xserver.nix) ] ++ [ (import ./network.nix) ] diff --git a/modules/core/default.server.nix b/modules/core/default.server.nix index 118f8a3..850882f 100644 --- a/modules/core/default.server.nix +++ b/modules/core/default.server.nix @@ -1,12 +1,13 @@ { ... }: { imports = - [(import ./hardware.nix)] - ++ [(import ./network.nix)] - ++ [(import ./program.nix)] - ++ [(import ./sshd.nix)] - ++ [(import ./security.nix)] - ++ [(import ./services.nix)] - ++ [(import ./system.nix)] - ++ [(import ./user.nix)]; + [ (import ./hardware.nix) ] + ++ [ (import ./network.nix) ] + ++ [ (import ./program.nix) ] + ++ [ (import ./sshd.nix) ] + ++ [ (import ./security.nix) ] + ++ [ (import ./services.nix) ] + ++ [ (import ./system.nix) ] + ++ [ (import ./user.nix) ] + ++ [ (import ./virtualization.nix) ]; } diff --git a/modules/core/virtualization.nix b/modules/core/virtualization.nix index 94c40a7..601680b 100644 --- a/modules/core/virtualization.nix +++ b/modules/core/virtualization.nix @@ -12,6 +12,8 @@ libvirtd.enable = if (host == "violet") then true + else if (host == "dandelion") then + true else if (host == "sakura") then true else if (host == "yoshino") then @@ -36,7 +38,7 @@ # { }; users.groups.libvirtd.members = - if (config.virtualisation.waydroid.enable == true) then [ username ] else [ ]; + if (config.virtualisation.libvirtd.enable == true) then [ username ] else [ ]; # Enable qemu etc environment.systemPackages = with pkgs; [ diff --git a/modules/home/steam.nix b/modules/home/steam.nix new file mode 100644 index 0000000..05f296d --- /dev/null +++ b/modules/home/steam.nix @@ -0,0 +1,3 @@ +{ + programs.steam.enable = true; +} diff --git a/roles/desktop.nix b/roles/desktop.nix index fc6fcdb..23c75df 100644 --- a/roles/desktop.nix +++ b/roles/desktop.nix @@ -16,6 +16,7 @@ in }; config = mkIf cfg.enable { + environment.systemPackages = with pkgs; [ cifs-utils ]; home-manager = { users.${username} = { home.packages = with pkgs; [ diff --git a/roles/laptop.nix b/roles/laptop.nix index 4a61e0d..76cb8f8 100644 --- a/roles/laptop.nix +++ b/roles/laptop.nix @@ -1,13 +1,25 @@ -{ lib, pkgs, config, username, home-manager, ... }: +{ + lib, + pkgs, + config, + username, + home-manager, + ... +}: with lib; let cfg = config.liv.laptop; -in { +in +{ options.liv.laptop = { enable = mkEnableOption "Enable laptop"; }; config = mkIf cfg.enable { + environment.systemPackages = with pkgs; [ + cifs-utils + powertop + ]; home-manager = { users.${username} = { home.packages = with pkgs; [ @@ -17,22 +29,25 @@ in { }; }; + # DisplayLink + services.xserver.videoDrivers = [ + "displaylink" + "modesetting" + ]; + systemd.services.dlm.wantedBy = [ "multi-user.target" ]; + networking.networkmanager.enable = true; - environment.systemPackages = with pkgs; [ - # powertop - ]; boot = { - kernelModules = ["acpi_call"]; - extraModulePackages = with config.boot.kernelPackages; - [ - acpi_call - ]; - }; - services = { + kernelModules = [ "acpi_call" ]; + extraModulePackages = with config.boot.kernelPackages; [ + acpi_call + ]; + }; + services = { thermald.enable = true; power-profiles-daemon.enable = true; - + upower = { enable = true; percentageLow = 20; @@ -41,6 +56,6 @@ in { criticalPowerAction = "Hibernate"; }; }; - # powerManagement.powertop.enable = true; + powerManagement.powertop.enable = true; }; }