flakes: Migrate the config and miku to flakes

This commit is contained in:
2021-11-01 21:33:21 +01:00
parent 09d385806a
commit 1d8f2f8053
64 changed files with 2612 additions and 1739 deletions

View File

@@ -12,13 +12,15 @@ let
video-sync = "display-resample";
interpolation = "";
tscale = "oversample";
} // additional // (if config.programs.mpv != "" then {
} // additional // (if config.ptw.programs.mpv != "" then {
# Make mpv pop up on the primary screen
screen-name = config.programs.mpv.primaryScreen;
fs-screen-name = config.programs.mpv.primaryScreen;
screen-name = config.ptw.programs.mpv.primaryScreen;
fs-screen-name = config.ptw.programs.mpv.primaryScreen;
} else {});
cfg = config.ptw.programs.mpv;
in {
options.programs.mpv = {
options.ptw.programs.mpv = {
enable = lib.mkEnableOption "Enable and configure mpv using HomeManager";
primaryScreen = lib.mkOption {
type = lib.types.str;
default = "";
@@ -26,10 +28,10 @@ in {
};
};
config = {
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [ mpv ];
home-manager.users."${config.system.singleUser}" = {
home-manager.users."${config.ptw.system.singleUser}" = {
programs.mpv = {
enable = true;
config = {