Initial NixOS flake config
This commit is contained in:
@@ -0,0 +1,2 @@
|
|||||||
|
result
|
||||||
|
result-*
|
||||||
@@ -0,0 +1,183 @@
|
|||||||
|
# Blake's NixOS configuration
|
||||||
|
|
||||||
|
This repository is the declarative source of truth for this NixOS system. It holds the configuration and the exact upstream input revisions used to build it. It does not hold private keys, passwords, encrypted disks, Docker data, browser profiles, or other mutable personal data.
|
||||||
|
|
||||||
|
## Current scope
|
||||||
|
|
||||||
|
The current flake exposes one host:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
nixos
|
||||||
|
```
|
||||||
|
|
||||||
|
Use it as `'.#nixos'`. The repository currently contains that host's hardware-specific configuration in `hosts/nixos/hardware-configuration.nix`; it must not be used unchanged on another computer. A later reorganization will add one flake host entry per computer and move shared settings into common modules.
|
||||||
|
|
||||||
|
## The two important flake files
|
||||||
|
|
||||||
|
`flake.nix` is the recipe. It declares the inputs, NixOS modules, and configuration outputs.
|
||||||
|
|
||||||
|
`flake.lock` is the reproducibility record. It pins each input to an exact Git revision and content hash. It does not list individual packages. Because nixpkgs is locked, a normal rebuild does not silently upgrade Docker, Firefox, the kernel, or any other Nix-managed package.
|
||||||
|
|
||||||
|
The declared inputs follow matching NixOS and Home Manager 26.05 release branches. The lock file chooses the precise snapshot from those branches used by this system.
|
||||||
|
|
||||||
|
## Everyday workflow
|
||||||
|
|
||||||
|
Open this guide after the alias has been activated:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
nix-guide
|
||||||
|
```
|
||||||
|
|
||||||
|
Edit the configuration as your normal user. Do not use `sudo` to edit files in this repository.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
cd ~/nixos-config
|
||||||
|
$EDITOR hosts/nixos/configuration.nix
|
||||||
|
git diff
|
||||||
|
nix flake check --no-build
|
||||||
|
sudo nixos-rebuild switch --flake '.#nixos'
|
||||||
|
git add -A
|
||||||
|
git commit -m "Describe the configuration change"
|
||||||
|
git push
|
||||||
|
```
|
||||||
|
|
||||||
|
Only `nixos-rebuild switch` needs `sudo`: it creates and activates a new system generation. Editing, reviewing, committing, and pushing remain ordinary user actions. Keeping the repository user-owned prevents root-owned files and keeps Git usable without administrator privileges.
|
||||||
|
|
||||||
|
If a rebuild succeeds but the new system has a problem, select an earlier generation from the boot menu, or run:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
sudo nixos-rebuild switch --rollback
|
||||||
|
```
|
||||||
|
|
||||||
|
## Updating packages safely
|
||||||
|
|
||||||
|
A rebuild uses the revisions already recorded in `flake.lock`; it is not a package update.
|
||||||
|
|
||||||
|
To request newer versions from the release branches declared in `flake.nix`:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
cd ~/nixos-config
|
||||||
|
nix flake update
|
||||||
|
```
|
||||||
|
|
||||||
|
To update only NixOS packages, leaving other flake inputs unchanged:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
nix flake update nixpkgs
|
||||||
|
```
|
||||||
|
|
||||||
|
Then review and test before activation:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
git diff -- flake.lock
|
||||||
|
nix flake check --no-build
|
||||||
|
sudo nixos-rebuild switch --flake '.#nixos'
|
||||||
|
```
|
||||||
|
|
||||||
|
If the switch works as expected, commit the lock-file update:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
git add flake.lock
|
||||||
|
git commit -m "Update flake inputs"
|
||||||
|
git push
|
||||||
|
```
|
||||||
|
|
||||||
|
A stable release branch normally receives compatible fixes and package updates. A move to a new NixOS release branch is a deliberate `flake.nix` change that must be built and tested before activation.
|
||||||
|
|
||||||
|
## Adding a program or service
|
||||||
|
|
||||||
|
1. Find the relevant NixOS or Home Manager option/package.
|
||||||
|
2. Add it to the appropriate `.nix` file.
|
||||||
|
3. Run `git diff` and read the change.
|
||||||
|
4. Run `nix flake check --no-build`.
|
||||||
|
5. Activate with `sudo nixos-rebuild switch --flake '.#nixos'`.
|
||||||
|
6. Verify the actual program or service works.
|
||||||
|
7. Commit and push the successful configuration.
|
||||||
|
|
||||||
|
Do not use `nix profile install` for persistent system software. Add persistent system packages to `environment.systemPackages` or use the relevant declarative option instead.
|
||||||
|
|
||||||
|
## SSH configuration and keys
|
||||||
|
|
||||||
|
SSH host aliases and connection settings can be declared through Home Manager and written to `~/.ssh/config`. The configuration may contain host names, users, ports, `ProxyJump`, and forwarding rules.
|
||||||
|
|
||||||
|
Private SSH keys never belong in this repository. Each computer should normally have its own key pair:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
ssh-keygen -t ed25519 -a 100 -C "blake@<hostname>"
|
||||||
|
```
|
||||||
|
|
||||||
|
Install the resulting public key (`~/.ssh/id_ed25519.pub`) on the servers that machine may access. The declarative SSH config can refer to the local private-key path, but it must not contain the key itself. A lost or retired computer can then be revoked without affecting every other machine.
|
||||||
|
|
||||||
|
## New computer guide
|
||||||
|
|
||||||
|
Do not apply this repository's current `hosts/nixos/hardware-configuration.nix` to another computer. It contains this machine's encrypted-disk UUID, boot partition UUID, LVM layout, and CPU-specific settings.
|
||||||
|
|
||||||
|
The durable multi-host layout is the next structural improvement for this repository. Once it exists, use this process for every additional NixOS computer.
|
||||||
|
|
||||||
|
### 1. Prepare the new machine
|
||||||
|
|
||||||
|
1. Boot the official NixOS installer for the target architecture.
|
||||||
|
2. Connect to the network.
|
||||||
|
3. Decide the host name, disk layout, encryption policy, and whether the machine needs special hardware modules.
|
||||||
|
4. Partition, format, encrypt, and mount the disks under `/mnt` according to that machine's plan.
|
||||||
|
5. Generate a starter hardware configuration:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
nixos-generate-config --root /mnt
|
||||||
|
```
|
||||||
|
|
||||||
|
6. Keep the generated `/mnt/etc/nixos/hardware-configuration.nix`. It is unique to that machine.
|
||||||
|
|
||||||
|
### 2. Create its host entry
|
||||||
|
|
||||||
|
On a trusted workstation or in the installer environment, clone this repository and create a host directory such as `hosts/<hostname>/`.
|
||||||
|
|
||||||
|
- Copy the generated hardware file into `hosts/<hostname>/hardware-configuration.nix`.
|
||||||
|
- Create a host module that imports the shared modules and that hardware file.
|
||||||
|
- Put only machine-specific choices there: hostname, disk/mount settings, bootloader, GPU/CPU-specific configuration, and hardware-only services.
|
||||||
|
- Add `nixosConfigurations.<hostname>` to `flake.nix`.
|
||||||
|
- Keep applications, desktop preferences, shell settings, and shared services in common modules so every machine receives the same tested setup.
|
||||||
|
|
||||||
|
Do not copy disk UUIDs, LUKS identifiers, swap-device paths, or a host name from another machine.
|
||||||
|
|
||||||
|
### 3. Install the declared configuration
|
||||||
|
|
||||||
|
After the target host output exists and the target root filesystem is mounted at `/mnt`, install using its own host selector:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
sudo nixos-install --flake .#<hostname>
|
||||||
|
```
|
||||||
|
|
||||||
|
Set the initial user password if the configuration does not provision one declaratively, reboot, then log in to the installed system.
|
||||||
|
|
||||||
|
### 4. Bootstrap personal access
|
||||||
|
|
||||||
|
After first boot:
|
||||||
|
|
||||||
|
1. Generate a new SSH key pair for this computer.
|
||||||
|
2. Authorize its public key on the servers it should access.
|
||||||
|
3. Rebuild so Home Manager writes the declared SSH host aliases.
|
||||||
|
4. Verify each alias with a non-destructive command such as:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
ssh -G <host-alias>
|
||||||
|
```
|
||||||
|
|
||||||
|
5. Restore personal data separately from the Nix configuration: documents, browser profiles if desired, Docker volumes/databases, and any encrypted secrets.
|
||||||
|
|
||||||
|
### 5. Verify before relying on it
|
||||||
|
|
||||||
|
Verify the things specific to that computer: boot, encrypted-disk unlock, networking, audio, graphics, Wi-Fi/Bluetooth, sleep, external drives, and any virtualization or GPU functionality. Confirm the flake evaluates and the working tree is committed:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
cd ~/nixos-config
|
||||||
|
nix flake check --no-build
|
||||||
|
git status --short
|
||||||
|
git log --oneline -n 3
|
||||||
|
```
|
||||||
|
|
||||||
|
## Secrets and data not managed by this repository
|
||||||
|
|
||||||
|
Never commit private SSH keys, passwords, API tokens, VPN credentials, or unencrypted Wi-Fi secrets. When secrets need declarative deployment, add an encrypted secret system such as `sops-nix` or `agenix`.
|
||||||
|
|
||||||
|
NixOS generations are not backups for application data. Back up Docker volumes, databases, documents, and other mutable files independently.
|
||||||
Generated
+49
@@ -0,0 +1,49 @@
|
|||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"home-manager": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1789267039,
|
||||||
|
"narHash": "sha256-LWiBv9yAYFi2LPbUhDGHPGKYskJQjj2fw12OlyO1uQo=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"rev": "ec172013fa62135f58fb58dd17ae9651e8f39727",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"ref": "release-26.05",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1790218706,
|
||||||
|
"narHash": "sha256-6e4Na3z008XpdVyOXgfasXIn1aN+z8AXFG+jXdQSyuI=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "c508844df6c28fa6dabc1b6af70f3ccbd65c5201",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-26.05",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"home-manager": "home-manager",
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
description = "Blake's NixOS configuration";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-26.05";
|
||||||
|
home-manager = {
|
||||||
|
url = "github:nix-community/home-manager/release-26.05";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, nixpkgs, home-manager, ... }:
|
||||||
|
{
|
||||||
|
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
modules = [
|
||||||
|
./hosts/nixos/configuration.nix
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,436 @@
|
|||||||
|
# Edit this configuration file to define what should be installed on
|
||||||
|
# your system. Help is available in the configuration.nix(5) man page
|
||||||
|
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||||
|
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
hyprlandPkg = pkgs.hyprland;
|
||||||
|
hyprlandPortalPkg = pkgs.xdg-desktop-portal-hyprland;
|
||||||
|
wordreaper = pkgs.callPackage ../../packages/wordreaper.nix { };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[ # Include the results of the hardware scan.
|
||||||
|
./hardware-configuration.nix
|
||||||
|
./defenk-ca.nix
|
||||||
|
./ssh-scripts.nix
|
||||||
|
./hyprland.nix # Modularized Hyprland config
|
||||||
|
];
|
||||||
|
|
||||||
|
home-manager.backupFileExtension = "backup";
|
||||||
|
home-manager.users.blake = { pkgs, ... }: {
|
||||||
|
home.stateVersion = "25.11";
|
||||||
|
|
||||||
|
programs.kitty = {
|
||||||
|
enable = true;
|
||||||
|
font = {
|
||||||
|
name = "JetBrainsMono Nerd Font";
|
||||||
|
size = 12.0;
|
||||||
|
};
|
||||||
|
settings = {
|
||||||
|
confirm_os_window_close = 0;
|
||||||
|
touch_scroll_multiplier = "5.0";
|
||||||
|
background_opacity = "0.85";
|
||||||
|
window_padding_width = 4;
|
||||||
|
cursor_trail = 1;
|
||||||
|
dynamic_background_opacity = true;
|
||||||
|
bold_font = "auto";
|
||||||
|
italic_font = "auto";
|
||||||
|
bold_italic_font = "auto";
|
||||||
|
};
|
||||||
|
extraConfig = ''
|
||||||
|
include current-theme.conf
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
services.easyeffects.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
boot.supportedFilesystems = [ "ntfs" "exfat" ];
|
||||||
|
|
||||||
|
# Bootloader.
|
||||||
|
boot.loader.systemd-boot.enable = false;
|
||||||
|
boot.loader.grub = {
|
||||||
|
enable = true;
|
||||||
|
efiSupport = true;
|
||||||
|
devices = [ "nodev" ];
|
||||||
|
useOSProber = false;
|
||||||
|
copyKernels = true;
|
||||||
|
theme = pkgs.fetchFromGitHub {
|
||||||
|
owner = "Lxtharia";
|
||||||
|
repo = "minegrub-theme";
|
||||||
|
rev = "main";
|
||||||
|
hash = "sha256-GvlAAIpM/iZtl/EtI+LTzEsQ2qlUkex9i4xRUZXmadM=";
|
||||||
|
} + "/minegrub";# The theme files are inside the 'minegrub' folder of the repo
|
||||||
|
};
|
||||||
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
|
networking.hostName = "nixos"; # Define your hostname.
|
||||||
|
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||||
|
|
||||||
|
# Configure network proxy if necessary
|
||||||
|
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||||
|
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||||
|
networking.firewall.allowedUDPPorts = [ config.services.tailscale.port ];
|
||||||
|
services.tailscale.enable = true;
|
||||||
|
services.tailscale.extraSetFlags = [ "--operator=blake" ];
|
||||||
|
networking.firewall.trustedInterfaces = [ "tailscale0" "waydroid0" ];
|
||||||
|
|
||||||
|
# Enable networking
|
||||||
|
networking.networkmanager.enable = true;
|
||||||
|
|
||||||
|
# Set your time zone.
|
||||||
|
time.timeZone = "America/Chicago";
|
||||||
|
|
||||||
|
# Select internationalisation properties.
|
||||||
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
|
|
||||||
|
i18n.extraLocaleSettings = {
|
||||||
|
LC_ADDRESS = "en_US.UTF-8";
|
||||||
|
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||||
|
LC_MEASUREMENT = "en_US.UTF-8";
|
||||||
|
LC_MONETARY = "en_US.UTF-8";
|
||||||
|
LC_NAME = "en_US.UTF-8";
|
||||||
|
LC_NUMERIC = "en_US.UTF-8";
|
||||||
|
LC_PAPER = "en_US.UTF-8";
|
||||||
|
LC_TELEPHONE = "en_US.UTF-8";
|
||||||
|
LC_TIME = "en_US.UTF-8";
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
# Enable the X11 windowing system.
|
||||||
|
# You can disable this if you're only using the Wayland session.
|
||||||
|
services.xserver.enable = true;
|
||||||
|
|
||||||
|
# Enable the KDE Plasma Desktop Environment.
|
||||||
|
services.displayManager.sddm.enable = true;
|
||||||
|
services.displayManager.defaultSession = "hyprland-uwsm";
|
||||||
|
services.desktopManager.plasma6.enable = true;
|
||||||
|
environment.shellAliases = {
|
||||||
|
conf = "vim /home/blake/nixos-config/hosts/nixos/configuration.nix";
|
||||||
|
nix-guide = "vim /home/blake/nixos-config/README.md";
|
||||||
|
hypr = "vim /home/blake/nixos-config/hosts/nixos/hyprland.nix";
|
||||||
|
rebuild = "sudo nixos-rebuild switch --flake '/home/blake/nixos-config#nixos'";
|
||||||
|
ls = "eza";
|
||||||
|
la = "eza --all";
|
||||||
|
ll = "eza --long --icons";
|
||||||
|
};
|
||||||
|
# Configure keymap in X11
|
||||||
|
services.xserver.xkb = {
|
||||||
|
layout = "us";
|
||||||
|
variant = "";
|
||||||
|
options = "caps:escape";
|
||||||
|
};
|
||||||
|
console.useXkbConfig = true;
|
||||||
|
|
||||||
|
# Enable CUPS to print documents.
|
||||||
|
services.printing.enable = true;
|
||||||
|
|
||||||
|
# Enable sound with pipewire.
|
||||||
|
services.pulseaudio.enable = false;
|
||||||
|
security.rtkit.enable = true;
|
||||||
|
services.pipewire = {
|
||||||
|
enable = true;
|
||||||
|
alsa.enable = true;
|
||||||
|
alsa.support32Bit = true;
|
||||||
|
pulse.enable = true;
|
||||||
|
# If you want to use JACK applications, uncomment this
|
||||||
|
#jack.enable = true;
|
||||||
|
|
||||||
|
# use the example session manager (no others are packaged yet so this is enabled by default,
|
||||||
|
# no need to redefine it in your config for now)
|
||||||
|
#media-session.enable = true;
|
||||||
|
|
||||||
|
#wireplumber.extraConfig = {
|
||||||
|
# "10-bluez" = {
|
||||||
|
# "monitor.bluez.properties" = {
|
||||||
|
# "bluez5.enable-sbc-xq" = true;
|
||||||
|
# "bluez5.enable-msbc" = true;
|
||||||
|
# "bluez5.enable-hw-volume" = true;
|
||||||
|
# "bluez5.roles" = [ "a2dp_sink" "a2dp_source" "headset_head_unit" "headset_audio_gateway" ];
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# "11-bluetooth-policy" = {
|
||||||
|
# "monitor.bluez.rules" = [
|
||||||
|
# {
|
||||||
|
# matches = [
|
||||||
|
# { "device.name" = "~bluez_card.3C_B0_ED_D2_F1_6C"; }
|
||||||
|
# ];
|
||||||
|
# actions = {
|
||||||
|
# update-props = {
|
||||||
|
# "bluez5.codecs" = [ "aac" "sbc" "sbc_xq" ];
|
||||||
|
# "bluez5.default-codec" = "aac";
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# }
|
||||||
|
# ];
|
||||||
|
# };
|
||||||
|
#};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Enable touchpad support (enabled default in most desktopManager).
|
||||||
|
# services.xserver.libinput.enable = true;
|
||||||
|
|
||||||
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||||
|
users.users.blake = {
|
||||||
|
isNormalUser = true;
|
||||||
|
description = "Blake";
|
||||||
|
shell = pkgs.zsh;
|
||||||
|
extraGroups = [ "networkmanager" "wheel" "docker" "libvirtd" ];
|
||||||
|
packages = with pkgs; [
|
||||||
|
kdePackages.kate
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# Install firefox.
|
||||||
|
programs.firefox.enable = true;
|
||||||
|
programs.zsh.enable = true;
|
||||||
|
# Allow NixOS to run the upstream browser and desktop-control helpers Hermes uses.
|
||||||
|
programs.nix-ld.enable = true;
|
||||||
|
programs.nix-ld.libraries = with pkgs; [
|
||||||
|
libx11
|
||||||
|
libxi
|
||||||
|
libxkbcommon
|
||||||
|
];
|
||||||
|
programs.kdeconnect.enable = true;
|
||||||
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
# Allow unfree packages
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
|
virtualisation.docker.enable = true;
|
||||||
|
virtualisation.waydroid.enable = true;
|
||||||
|
# Persistent local Windows VM support. QEMU supplies UEFI; swtpm provides
|
||||||
|
# the TPM 2.0 Windows 11 expects; SPICE handles display, clipboard, and USB.
|
||||||
|
virtualisation.libvirtd = {
|
||||||
|
enable = true;
|
||||||
|
qemu.swtpm.enable = true;
|
||||||
|
};
|
||||||
|
virtualisation.spiceUSBRedirection.enable = true;
|
||||||
|
programs.virt-manager.enable = true;
|
||||||
|
|
||||||
|
programs.steam = {
|
||||||
|
enable = true;
|
||||||
|
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
|
||||||
|
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
|
||||||
|
localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers
|
||||||
|
};
|
||||||
|
|
||||||
|
# List packages installed in system profile. To search, run:
|
||||||
|
# $ nix search wget
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
wordreaper
|
||||||
|
freetube
|
||||||
|
(wordlists.override { lists = [ rockyou ]; })
|
||||||
|
appimage-run
|
||||||
|
rpi-imager
|
||||||
|
exiftool
|
||||||
|
nodejs_22
|
||||||
|
zfs
|
||||||
|
hyprpaper
|
||||||
|
nwg-displays
|
||||||
|
spotify
|
||||||
|
obsidian
|
||||||
|
nh
|
||||||
|
vim
|
||||||
|
openvpn
|
||||||
|
prusa-slicer
|
||||||
|
wget
|
||||||
|
brave
|
||||||
|
git
|
||||||
|
fcrackzip
|
||||||
|
gcc
|
||||||
|
gnumake
|
||||||
|
nmap
|
||||||
|
cmake
|
||||||
|
pkg-config
|
||||||
|
expat
|
||||||
|
hyprland-protocols
|
||||||
|
codex
|
||||||
|
cewl
|
||||||
|
openconnect
|
||||||
|
chromium
|
||||||
|
ipscan
|
||||||
|
volatility3
|
||||||
|
wireguard-tools
|
||||||
|
wl-clicker
|
||||||
|
hyprcursor
|
||||||
|
libglvnd
|
||||||
|
ripgrep
|
||||||
|
fd
|
||||||
|
gocryptfs
|
||||||
|
neovim
|
||||||
|
pciutils
|
||||||
|
ghidra
|
||||||
|
vscodium
|
||||||
|
vesktop
|
||||||
|
jellyfin-media-player
|
||||||
|
unzip
|
||||||
|
aircrack-ng
|
||||||
|
openssl
|
||||||
|
rustscan
|
||||||
|
inetutils
|
||||||
|
libarchive
|
||||||
|
btop
|
||||||
|
kdePackages.gwenview
|
||||||
|
lmstudio
|
||||||
|
samba
|
||||||
|
kubectl
|
||||||
|
thc-hydra
|
||||||
|
rockyou
|
||||||
|
metasploit
|
||||||
|
foundry
|
||||||
|
pipx
|
||||||
|
file
|
||||||
|
binutils
|
||||||
|
binwalk
|
||||||
|
sleuthkit
|
||||||
|
autopsy
|
||||||
|
tldr
|
||||||
|
# kitty
|
||||||
|
kittysay
|
||||||
|
oh-my-zsh
|
||||||
|
oh-my-posh
|
||||||
|
fzf
|
||||||
|
eza
|
||||||
|
ntfs3g
|
||||||
|
gobuster
|
||||||
|
exfatprogs
|
||||||
|
p7zip
|
||||||
|
extundelete
|
||||||
|
testdisk
|
||||||
|
sage
|
||||||
|
hashid
|
||||||
|
hashcat
|
||||||
|
john
|
||||||
|
(ophcrack.overrideAttrs (old: {
|
||||||
|
buildInputs = (old.buildInputs or []) ++ [ expat ];
|
||||||
|
}))
|
||||||
|
chntpw
|
||||||
|
qbittorrent
|
||||||
|
vlc
|
||||||
|
flatpak
|
||||||
|
openlinkhub
|
||||||
|
proton-vpn
|
||||||
|
wl-clipboard
|
||||||
|
grim
|
||||||
|
slurp
|
||||||
|
ncdu
|
||||||
|
fw-fanctrl
|
||||||
|
nvtopPackages.full
|
||||||
|
wireshark
|
||||||
|
taskwarrior3
|
||||||
|
noctalia-shell
|
||||||
|
codex
|
||||||
|
quickshell
|
||||||
|
hyprshell
|
||||||
|
udiskie
|
||||||
|
hyprpolkitagent
|
||||||
|
vicinae
|
||||||
|
kdePackages.dolphin
|
||||||
|
qutebrowser
|
||||||
|
playerctl
|
||||||
|
brightnessctl
|
||||||
|
libnotify
|
||||||
|
jq
|
||||||
|
libreoffice-still
|
||||||
|
sendme
|
||||||
|
typst
|
||||||
|
zathura
|
||||||
|
tinymist
|
||||||
|
steghide
|
||||||
|
hexedit
|
||||||
|
stegseek
|
||||||
|
tmux
|
||||||
|
(python3.withPackages(ps: with ps; [
|
||||||
|
web3
|
||||||
|
pycryptodome
|
||||||
|
pwntools
|
||||||
|
requests
|
||||||
|
tqdm
|
||||||
|
pynput
|
||||||
|
keyboard
|
||||||
|
]))
|
||||||
|
];
|
||||||
|
|
||||||
|
hardware.graphics = {
|
||||||
|
enable = true;
|
||||||
|
enable32Bit = true;
|
||||||
|
extraPackages = with pkgs; [
|
||||||
|
rocmPackages.clr.icd
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
hardware.bluetooth.enable = true;
|
||||||
|
hardware.bluetooth.powerOnBoot = true;
|
||||||
|
services.blueman.enable = true;
|
||||||
|
services.fprintd.enable = true;
|
||||||
|
services.fprintd.tod.enable = true;
|
||||||
|
services.fprintd.tod.driver = pkgs.libfprint-2-tod1-goodix;
|
||||||
|
security.pam.services.sudo.fprintAuth = true;
|
||||||
|
security.pam.services.polkit-1.fprintAuth = true;
|
||||||
|
security.pam.services.sddm.fprintAuth = false;
|
||||||
|
# Allow fprintd to disable USB persist for Goodix sensors
|
||||||
|
systemd.services.fprintd.serviceConfig = {
|
||||||
|
ProtectKernelTunables = false;
|
||||||
|
ReadWritePaths = [ "/sys/bus/usb/devices" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
services.flatpak.enable = true;
|
||||||
|
programs.hyprland = {
|
||||||
|
enable = true;
|
||||||
|
package = hyprlandPkg;
|
||||||
|
portalPackage = hyprlandPortalPkg;
|
||||||
|
withUWSM = true;
|
||||||
|
};
|
||||||
|
xdg.portal.config.common.default = "*";
|
||||||
|
# Some programs need SUID wrappers, can be configured further or are
|
||||||
|
# started in user sessions.
|
||||||
|
# programs.mtr.enable = true;
|
||||||
|
# programs.gnupg.agent = {
|
||||||
|
# enable = true;
|
||||||
|
# enableSSHSupport = true;
|
||||||
|
# };
|
||||||
|
# List services that you want to enable:
|
||||||
|
|
||||||
|
# Enable the OpenSSH daemon.
|
||||||
|
# services.openssh.enable = true;
|
||||||
|
|
||||||
|
# Open ports in the firewall.
|
||||||
|
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||||
|
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||||
|
# Or disable the firewall altogether.
|
||||||
|
# networking.firewall.enable = false;
|
||||||
|
hardware.ckb-next = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.ckb-next.overrideAttrs (old: {
|
||||||
|
cmakeFlags = (old.cmakeFlags or [ ]) ++ [ "-DUSE_DBUS_MENU=0" ];
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
# This value determines the NixOS release from which the default
|
||||||
|
# settings for stateful data, like file locations and database versions
|
||||||
|
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||||
|
# this value at the release version of the first install of this system.
|
||||||
|
# Before changing this value read the documentation for this option
|
||||||
|
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||||
|
system.stateVersion = "26.05"; # Did you read the comment?
|
||||||
|
#oh-my-zsh = {
|
||||||
|
# enable = true;
|
||||||
|
#}
|
||||||
|
# KWallet Auto-unlock
|
||||||
|
security.pam.services.sddm.enableKwallet = true;
|
||||||
|
security.pam.services.login.fprintAuth = false;
|
||||||
|
security.pam.services.hyprland.enableKwallet = true;
|
||||||
|
services.gnome.gnome-keyring.enable = true;
|
||||||
|
|
||||||
|
environment.variables = {
|
||||||
|
ZDOTDIR = "$HOME/.config/zsh";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/mnt/wordlists" = {
|
||||||
|
device = "/dev/disk/by-label/wordlists";
|
||||||
|
fsType = "ext4";
|
||||||
|
options = [ "nofail" "x-systemd.automount" "x-systemd.device-timeout=5" ];
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
# Trust the DEFENK VPN's private root certificate system-wide.
|
||||||
|
security.pki.certificateFiles = [ ./root_ca.crt ];
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
# Hardware configuration for Corsair MP600 PRO LPX 2 TB NVMe (A5JQB34902JR7K)
|
||||||
|
# Generated during migration from Framework 250 GB Expansion Card.
|
||||||
|
{ config, lib, pkgs, modulesPath, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usbhid" "uas" "sd_mod" ];
|
||||||
|
boot.initrd.kernelModules = [ "dm-snapshot" ];
|
||||||
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
# LUKS on NVMe Partition 2
|
||||||
|
boot.initrd.luks.devices."cryptroot" = {
|
||||||
|
device = "/dev/disk/by-uuid/ea31deed-6dbf-4420-ab6b-dd076193f50b";
|
||||||
|
preLVM = true;
|
||||||
|
allowDiscards = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Hibernation resume device
|
||||||
|
boot.resumeDevice = "/dev/vg_nixos/swap";
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{ device = "/dev/vg_nixos/root";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" =
|
||||||
|
{ device = "/dev/disk/by-uuid/12CE-A600";
|
||||||
|
fsType = "vfat";
|
||||||
|
options = [ "fmask=0077" "dmask=0077" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices =
|
||||||
|
[ { device = "/dev/vg_nixos/swap"; }
|
||||||
|
];
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
}
|
||||||
@@ -0,0 +1,417 @@
|
|||||||
|
-- Phase 1 Hyprland Lua migration for Blake.
|
||||||
|
-- Target: Hyprland v0.56.x
|
||||||
|
-- Intent: preserve the current daily-use workflow while moving off hyprlang.
|
||||||
|
|
||||||
|
local HOME = os.getenv("HOME") or "/home/blake"
|
||||||
|
local XDG_CONFIG_HOME = os.getenv("XDG_CONFIG_HOME") or (HOME .. "/.config")
|
||||||
|
|
||||||
|
local mainMod = "SUPER"
|
||||||
|
local terminal = "kitty"
|
||||||
|
local fileManager = "dolphin"
|
||||||
|
local browser = "qutebrowser"
|
||||||
|
local email = "thunderbird"
|
||||||
|
local menu = "noctalia-shell ipc call launcher toggle"
|
||||||
|
local ipc = "noctalia-shell ipc"
|
||||||
|
local legacyMonitorFile = XDG_CONFIG_HOME .. "/hypr/monitors.conf"
|
||||||
|
|
||||||
|
local function load_monitor_rules(path)
|
||||||
|
local handle = io.open(path, "r")
|
||||||
|
if not handle then
|
||||||
|
hl.monitor({
|
||||||
|
output = "",
|
||||||
|
mode = "preferred",
|
||||||
|
position = "auto",
|
||||||
|
scale = "auto",
|
||||||
|
})
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local loaded = 0
|
||||||
|
for line in handle:lines() do
|
||||||
|
local rule = line:match("^monitor=(.+)$")
|
||||||
|
if rule then
|
||||||
|
local output, mode, position, scale = rule:match("^([^,]+),([^,]+),([^,]+),([^,]+)$")
|
||||||
|
if output and mode and position and scale then
|
||||||
|
hl.monitor({
|
||||||
|
output = output,
|
||||||
|
mode = mode,
|
||||||
|
position = position,
|
||||||
|
scale = scale,
|
||||||
|
})
|
||||||
|
loaded = loaded + 1
|
||||||
|
else
|
||||||
|
local mon, keyword, value = rule:match("^([^,]+),([^,]+),(.+)$")
|
||||||
|
if mon and keyword == "transform" and tonumber(value) then
|
||||||
|
hl.monitor({
|
||||||
|
output = mon,
|
||||||
|
transform = tonumber(value),
|
||||||
|
})
|
||||||
|
loaded = loaded + 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
handle:close()
|
||||||
|
|
||||||
|
if loaded == 0 then
|
||||||
|
hl.monitor({
|
||||||
|
output = "",
|
||||||
|
mode = "preferred",
|
||||||
|
position = "auto",
|
||||||
|
scale = "auto",
|
||||||
|
})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function bind_exec(keys, command, opts)
|
||||||
|
hl.bind(keys, hl.dsp.exec_cmd(command), opts)
|
||||||
|
end
|
||||||
|
|
||||||
|
hl.env("XCURSOR_SIZE", "24")
|
||||||
|
hl.env("HYPRCURSOR_SIZE", "24")
|
||||||
|
hl.env("XCURSOR_THEME", "breeze_cursors")
|
||||||
|
hl.env("HYPRCURSOR_THEME", "breeze_cursors")
|
||||||
|
-- Prefer Wayland automatically for Electron applications while retaining
|
||||||
|
-- XWayland as a fallback for applications that need it.
|
||||||
|
hl.env("ELECTRON_OZONE_PLATFORM_HINT", "auto")
|
||||||
|
|
||||||
|
load_monitor_rules(legacyMonitorFile)
|
||||||
|
|
||||||
|
hl.config({
|
||||||
|
general = {
|
||||||
|
gaps_in = 3,
|
||||||
|
gaps_out = 1,
|
||||||
|
border_size = 1,
|
||||||
|
col = {
|
||||||
|
active_border = "rgb(ffb3b2)",
|
||||||
|
inactive_border = "rgb(181212)",
|
||||||
|
},
|
||||||
|
resize_on_border = true,
|
||||||
|
allow_tearing = false,
|
||||||
|
layout = "dwindle",
|
||||||
|
},
|
||||||
|
|
||||||
|
decoration = {
|
||||||
|
rounding = 3,
|
||||||
|
active_opacity = 1.0,
|
||||||
|
inactive_opacity = 0.9,
|
||||||
|
shadow = {
|
||||||
|
enabled = true,
|
||||||
|
range = 4,
|
||||||
|
render_power = 3,
|
||||||
|
color = "rgba(1a1a1aee)",
|
||||||
|
},
|
||||||
|
blur = {
|
||||||
|
enabled = true,
|
||||||
|
size = 3,
|
||||||
|
passes = 1,
|
||||||
|
vibrancy = 0.1696,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
animations = {
|
||||||
|
enabled = true,
|
||||||
|
},
|
||||||
|
|
||||||
|
dwindle = {
|
||||||
|
preserve_split = true,
|
||||||
|
},
|
||||||
|
|
||||||
|
master = {
|
||||||
|
new_status = "master",
|
||||||
|
},
|
||||||
|
|
||||||
|
misc = {
|
||||||
|
force_default_wallpaper = 0,
|
||||||
|
disable_hyprland_logo = false,
|
||||||
|
},
|
||||||
|
|
||||||
|
input = {
|
||||||
|
kb_layout = "us",
|
||||||
|
kb_options = "caps:escape",
|
||||||
|
follow_mouse = 1,
|
||||||
|
sensitivity = 0,
|
||||||
|
accel_profile = "flat",
|
||||||
|
scroll_factor = 0.35,
|
||||||
|
touchpad = {
|
||||||
|
natural_scroll = false,
|
||||||
|
scroll_factor = 0.15,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
xwayland = {
|
||||||
|
force_zero_scaling = true,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
hl.curve("easeOutQuint", { type = "bezier", points = { { 0.23, 1 }, { 0.32, 1 } } })
|
||||||
|
hl.curve("easeInOutCubic", { type = "bezier", points = { { 0.65, 0.05 }, { 0.36, 1 } } })
|
||||||
|
hl.curve("linear", { type = "bezier", points = { { 0, 0 }, { 1, 1 } } })
|
||||||
|
hl.curve("almostLinear", { type = "bezier", points = { { 0.5, 0.5 }, { 0.75, 1 } } })
|
||||||
|
hl.curve("quick", { type = "bezier", points = { { 0.15, 0 }, { 0.1, 1 } } })
|
||||||
|
|
||||||
|
hl.animation({ leaf = "global", enabled = true, speed = 10, bezier = "default" })
|
||||||
|
hl.animation({ leaf = "border", enabled = true, speed = 5.39, bezier = "easeOutQuint" })
|
||||||
|
hl.animation({ leaf = "windows", enabled = true, speed = 4.79, bezier = "easeOutQuint" })
|
||||||
|
hl.animation({ leaf = "windowsIn", enabled = true, speed = 4.1, bezier = "easeOutQuint", style = "popin 87%" })
|
||||||
|
hl.animation({ leaf = "windowsOut", enabled = true, speed = 1.49, bezier = "linear", style = "popin 87%" })
|
||||||
|
hl.animation({ leaf = "fadeIn", enabled = true, speed = 1.73, bezier = "almostLinear" })
|
||||||
|
hl.animation({ leaf = "fadeOut", enabled = true, speed = 1.46, bezier = "almostLinear" })
|
||||||
|
hl.animation({ leaf = "fade", enabled = true, speed = 3.03, bezier = "quick" })
|
||||||
|
hl.animation({ leaf = "layers", enabled = true, speed = 3.81, bezier = "easeOutQuint" })
|
||||||
|
hl.animation({ leaf = "layersIn", enabled = true, speed = 4, bezier = "easeOutQuint", style = "fade" })
|
||||||
|
hl.animation({ leaf = "layersOut", enabled = true, speed = 1.5, bezier = "linear", style = "fade" })
|
||||||
|
hl.animation({ leaf = "fadeLayersIn", enabled = true, speed = 1.79, bezier = "almostLinear" })
|
||||||
|
hl.animation({ leaf = "fadeLayersOut", enabled = true, speed = 1.39, bezier = "almostLinear" })
|
||||||
|
hl.animation({ leaf = "workspaces", enabled = true, speed = 1.94, bezier = "almostLinear", style = "fade" })
|
||||||
|
hl.animation({ leaf = "workspacesIn", enabled = true, speed = 1.21, bezier = "almostLinear", style = "fade" })
|
||||||
|
hl.animation({ leaf = "workspacesOut", enabled = true, speed = 1.94, bezier = "almostLinear", style = "fade" })
|
||||||
|
hl.animation({ leaf = "zoomFactor", enabled = true, speed = 7, bezier = "quick" })
|
||||||
|
|
||||||
|
hl.gesture({
|
||||||
|
fingers = 3,
|
||||||
|
direction = "horizontal",
|
||||||
|
action = "workspace",
|
||||||
|
})
|
||||||
|
|
||||||
|
hl.window_rule({
|
||||||
|
name = "special-discord",
|
||||||
|
match = { class = "^(vesktop)$" },
|
||||||
|
workspace = "special:discord",
|
||||||
|
})
|
||||||
|
|
||||||
|
hl.window_rule({
|
||||||
|
name = "special-obsidian",
|
||||||
|
match = { class = "^(obsidian)$" },
|
||||||
|
workspace = "special:obsidian",
|
||||||
|
})
|
||||||
|
|
||||||
|
hl.window_rule({
|
||||||
|
name = "special-spotify",
|
||||||
|
-- Spotify has used both lowercase and title-case X11 window classes.
|
||||||
|
match = { class = "^([Ss]potify)$" },
|
||||||
|
workspace = "special:spotify",
|
||||||
|
})
|
||||||
|
|
||||||
|
hl.window_rule({
|
||||||
|
name = "special-email",
|
||||||
|
match = { class = "^([Tt]hunderbird)$" },
|
||||||
|
workspace = "special:email",
|
||||||
|
})
|
||||||
|
|
||||||
|
hl.window_rule({
|
||||||
|
name = "suppress-maximize",
|
||||||
|
match = { class = ".*" },
|
||||||
|
suppress_event = "maximize",
|
||||||
|
})
|
||||||
|
|
||||||
|
hl.window_rule({
|
||||||
|
name = "hyprland-run",
|
||||||
|
match = { class = "^(hyprland-run)$" },
|
||||||
|
float = true,
|
||||||
|
move = "20 monitor_h-120",
|
||||||
|
})
|
||||||
|
|
||||||
|
hl.window_rule({
|
||||||
|
name = "calc-term",
|
||||||
|
match = { class = "^(calc-term)$" },
|
||||||
|
float = true,
|
||||||
|
pseudo = true,
|
||||||
|
center = true,
|
||||||
|
size = "40% 40%",
|
||||||
|
})
|
||||||
|
|
||||||
|
hl.window_rule({
|
||||||
|
name = "btop-popup",
|
||||||
|
match = { class = "^(btop)$" },
|
||||||
|
float = true,
|
||||||
|
size = "90% 80%",
|
||||||
|
dim_around = true,
|
||||||
|
})
|
||||||
|
|
||||||
|
hl.window_rule({
|
||||||
|
name = "popup-term",
|
||||||
|
match = { class = "^(popup-term)$" },
|
||||||
|
float = true,
|
||||||
|
size = "90% 80%",
|
||||||
|
dim_around = true,
|
||||||
|
opacity = "0.9 0.8",
|
||||||
|
})
|
||||||
|
|
||||||
|
hl.window_rule({
|
||||||
|
name = "kitty-opacity",
|
||||||
|
match = { class = "^(kitty)$" },
|
||||||
|
opacity = "1.0 1.0",
|
||||||
|
})
|
||||||
|
|
||||||
|
hl.window_rule({
|
||||||
|
name = "xwayland-drag-fix",
|
||||||
|
match = {
|
||||||
|
class = "^$",
|
||||||
|
title = "^$",
|
||||||
|
xwayland = true,
|
||||||
|
float = true,
|
||||||
|
fullscreen = false,
|
||||||
|
pin = false,
|
||||||
|
},
|
||||||
|
no_focus = true,
|
||||||
|
})
|
||||||
|
|
||||||
|
hl.window_rule({
|
||||||
|
name = "picture-in-picture",
|
||||||
|
match = { title = "^(Picture in picture)$" },
|
||||||
|
float = true,
|
||||||
|
pin = true,
|
||||||
|
center = true,
|
||||||
|
keep_aspect_ratio = true,
|
||||||
|
persistent_size = true,
|
||||||
|
})
|
||||||
|
|
||||||
|
hl.window_rule({
|
||||||
|
name = "privacy-browsers-float",
|
||||||
|
match = { class = "^(Tor Browser|Mullvad Browser)$" },
|
||||||
|
float = true,
|
||||||
|
center = true,
|
||||||
|
fullscreen_state = "0 0",
|
||||||
|
suppress_event = "maximize",
|
||||||
|
})
|
||||||
|
|
||||||
|
hl.window_rule({
|
||||||
|
name = "noctalia-settings",
|
||||||
|
match = {
|
||||||
|
class = "^dev.noctalia.Noctalia$",
|
||||||
|
initial_title = "^Noctalia Settings$",
|
||||||
|
},
|
||||||
|
float = true,
|
||||||
|
center = true,
|
||||||
|
size = "50% 80%",
|
||||||
|
})
|
||||||
|
|
||||||
|
hl.on("hyprland.start", function()
|
||||||
|
-- Noctalia owns the wallpaper layer and restores its saved wallpaper.
|
||||||
|
-- Starting Hyprpaper too creates a competing background with a different
|
||||||
|
-- fit mode after each login.
|
||||||
|
hl.exec_cmd("systemctl --user start hyprpolkitagent")
|
||||||
|
hl.exec_cmd("udiskie")
|
||||||
|
hl.exec_cmd("hyprpm reload -n")
|
||||||
|
hl.exec_cmd("kdeconnectd")
|
||||||
|
hl.exec_cmd("hyprshell run &")
|
||||||
|
hl.exec_cmd("vesktop -m --user-agent-os windows")
|
||||||
|
hl.exec_cmd("noctalia-shell")
|
||||||
|
hl.exec_cmd("hyprctl setcursor breeze_cursors 24")
|
||||||
|
end)
|
||||||
|
|
||||||
|
hl.bind(mainMod .. " + Q", hl.dsp.exec_cmd(terminal))
|
||||||
|
-- Tap the left Super key to open Hyprshell's overview. Triggering on release
|
||||||
|
-- leaves Super free to act as a modifier for bindings such as Super+Q.
|
||||||
|
hl.bind("SUPER + SUPER_L", hl.dsp.exec_cmd("hyprshell socat '\"OpenOverview\"'"), { release = true })
|
||||||
|
hl.bind(mainMod .. " + CTRL + S", hl.dsp.exec_cmd("grim -g \"$(slurp)\" - | wl-copy"))
|
||||||
|
hl.bind("ALT + Q", hl.dsp.exec_cmd(terminal .. " --class popup-term"))
|
||||||
|
hl.bind(mainMod .. " + W", hl.dsp.exec_cmd(terminal .. " --class popup-term"))
|
||||||
|
hl.bind(mainMod .. " + C", hl.dsp.window.close())
|
||||||
|
hl.bind(mainMod .. " + SHIFT + CTRL + M", hl.dsp.exec_cmd("command -v hyprshutdown >/dev/null 2>&1 && hyprshutdown || hyprctl dispatch exit"))
|
||||||
|
hl.bind(mainMod .. " + P", hl.dsp.window.pin())
|
||||||
|
hl.bind(mainMod .. " + SHIFT + P", hl.dsp.window.float({ action = "toggle" }))
|
||||||
|
hl.bind(mainMod .. " + SHIFT + BACKSLASH", hl.dsp.window.float({ action = "toggle" }))
|
||||||
|
hl.bind(mainMod .. " + BACKSLASH", hl.dsp.layout("togglesplit"))
|
||||||
|
hl.bind(mainMod .. " + CTRL + BACKSLASH", hl.dsp.window.pseudo())
|
||||||
|
hl.bind(mainMod .. " + Return", hl.dsp.window.fullscreen({ mode = "maximized", action = "toggle" }))
|
||||||
|
hl.bind(mainMod .. " + SHIFT + Return", hl.dsp.window.fullscreen({ mode = "fullscreen", action = "toggle" }))
|
||||||
|
|
||||||
|
hl.bind(mainMod .. " + H", hl.dsp.focus({ direction = "left" }))
|
||||||
|
hl.bind(mainMod .. " + L", hl.dsp.focus({ direction = "right" }))
|
||||||
|
hl.bind(mainMod .. " + K", hl.dsp.focus({ direction = "up" }))
|
||||||
|
hl.bind(mainMod .. " + J", hl.dsp.focus({ direction = "down" }))
|
||||||
|
|
||||||
|
hl.bind(mainMod .. " + SHIFT + H", hl.dsp.window.move({ direction = "left" }))
|
||||||
|
hl.bind(mainMod .. " + SHIFT + L", hl.dsp.window.move({ direction = "right" }))
|
||||||
|
hl.bind(mainMod .. " + SHIFT + K", hl.dsp.window.move({ direction = "up" }))
|
||||||
|
hl.bind(mainMod .. " + SHIFT + J", hl.dsp.window.move({ direction = "down" }))
|
||||||
|
|
||||||
|
for i = 1, 10 do
|
||||||
|
local key = tostring(i % 10)
|
||||||
|
hl.bind(mainMod .. " + " .. key, hl.dsp.focus({ workspace = i }))
|
||||||
|
hl.bind(mainMod .. " + SHIFT + " .. key, hl.dsp.window.move({ workspace = i }))
|
||||||
|
end
|
||||||
|
|
||||||
|
hl.bind(mainMod .. " + SHIFT + S", hl.dsp.window.move({ workspace = "special:magic" }))
|
||||||
|
bind_exec(mainMod .. " + D", "hyprctl clients | grep -iq \"vesktop\" && hyprctl dispatch 'hl.dsp.workspace.toggle_special(\"discord\")' || vesktop --user-agent-os windows")
|
||||||
|
bind_exec(mainMod .. " + S", "hyprctl clients | grep -iq \"spotify\" && hyprctl dispatch 'hl.dsp.workspace.toggle_special(\"spotify\")' || spotify")
|
||||||
|
bind_exec(mainMod .. " + E", "hyprctl clients | grep -iq \"thunderbird\" && hyprctl dispatch 'hl.dsp.workspace.toggle_special(\"email\")' || " .. email)
|
||||||
|
hl.bind(mainMod .. " + SHIFT + O", hl.dsp.workspace.toggle_special("obsidian"))
|
||||||
|
bind_exec(mainMod .. " + N", "obsidian")
|
||||||
|
bind_exec("ALT + E", email)
|
||||||
|
bind_exec(mainMod .. " + B", "brave")
|
||||||
|
bind_exec(mainMod .. " + SHIFT + F", browser)
|
||||||
|
bind_exec(mainMod .. " + SHIFT + Q", browser)
|
||||||
|
bind_exec(mainMod .. " + SPACE", "playerctl play-pause")
|
||||||
|
bind_exec("ALT_L + C", ipc .. " call clipper openPanel")
|
||||||
|
bind_exec("SUPER + escape", "kitty --class btop -o \"confirm_os_window_close 0\" btop")
|
||||||
|
bind_exec("CTRL + SHIFT + ESCAPE", "btop")
|
||||||
|
bind_exec(mainMod .. " + comma", ipc .. " call controlCenter toggle")
|
||||||
|
bind_exec(mainMod .. " + period", ipc .. " call settings toggle")
|
||||||
|
bind_exec("PRINT", "hyprshot -m active -m window --output-folder ~/screenshot")
|
||||||
|
bind_exec("SHIFT + PRINT", "hyprshot -m region --output-folder ~/screenshots")
|
||||||
|
bind_exec("ALT + PRINT", "hyprshot -m active -m output --output-folder ~/screenshots")
|
||||||
|
hl.bind(mainMod .. " + M", hl.dsp.submap("quick-settings"))
|
||||||
|
hl.bind(mainMod .. " + O", hl.dsp.submap("open-apps"))
|
||||||
|
bind_exec(mainMod .. " + CTRL + L", ipc .. " lockScreen lock")
|
||||||
|
|
||||||
|
hl.bind(mainMod .. " + right", hl.dsp.window.resize({ x = 20, y = 0, relative = true }), { repeating = true })
|
||||||
|
hl.bind(mainMod .. " + left", hl.dsp.window.resize({ x = -20, y = 0, relative = true }), { repeating = true })
|
||||||
|
hl.bind(mainMod .. " + up", hl.dsp.window.resize({ x = 0, y = -20, relative = true }), { repeating = true })
|
||||||
|
hl.bind(mainMod .. " + down", hl.dsp.window.resize({ x = 0, y = 20, relative = true }), { repeating = true })
|
||||||
|
|
||||||
|
hl.bind(mainMod .. " + mouse:272", hl.dsp.window.drag())
|
||||||
|
hl.bind(mainMod .. " + mouse:273", hl.dsp.window.resize())
|
||||||
|
|
||||||
|
bind_exec("XF86AudioRaiseVolume", "wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+", { locked = true, repeating = true })
|
||||||
|
bind_exec("XF86AudioLowerVolume", "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-", { locked = true, repeating = true })
|
||||||
|
bind_exec("XF86AudioMute", "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle", { locked = true, repeating = true })
|
||||||
|
bind_exec("XF86AudioMicMute", "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle", { locked = true, repeating = true })
|
||||||
|
bind_exec("XF86MonBrightnessUp", "brightnessctl -e4 -n2 set 5%+", { locked = true, repeating = true })
|
||||||
|
bind_exec("XF86MonBrightnessDown", "brightnessctl -e4 -n2 set 5%-", { locked = true, repeating = true })
|
||||||
|
bind_exec("XF86AudioNext", "playerctl next", { locked = true })
|
||||||
|
bind_exec("XF86AudioPause", "playerctl play-pause", { locked = true })
|
||||||
|
bind_exec("XF86AudioPlay", "playerctl play-pause", { locked = true })
|
||||||
|
bind_exec("XF86AudioPrev", "playerctl previous", { locked = true })
|
||||||
|
bind_exec("ALT + mouse:274", "playerctl play-pause")
|
||||||
|
|
||||||
|
hl.define_submap("quick-settings", function()
|
||||||
|
bind_exec("V", "protonvpn-app")
|
||||||
|
bind_exec("S", ipc .. " settings toggle")
|
||||||
|
bind_exec("C", ipc .. " plugin:clipper togglePanel")
|
||||||
|
bind_exec("P", ipc .. " sessionMenu toggle")
|
||||||
|
bind_exec(mainMod .. " + L", ipc .. " sessionMenu toggle")
|
||||||
|
bind_exec("T", ipc .. " systemMonitor toggle")
|
||||||
|
bind_exec("M", ipc .. " controlCenter toggle")
|
||||||
|
bind_exec("D", ipc .. " notifications toggleDND")
|
||||||
|
bind_exec("A", ipc .. " notifications dismissAll")
|
||||||
|
bind_exec("N", ipc .. " notifications toggleHistory")
|
||||||
|
hl.bind("L", hl.dsp.submap("layouts"))
|
||||||
|
bind_exec("SHIFT + B", ipc .. " bar toggle")
|
||||||
|
bind_exec("B", ipc .. " bluetooth togglePanel")
|
||||||
|
bind_exec("W", ipc .. " network togglePanel")
|
||||||
|
bind_exec("SHIFT + W", ipc .. " wifi toggle")
|
||||||
|
hl.bind("catchall", hl.dsp.submap("reset"))
|
||||||
|
end)
|
||||||
|
|
||||||
|
hl.define_submap("open-apps", function()
|
||||||
|
bind_exec("S", "spotify")
|
||||||
|
bind_exec("D", "vesktop --user-agent-os windows")
|
||||||
|
bind_exec("F", "firefox")
|
||||||
|
bind_exec("Q", browser)
|
||||||
|
bind_exec("M", "feishin")
|
||||||
|
bind_exec("O", "obsidian")
|
||||||
|
bind_exec("T", email)
|
||||||
|
bind_exec("R", "calibre")
|
||||||
|
bind_exec("E", "darktable")
|
||||||
|
hl.bind("catchall", hl.dsp.submap("reset"))
|
||||||
|
end)
|
||||||
|
|
||||||
|
hl.define_submap("layouts", function()
|
||||||
|
hl.bind("D", hl.dsp.exec_cmd("hyprctl keyword general:layout dwindle"))
|
||||||
|
hl.bind("M", hl.dsp.exec_cmd("hyprctl keyword general:layout master"))
|
||||||
|
hl.bind("catchall", hl.dsp.submap("reset"))
|
||||||
|
end)
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
home-manager.users.blake = { pkgs, ... }: {
|
||||||
|
# Hyprland itself is configured system-wide and reads this Lua file directly.
|
||||||
|
# Do not also enable Home Manager's Hyprland module: it manages a separate
|
||||||
|
# hyprland.conf, whose backup collision can abort the entire activation and
|
||||||
|
# leave this managed Lua file on an old generation.
|
||||||
|
xdg.configFile."hypr/hyprland.lua".source = ./hyprland.lua;
|
||||||
|
xdg.configFile."hypr/hyprpaper.conf".source = ./hyprpaper.conf;
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
# Hyprpaper 0.8+ uses wallpaper blocks. An empty monitor is the fallback for
|
||||||
|
# every output, including any monitor connected after the session starts.
|
||||||
|
splash = false
|
||||||
|
|
||||||
|
wallpaper {
|
||||||
|
monitor =
|
||||||
|
path = /home/blake/Pictures/wallpapers/david-lucy-cyberpunk-edgerunners-4k.png
|
||||||
|
fit_mode = fill
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIIBozCCAUmgAwIBAgIQTmqi6SxFTi+jy3sapgsmmzAKBggqhkjOPQQDAjAwMRIw
|
||||||
|
EAYDVQQKEwlERUZFTksgQ0ExGjAYBgNVBAMTEURFRkVOSyBDQSBSb290IENBMB4X
|
||||||
|
DTI2MDkxNjE3MzEyNFoXDTM2MDkxMzE3MzEyNFowMDESMBAGA1UEChMJREVGRU5L
|
||||||
|
IENBMRowGAYDVQQDExFERUZFTksgQ0EgUm9vdCBDQTBZMBMGByqGSM49AgEGCCqG
|
||||||
|
SM49AwEHA0IABMzLyHUtVhIIPy6OeWOJMR1jH3jYw/vwefiYwE1S6G92G8JputjR
|
||||||
|
FOOv+5j2idwasByS3SuZO15eHOUds71f5L2jRTBDMA4GA1UdDwEB/wQEAwIBBjAS
|
||||||
|
BgNVHRMBAf8ECDAGAQH/AgEBMB0GA1UdDgQWBBQBpUPPcsPgryaPFTysw9XScNKw
|
||||||
|
jDAKBggqhkjOPQQDAgNIADBFAiEAvUYQqfHRdNwulLeJ7wk0/6jPGN4P4VsNAGwy
|
||||||
|
lxgceawCIHHrCXGaTnvl5/NaWXHZMeNfWBcThKDFDDbFc+tmFx+/
|
||||||
|
-----END CERTIFICATE-----
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
environment.systemPackages = [
|
||||||
|
(pkgs.writeShellScriptBin "chucksrocks" "ssh -i /home/blake/.ssh/id_ed25519 cstilson@chucksrocks.com \"$@\"")
|
||||||
|
(pkgs.writeShellScriptBin "CrimsonHat" "ssh blake@68.62.154.204 -p 30232 \"$@\"")
|
||||||
|
(pkgs.writeShellScriptBin "jellyfin" "ssh -J blake@riverrooks.dev:1215 -L 8265:localhost:8265 -L 8080:localhost:8080 blake@10.99.186.147 -p 1215 \"$@\"")
|
||||||
|
(pkgs.writeShellScriptBin "RiverServer" "ssh blake@riverrooks.dev -p 1215 \"$@\"")
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
{ fetchFromGitHub, python3, python3Packages }:
|
||||||
|
|
||||||
|
python3Packages.buildPythonApplication rec {
|
||||||
|
pname = "wordreaper";
|
||||||
|
version = "2.3.1";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "Nemorous";
|
||||||
|
repo = "wordreaper";
|
||||||
|
rev = "7391e2055211ab1dd80d3631570a15ac026f824a";
|
||||||
|
hash = "sha256-pZpKL2FHnbuYCMkaVYqo3SuIUvbepgE39byYHcbPo3M=";
|
||||||
|
};
|
||||||
|
|
||||||
|
pyproject = true;
|
||||||
|
build-system = with python3Packages; [ setuptools wheel ];
|
||||||
|
dependencies = with python3Packages; [
|
||||||
|
beautifulsoup4
|
||||||
|
colorama
|
||||||
|
psutil
|
||||||
|
requests
|
||||||
|
tqdm
|
||||||
|
wordninja
|
||||||
|
];
|
||||||
|
|
||||||
|
# Upstream's package-data glob excludes rules/hybrid/*.
|
||||||
|
postInstall = ''
|
||||||
|
cp -r word_reaper/rules/* "$out/${python3.sitePackages}/word_reaper/rules/"
|
||||||
|
'';
|
||||||
|
|
||||||
|
pythonImportsCheck = [ "word_reaper" ];
|
||||||
|
doCheck = false; # Upstream ships no test suite.
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user