flakes: Migrate the config and miku to flakes
This commit is contained in:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user