diff --git a/configuration.nix b/configuration.nix index 00319f3..7ea2932 100644 --- a/configuration.nix +++ b/configuration.nix @@ -40,6 +40,19 @@ wlp3s0.useDHCP = true; wwp0s20u4c2i12.useDHCP = true; }; + + wireguard.enable = true; + + firewall = let + ports = [ + 32400 # Plex local + 57955 # Plex VPN + 57430 # Deluge + ]; + in { + allowedTCPPorts = ports; + allowedUDPPorts = ports; + }; }; # Configure network proxy if necessary # networking.proxy.default = "http://user:password@proxy:port/"; @@ -80,6 +93,9 @@ tree vim wget + + # Interfacing with HFS+ drives + hfsprogs ]; # Some programs need SUID wrappers, can be configured further or are @@ -104,9 +120,15 @@ openssh.enable = true; clipmenu.enable = true; geoclue2.enable = true; + gvfs.enable = true; printing.enable = true; gnome3.gnome-keyring.enable = true; upower.enable = true; + mullvad-vpn.enable = true; + plex = { + enable = true; + # user = "mat"; + }; xserver = { enable = true; layout = "us"; @@ -163,6 +185,8 @@ }; }; + nixpkgs.config.allowUnfree = true; + # Define a user account. Don't forget to set a password with ‘passwd’. users.users.mat = { isNormalUser = true; @@ -176,6 +200,10 @@ }; home-manager.users.mat = import ./home.nix; + fileSystems = { + "/mnt/passport".device = "/dev/sdb"; + }; + # Don't ask for my password *quite* as often. security.sudo.extraConfig = "Defaults timestamp_timeout=60"; @@ -183,7 +211,7 @@ binaryCaches = [ "https://hydra.iohk.io" ]; binaryCachePublicKeys = [ "hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=" ]; - }; + }; # This value determines the NixOS release with which your system is to be # compatible, in order to avoid breaking some software such as database diff --git a/home.nix b/home.nix index 85dbee8..d24eb68 100644 --- a/home.nix +++ b/home.nix @@ -7,9 +7,6 @@ let lockCmd = "i3lock -i ~/.lockscreen-image"; statusCmd = "i3status-rs ~/.config/i3status.toml"; - nixpkgs-lldb = import {}; - nixpkgs-ra = import {}; - in { nixpkgs = { config = { allowUnfree = true; }; }; home = { @@ -26,35 +23,44 @@ in { nix-prefetch-git # command line utilities ag - python37Packages.cookiecutter + bottom du-dust exercism fzy + httpie imagemagick jq - haskell.packages.ghc865.pointfree + pijul + procs rlwrap - tldr + tealdeer unzip + unrar + wireguard # graphical applications + castor + deluge discord (dunst.override { dunstify = true; }) enpass fractal firefox - httpie kitty + mullvad-vpn signal-desktop slack steam + vlc xfce.thunar xfce.thunar-archive-plugin # graphical utilities clipmenu clipnotify dmenu + gnome3.gnome-disk-utility i3lock i3status-rust + libappindicator libnotify lxappearance rofi @@ -111,7 +117,7 @@ in { include ./theme.conf ''; ".config/kitty/theme.conf".source = ./assets/kitty-theme.conf; - ".config/nvim/init.vim".source = ./assets/init.vim; + # ".config/nvim/init.vim".source = ./assets/init.vim; ".config/rofi/theme.rasi".source = ./assets/sidetab.rasi; }; }; @@ -152,7 +158,7 @@ in { alias sys="sudo systemctl" alias rebuild="sudo nixos-rebuild switch" alias rebuildd="sudo nixos-rebuild switch; and systemctl restart display-manager" - alias upgrade="sudo rm -rf /root/.cache/nix/tarballs; and sudo nixos-rebuild switch --upgrade" + alias upgrade="sudo rm -rf /root/.cache/nix/tarballs; and sudo nix-channel --upgrade; and sudo nixos-rebuild switch --upgrade" alias clip="xclip -selection c" alias cxuse="sudo cachix use -d ~/dotfiles.nix" alias cxpsh="nix-shell --command exit; nix-store -qR --include-outputs (nix-instantiate shell.nix) | cachix push" @@ -163,6 +169,11 @@ in { alias vims="vim -S Session.vim" alias bigscreen="xrandr --output eDP1 --off --output HDMI2 --auto" alias smallscreen="xrandr --output eDP1 --auto --output HDMI2 --off" + alias pi="env TERM=xterm ssh pi@pi" + alias drop="env TERM=xterm ssh mat@drop" + alias wgup="wg-quick up wg0" + alias wgdn="wg-quick down wg0" + alias wifi="nmcli r w off; nmcli r w on" bind \cr 'fzy_select_history (commandline -b)' bind -M insert \cr 'fzy_select_history (commandline -b)' @@ -229,6 +240,10 @@ in { ssh = { enable = true; extraOptionOverrides = { "AddKeysToAgent" = "true"; }; + matchBlocks = { + "drop".hostname = "104.131.174.193"; + "pi".hostname = "192.168.1.165"; + }; }; starship.enable = true; vscode = { @@ -242,12 +257,10 @@ in { ''; }); extensions = with pkgs.vscode-extensions; [ - # matklad.rust-analyzer - nixpkgs-ra.vscode-extensions.matklad.rust-analyzer - ms-python.python + matklad.rust-analyzer + # ms-python.python skyapps.fish-vscode - # vadimcn.vscode-lldb - nixpkgs-lldb.vscode-extensions.vadimcn.vscode-lldb + vadimcn.vscode-lldb ]; }; }; @@ -310,6 +323,9 @@ in { scriptPath = ".hm-xsession"; windowManager = { i3 = import ./i3.nix { inherit lib lockCmd statusCmd; }; + awesome = { + enable = false; + }; }; }; } diff --git a/i3.nix b/i3.nix index 9991673..ebf4b5d 100644 --- a/i3.nix +++ b/i3.nix @@ -111,6 +111,7 @@ { class = "discord"; } { class = "(?i)signal(-desktop)?"; } { class = "(?i)fractal"; } + { class = "(?i)castor"; } ]; "4: other" = [{ class = ".*"; }]; }; @@ -119,6 +120,8 @@ exec --no-startup-id firefox exec --no-startup-id kitty exec --no-startup-id Enpass + exec --no-startup-id deluged + exec --no-startup-id mullvad-vpn # exec --no-startup-id slack # exec --no-startup-id nheko # exec --no-startup-id Discord