mirror of
https://github.com/starr-dusT/dotfiles.git
synced 2025-02-19 19:27:31 -08:00
more update
This commit is contained in:
parent
f807658d38
commit
d17c974a47
@ -32,8 +32,6 @@ export NVM_DIR="$HOME/.nvm"
|
|||||||
|
|
||||||
export PATH="$HOME/.nimble/bin:$PATH"
|
export PATH="$HOME/.nimble/bin:$PATH"
|
||||||
|
|
||||||
. "$HOME/.cargo/env"
|
|
||||||
|
|
||||||
alias spl="tmux_splat"
|
alias spl="tmux_splat"
|
||||||
alias n="nnn -d -e -H -r"
|
alias n="nnn -d -e -H -r"
|
||||||
alias s="startx"
|
alias s="startx"
|
||||||
|
@ -50,4 +50,4 @@ font:
|
|||||||
y: 1
|
y: 1
|
||||||
|
|
||||||
import:
|
import:
|
||||||
- ~/.config/alacritty/themes/themes/monokai-pro.yml
|
- ~/.config/alacritty/themes/themes/dracula.yaml
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
vim.o.termguicolors = true
|
vim.o.termguicolors = true
|
||||||
vim.cmd[[colorscheme monokai-pro]]
|
vim.cmd[[colorscheme dracula]]
|
||||||
|
@ -5,7 +5,7 @@ return require('packer').startup(function(use)
|
|||||||
use 'wbthomason/packer.nvim'
|
use 'wbthomason/packer.nvim'
|
||||||
|
|
||||||
-- Colors
|
-- Colors
|
||||||
--use ('dracula/vim')
|
use ('dracula/vim')
|
||||||
|
|
||||||
-- IDE
|
-- IDE
|
||||||
use('nvim-lua/plenary.nvim')
|
use('nvim-lua/plenary.nvim')
|
||||||
|
@ -39,6 +39,7 @@ set $foreground #F8F8F2
|
|||||||
set $focused #bd93f9
|
set $focused #bd93f9
|
||||||
set $inactive #44475A
|
set $inactive #44475A
|
||||||
set $urgent #FF5555
|
set $urgent #FF5555
|
||||||
|
set $workspace #50FA7B
|
||||||
|
|
||||||
# class border bground text indicator child_border
|
# class border bground text indicator child_border
|
||||||
client.focused $focused $focused $foreground $focused $focused
|
client.focused $focused $focused $foreground $focused $focused
|
||||||
@ -243,7 +244,7 @@ bar {
|
|||||||
pango_markup enabled
|
pango_markup enabled
|
||||||
colors {
|
colors {
|
||||||
background #000000
|
background #000000
|
||||||
focused_workspace $focused $focused $background
|
focused_workspace $workspace $workspace $background
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -253,5 +254,6 @@ bar {
|
|||||||
|
|
||||||
exec_always --no-startup-id "dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK"
|
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 "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 "~/.config/sway/scripts/idle.sh"
|
||||||
exec --no-startup-id "udiskie"
|
exec --no-startup-id "udiskie"
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
# TODO
|
# TODO
|
||||||
- Figure out if LTS kernel helps Dota2
|
- Fix syncthing for Yuzu/retro games
|
||||||
|
- Use chezmoi to set colors for theme (if possible)
|
||||||
|
- Document themeing options in additional-setup (to help and figure out automation)
|
||||||
|
- Make fzf scratch pad for zk notes
|
||||||
|
- Make scratch pad for taskwarrior/timewarrior?
|
||||||
|
@ -2,9 +2,13 @@
|
|||||||
|
|
||||||
The following documents some Arch setup that wasn't automated with ansible.
|
The following documents some Arch setup that wasn't automated with ansible.
|
||||||
|
|
||||||
## Wireguard Client
|
## Wireguard Client [x]
|
||||||
|
|
||||||
Wireguard is nice for a home vpn and [pivpn](https://pivpn.io/) makes it easy.
|
Wireguard is nice for a home vpn and [pivpn](https://pivpn.io/) makes it easy.
|
||||||
|
Currently my scripts for controlling (and visualizing the state of the vpn)
|
||||||
|
assume the connection name for the vpn is the same as the hostname of the system.
|
||||||
|
This may need to be modified in the future if I end up needing multiple vpn
|
||||||
|
connections.
|
||||||
|
|
||||||
1. Create client on server and copy resulting `.conf` file to local machine
|
1. Create client on server and copy resulting `.conf` file to local machine
|
||||||
2. Import to networkmanager with:
|
2. Import to networkmanager with:
|
||||||
@ -14,7 +18,7 @@ nmcli connection import type wireguard file <conf file from pivpn>
|
|||||||
3. Use `nm-connection-editor` to disable automatic connection
|
3. Use `nm-connection-editor` to disable automatic connection
|
||||||
4. Connect to vpn with `nmcli connection up <vpn connection name>
|
4. Connect to vpn with `nmcli connection up <vpn connection name>
|
||||||
|
|
||||||
## Mount network drives
|
## Mount network drives [x]
|
||||||
|
|
||||||
I find fstab messing about more troubule than it is worth. Credentials are
|
I find fstab messing about more troubule than it is worth. Credentials are
|
||||||
stored in ~/.smb. Mount network drives when needed with the following command:
|
stored in ~/.smb. Mount network drives when needed with the following command:
|
||||||
@ -23,7 +27,7 @@ stored in ~/.smb. Mount network drives when needed with the following command:
|
|||||||
linux-mount-<network drive name>
|
linux-mount-<network drive name>
|
||||||
```
|
```
|
||||||
|
|
||||||
## Taskopen for taskwarrior
|
## Taskopen for taskwarrior [x]
|
||||||
|
|
||||||
[taskopen](https://github.com/jschlatow/taskopen) is easier to install
|
[taskopen](https://github.com/jschlatow/taskopen) is easier to install
|
||||||
manually at this point since it isn't packaged and uses nim. Might get this
|
manually at this point since it isn't packaged and uses nim. Might get this
|
||||||
@ -61,7 +65,7 @@ Gitconfig files for SSH git push/pull are automaitcally placed. The only
|
|||||||
additional configuration required is the transfer of SSH keys (see Syncthing
|
additional configuration required is the transfer of SSH keys (see Syncthing
|
||||||
section).
|
section).
|
||||||
|
|
||||||
## Firefox
|
## Firefox [x]
|
||||||
|
|
||||||
Transfer the `.mozilla` folder from install-to-install to maintain Firefox
|
Transfer the `.mozilla` folder from install-to-install to maintain Firefox
|
||||||
settings and configurations.
|
settings and configurations.
|
||||||
@ -101,11 +105,13 @@ provides good information on setting up the virtual machine in virt-manager.
|
|||||||
The `patch.rom` required for my GPU is included in my repo. The virt-manager
|
The `patch.rom` required for my GPU is included in my repo. The virt-manager
|
||||||
setup should usually be avoided by transfering the VM between machines:
|
setup should usually be avoided by transfering the VM between machines:
|
||||||
|
|
||||||
1. Copy the VM's disks from `/var/lib/libvirt/images` on src host to the same dir on destination host
|
1. Copy the VM's disks from `/var/lib/libvirt/images` on src host to the same
|
||||||
2. On the source host run `virsh dumpxml VMNAME > domxml.xml` and copy this xml to the destination host
|
dir on destination host
|
||||||
|
2. On the source host run `virsh dumpxml VMNAME > domxml.xml` and copy this xml
|
||||||
|
to the destination host
|
||||||
3. On the destination host run `virsh define domxml.xml`
|
3. On the destination host run `virsh define domxml.xml`
|
||||||
|
|
||||||
## AUR Helper
|
## AUR Helper [x]
|
||||||
|
|
||||||
I install the absolute minimum number of AUR packages (and I don't automate
|
I install the absolute minimum number of AUR packages (and I don't automate
|
||||||
thier installation). Run the following to install:
|
thier installation). Run the following to install:
|
||||||
@ -121,10 +127,22 @@ I usually install the following packages:
|
|||||||
1. Google Earth
|
1. Google Earth
|
||||||
2. Google Chrome (I like baseball)
|
2. Google Chrome (I like baseball)
|
||||||
|
|
||||||
## Yuzu
|
## Yuzu [x]
|
||||||
|
|
||||||
Copy over the `~/.config/yuzu` and `~/.local/share/yuzu` from prior install.
|
Copy over the `~/.config/yuzu` and `~/.local/share/yuzu` from prior install.
|
||||||
|
|
||||||
## GTK Theme
|
## Themeing (is that a word?)
|
||||||
|
|
||||||
|
### Alacritty
|
||||||
|
TODO
|
||||||
|
|
||||||
|
### ZSH
|
||||||
|
TODO
|
||||||
|
|
||||||
|
### Sway
|
||||||
|
TODO
|
||||||
|
|
||||||
|
### GTK Theme [x]
|
||||||
|
|
||||||
Set the GTK theme to `dracula` within the gnome-tweaks application.
|
Set the GTK theme to `dracula` within the gnome-tweaks application.
|
||||||
|
|
||||||
|
@ -4,10 +4,10 @@
|
|||||||
- alacritty
|
- alacritty
|
||||||
- sway
|
- sway
|
||||||
- swayidle
|
- swayidle
|
||||||
|
- swaybg
|
||||||
- grim # screenshot functionality
|
- grim # screenshot functionality
|
||||||
- wl-clipboard # wl-copy and wl-paste for copy/paste from stdin / stdout
|
- wl-clipboard # wl-copy and wl-paste for copy/paste from stdin / stdout
|
||||||
- mako # notification system developed by swaywm maintainer
|
- mako # notification system developed by swaywm maintainer
|
||||||
- feh
|
|
||||||
- pcmanfm
|
- pcmanfm
|
||||||
- blueman
|
- blueman
|
||||||
- flameshot
|
- flameshot
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
ansible.builtin.pip:
|
ansible.builtin.pip:
|
||||||
name:
|
name:
|
||||||
- pynvim
|
- pynvim
|
||||||
|
- yt-dlp
|
||||||
|
|
||||||
- name: Install terminal cargo packages
|
- name: Install terminal cargo packages
|
||||||
community.general.cargo:
|
community.general.cargo:
|
||||||
|
102
provision/nixos/flake.lock
generated
Normal file
102
provision/nixos/flake.lock
generated
Normal file
@ -0,0 +1,102 @@
|
|||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"flake-utils": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1642700792,
|
||||||
|
"narHash": "sha256-XqHrk7hFb+zBvRg6Ghl+AZDq03ov6OshJLiSWOoX5es=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "846b2ae0fc4cc943637d3d1def4454213e203cba",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"home-manager": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1683989410,
|
||||||
|
"narHash": "sha256-puF/QsIkp4ch0sf6M5mNzbdZtYcq2MJHcKre9wJ3ZYo=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"rev": "6702b22b9805bc1879715d4111e3764cd4237aed",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"mach-nix": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"pypi-deps-db": "pypi-deps-db"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681814846,
|
||||||
|
"narHash": "sha256-IMQ1Twf/ozE53CwrunXNlYD3D31xqgz/mZyZG38Ov/Y=",
|
||||||
|
"owner": "DavHau",
|
||||||
|
"repo": "mach-nix",
|
||||||
|
"rev": "8d903072c7b5426d90bc42a008242c76590af916",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "DavHau",
|
||||||
|
"repo": "mach-nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1683408522,
|
||||||
|
"narHash": "sha256-9kcPh6Uxo17a3kK3XCHhcWiV1Yu1kYj22RHiymUhMkU=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "897876e4c484f1e8f92009fd11b7d988a121a4e7",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pypi-deps-db": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1678051695,
|
||||||
|
"narHash": "sha256-kFFP8TN8pEKARtjK9loGdH+TU23ZbHdVLCUdNcufKPs=",
|
||||||
|
"owner": "DavHau",
|
||||||
|
"repo": "pypi-deps-db",
|
||||||
|
"rev": "e00b22ead9d3534ba1c448e1af3076af6b234acf",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "DavHau",
|
||||||
|
"repo": "pypi-deps-db",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"home-manager": "home-manager",
|
||||||
|
"mach-nix": "mach-nix",
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
45
provision/nixos/flake.nix
Normal file
45
provision/nixos/flake.nix
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
{
|
||||||
|
description = "A very basic flake";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
home-manager = {
|
||||||
|
url = github:nix-community/home-manager;
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
mach-nix= {
|
||||||
|
url = "github:DavHau/mach-nix";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = inputs @ { self, nixpkgs, home-manager, mach-nix, ... }:
|
||||||
|
let
|
||||||
|
system = "x86_64-linux";
|
||||||
|
pkgs = import nixpkgs {
|
||||||
|
inherit system;
|
||||||
|
config.allowUnfree = true;
|
||||||
|
};
|
||||||
|
lib = nixpkgs.lib;
|
||||||
|
user = "tstarr";
|
||||||
|
in {
|
||||||
|
nixosConfigurations = {
|
||||||
|
kestrel = lib.nixosSystem {
|
||||||
|
inherit system;
|
||||||
|
specialArgs = { inherit user; };
|
||||||
|
modules = [
|
||||||
|
./hosts/kestrel/configuration.nix
|
||||||
|
./hosts/kestrel/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/kestrel/home-configuration.nix ];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
145
provision/nixos/hosts/kestrel/configuration.nix
Normal file
145
provision/nixos/hosts/kestrel/configuration.nix
Normal file
@ -0,0 +1,145 @@
|
|||||||
|
{ config, pkgs, user, lib, ... }:
|
||||||
|
{
|
||||||
|
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;
|
||||||
|
|
||||||
|
# Use zen kernel
|
||||||
|
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 = "kestrel";
|
||||||
|
networking.networkmanager.enable = true;
|
||||||
|
|
||||||
|
# Set your time zone.
|
||||||
|
time.timeZone = "America/Los_Angeles";
|
||||||
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
|
|
||||||
|
#services.xserver = {
|
||||||
|
# enable = true;
|
||||||
|
# layout = "us";
|
||||||
|
|
||||||
|
# desktopManager.xterm.enable = false;
|
||||||
|
|
||||||
|
# # Use nvidia drivers
|
||||||
|
# videoDrivers = [ "amdgpu" ];
|
||||||
|
|
||||||
|
# displayManager.gdm.enable = true;
|
||||||
|
# desktopManager.gnome.enable = true;
|
||||||
|
|
||||||
|
# # Use the xmonad wm
|
||||||
|
# windowManager = {
|
||||||
|
# xmonad = {
|
||||||
|
# enable = true;
|
||||||
|
# enableContribAndExtras = true;
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
#};
|
||||||
|
|
||||||
|
# Enable sound.
|
||||||
|
sound.enable = true;
|
||||||
|
hardware.pulseaudio.enable = true;
|
||||||
|
hardware.pulseaudio.support32Bit = true;
|
||||||
|
|
||||||
|
# Add fonts
|
||||||
|
fonts.fonts = with pkgs; [
|
||||||
|
nerdfonts
|
||||||
|
];
|
||||||
|
|
||||||
|
virtualisation.docker.enable = true;
|
||||||
|
virtualisation.docker.storageDriver = "btrfs";
|
||||||
|
programs.zsh.enable = true;
|
||||||
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||||
|
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
|
||||||
|
#pamixer
|
||||||
|
vifm
|
||||||
|
mpv
|
||||||
|
pinentry-curses
|
||||||
|
trash-cli
|
||||||
|
bc
|
||||||
|
unzip
|
||||||
|
];
|
||||||
|
|
||||||
|
# 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 = "tstarr";
|
||||||
|
dataDir = "/home/tstarr/sync";
|
||||||
|
configDir = "/home/tstarr/.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
|
||||||
|
imports = [ ../../modules ];
|
||||||
|
modules = {
|
||||||
|
services = {
|
||||||
|
samba.enable = true;
|
||||||
|
vfio.enable = false; # Currently broken
|
||||||
|
};
|
||||||
|
devel = {
|
||||||
|
tooling.enable = true;
|
||||||
|
python.enable = true;
|
||||||
|
engineering.enable = true;
|
||||||
|
};
|
||||||
|
gaming = {
|
||||||
|
steam.enable = true;
|
||||||
|
};
|
||||||
|
desktop = {
|
||||||
|
sway.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
system.stateVersion = "22.11"; # Did you read the comment?
|
||||||
|
}
|
64
provision/nixos/hosts/kestrel/hardware.nix
Normal file
64
provision/nixos/hosts/kestrel/hardware.nix
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
# 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 = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{ device = "/dev/disk/by-uuid/b946d3b5-86ea-4f22-be13-532a60023b98";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [ "subvol=root" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/home" =
|
||||||
|
{ device = "/dev/disk/by-uuid/b946d3b5-86ea-4f22-be13-532a60023b98";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [ "subvol=home" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/nix" =
|
||||||
|
{ device = "/dev/disk/by-uuid/b946d3b5-86ea-4f22-be13-532a60023b98";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [ "subvol=nix" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/persist" =
|
||||||
|
{ device = "/dev/disk/by-uuid/b946d3b5-86ea-4f22-be13-532a60023b98";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [ "subvol=persist" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/var/log" =
|
||||||
|
{ device = "/dev/disk/by-uuid/b946d3b5-86ea-4f22-be13-532a60023b98";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [ "subvol=log" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" =
|
||||||
|
{ device = "/dev/disk/by-uuid/0A89-7181";
|
||||||
|
fsType = "vfat";
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices =
|
||||||
|
[ { device = "/dev/disk/by-uuid/b62ff9a9-37ed-494a-9805-9f148aff4b9c"; }
|
||||||
|
];
|
||||||
|
|
||||||
|
# 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.enp3s0.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
}
|
24
provision/nixos/hosts/kestrel/home-configuration.nix
Normal file
24
provision/nixos/hosts/kestrel/home-configuration.nix
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
{ config, pkgs, user, ... }:
|
||||||
|
{
|
||||||
|
home.username = "${user}";
|
||||||
|
home.homeDirectory = "/home/${user}";
|
||||||
|
programs.home-manager.enable = true;
|
||||||
|
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
google-chrome
|
||||||
|
firefox
|
||||||
|
alacritty
|
||||||
|
gamemode
|
||||||
|
lutris
|
||||||
|
pcmanfm
|
||||||
|
discord
|
||||||
|
inkscape
|
||||||
|
libreoffice-fresh
|
||||||
|
chezmoi
|
||||||
|
rbw
|
||||||
|
vscodium.fhs
|
||||||
|
];
|
||||||
|
|
||||||
|
home.stateVersion = "22.11";
|
||||||
|
}
|
7
provision/nixos/lib/overlays.nix
Normal file
7
provision/nixos/lib/overlays.nix
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
/* 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 ||
|
||||||
|
pathExists (path + ("/" + n + "/default.nix")))
|
||||||
|
(attrNames (readDir path)))
|
0
provision/nixos/modules/.placeholder
Normal file
0
provision/nixos/modules/.placeholder
Normal file
4
provision/nixos/modules/default.nix
Normal file
4
provision/nixos/modules/default.nix
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
imports = [ ./desktop ./gaming ./devel ./services ];
|
||||||
|
}
|
4
provision/nixos/modules/desktop/default.nix
Normal file
4
provision/nixos/modules/desktop/default.nix
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
imports = [ ./sway.nix ];
|
||||||
|
}
|
71
provision/nixos/modules/desktop/sway.nix
Normal file
71
provision/nixos/modules/desktop/sway.nix
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
{ config, lib, pkgs, user, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.modules.desktop.sway;
|
||||||
|
|
||||||
|
# currently, there is some friction between sway and gtk:
|
||||||
|
# https://github.com/swaywm/sway/wiki/GTK-3-settings-on-Wayland
|
||||||
|
# the suggested way to set gtk settings is with gsettings
|
||||||
|
# for gsettings to work, we need to tell it where the schemas are
|
||||||
|
# using the XDG_DATA_DIR environment variable
|
||||||
|
# run at the end of sway config
|
||||||
|
configure-gtk = pkgs.writeTextFile {
|
||||||
|
name = "configure-gtk";
|
||||||
|
destination = "/bin/configure-gtk";
|
||||||
|
executable = true;
|
||||||
|
text = let
|
||||||
|
schema = pkgs.gsettings-desktop-schemas;
|
||||||
|
datadir = "${schema}/share/gsettings-schemas/${schema.name}";
|
||||||
|
in ''
|
||||||
|
export XDG_DATA_DIRS=${datadir}:$XDG_DATA_DIRS
|
||||||
|
gnome_schema=org.gnome.desktop.interface
|
||||||
|
gsettings set $gnome_schema gtk-theme 'Dracula'
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
in {
|
||||||
|
options.modules.desktop.sway.enable = lib.mkEnableOption "sway";
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
sway
|
||||||
|
wayland
|
||||||
|
xwayland
|
||||||
|
configure-gtk
|
||||||
|
xdg-utils # for opening default programs when clicking links
|
||||||
|
glib # gsettings
|
||||||
|
dracula-theme # gtk theme
|
||||||
|
gnome3.adwaita-icon-theme # default gnome cursors
|
||||||
|
swaylock-effects
|
||||||
|
swayidle
|
||||||
|
grim # screenshot functionality
|
||||||
|
wl-clipboard # wl-copy and wl-paste for copy/paste from stdin / stdout
|
||||||
|
mako # notification system developed by swaywm maintainer
|
||||||
|
#dunst
|
||||||
|
wdisplays # tool to configure displays
|
||||||
|
rofi
|
||||||
|
imagemagick
|
||||||
|
feh
|
||||||
|
];
|
||||||
|
|
||||||
|
# xdg-desktop-portal works by exposing a series of D-Bus interfaces
|
||||||
|
# known as portals under a well-known name
|
||||||
|
# (org.freedesktop.portal.Desktop) and object path
|
||||||
|
# (/org/freedesktop/portal/desktop).
|
||||||
|
# The portal interfaces include APIs for file access, opening URIs,
|
||||||
|
# printing and others.
|
||||||
|
services.dbus.enable = true;
|
||||||
|
xdg.portal = {
|
||||||
|
enable = true;
|
||||||
|
wlr.enable = true;
|
||||||
|
# gtk portal needed to make gtk apps happy
|
||||||
|
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
||||||
|
};
|
||||||
|
|
||||||
|
# enable sway window manager
|
||||||
|
programs.sway = {
|
||||||
|
enable = true;
|
||||||
|
wrapperFeatures.gtk = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
5
provision/nixos/modules/devel/default.nix
Normal file
5
provision/nixos/modules/devel/default.nix
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [ ./tooling.nix ./python.nix ./engineering.nix ];
|
||||||
|
}
|
14
provision/nixos/modules/devel/engineering.nix
Normal file
14
provision/nixos/modules/devel/engineering.nix
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# CAD and 3d printing and everything nice
|
||||||
|
|
||||||
|
{ config, lib, pkgs, user, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.modules.devel.engineering;
|
||||||
|
in {
|
||||||
|
options.modules.devel.engineering.enable = lib.mkEnableOption "engineering";
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
|
||||||
|
# Install packages
|
||||||
|
environment.systemPackages = with pkgs; [ super-slicer freecad blender ];
|
||||||
|
};
|
||||||
|
}
|
27
provision/nixos/modules/devel/python.nix
Normal file
27
provision/nixos/modules/devel/python.nix
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
# python with all the venom
|
||||||
|
|
||||||
|
{ config, lib, pkgs, user, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.modules.devel.python;
|
||||||
|
my-python-packages = ps: with ps; [
|
||||||
|
virtualenv
|
||||||
|
i3ipc
|
||||||
|
ipython
|
||||||
|
pip
|
||||||
|
];
|
||||||
|
|
||||||
|
in {
|
||||||
|
options.modules.devel.python.enable = lib.mkEnableOption "python";
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
|
||||||
|
# Install packages
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
(python3.withPackages my-python-packages)
|
||||||
|
beancount
|
||||||
|
fava
|
||||||
|
nodePackages_latest.pyright
|
||||||
|
distrobox
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
19
provision/nixos/modules/devel/tooling.nix
Normal file
19
provision/nixos/modules/devel/tooling.nix
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# coding stuff for all the languages
|
||||||
|
|
||||||
|
{ config, lib, pkgs, user, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.modules.devel.tooling;
|
||||||
|
in {
|
||||||
|
options.modules.devel.tooling.enable = lib.mkEnableOption "tooling";
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
|
||||||
|
# Install packages
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
neovim
|
||||||
|
ripgrep
|
||||||
|
tmux
|
||||||
|
tmuxinator
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
4
provision/nixos/modules/gaming/default.nix
Normal file
4
provision/nixos/modules/gaming/default.nix
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
imports = [ ./steam.nix ];
|
||||||
|
}
|
23
provision/nixos/modules/gaming/steam.nix
Normal file
23
provision/nixos/modules/gaming/steam.nix
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
{ config, lib, pkgs, user, ... }:
|
||||||
|
|
||||||
|
let cfg = config.modules.gaming.steam;
|
||||||
|
in {
|
||||||
|
options.modules.gaming.steam.enable = lib.mkEnableOption "steam";
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
hardware.opengl = { # this fixes the "glXChooseVisual failed" bug, context: https://github.com/NixOS/nixpkgs/issues/47932
|
||||||
|
enable = true;
|
||||||
|
driSupport32Bit = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# optionally enable 32bit pulseaudio support if pulseaudio is enabled
|
||||||
|
hardware.pulseaudio.support32Bit = config.hardware.pulseaudio.enable;
|
||||||
|
|
||||||
|
hardware.steam-hardware.enable = true;
|
||||||
|
|
||||||
|
environment.systemPackages = [
|
||||||
|
pkgs.steam
|
||||||
|
pkgs.ryujinx
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
5
provision/nixos/modules/services/default.nix
Normal file
5
provision/nixos/modules/services/default.nix
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [ ./samba.nix ./vfio.nix ];
|
||||||
|
}
|
32
provision/nixos/modules/services/samba.nix
Normal file
32
provision/nixos/modules/services/samba.nix
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
# Samba for file sharing!
|
||||||
|
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
let cfg = config.modules.services.samba;
|
||||||
|
in {
|
||||||
|
options.modules.services.samba.enable = lib.mkEnableOption "samba";
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
services.samba = {
|
||||||
|
enable = true;
|
||||||
|
extraConfig = ''
|
||||||
|
browseable = yes
|
||||||
|
smb encrypt = required
|
||||||
|
'';
|
||||||
|
shares = {
|
||||||
|
homes = {
|
||||||
|
browseable = "no"; # note: each home will be browseable; the "homes" share will not.
|
||||||
|
"read only" = "no";
|
||||||
|
"guest ok" = "no";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Curiously, `services.samba` does not automatically open
|
||||||
|
# the needed ports in the firewall.
|
||||||
|
networking.firewall.allowedTCPPorts = [ 445 139 ];
|
||||||
|
networking.firewall.allowedUDPPorts = [ 137 138 ];
|
||||||
|
|
||||||
|
# To make SMB mounting easier on the command line
|
||||||
|
environment.systemPackages = with pkgs; [ cifs-utils ];
|
||||||
|
};
|
||||||
|
}
|
57
provision/nixos/modules/services/vfio.nix
Normal file
57
provision/nixos/modules/services/vfio.nix
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
# vfio setup for windows gaming with single gpu
|
||||||
|
|
||||||
|
{ config, lib, pkgs, user, ... }:
|
||||||
|
|
||||||
|
let cfg = config.modules.services.vfio;
|
||||||
|
in {
|
||||||
|
options.modules.services.vfio.enable = lib.mkEnableOption "samba";
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
|
||||||
|
users.users.${user}.extraGroups = [ "qemu-libvirtd" "libvirtd" "kvm" ];
|
||||||
|
|
||||||
|
# Boot configuration
|
||||||
|
boot.kernelParams = [ "amd_iommu=on" "iommu=pt" ];
|
||||||
|
boot.kernelModules = [ "kvm-amd" "vfio-pci" ];
|
||||||
|
|
||||||
|
programs.dconf.enable = true;
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [ virt-manager ];
|
||||||
|
|
||||||
|
# Enable libvirtd
|
||||||
|
virtualisation.libvirtd = {
|
||||||
|
enable = true;
|
||||||
|
onBoot = "ignore";
|
||||||
|
onShutdown = "shutdown";
|
||||||
|
qemu.ovmf.enable = true;
|
||||||
|
qemu.runAsRoot = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Place helper files where libvirt can get to them
|
||||||
|
environment.etc = {
|
||||||
|
"libvirt/hooks/qemu" = {
|
||||||
|
source = "/home/${user}/.setup/local/gpu-passthrough/qemu";
|
||||||
|
mode = "0755";
|
||||||
|
};
|
||||||
|
"libvirt/hooks/qemu.d/win10/prepare/begin/start.sh" = {
|
||||||
|
source = "/home/${user}/.setup/local/gpu-passthrough/start.sh";
|
||||||
|
mode = "0755";
|
||||||
|
};
|
||||||
|
"libvirt/hooks/qemu.d/win10/release/end/revert.sh" = {
|
||||||
|
source = "/home/${user}/.setup/local/gpu-passthrough/revert.sh";
|
||||||
|
mode = "0755";
|
||||||
|
};
|
||||||
|
"libvirt/qemu.conf" = {
|
||||||
|
source = "/home/${user}/.setup/local/gpu-passthrough/qemu.conf";
|
||||||
|
mode = "0755";
|
||||||
|
};
|
||||||
|
"libvirt/libvirtd.conf" = {
|
||||||
|
source = "/home/${user}/.setup/local/gpu-passthrough/libvirtd.conf";
|
||||||
|
mode = "0755";
|
||||||
|
};
|
||||||
|
"libvirt/patch.rom" = {
|
||||||
|
source = "/home/${user}/.setup/local/gpu-passthrough/patch.rom";
|
||||||
|
mode = "0755";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
0
provision/nixos/overlays/.placeholder
Normal file
0
provision/nixos/overlays/.placeholder
Normal file
5
provision/nixos/overlays/rofi.nix
Normal file
5
provision/nixos/overlays/rofi.nix
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
self: super: {
|
||||||
|
rofi = super.rofi.override { plugins = [ self.rofi-emoji ]; };
|
||||||
|
}
|
||||||
|
|
||||||
|
|
0
provision/nixos/pkgs/.placeholder
Normal file
0
provision/nixos/pkgs/.placeholder
Normal file
Loading…
x
Reference in New Issue
Block a user