add missing desktop stuff

This commit is contained in:
Patrick Neff 2024-04-14 23:43:07 +02:00
parent c40c62dff2
commit 523ddfd122
11 changed files with 163 additions and 21 deletions

View File

@ -24,8 +24,9 @@ lib.mkIf config.desktop.awesome.enable {
}; };
}; };
services.gnome-keyring.enable = true;
xsession = { xsession = {
enable = true;
windowManager.awesome = { windowManager.awesome = {
enable = true; enable = true;
luaModules = with pkgs.luaPackages; [ luaModules = with pkgs.luaPackages; [

View File

@ -0,0 +1,18 @@
{
lib,
config,
...
}: {
config = lib.mkIf config.desktop.enable {
services.darkman = {
enable = true;
settings = {
lat = 50.81;
lng = 7.03;
usegeoclue = true;
dbusserver = true;
portal = true;
};
};
};
}

View File

@ -1,4 +1,5 @@
{ {
pkgs,
lib, lib,
config, config,
nix-colors, nix-colors,
@ -42,6 +43,9 @@
./rofi ./rofi
./network-manager-applet ./network-manager-applet
./alacritty ./alacritty
./xserver
./darkman
./thunar
]; ];
config = lib.mkIf config.desktop.enable { config = lib.mkIf config.desktop.enable {
desktop.awesome.enable = lib.mkDefault true; desktop.awesome.enable = lib.mkDefault true;
@ -52,11 +56,45 @@
}; };
services = { services = {
nextcloud-client.enable = lib.mkDefault true; nextcloud-client.enable = lib.mkDefault true;
udiskie.enable = lib.mkDefault true; udiskie = {
settings = {
enable = lib.mkDefault true;
program_options = {
udisks_version = 2;
tray = true;
};
};
};
picom.enable = lib.mkDefault true; picom.enable = lib.mkDefault true;
}; };
fonts.fontconfig.enable = true; fonts.fontconfig.enable = true;
colorScheme = nix-colors.colorSchemes.catppuccin-mocha; colorScheme = nix-colors.colorSchemes.catppuccin-mocha;
desktop.network-manager.enable = lib.mkDefault true; desktop.network-manager.enable = lib.mkDefault true;
xdg = {
enable = lib.mkDefault true;
portal = {
enable = lib.mkDefault true;
config = {
common = {
default = [
"gtk"
];
};
awesome = {
default = [
"pantheon"
"gtk"
];
"org.freedesktop.impl.portal.Secret" = [
"gnome-keyring"
];
};
};
extraPortals = with pkgs; [
xdg-desktop-portal-gtk
];
};
userDirs.enable = true;
};
}; };
} }

View File

@ -0,0 +1,10 @@
{
pkgs,
config,
lib,
...
}:
with lib;
mkIf config.desktop.enable {
home.packages = with pkgs; [xfce.thunar];
}

View File

@ -0,0 +1,8 @@
_: {
imports = [
./xresources.nix
./xsession.nix
];
}

View File

@ -0,0 +1,40 @@
_: {
xresources.properties = {
"*background" = "#1E1E2E";
"*foreground" = "#CDD6F4";
"*cursorColor" = "#F5E0DC";
"*color0" = "#45475A";
"*color8" = "#585B70";
"*color1" = "#F38BA8";
"*color9" = "#F38BA8";
"*color2" = "#A6E3A1";
"*color10" = "#A6E3A1";
"*color3" = "#F9E2AF";
"*color11" = "#F9E2AF";
"*color4" = "#89B4FA";
"*color12" = "#89B4FA";
"*color5" = "#F5C2E7";
"*color13" = "#F5C2E7";
"*color6" = "#94E2D5";
"*color14" = "#94E2D5";
"*color7" = "#BAC2DE";
"*color15" = "#A6ADC8";
"URxvt.letterSpace" = "-1";
"URxvt.lineSpace" = "0";
"URxvt.saveline" = "10480";
"URxvt.scrollBar" = "false";
"URxvt.urgentOnBell" = "true";
"URxvt.font" = "xft:FiraCode Nerd Font Mono:size=9";
"URxvt.fontBold" = "xft:FiraCode Nerd Font Mono:bold:size=9";
"URxvt.depth" = "32";
"URxvt.background" = "[95]#1E1E2E";
"Xft.autohint" = "0";
"Xft.lcdfilter" = "lcddefault";
"Xft.hintstyle" = "hintslight";
"Xft.hinting" = "1";
"Xft.antialias" = "1";
"Xft.rgba" = "rgb";
"XTerm*faceName" = "FiraCode Nerd Font Mono:bold:size=9";
};
}

View File

@ -0,0 +1,15 @@
{
pkgs,
config,
lib,
...
}:
lib.mkIf config.desktop.enable {
xsession = {
enable = true;
profileExtra = ''
${pkgs.mate.mate-polkit}/usr/lib/mate-polkit/polkit-mate-authentication-agent-1 &
${pkgs.darkman}/bin/darkman set dark
'';
};
}

View File

@ -15,5 +15,6 @@
hardware.enableRedistributableFirmware = lib.mkDefault true; hardware.enableRedistributableFirmware = lib.mkDefault true;
services.openssh.enable = lib.mkDefault true; services.openssh.enable = lib.mkDefault true;
boot.loader.systemd-boot.enable = lib.mkDefault true; boot.loader.systemd-boot.enable = lib.mkDefault true;
services.udisks2.enable = lib.mkDefault true;
}; };
} }

View File

@ -1,39 +1,48 @@
{ config, lib, pkgs, vars, ... }: {
let config,
lib,
pkgs,
vars,
...
}: let
inherit (vars) username name locale hostname sshKeys; inherit (vars) username name locale hostname sshKeys;
baseGroups = [ baseGroups = [
"users" "users"
"wheel" "wheel"
];
rpiGroups =
if config.hardware.raspberry-pi.enable then [
"audio" "audio"
"video" "video"
"plugdev"
"adm"
"disk" "disk"
"power"
"adm"
"plugdev"
];
rpiGroups =
if config.hardware.raspberry-pi.enable
then [
"i2c" "i2c"
"spi" "spi"
"power" ]
] else [ ]; else [];
extraGroups = baseGroups ++ rpiGroups; extraGroups = baseGroups ++ rpiGroups;
basePackages = with pkgs; [ home-manager ]; basePackages = with pkgs; [home-manager];
wslPackages = wslPackages =
if config.wsl.enable then with pkgs; [ if config.wsl.enable
then
with pkgs; [
wslu wslu
wsl-open wsl-open
] else [ ]; ]
else [];
packages = basePackages ++ wslPackages; packages = basePackages ++ wslPackages;
in in {
{
options = { options = {
hardware.raspberry-pi.enable = lib.mkEnableOption "raspberry pi features"; hardware.raspberry-pi.enable = lib.mkEnableOption "raspberry pi features";
}; };
config = { config = {
users = { users = {
groups.${username} = { }; groups.${username} = {};
users = { users = {
${username} = { ${username} = {
inherit packages extraGroups; inherit packages extraGroups;
@ -50,4 +59,3 @@ in
}; };
}; };
} }

View File

@ -14,5 +14,7 @@
programs.dconf.enable = lib.mkDefault true; programs.dconf.enable = lib.mkDefault true;
hardware.opengl.enable = lib.mkDefault true; hardware.opengl.enable = lib.mkDefault true;
desktop.enable = lib.mkDefault true; desktop.enable = lib.mkDefault true;
security.polkit.enable = lib.mkDefault true;
services.upower.enable = lib.mkDefault true;
}; };
} }

View File

@ -21,6 +21,7 @@
}; };
xserver = { xserver = {
enable = true; enable = true;
updateDbusEnvironment = true;
windowManager.awesome = { windowManager.awesome = {
enable = true; enable = true;
luaModules = with pkgs.luaPackages; [ luaModules = with pkgs.luaPackages; [