This commit is contained in:
Tyler Starr 2023-09-02 17:48:18 -07:00
commit 1c03f468c3
28 changed files with 424 additions and 41 deletions

View File

@ -6,3 +6,5 @@
- Make scratch pad for taskwarrior/timewarrior?
- Make kestrel vpn setup automatically
- convert home server to nix?
- Make bookmarks fzf script
- Make windows vm in virt manager

View File

@ -1,3 +1,3 @@
#!/usr/bin/env bash
sudo mount -t cifs -o rw,uid=$(id -u $(whoami)),gid=$(id -g $(whoami)),vers=3.0,credentials=/home/tstarr/.smb //192.168.1.136/engi /home/tstarr/mnt/engi
sudo mount -t cifs -o rw,uid=$(id -u $(whoami)),gid=$(id -g $(whoami)),vers=3.0,credentials=/home/tstarr/.smb //192.168.1.136/private /home/tstarr/mnt/engi

View File

@ -7,5 +7,5 @@ if [[ "$2" == "Password" ]]
then
rbw get "$1"
else
rbw get "$1" --full | grep "$2" | cut -d ' ' -f 2-
rbw get "$1" --field="$2"
fi

View File

@ -113,7 +113,7 @@ for_window [title="launcher"] floating enable
#----- KEY BINDINGS
#-------------------------------------------------------------------------------
# [p]ower commands
# Power commands
bindsym $mod+p mode $mode_power
mode $mode_power {
bindsym s exec shutdown now
@ -121,7 +121,7 @@ mode $mode_power {
bindsym Escape mode default
}
# [x]utility commands
# Utility commands
bindsym $mod+x mode utility
mode utility {
bindsym q exit
@ -131,7 +131,7 @@ mode utility {
bindsym Escape mode default
}
# layout commands
# Layout commands
bindsym $mod+Ctrl+t splitv; layout tabbed
bindsym $mod+Ctrl+v layout splitv
bindsym $mod+Ctrl+s layout splith
@ -141,7 +141,7 @@ bindsym $mod+Ctrl+k resize grow height 50
bindsym $mod+Ctrl+l resize grow width 50
bindsym $mod+Ctrl+c move position center
# program management
# Program management
bindsym $mod+d kill
bindsym $mod+f fullscreen toggle
bindsym $mod+t floating toggle
@ -149,7 +149,7 @@ bindsym $mod+s sticky toggle
bindsym $mod+Tab focus mode_toggle
floating_modifier $mod
# spatial container management
# Spatial container management
bindsym $mod+h exec ~/.config/sway/scripts/tabfocus.sh "h"
bindsym $mod+j exec ~/.config/sway/scripts/tabfocus.sh "j"
bindsym $mod+k exec ~/.config/sway/scripts/tabfocus.sh "k"
@ -163,7 +163,7 @@ bindsym $mod+backslash split h
bindsym $mod+z splith; layout tabbed; focus parent
bindsym $mod+Shift+z layout default
# workspace management
# Workspace management
bindsym $mod+1 workspace $tag1
bindsym $mod+2 workspace $tag2
bindsym $mod+3 workspace $tag3
@ -181,29 +181,27 @@ bindsym $mod+Shift+w move container to workspace $tag6
bindsym $mod+Shift+e move container to workspace $tag7
bindsym $mod+Shift+r move container to workspace $tag8
# audio
# Audio
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +2%
bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -2%
bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
# [o]pen applications
# Open applications
bindsym $mod+Return exec alacritty
bindsym $mod+a mode launcher
mode launcher {
bindsym r exec alacritty --title launcher -e /home/{{ .user }}/bin/linux-app-launcher, $e
#bindsym w exec rofi -show window -show-icons, $e
#bindsym e exec rofi -modi emoji -show emoji, $e
bindsym Escape mode default
}
bindsym $mod+o mode open
mode open {
bindsym b exec firefox, $e
bindsym b exec brave, $e
bindsym s exec steam || flatpak run com.valvesoftware.Steam, $e
bindsym d exec discord || flatpak run com.discordapp.Discord, $e
bindsym Escape mode default
}
# s[c]ratchpads commands
# Scratchpads commands
bindsym $mod+c mode scratch
mode scratch {
bindsym Return exec sway-scratchpad \
@ -221,27 +219,31 @@ mode scratch {
--mark files \
--width 71 \
--height 71, $e
bindsym d exec sway-scratchpad \
--command "alacritty -e tmuxp load /home/{{ .user }}/.config/tmuxp/dot.yml" \
--mark dot \
--width 90 \
--height 90, $e
bindsym Shift+c move scratchpad, $e
bindsym c scratchpad show, $e
bindsym Escape mode default
}
output $DISP_SEC {
resolution 2560x1440@143.912Hz
position 0,0
}
output $DISP_PRI {
resolution 2560x1440@143.973Hz
position 2560,0
}
output $DISP_SEC {
resolution 2560x1440@143.912Hz
position 0,0
}
bar {
position top
status_command while ~/.config/sway/scripts/status.sh; do sleep 1; done
tray_output none
pango_markup enabled
status_command while ~/.config/sway/scripts/status.sh; do sleep 1; done
colors {
background #000000
focused_workspace $workspace $workspace $background
@ -252,8 +254,8 @@ bar {
#----- AUTOSTART WITH I3
#-------------------------------------------------------------------------------
#exec_always --no-startup-id "configure-gtk"
exec_always --no-startup-id "dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK"
exec_always --no-startup-id "configure-gtk"
exec_always --no-startup-id "swaybg -i ~/media/pictures/wallpapers/solar_system_wallpapers/mars.png"
exec --no-startup-id "~/.config/sway/scripts/idle.sh"
exec --no-startup-id "udiskie"

View File

@ -0,0 +1,11 @@
# tmuxp config for general dev
session_name: dot
windows:
- window_name: editor
shell_command_before:
- cd ~/.local/share/chezmoi
panes:
- shell_command:
- nvim
- window_name: term

View File

@ -0,0 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINKal966nABRHParmjBURtssOl6TcpBAdi6LVvQMXBLv starrtyler88@gmail.com

View File

@ -0,0 +1 @@
{{ (secret "Github - Personal Secret" "NOTES") }}

View File

@ -3,6 +3,12 @@
Jumpstart scripts to install Arch with packages and configs I use.
## Status
:warning: :warning: :warning:
I don't actively use this anymore. This is likely falling into disrepair.
## Usage
1. Install Arch with `archinstall` and the following settings:

View File

@ -3,6 +3,12 @@
Jumpstart scripts to install Fedora with packages and configs I use.
## Status
:warning: :warning: :warning:
I don't actively use this anymore. This is likely falling into disrepair.
## Usage
Install Fedora Workstation with BTRFS and default partitions.

View File

Binary file not shown.

View File

@ -21,6 +21,23 @@
"type": "github"
}
},
"jovian-nixos": {
"flake": false,
"locked": {
"lastModified": 1692160665,
"narHash": "sha256-MKjvQuArGltIhZh6m23hSdogRr8DxwGqSwt0DlTlUbc=",
"ref": "development",
"rev": "97662e4872b88df79e60be0c27fc277b326fd6e9",
"revCount": 322,
"type": "git",
"url": "https://github.com/Jovian-Experiments/Jovian-NixOS"
},
"original": {
"ref": "development",
"type": "git",
"url": "https://github.com/Jovian-Experiments/Jovian-NixOS"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1688939073,
@ -37,10 +54,28 @@
"type": "github"
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1691186842,
"narHash": "sha256-wxBVCvZUwq+XS4N4t9NqsHV4E64cPVqQ2fdDISpjcw0=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "18036c0be90f4e308ae3ebcab0e14aae0336fe42",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
"nixpkgs": "nixpkgs"
"jovian-nixos": "jovian-nixos",
"nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable"
}
}
},

View File

@ -3,26 +3,35 @@
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = github:nix-community/home-manager/release-23.05;
inputs.nixpkgs.follows = "nixpkgs";
};
jovian-nixos = {
url = "git+https://github.com/Jovian-Experiments/Jovian-NixOS?ref=development";
flake = false;
};
};
outputs = inputs @ { self, nixpkgs, home-manager, ... }:
outputs = inputs @ { self, nixpkgs, nixpkgs-unstable, home-manager, jovian-nixos, ... }:
let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
pkgs-unstable = import nixpkgs-unstable {
inherit system;
config.allowUnfree = true;
};
lib = nixpkgs.lib;
user = "tstarr";
in {
nixosConfigurations = {
kestrel = lib.nixosSystem {
inherit system;
specialArgs = { inherit user; };
specialArgs = { inherit user; inherit pkgs-unstable; };
modules = [
./hosts/kestrel/configuration.nix
./hosts/kestrel/hardware.nix
@ -53,6 +62,23 @@
}
];
};
bulwark = lib.nixosSystem {
inherit system;
specialArgs = { inherit user; inherit pkgs-unstable; inherit jovian-nixos; inherit home-manager; };
modules = [
./hosts/bulwark/configuration.nix
./hosts/bulwark/hardware.nix
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = { inherit user; };
home-manager.users.${user} = {
imports = [ ./hosts/bulwark/home-configuration.nix ];
};
}
];
};
};
};
}

View File

@ -0,0 +1,120 @@
{ config, lib, pkgs, pkgs-unstable, user, ... }:
{
imports = [
./steam-deck.nix
../../modules
];
nix = {
package = pkgs.nixFlakes;
extraOptions = "experimental-features = nix-command flakes";
settings.auto-optimise-store = true;
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d";
};
};
# Add non-free packages
nixpkgs.config.allowUnfree = true;
nixpkgs.overlays = import ../../lib/overlays.nix;
# Custom kernel is set within Jovian-Nixos
# boot.kernelPackages = pkgs.linuxPackages_zen;
# Hardware options
hardware.bluetooth.enable = true;
hardware.sensor.iio.enable = true;
hardware.opengl.enable = true;
hardware.opengl.driSupport = true;
hardware.opengl.driSupport32Bit = true;
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# Set networking options
networking.hostName = "bulwark";
networking.networkmanager.enable = true;
networking.firewall.checkReversePath = "loose";
networking.firewall.enable = false;
# Set your time zone.
time.timeZone = "America/Los_Angeles";
i18n.defaultLocale = "en_US.UTF-8";
# Add fonts
fonts.fonts = with pkgs; [
nerdfonts
];
# Enable zsh
programs.zsh.enable = true;
# Define user account.
users.users.${user} = {
isNormalUser = true;
extraGroups = [ "wheel" "docker" ]; # Enable sudo for the user.
shell = pkgs.zsh;
};
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
vim
git
killall
pciutils
syncthing
pinentry-curses
trash-cli
unzip
nnn
advcpmv
neovim
] ++ [
pkgs-unstable.brave
];
# Enable user services
services = {
gvfs.enable = true; # USB automount
blueman.enable = true;
printing.enable = true;
printing.drivers = [ pkgs.hplip ];
avahi.enable = true;
avahi.nssmdns = true;
syncthing = {
enable = true;
user = "${user}";
dataDir = "/home/${user}/sync";
configDir = "/home/${user}/.config/syncthing";
};
};
# Enable the OpenSSH daemon.
services.openssh.enable = true;
services.pcscd.enable = true;
programs.gnupg.agent = {
enable = true;
pinentryFlavor = "curses";
enableSSHSupport = true;
};
# Enable modules
modules = {
services = {
samba-client.enable = true;
};
devel = {
tooling.enable = true;
};
gaming = {
steam.enable = true;
};
};
system.stateVersion = "23.05"; # Did you read the comment?
}

View File

@ -0,0 +1,40 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/ff26006b-37a0-4cfe-901b-6c1fb4d2cbbb";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/80B1-3DF9";
fsType = "vfat";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/b11acbe6-69f7-4a03-a79e-c17a5563ed17"; }
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp4s0f3u1u3.useDHCP = lib.mkDefault true;
# networking.interfaces.wlo1.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View File

@ -0,0 +1,16 @@
{ config, pkgs, user, ... }:
{
home.username = "${user}";
home.homeDirectory = "/home/${user}";
programs.home-manager.enable = true;
home.packages = with pkgs; [
chezmoi
rbw
zk
joplin
joplin-desktop
];
home.stateVersion = "23.05";
}

View File

@ -0,0 +1,44 @@
{ config, lib, pkgs, pkgs-unstable, user, jovian-nixos, home-manager, ... }:
{
imports = [
(jovian-nixos + "/modules")
home-manager.nixosModule
];
jovian = {
steam.desktopSession = "gnome-xorg";
steam.enable = true;
steam.autoStart = true;
steam.user = "${user}";
devices.steamdeck = {
enable = true;
};
};
# Enable GNOME
services.xserver.enable = true;
services.xserver.desktopManager.gnome.enable = true;
services.xserver.displayManager.gdm.enable = false;
# Enable sound and handle conflict (https://github.com/Jovian-Experiments/Jovian-NixOS/issues/99)
sound.enable = true;
hardware.pulseaudio.enable = lib.mkForce false;
environment.systemPackages = with pkgs; [
jupiter-dock-updater-bin
steamdeck-firmware
];
# GNOME settings through home
home-manager.users.${user} = {
dconf.settings = {
# Enable on-screen keyboard
"org/gnome/desktop/a11y/applications" = {
screen-keyboard-enabled = true;
};
"org/gnome/shell" = {
favorite-apps = ["steam.desktop"];
};
};
};
}

View File

@ -34,6 +34,7 @@
networking.hostName = "kestrel";
networking.networkmanager.enable = true;
networking.firewall.checkReversePath = "loose";
networking.firewall.enable = false;
# Set your time zone.
time.timeZone = "America/Los_Angeles";
@ -59,10 +60,16 @@
# Define user account.
users.users.${user} = {
isNormalUser = true;
extraGroups = [ "wheel" "docker" ]; # Enable sudo for the user.
extraGroups = [ "wheel" "docker" "libvirtd" ]; # Enable sudo for the user.
shell = pkgs.zsh;
};
xdg.portal = {
enable = true;
gtkUsePortal = true;
extraPortals = [ pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-wlr ];
};
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
@ -75,6 +82,7 @@
trash-cli
unzip
nnn
advcpmv
];
# Enable user services
@ -107,6 +115,7 @@
modules = {
services = {
samba-client.enable = true;
virt-manager.enable = true;
};
devel = {
tooling.enable = true;

View File

@ -4,10 +4,19 @@
home.homeDirectory = "/home/${user}";
programs.home-manager.enable = true;
# Setup git
programs.git = {
enable = true;
userName = "starr-dusT";
userEmail = "starrtyler88@gmail.com";
};
home.packages = with pkgs; [
chezmoi
rbw
zk
joplin
joplin-desktop
];
home.stateVersion = "23.05";

View File

@ -1,5 +1,6 @@
/* This configures nixpkgs.overlays to include our overlays/ directory.
*/
let path = ../overlays; in with builtins;
map (n: import (path + ("/" + n)))
(filter (n: match ".*\\.nix" n != null ||

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, user, ... }:
{ config, lib, pkgs, pkgs-unstable, user, ... }:
let
cfg = config.modules.desktop.sway;
@ -52,12 +52,16 @@ in {
networkmanagerapplet
pcmanfm
google-chrome
firefox
gamemode
discord
inkscape
libreoffice-fresh
mpv
udiskie
p7zip
pavucontrol
] ++ [
pkgs-unstable.brave
];
# xdg-desktop-portal works by exposing a series of D-Bus interfaces

View File

@ -14,6 +14,7 @@ in {
ripgrep
tmux
tmuxp
lazygit
];
};
}

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, user, ... }:
{ config, lib, pkgs, pkgs-unstable, user, ... }:
let cfg = config.modules.gaming.steam;
in {
@ -16,7 +16,10 @@ in {
environment.systemPackages = [
pkgs.steam
pkgs.yuzu-early-access
pkgs-unstable.yuzu-early-access
pkgs.dolphin-emu
pkgs-unstable.sunshine
pkgs-unstable.moonlight-qt
];
};

View File

@ -1,4 +1,4 @@
{ ... }:
{
imports = [ ./samba-server.nix ./samba-client.nix ./jellyfin.nix ];
imports = [ ./samba-server.nix ./samba-client.nix ./jellyfin.nix ./virt-manager.nix ];
}

View File

@ -0,0 +1,11 @@
{ config, lib, pkgs, ... }:
let cfg = config.modules.services.virt-manager;
in {
options.modules.services.virt-manager.enable = lib.mkEnableOption "virt-manager";
config = lib.mkIf cfg.enable {
virtualisation.libvirtd.enable = true;
programs.dconf.enable = true;
environment.systemPackages = with pkgs; [ virt-manager ];
};
}

View File

@ -3,4 +3,5 @@
*/
final: prev: {
sway-scratchpad = final.callPackage ../pkgs/sway-scratchpad.nix {};
advcpmv = final.callPackage ../pkgs/advcpmv.nix {};
}

View File

@ -0,0 +1,31 @@
{ stdenv, fetchurl, fetchpatch }:
let
advcpmv_owner = "jarun";
advcpmv_version = "0.9";
coreutils_version = "9.1";
coreutils_upstream = "coreutils";
patch_rev = "69d2f9d3c72ec149fc7e06f5154af27db857ebb5";
in
stdenv.mkDerivation rec {
name = "advcpmv";
version = advcpmv_version;
src = fetchurl {
name = "source-${name}-${coreutils_version}.tar.xz";
url = "ftp://ftp.gnu.org/gnu/${coreutils_upstream}/${coreutils_upstream}-${coreutils_version}.tar.xz";
sha256 = "sha256-YaH0ENeLp+fzelpPUObRMgrKMzdUhKMlXt3xejhYBCM=";
};
patches = [
(fetchpatch {
url = "https://raw.githubusercontent.com/${advcpmv_owner}/${name}/${patch_rev}/${name}-${advcpmv_version}-${coreutils_version}.patch";
sha256 = "sha256-d+SRT/R4xmfHLAdOr7m4R3WFiW64P5ZH6iqDvErYCyg=";
})
];
installPhase = ''
install -D "src/cp" "$out/bin/cpg"
install -D "src/mv" "$out/bin/mvg"
'';
}

View File

@ -0,0 +1,3 @@
#!/usr/bin/env bash
chmod 600 ~/.ssh/keys/github_personal