Created
May 25, 2020 05:05
-
-
Save Emantor/1dc949426a150ad618a0ec4d67a9931f to your computer and use it in GitHub Desktop.
Dconf read-only DB for NixOS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create a read-only DB with default theme and font settings. | |
programs.dconf.enable = true; | |
programs.dconf.profiles.user = | |
let | |
customDconf = pkgs.writeTextFile { | |
name = "nixos-user-dconf"; | |
destination = "/dconf/nixos-user-custom"; | |
text = '' | |
[org/gnome/desktop/interface] | |
cursor-theme='Numix-Cursor' | |
font-name='Source Sans Pro 10' | |
''; | |
}; | |
customDconfDb = pkgs.stdenv.mkDerivation { | |
name = "nixos-user-dconf-db"; | |
buildCommand = '' | |
${pkgs.gnome3.dconf}/bin/dconf compile $out ${customDconf}/dconf | |
''; | |
}; | |
in pkgs.stdenv.mkDerivation { | |
name = "dconf-nixos-user-profile"; | |
buildCommand = '' | |
# create a custom user profile | |
echo -e "user-db:user\nfile-db:${customDconfDb}" > $out | |
''; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment