xsession and file manager updates

This commit is contained in:
Patrick Neff 2024-04-15 16:07:59 +02:00
parent 2b1684d24b
commit 3213d23a02
12 changed files with 192 additions and 67 deletions

View File

@ -1,4 +1,8 @@
{ lib, ... }: { {
lib,
config,
...
}: {
options = { options = {
desktop = { desktop = {
awesome = { awesome = {
@ -18,5 +22,5 @@
}; };
}; };
}; };
imports = [ ./awesomewm.nix ]; imports = [./awesomewm.nix ../xserver];
} }

View File

@ -16,7 +16,7 @@
fileManager = lib.mkOption { fileManager = lib.mkOption {
type = lib.types.str; type = lib.types.str;
description = "the default file_manager to use"; description = "the default file_manager to use";
default = "thunar"; default = "pcmanfm";
}; };
browser = lib.mkOption { browser = lib.mkOption {
type = lib.types.str; type = lib.types.str;
@ -43,12 +43,17 @@
./rofi ./rofi
./network-manager-applet ./network-manager-applet
./alacritty ./alacritty
./xserver
./darkman ./darkman
./pcmanfm
./thunar ./thunar
]; ];
config = lib.mkIf config.desktop.enable { config = lib.mkIf config.desktop.enable {
desktop.awesome.enable = lib.mkDefault true; desktop = {
xserver.enable = lib.mkDefault true;
awesome.enable = lib.mkDefault true;
pcmanfm.enable = lib.mkDefault true;
network-manager.enable = lib.mkDefault true;
};
programs = { programs = {
keepassxc.enable = lib.mkDefault true; keepassxc.enable = lib.mkDefault true;
firefox.enable = lib.mkDefault true; firefox.enable = lib.mkDefault true;
@ -69,7 +74,6 @@
}; };
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;
xdg = { xdg = {
enable = lib.mkDefault true; enable = lib.mkDefault true;
portal = { portal = {

View File

@ -0,0 +1,16 @@
{
pkgs,
lib,
config,
...
}: let
cfg = config.desktop.pcmanfm;
in
with lib; {
options = {
desktop.pcmanfm.enable = mkEnableOption "pcmanfm";
};
config = mkIf cfg.enable {
home.packages = with pkgs; [pcmanfm];
};
}

View File

@ -4,7 +4,11 @@
lib, lib,
... ...
}: }:
with lib; with lib; {
mkIf config.desktop.enable { options = {
desktop.thunar.enable = mkEnableOption "Thunar";
};
config = mkIf config.desktop.thunar.enable {
home.packages = with pkgs; [xfce.thunar]; home.packages = with pkgs; [xfce.thunar];
} };
}

View File

@ -1,8 +1,10 @@
_: { {lib, ...}:
with lib; {
imports = [ imports = [
./xresources.nix ./xresources.nix
./xsession.nix ./xsession.nix
]; ];
options = {
desktop.xserver.enable = mkEnableOption "xserver";
};
} }

View File

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

@ -4,7 +4,7 @@
lib, lib,
... ...
}: }:
lib.mkIf config.desktop.enable { lib.mkIf config.desktop.xserver.enable {
xsession = { xsession = {
enable = true; enable = true;
profileExtra = '' profileExtra = ''

View File

@ -0,0 +1,78 @@
{vars,...}: let
inherit (vars) timeZone hostName domain;
datadirs = "smb://svartalbenheim.odie.intranet/kodi/userdata";
mysql = {
port = 3306;
user = "kodi";
pass = "kodi";
};
in {
advancedsettings = {
addons = {
unknownsourcecs = true;
};
services = {
devicename = "${hostName}.${domain}";
webserver = true;
webserverauthentication = false;
webserverusername = "kodi";
webserverpassword = "kodi";
webserverport = 8000;
webserverssl = false;
zeroconf = true;
wsdiscovery = true;
upnp = true;
upnpserver = true;
airplay = true;
airplayvideosupport = true;
};
locale = {
language = "resource.language.de_de";
country = "Deutschland";
timezone = timeZone;
};
lookandfeed = {
enablerssfeeds = false;
};
videodatabase = {
type = "mysql";
inherit (mysql) user pass port;
};
musicdatabase = {
type = "mysql";
inherit (mysql) user pass port;
};
videolibrary = {
importwatchedstate = true;
importresumepoint = true;
};
pathsubstitution = {
substitute = [
{
from = "special://profile/playlists/";
to = "${datadirs}/playlists/";
}
{
from = "special://profile/sources.xml";
to = "${datadirs}/sources.xml";
}
{
from = "special://profile/mediasources.xml";
to = "${datadirs}/mediasources.xml";
}
{
from = "special://profile/RssFeeds.xml";
to = "${datadirs}/RssFeeds.xml";
}
{
from = "special://profile/favourites.xml";
to = "${datadirs}/favourites.xml";
}
{
from = "special://profile/passwords.xml";
to = "${datadirs}/passwords.xml";
}
];
};
};
}

View File

@ -1,20 +1,23 @@
{ {
vars,
pkgs, pkgs,
config, config,
lib, lib,
... ...
}: let }: let
cfg = config.mediacenter.kodi; cfg = config.mediacenter.kodi;
in with lib; { in
options = { with lib; {
mediacenter.kodi = { options = {
enable = mkEnableOption "kodi"; mediacenter.kodi = {
enable = mkEnableOption "kodi";
}; };
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
programs.kodi = { programs.kodi = {
enable = true; enable = true;
package = pkgs.kodi-standalone; package = pkgs.kodi-standalone;
settings = import ./advancedsettings.nix {inherit vars;};
};
}; };
}; }
}

View File

@ -1,6 +1,7 @@
{ {
lib, lib,
config, config,
vars,
... ...
}: }:
let let
@ -13,7 +14,7 @@ lib.mkIf config.services.borgmatic.enable {
home = { home = {
location = { location = {
patterns = [ patterns = [
"R /home/odie" "R /home/${vars.username}"
] ++ commonExcludes; ] ++ commonExcludes;
repositories = [ repositories = [
{ {

View File

@ -1,4 +1,4 @@
{ lib, ... }: { {lib, ...}: {
imports = [ imports = [
./fonts ./fonts
./sound ./sound
@ -15,6 +15,9 @@
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; security.polkit.enable = lib.mkDefault true;
services.upower.enable = lib.mkDefault true; services = {
upower.enable = lib.mkDefault true;
gvfs.enable = lib.mkDefault true;
};
}; };
} }

View File

@ -18,6 +18,10 @@
awesome = { awesome = {
enable = false; enable = false;
}; };
network-manager.enable = false;
xserver.enable = false;
pcmanfm.enable = false;
thunar.enable = false;
}; };
programs = { programs = {
firefox.enable = false; firefox.enable = false;
@ -33,7 +37,6 @@
home.packages = with pkgs; [ home.packages = with pkgs; [
nix-serve nix-serve
]; ];
desktop.network-manager.enable = false;
} }
]; ];
} }