diff --git a/home/modules/browsers.nix b/home/modules/browsers.nix deleted file mode 100644 index b7996ec..0000000 --- a/home/modules/browsers.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: -with lib; let - cfg = config.local.apps.browsers; -in { - options.local.apps.browsers = { - enable = mkEnableOption "Browser home settings"; - }; - config = mkIf cfg.enable { - home.packages = with pkgs; [ - chromium - firefox - ]; - }; -} diff --git a/home/modules/default.nix b/home/modules/default.nix index fb90319..1ff208d 100644 --- a/home/modules/default.nix +++ b/home/modules/default.nix @@ -10,7 +10,7 @@ ./baseline.nix ./gaming.nix ./yubikey.nix - ./browsers.nix + ./firefox.nix ./gui ./zsh ./gpg.nix diff --git a/home/modules/defaultDesktopPack.nix b/home/modules/defaultDesktopPack.nix index 29fbf7a..a43fca7 100644 --- a/home/modules/defaultDesktopPack.nix +++ b/home/modules/defaultDesktopPack.nix @@ -13,6 +13,7 @@ in { config = mkIf cfg.enable { home.packages = with pkgs; [ calibre + chromium discord gwenview libreoffice-fresh diff --git a/home/modules/firefox.nix b/home/modules/firefox.nix new file mode 100644 index 0000000..43a0c92 --- /dev/null +++ b/home/modules/firefox.nix @@ -0,0 +1,29 @@ +{ + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.local.apps.browsers; +in { + options.local.apps.browsers = { + enable = mkEnableOption "firefox settings"; + + workspace = mkOption { + type = types.nullOr types.str; + default = null; + description = '' + Workspace in which Firefox should open. If not set, Firefox will not open at startup. + ''; + }; + }; + + config = mkIf cfg.enable { + programs.firefox.enable = true; + + xsession.windowManager.i3.config.startup = optional (cfg.workspace != null) { + command = "${lib.getExe pkgs.i3-gaps} 'workspace ${cfg.workspace}; exec ${lib.getExe pkgs.firefox}'"; + }; + }; +} diff --git a/home/modules/gui/i3.nix b/home/modules/gui/i3.nix index 527f462..29c9507 100644 --- a/home/modules/gui/i3.nix +++ b/home/modules/gui/i3.nix @@ -45,47 +45,43 @@ with lib; { # y se sobreescriba las cosas que pongo acá # NO QUITARLO. ver man home-configuration.nix keybindings = mkOptionDefault { - "${mod}+Return" = "exec ${pkgs.kitty}/bin/kitty ${pkgs.tmux}/bin/tmux"; + "${mod}+Return" = "exec ${lib.getExe pkgs.kitty} ${lib.getExe pkgs.tmux}"; "${mod}+Tab" = "focus right"; "${mod}+Shift+Tab" = "focus left"; - "${mod}+Shift+s" = "exec ${pkgs.maim}/bin/maim -s -u | ${pkgs.xclip}/bin/xclip -selection clipboard -t image/png -i"; + "${mod}+Shift+s" = "exec ${lib.getExe pkgs.maim} -s -u | ${lib.getExe pkgs.xclip} -selection clipboard -t image/png -i"; "${mod}+Shift+w" = "move workspace to output right"; - "${mod}+l" = "exec ${pkgs.betterlockscreen}/bin/betterlockscreen -l"; + "${mod}+l" = "exec ${lib.getExe pkgs.betterlockscreen} -l"; }; startup = [ { - command = "${pkgs.xss-lock}/bin/xss-lock --transfer-sleep-lock -- ${pkgs.i3lock}/bin/i3lock --nofork"; + command = "${lib.getExe pkgs.xss-lock} --transfer-sleep-lock -- ${lib.getExe pkgs.i3lock} --nofork"; notification = false; } { - command = "${pkgs.networkmanagerapplet}/bin/nm-applet"; + command = "${lib.getExe pkgs.networkmanagerapplet}"; notification = false; } #todo: sería nice hostear esta imagen en el server y fetchearla si no existe { - command = "${pkgs.feh}/bin/feh --bg-fill ${config.home.homeDirectory}/Pictures/wallpapers/jupiter.png"; + command = "${lib.getExe pkgs.feh} --bg-fill ${config.home.homeDirectory}/Pictures/wallpapers/jupiter.png"; notification = false; always = true; } { - #todo: move this to browsers module - command = "${pkgs.i3-gaps}/bin/i3-msg 'workspace 1; exec ${pkgs.firefox}/bin/firefox'"; + #todo: move this to telegram module + command = "${lib.getExe pkgs.i3-gaps} 'workspace 2; exec ${lib.getExe pkgs.tdesktop}'"; } { - #todo: move this to telegram module - command = "${pkgs.i3-gaps}/bin/i3-msg 'workspace 2; exec ${pkgs.tdesktop}/bin/telegram-desktop'"; + command = "${lib.getExe pkgs.i3-gaps} 'workspace 2; exec ${lib.getExe pkgs.gajim}'"; } - #{ - # command = "${pkgs.i3-gaps}/bin/i3-msg 'workspace 2; exec ${pkgs.element-desktop}/bin/element-desktop'"; - #} { command = "${pkgs.systemd}/bin/systemctl --user restart polybar.service"; notification = false; always = true; } { - command = "${pkgs.autorandr}/bin/autorandr -c"; + command = "${lib.getExe pkgs.autorandr} -c"; notification = false; always = true; } diff --git a/home/platforms/fabian@posixlycorrect/default.nix b/home/platforms/fabian@posixlycorrect/default.nix index dc01dbe..13167d9 100644 --- a/home/platforms/fabian@posixlycorrect/default.nix +++ b/home/platforms/fabian@posixlycorrect/default.nix @@ -40,8 +40,11 @@ neovim.enable = true; gaming.enable = true; yubikey.enable = true; - browsers.enable = true; defaultDesktopPack.enable = true; + firefox = { + enable = true; + workspace = 1; + }; }; gui = { diff --git a/sys/platforms/vps/srv/forgejo.nix b/sys/platforms/vps/srv/forgejo.nix index 25ff959..9feb36a 100644 --- a/sys/platforms/vps/srv/forgejo.nix +++ b/sys/platforms/vps/srv/forgejo.nix @@ -47,12 +47,10 @@ with lib; { LANDING_PAGE = "explore"; }; - # You can temporarily allow registration to create an admin user. service.DISABLE_REGISTRATION = true; - # ver https://github.com/nektos/act actions = { - ENABLED = false; + ENABLED = true; }; mailer = { ENABLED = false;