boreal: setup sddm theme module

This commit is contained in:
Antoine Martin 2021-04-22 14:22:55 +02:00
parent ecb72c6900
commit b1e1b0f1dd
7 changed files with 60 additions and 2 deletions

View file

@ -1,11 +1,13 @@
{ ... }:
{
imports = [
# Default configuration
./base
./base/gui-programs.nix
# Module definitions
./modules
# Service definitions
./services

View file

@ -74,6 +74,10 @@
nixpkgs.overlays = [
emacs-overlay.overlay
(self: super: {
packages = import ./pkgs { pkgs = super; };
})
# uncomment this to build everything from scratch, fun but takes a
# while
#

View file

@ -67,12 +67,13 @@ in
xserver = {
enable = true;
videoDrivers = [ "nvidia" ];
displayManager.sddm.enable = true;
windowManager.i3.enable = true;
layout = "fr";
xkbVariant = "us";
};
};
my.displayManager.sddm.enable = true;
sound.enable = true;
hardware.pulseaudio = {

6
modules/default.nix Normal file
View file

@ -0,0 +1,6 @@
{ ... }:
{
imports = [
./sddm.nix
];
}

23
modules/sddm.nix Normal file
View file

@ -0,0 +1,23 @@
{ config, lib, pkgs, ... }:
let
cfg = config.my.displayManager.sddm;
in
{
options.my.displayManager.sddm.enable = lib.mkEnableOption "SDDM setup";
config = lib.mkIf cfg.enable {
services.xserver.displayManager.sddm = {
enable = true;
theme = "sugar-candy";
};
environment.systemPackages = with pkgs; [
packages.sddm-sugar-candy
# dependencies for sugar-candy theme
libsForQt5.qt5.qtgraphicaleffects
libsForQt5.qt5.qtquickcontrols2
libsForQt5.qt5.qtsvg
];
};
}

4
pkgs/default.nix Normal file
View file

@ -0,0 +1,4 @@
{ pkgs }:
{
sddm-sugar-candy = pkgs.callPackage ./sddm-sugar-candy.nix {};
}

18
pkgs/sddm-sugar-candy.nix Normal file
View file

@ -0,0 +1,18 @@
{ stdenv, fetchFromGitLab }:
stdenv.mkDerivation rec {
pname = "sddm-sugar-candy";
# latest master commit, no recent tags :(
version = "2b72ef6c6f720fe0ffde5ea5c7c48152e02f6c4f";
dontBuild = true;
installPhase = ''
mkdir -p $out/share/sddm/themes
cp -aR $src $out/share/sddm/themes/sugar-candy
'';
src = fetchFromGitLab {
domain = "framagit.org";
owner = "MarianArlt";
repo = "sddm-sugar-candy";
rev = version;
sha256 = "sha256-XggFVsEXLYklrfy1ElkIp9fkTw4wvXbyVkaVCZq4ZLU=";
};
}