migrates config further

This commit is contained in:
Dennis Schoepf 2026-03-03 22:36:18 +01:00
parent d44b7ebdaa
commit 95fd98e0ae
6 changed files with 72 additions and 2 deletions

View file

@ -0,0 +1,17 @@
{ ... }:
{
flake.modules.nixos.desktop =
{ pkgs, ... }:
{
services.displayManager.cosmic-greeter.enable = true;
services.desktopManager.cosmic.enable = true;
services.system76-scheduler.enable = true;
environment.cosmic.excludePackages = with pkgs; [
cosmic-term
];
};
# TODO: Persist ~/.config/cosmic after setup
# and symlink it with home manager
}

View file

@ -0,0 +1,10 @@
{ ... }:
{
flake.modules.nixos.drawing-tablet =
{ pkgs, ... }:
{
hardware.opentabletdriver.enable = true;
hardware.uinput.enable = true;
boot.kernelModules = [ "uinput" ];
};
}

View file

@ -0,0 +1,8 @@
{ ... }:
{
flake.modules.nixos.gaming =
{ pkgs, ... }:
{
programs.gamemode.enable = true;
};
}

View file

@ -6,12 +6,14 @@ in
flake.nixosConfigurations.dnsc-machine = inputs.nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = with config.flake.modules.nixos; [
# Modules
home-manager
base
nvidia-graphics
graphics-tablet
printing
shell
desktop
# Machine-specific configuration
{
imports = [ ./_hardware-configuration.nix ];
networking.hostName = hostname;

View file

@ -0,0 +1,20 @@
{ config, ... }:
{
flake.modules.nixos.nvidia-graphics =
{ pkgs, ... }:
{
services.xserver.videoDrivers = [ "nvidia" ];
hardware = {
graphics.enable = true;
nvidia = {
modesetting.enable = true;
powerManagement.enable = false;
powerManagement.finegrained = false;
open = true;
nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.stable;
};
};
environment.sessionVariables.NIXOS_OZONE_WL = "1";
};
}

View file

@ -0,0 +1,13 @@
{ ... }:
{
flake.modules.nixos.printing =
{ pkgs, ... }:
{
services.printing.enable = true;
services.avahi = {
enable = true;
nssmdns4 = true;
openFirewall = true;
};
};
}