1
0
Fork 0
This commit is contained in:
Lukas Wurzinger 2025-05-11 22:49:04 +02:00
parent be9fb9278e
commit b8af0e9761
No known key found for this signature in database
165 changed files with 1815 additions and 1431 deletions

View file

@ -0,0 +1,16 @@
{
config,
lib,
pkgs,
...
}:
let
cfg = config.profiles.desktop;
in
{
config = lib.mkIf cfg.enable {
environment.systemPackages = [
pkgs.wl-clipboard
];
};
}

View file

@ -0,0 +1,33 @@
{
config,
lib,
pkgs,
...
}:
let
cfg = config.profiles.desktop;
in
{
config = lib.mkIf cfg.enable {
programs.appimage = {
enable = true;
binfmt = true;
package = pkgs.appimage-run.override {
extraPkgs = pkgs: [
pkgs.curl
pkgs.zlib
pkgs.libmpg123
];
};
};
boot.binfmt.emulatedSystems = lib.remove pkgs.stdenv.hostPlatform.system [
"x86_64-linux"
"aarch64-linux"
];
environment.systemPackages = [
pkgs.wineWow64Packages.waylandFull
];
};
}

View file

@ -0,0 +1,29 @@
{
config,
lib,
inputs,
...
}:
let
cfg = config.profiles.desktop;
in
{
imports = [
inputs.nixos-cosmic.nixosModules.default
];
config = lib.mkIf cfg.enable {
nix.settings = {
substituters = [ "https://cosmic.cachix.org" ];
trusted-public-keys = [ "cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE=" ];
};
services = {
desktopManager.cosmic.enable = true;
displayManager.cosmic-greeter.enable = true;
};
environment.sessionVariables.COSMIC_DATA_CONTROL_ENABLED = 1;
};
}

View file

@ -0,0 +1,29 @@
{ config, lib, ... }:
let
cfg = config.profiles.desktop;
in
{
options.profiles.desktop = {
enable = lib.mkEnableOption "desktop";
};
# imports = lib.optionals cfg.enable (lib.findModules {} [./profile]);
config = lib.mkIf cfg.enable {
imports = lib.findModules { } [ ./profile ];
assertions = [
{
assertion = config.profiles.server.enable == false;
message = "The desktop profile is not compatible with the server profile.";
}
];
};
# config.assertions = lib.mkIf cfg.enable [
# {
# assertion = config.profiles.server.enable == false;
# message = "The desktop profile is not compatible with the server profile.";
# }
# ];
}

View file

@ -0,0 +1,25 @@
{
config,
lib,
pkgs,
...
}:
let
cfg = config.profiles.desktop;
in
{
config = lib.mkIf cfg.enable {
programs.firefox = {
enable = true;
package = pkgs.librewolf;
preferences = {
"webgl.disabled" = false;
"privacy.resistFingerprinting" = false;
"middlemouse.paste" = false;
"general.autoScroll" = true;
"privacy.clearOnShutdown.history" = false;
"privacy.clearOnShutdown.downloads" = false;
};
};
};
}

View file

@ -0,0 +1,48 @@
{
config,
lib,
pkgs,
...
}:
let
cfg = config.profiles.desktop;
in
{
config = lib.mkIf cfg.enable {
fonts = {
enableDefaultPackages = true;
packages = [
pkgs.noto-fonts
pkgs.noto-fonts-extra
pkgs.noto-fonts-cjk-sans
pkgs.noto-fonts-cjk-serif
pkgs.noto-fonts-monochrome-emoji
pkgs.noto-fonts-color-emoji
pkgs.nerd-fonts.fira-code
];
fontconfig = {
enable = true;
defaultFonts = {
monospace = [
"FiraCode Nerd Font"
];
sansSerif = [
"Noto Sans"
];
serif = [
"Noto Serif"
];
emoji = [
"Noto Color Emoji"
"Noto Emoji"
];
};
};
# TODO
fontDir.enable = true;
};
};
}

View file

@ -0,0 +1,22 @@
{
config,
lib,
...
}:
let
cfg = config.profiles.desktop;
in
{
config = lib.mkIf cfg.enable {
hardware = {
bluetooth.enable = true;
steam-hardware.enable = true;
xone.enable = true;
xpadneo.enable = true;
opentabletdriver.enable = true;
gcadapter.enable = true;
graphics.enable = true;
enableAllFirmware = true;
};
};
}

View file

@ -0,0 +1,13 @@
{
config,
lib,
...
}:
let
cfg = config.profiles.desktop;
in
{
config = lib.mkIf cfg.enable {
location.provider = "geoclue2";
};
}

View file

@ -0,0 +1,20 @@
{
config,
lib,
...
}:
let
cfg = config.profiles.desktop;
in
{
config = lib.mkIf cfg.enable {
services.resolved.enable = true;
networking.networkmanager = {
enable = true;
dns = "systemd-resolved";
};
users.groups.networkmanager.members = config.users.normalUsers;
};
}

View file

@ -0,0 +1,21 @@
{
config,
lib,
...
}:
let
cfg = config.profiles.desktop;
in
{
config = lib.mkIf cfg.enable {
security.rtkit.enable = true;
services.pipewire = {
enable = true;
wireplumber.enable = true;
alsa.enable = true;
pulse.enable = true;
jack.enable = true;
};
};
}

View file

@ -0,0 +1,16 @@
{
config,
lib,
...
}:
let
cfg = config.profiles.desktop;
in
{
config = lib.mkIf cfg.enable {
services.printing = {
enable = true;
webInterface = true;
};
};
}

View file

@ -0,0 +1,16 @@
{
config,
lib,
pkgs,
...
}:
let
cfg = config.profiles.desktop;
in
{
config = lib.mkIf cfg.enable {
environment.systemPackages = [
pkgs.supersonic-wayland
];
};
}

View file

@ -0,0 +1,17 @@
{
config,
lib,
pkgs,
...
}:
let
cfg = config.profiles.desktop;
in
{
# TODO
config = lib.mkIf cfg.enable {
environment.systemPackages = [
pkgs.vesktop
];
};
}

View file

@ -0,0 +1,16 @@
{
config,
lib,
...
}:
let
cfg = config.profiles.desktop;
in
{
config = lib.mkIf cfg.enable {
environment.sessionVariables = {
NIXOS_OZONE_WL = "1";
SDL_VIDEODRIVER = "wayland";
};
};
}

13
profiles/desktop/xdg.nix Normal file
View file

@ -0,0 +1,13 @@
{
config,
lib,
...
}:
let
cfg = config.profiles.desktop;
in
{
config = lib.mkIf cfg.enable {
xdg.portal.xdgOpenUsePortal = true;
};
}

16
profiles/desktop/zk.nix Normal file
View file

@ -0,0 +1,16 @@
{
config,
lib,
pkgs,
...
}:
let
cfg = config.profiles.desktop;
in
{
config = lib.mkIf cfg.enable {
environment.systemPackages = [
pkgs.zk
];
};
}