Various changes

work
Matthew Ess 2021-01-03 11:18:57 -05:00
parent 1467c20e3d
commit ef3862cd98
3 changed files with 62 additions and 15 deletions

View File

@ -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";

View File

@ -7,9 +7,6 @@ let
lockCmd = "i3lock -i ~/.lockscreen-image";
statusCmd = "i3status-rs ~/.config/i3status.toml";
nixpkgs-lldb = import <nixpkgs-vscode-lldb> {};
nixpkgs-ra = import <nixpkgs-ra> {};
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;
};
};
};
}

3
i3.nix
View File

@ -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