diff --git a/home/default.nix b/home/default.nix index 200873f..fa9360b 100644 --- a/home/default.nix +++ b/home/default.nix @@ -1,14 +1,19 @@ # man page: https://rycee.gitlab.io/home-manager/options.html { nixpkgs }: -{ config, pkgs, lib, ... }: -{ +{ config, pkgs, lib, ... }: { + + imports = [ ./steam ]; home = { stateVersion = "21.11"; # No tocar esto username = "fabian"; homeDirectory = "/home/fabian"; packages = import ./path.nix pkgs; + sessionVariables = { + "EDITOR" = "nvim"; + "TERMINAL" = "kitty"; + }; }; nix.registry."system".to = { @@ -22,7 +27,7 @@ xsession.windowManager.i3 = { enable = true; package = pkgs.i3-gaps; - extraConfig = import ./i3 pkgs; + extraConfig = import ./i3/default.nix pkgs; }; nixpkgs.config.allowUnfree = true; @@ -68,6 +73,8 @@ "files.autoSave" = "onFocusChange"; "explorer.confirmDelete" = false; "explorer.confirmDragAndDrop" = false; + "security.workspace.trust.enabled" = false; + "workbench.startupEditor" = "none"; }; }; @@ -77,5 +84,9 @@ userName = "Fabián Montero"; signing.key = "E77A808BF9A955D668EEEA6473FA9C9CB5F0249B"; }; + + programs.steam.enable = true; + + } diff --git a/home/i3/default.nix b/home/i3/default.nix index f772f19..ed66d06 100644 --- a/home/i3/default.nix +++ b/home/i3/default.nix @@ -1,4 +1,4 @@ -{...}: '' +{maim, xclip, ...}: '' # See https://i3wm.org/docs/userguide.html for a complete reference! @@ -22,9 +22,9 @@ exec_always --no-startup-id xrandr --output DisplayPort-0 --primary --mode 1920x exec_always --no-startup-id compton -b # exec_always --no-startup-id $HOME/.config/polybar/launch.sh -exec --no-startup-id .config/i3/keyboard.sh -exec --no-startup-id .config/i3/wallpaper.sh -exec --no-startup-id dunst -config .config/dunst/dunstrc +exec --no-startup-id ./keyboard.sh +# exec --no-startup-id ./wallpaper.sh +# exec --no-startup-id dunst -config .config/dunst/dunstrc # Use pactl to adjust volume in PulseAudio. set $refresh_i3status killall -SIGUSR1 i3status @@ -183,7 +183,7 @@ gaps outer 10 gaps inner 10 # screenshot -bindsym $mod+Shift+s exec maim -s -u | xclip -selection clipboard -t image/png -i +bindsym $mod+Shift+s exec ${maim} -s -u | ${xclip} -selection clipboard -t image/png -i # 2 screens workspace $ws1 output DisplayPort-0 diff --git a/home/i3/polybar/config.nix b/home/i3/polybar/config.nix index 74506ae..c5eb261 100644 --- a/home/i3/polybar/config.nix +++ b/home/i3/polybar/config.nix @@ -1,5 +1,4 @@ '' -[colors] ;background = ''${xrdb:color0:#222} background = #AA000000 background-alt = #00000000 diff --git a/home/path.nix b/home/path.nix index 2d0615a..cbc0ff9 100644 --- a/home/path.nix +++ b/home/path.nix @@ -6,6 +6,7 @@ pkgs: with pkgs; [ jetbrains.pycharm-professional jq killall + maim pipenv rustup signal-desktop diff --git a/home/steam/default.nix b/home/steam/default.nix new file mode 100644 index 0000000..a5415a0 --- /dev/null +++ b/home/steam/default.nix @@ -0,0 +1,13 @@ +{callPackage, lib, config, ...}: +with lib; let + cfg = config.programs.steam; +in { + options = { + programs.steam.enable = mkEnableOption "Weather to enable option or not."; + }; + config = mkIf cfg.enable { + home.packages = [ + (callPackage ./package.nix {}) + ]; + }; +} diff --git a/home/steam/package.nix b/home/steam/package.nix new file mode 100644 index 0000000..a740373 --- /dev/null +++ b/home/steam/package.nix @@ -0,0 +1,4 @@ +{ writeShellScriptBin, steam-run, steam, ... }: +writeShellScriptBin "steam" '' + exec ${steam-run}/bin/steam-run ${steam}/bin/steam +''