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; wlp3s0.useDHCP = true;
wwp0s20u4c2i12.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 # Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/"; # networking.proxy.default = "http://user:password@proxy:port/";
@ -80,6 +93,9 @@
tree tree
vim vim
wget wget
# Interfacing with HFS+ drives
hfsprogs
]; ];
# Some programs need SUID wrappers, can be configured further or are # Some programs need SUID wrappers, can be configured further or are
@ -104,9 +120,15 @@
openssh.enable = true; openssh.enable = true;
clipmenu.enable = true; clipmenu.enable = true;
geoclue2.enable = true; geoclue2.enable = true;
gvfs.enable = true;
printing.enable = true; printing.enable = true;
gnome3.gnome-keyring.enable = true; gnome3.gnome-keyring.enable = true;
upower.enable = true; upower.enable = true;
mullvad-vpn.enable = true;
plex = {
enable = true;
# user = "mat";
};
xserver = { xserver = {
enable = true; enable = true;
layout = "us"; layout = "us";
@ -163,6 +185,8 @@
}; };
}; };
nixpkgs.config.allowUnfree = true;
# Define a user account. Don't forget to set a password with passwd. # Define a user account. Don't forget to set a password with passwd.
users.users.mat = { users.users.mat = {
isNormalUser = true; isNormalUser = true;
@ -176,6 +200,10 @@
}; };
home-manager.users.mat = import ./home.nix; home-manager.users.mat = import ./home.nix;
fileSystems = {
"/mnt/passport".device = "/dev/sdb";
};
# Don't ask for my password *quite* as often. # Don't ask for my password *quite* as often.
security.sudo.extraConfig = "Defaults timestamp_timeout=60"; security.sudo.extraConfig = "Defaults timestamp_timeout=60";

View File

@ -7,9 +7,6 @@ let
lockCmd = "i3lock -i ~/.lockscreen-image"; lockCmd = "i3lock -i ~/.lockscreen-image";
statusCmd = "i3status-rs ~/.config/i3status.toml"; statusCmd = "i3status-rs ~/.config/i3status.toml";
nixpkgs-lldb = import <nixpkgs-vscode-lldb> {};
nixpkgs-ra = import <nixpkgs-ra> {};
in { in {
nixpkgs = { config = { allowUnfree = true; }; }; nixpkgs = { config = { allowUnfree = true; }; };
home = { home = {
@ -26,35 +23,44 @@ in {
nix-prefetch-git nix-prefetch-git
# command line utilities # command line utilities
ag ag
python37Packages.cookiecutter bottom
du-dust du-dust
exercism exercism
fzy fzy
httpie
imagemagick imagemagick
jq jq
haskell.packages.ghc865.pointfree pijul
procs
rlwrap rlwrap
tldr tealdeer
unzip unzip
unrar
wireguard
# graphical applications # graphical applications
castor
deluge
discord discord
(dunst.override { dunstify = true; }) (dunst.override { dunstify = true; })
enpass enpass
fractal fractal
firefox firefox
httpie
kitty kitty
mullvad-vpn
signal-desktop signal-desktop
slack slack
steam steam
vlc
xfce.thunar xfce.thunar
xfce.thunar-archive-plugin xfce.thunar-archive-plugin
# graphical utilities # graphical utilities
clipmenu clipmenu
clipnotify clipnotify
dmenu dmenu
gnome3.gnome-disk-utility
i3lock i3lock
i3status-rust i3status-rust
libappindicator
libnotify libnotify
lxappearance lxappearance
rofi rofi
@ -111,7 +117,7 @@ in {
include ./theme.conf include ./theme.conf
''; '';
".config/kitty/theme.conf".source = ./assets/kitty-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; ".config/rofi/theme.rasi".source = ./assets/sidetab.rasi;
}; };
}; };
@ -152,7 +158,7 @@ in {
alias sys="sudo systemctl" alias sys="sudo systemctl"
alias rebuild="sudo nixos-rebuild switch" alias rebuild="sudo nixos-rebuild switch"
alias rebuildd="sudo nixos-rebuild switch; and systemctl restart display-manager" 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 clip="xclip -selection c"
alias cxuse="sudo cachix use -d ~/dotfiles.nix" 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" 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 vims="vim -S Session.vim"
alias bigscreen="xrandr --output eDP1 --off --output HDMI2 --auto" alias bigscreen="xrandr --output eDP1 --off --output HDMI2 --auto"
alias smallscreen="xrandr --output eDP1 --auto --output HDMI2 --off" 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 \cr 'fzy_select_history (commandline -b)'
bind -M insert \cr 'fzy_select_history (commandline -b)' bind -M insert \cr 'fzy_select_history (commandline -b)'
@ -229,6 +240,10 @@ in {
ssh = { ssh = {
enable = true; enable = true;
extraOptionOverrides = { "AddKeysToAgent" = "true"; }; extraOptionOverrides = { "AddKeysToAgent" = "true"; };
matchBlocks = {
"drop".hostname = "104.131.174.193";
"pi".hostname = "192.168.1.165";
};
}; };
starship.enable = true; starship.enable = true;
vscode = { vscode = {
@ -242,12 +257,10 @@ in {
''; '';
}); });
extensions = with pkgs.vscode-extensions; [ extensions = with pkgs.vscode-extensions; [
# matklad.rust-analyzer matklad.rust-analyzer
nixpkgs-ra.vscode-extensions.matklad.rust-analyzer # ms-python.python
ms-python.python
skyapps.fish-vscode skyapps.fish-vscode
# vadimcn.vscode-lldb vadimcn.vscode-lldb
nixpkgs-lldb.vscode-extensions.vadimcn.vscode-lldb
]; ];
}; };
}; };
@ -310,6 +323,9 @@ in {
scriptPath = ".hm-xsession"; scriptPath = ".hm-xsession";
windowManager = { windowManager = {
i3 = import ./i3.nix { inherit lib lockCmd statusCmd; }; i3 = import ./i3.nix { inherit lib lockCmd statusCmd; };
awesome = {
enable = false;
};
}; };
}; };
} }

3
i3.nix
View File

@ -111,6 +111,7 @@
{ class = "discord"; } { class = "discord"; }
{ class = "(?i)signal(-desktop)?"; } { class = "(?i)signal(-desktop)?"; }
{ class = "(?i)fractal"; } { class = "(?i)fractal"; }
{ class = "(?i)castor"; }
]; ];
"4: other" = [{ class = ".*"; }]; "4: other" = [{ class = ".*"; }];
}; };
@ -119,6 +120,8 @@
exec --no-startup-id firefox exec --no-startup-id firefox
exec --no-startup-id kitty exec --no-startup-id kitty
exec --no-startup-id Enpass 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 slack
# exec --no-startup-id nheko # exec --no-startup-id nheko
# exec --no-startup-id Discord # exec --no-startup-id Discord