Update the theme template

This commit includes a bunch of minor updates of some Nix modules but
the focus here is the update of the theme template. The renaming of the
Cookiecutter template will now make backups and migration between
different filesystems very easy especially with NTFS-based filesystems
often found on external hard drives.
This commit is contained in:
Gabriel Arazas 2020-10-21 00:10:59 +08:00
parent 0337611eb1
commit 8ed3f6b1c4
15 changed files with 14 additions and 62 deletions

View File

@ -5,6 +5,5 @@
{
imports = [
./recoll.nix
./unison.nix
];
}

View File

@ -1,42 +0,0 @@
# When enabled, this will periodically backup your stuff as configured in '$UNISON/default.prf' (or not with the 'flags' option).
{ config, options, lib, pkgs, ... }:
with lib;
let
cfg = config.modules.services.unison;
in
{
options.modules.services.unison = {
enable = mkOption {
type = types.bool;
default = false;
};
flags = mkOption {
type = types.str;
default = "";
};
};
config = mkIf cfg.enable {
my.home = {
systemd.user.services.unison = {
Unit = {
Description = "Unison backup";
Documentation = [ "https://www.cis.upenn.edu/~bcpierce/unison/docs.html" ];
};
Service = {
ExecStart = "${(pkgs.unison.override { enableX11 = false; })}/bin/unison ${cfg.flags}";
Environment = [ "UNISON=\"$XDG_DATA_HOME/unison\"" ];
RestartSec = "2h";
};
Install = {
WantedBy = [ "default.target" ];
};
};
};
};
}

View File

@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = kernel.moduleBuildDependencies;
patchPhase = ''
sed -i Makefile -e 's/modprobe veikk//' -e 's/depmod//'
sed -i Makefile -e 's/modprobe veikk/#modprobe veikk/' -e 's/depmod/#depmod/'
'';
INSTALL_MOD_PATH = "\${out}";

View File

@ -1,5 +1,6 @@
{
"name": "Fair and square",
"slug": "{{ cookiecutter.name | slugify }}",
"version": "0.1.0",
"special": {
"background": "#2E3440",

View File

@ -2,21 +2,14 @@
with lib;
{
options.modules.themes."{{ cookiecutter.name | slugify }}" = {
options.modules.themes."{{ cookiecutter.slug }}" = {
enable = mkOption {
type = types.bool;
default = false;
};
};
config = mkIf config.modules.themes."{{ cookiecutter.name | slugify }}".enable {
# Pass the metadata of the theme.
modules.theme = {
name = "{{ cookiecutter.name }}";
version = "{{ cookiecutter.version }}";
path = ./.;
};
config = mkIf config.modules.themes."{{ cookiecutter.slug }}".enable {
services = {
# Enable picom compositor.
picom = {
@ -29,8 +22,6 @@ with lib;
xserver = {
displayManager = {
lightdm.enable = true;
lightdm.greeters.mini.enable = true;
lightdm.greeters.mini.user = config.my.username;
defaultSession = "none+bspwm";
};
enable = true;
@ -45,6 +36,9 @@ with lib;
# Enable GTK configuration.
gtk.enable = true;
# Set the wallpaper.
home.file.".background-image".source = ./config/wallpaper;
# Enable QT configuration and set it to the same GTK config.
qt.enable = true;
qt.platformTheme = "gtk";
@ -89,14 +83,14 @@ with lib;
'';
})
];
};
# Set the cursor theme.
xdg.dataFile = {
"icons/default/index.theme".text = ''
[icon theme]
Inherits=Adwaita
'';
# Set the cursor theme.
xdg.dataFile = {
"icons/default/index.theme".text = ''
[icon theme]
Inherits=Adwaita
'';
};
};
my.packages = with pkgs; [