I am batman
5
.gitignore
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
.vscode
|
||||
|
||||
hosts/desktop/
|
||||
hosts/laptop/
|
||||
hosts/yoga/
|
||||
145
README.md
Normal file
@@ -0,0 +1,145 @@
|
||||
# 🖥️ ParanaOS
|
||||
|
||||
<!-- Desktop screenshots (actual images) -->
|
||||
<p align="center">
|
||||
<img src="imgs/260204_17h43m19s_screenshot.png" width="400" alt="Screenshot 1"/>
|
||||
<img src="imgs/260204_17h44m14s_screenshot.png" width="400" alt="Screenshot 2"/>
|
||||
<img src="imgs/260204_17h44m50s_screenshot.png" width="400" alt="Screenshot 3"/>
|
||||
<img src="imgs/260204_17h47m38s_screenshot.png" width="400" alt="Screenshot 4"/>
|
||||
<img src="imgs/260204_17h48m01s_screenshot.png" width="400" alt="Screenshot 5"/>
|
||||
<img src="imgs/260204_17h49m57s_screenshot.png" width="400" alt="Screenshot 6"/>
|
||||
<img src="imgs/260204_17h50m12s_screenshot.png" width="400" alt="Screenshot 7"/>
|
||||
<img src="imgs/260204_17h50m28s_screenshot.png" width="400" alt="Screenshot 8"/>
|
||||
<img src="imgs/260204_17h50m45s_screenshot.png" width="400" alt="Screenshot 9"/>
|
||||
<img src="imgs/260204_17h52m05s_screenshot.png" width="400" alt="Screenshot 10"/>
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
## Overview
|
||||
|
||||
Welcome to my personal dotfiles repo! This setup uses [Nix Flakes](https://nixos.wiki/wiki/Flakes), modular shell/configuration management, and lightweight scripts to make my Linux environment highly reproducible, beautiful, and easy to customize.
|
||||
|
||||
**Features:**
|
||||
- 🎨 Powerlevel10k Zsh theme
|
||||
- 🐚 Modular configs for shell, editor, and more
|
||||
- ⚡ Automated install with Nix
|
||||
- 🖼️ Wallpapers for a custom look
|
||||
- 🛠️ Utility scripts
|
||||
- 🔒 Host-specific overrides
|
||||
|
||||
---
|
||||
|
||||
## Screenshots
|
||||
|
||||
<details>
|
||||
<summary>Click to expand all screenshots</summary>
|
||||
|
||||
<p align="center">
|
||||
<img src="imgs/260204_17h43m19s_screenshot.png" width="700" alt="Screenshot 1"/>
|
||||
<img src="imgs/260204_17h44m14s_screenshot.png" width="700" alt="Screenshot 2"/>
|
||||
<img src="imgs/260204_17h44m50s_screenshot.png" width="700" alt="Screenshot 3"/>
|
||||
<img src="imgs/260204_17h47m38s_screenshot.png" width="700" alt="Screenshot 4"/>
|
||||
<img src="imgs/260204_17h48m01s_screenshot.png" width="700" alt="Screenshot 5"/>
|
||||
<img src="imgs/260204_17h49m57s_screenshot.png" width="700" alt="Screenshot 6"/>
|
||||
<img src="imgs/260204_17h50m12s_screenshot.png" width="700" alt="Screenshot 7"/>
|
||||
<img src="imgs/260204_17h50m28s_screenshot.png" width="700" alt="Screenshot 8"/>
|
||||
<img src="imgs/260204_17h50m45s_screenshot.png" width="700" alt="Screenshot 9"/>
|
||||
<img src="imgs/260204_17h52m05s_screenshot.png" width="700" alt="Screenshot 10"/>
|
||||
</p>
|
||||
</details>
|
||||
|
||||
---
|
||||
|
||||
## Installation & Setup
|
||||
|
||||
### Prerequisites
|
||||
- **Linux machine** (tested with Arch, Ubuntu; works on most distros)
|
||||
- **[Nix](https://nixos.org/download.html)** package manager (see https://nixos.org for install instructions)
|
||||
- Optionally: [Home Manager](https://nix-community.github.io/home-manager/) for full home directory integration
|
||||
|
||||
### Step 1: Clone the repository
|
||||
|
||||
```sh
|
||||
git clone https://github.com/gibbyDev/.dotfiles>.git ~/.dotfiles
|
||||
cd ~/.dotfiles
|
||||
```
|
||||
|
||||
### Step 2: Install dependencies with Nix Flakes
|
||||
|
||||
If you don’t have flakes enabled, run:
|
||||
|
||||
```sh
|
||||
nix --experimental-features 'nix-command flakes' flake show
|
||||
```
|
||||
|
||||
Run the installer to rebuild system and home manager modules:
|
||||
|
||||
```sh
|
||||
chmod +x install.sh
|
||||
./install.sh
|
||||
```
|
||||
|
||||
Replace `<your-host>` with your hostname as defined in the `hosts/` directory.
|
||||
|
||||
### Step 3: Extras and Customization
|
||||
- Edit (or override) configs in `modules/` for shell, editor, etc.
|
||||
- Change wallpapers by replacing files in `wallpapers/`
|
||||
- Update host-specific settings in `hosts/`
|
||||
- Zsh theme: `.p10k.zsh` config for Powerlevel10k is included
|
||||
- Additional scripts can be run or extended from `scripts/`
|
||||
|
||||
---
|
||||
|
||||
## Directory Structure
|
||||
|
||||
```text
|
||||
.
|
||||
├── flake.lock
|
||||
├── flake.nix
|
||||
├── hosts
|
||||
│ └── template/
|
||||
├── imgs
|
||||
├── modules
|
||||
│ ├── code/
|
||||
│ ├── default.nix
|
||||
│ ├── dolphin/
|
||||
│ ├── fastfetch/
|
||||
│ ├── firefox/
|
||||
│ ├── hyprland/
|
||||
│ ├── kitty/
|
||||
│ ├── misc/
|
||||
│ ├── nvim/
|
||||
│ ├── opencode/
|
||||
│ ├── rofi/
|
||||
│ ├── tmux/
|
||||
│ ├── virtualization/
|
||||
│ ├── waybar/
|
||||
│ ├── wlogout/
|
||||
│ └── yazi/
|
||||
├── .p10k.zsh
|
||||
├── README.md
|
||||
├── scripts
|
||||
└── wallpapers
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## FAQ & Troubleshooting
|
||||
- **How do I update everything?**
|
||||
- Pull latest: `git pull`
|
||||
- Re-run the Nix install process
|
||||
- **Where do I put overrides for my machine?**
|
||||
- Add files to the `hosts/` directory named after your hostname.
|
||||
- **How do I contribute or fork?**
|
||||
- Make your edits, then push to your fork or PR as needed!
|
||||
|
||||
---
|
||||
|
||||
## License
|
||||
MIT (or specify your own preferred license)
|
||||
|
||||
## Credits
|
||||
Big thanks to the Nix, Home Manager, and Powerlevel10k communities!
|
||||
|
||||
---
|
||||
173
flake.lock
generated
Normal file
@@ -0,0 +1,173 @@
|
||||
{
|
||||
"nodes": {
|
||||
"crane": {
|
||||
"locked": {
|
||||
"lastModified": 1766194365,
|
||||
"narHash": "sha256-4AFsUZ0kl6MXSm4BaQgItD0VGlEKR3iq7gIaL7TjBvc=",
|
||||
"owner": "ipetkov",
|
||||
"repo": "crane",
|
||||
"rev": "7d8ec2c71771937ab99790b45e6d9b93d15d9379",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "ipetkov",
|
||||
"repo": "crane",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"nur",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1733312601,
|
||||
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1772218752,
|
||||
"narHash": "sha256-G8nArvOTZXU8DRvrzAdz3Elcj6kA/vMtvY9mrGLATtA=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "f3a30376bb9eb2f6f61816be7d6ed954b6d2a3b9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1771848320,
|
||||
"narHash": "sha256-0MAd+0mun3K/Ns8JATeHT1sX28faLII5hVLq0L3BdZU=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "2fc6539b481e1d2569f25f8799236694180c0993",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1751274312,
|
||||
"narHash": "sha256-/bVBlRpECLVzjV19t5KMdMFWSwKLtb5RyXdjz3LJT+g=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "50ab793786d9de88ee30ec4e4c24fb4236fc2674",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-24.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1771848320,
|
||||
"narHash": "sha256-0MAd+0mun3K/Ns8JATeHT1sX28faLII5hVLq0L3BdZU=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "2fc6539b481e1d2569f25f8799236694180c0993",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1766309749,
|
||||
"narHash": "sha256-3xY8CZ4rSnQ0NqGhMKAy5vgC+2IVK0NoVEzDoOh4DA4=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "a6531044f6d0bef691ea18d4d4ce44d0daa6e816",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nur": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1772306319,
|
||||
"narHash": "sha256-ZcE3mTo1ThKx8KfW/deQxDhswNso/g0kbPWsfIkbsg8=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"rev": "2ad742d56b58e3cf5f8b300dc92ced2488ef3420",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs-stable": "nixpkgs-stable",
|
||||
"nur": "nur",
|
||||
"stash": "stash"
|
||||
}
|
||||
},
|
||||
"stash": {
|
||||
"inputs": {
|
||||
"crane": "crane",
|
||||
"nixpkgs": "nixpkgs_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1772183710,
|
||||
"narHash": "sha256-ojaPFnfWFRUi4Nc69T+ObdZ3Bxf62T3bv49qqV+wgHw=",
|
||||
"owner": "NotAShelf",
|
||||
"repo": "stash",
|
||||
"rev": "181edcefb1fb38bbd1ca306e91ba493bcf4014d9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NotAShelf",
|
||||
"repo": "stash",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
236
flake.nix
Normal file
@@ -0,0 +1,236 @@
|
||||
{
|
||||
description = "ParanaOS by GibbyDev";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-24.11";
|
||||
home-manager.url = "github:nix-community/home-manager";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
nur.url = "github:nix-community/NUR";
|
||||
stash.url = "github:NotAShelf/stash";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, nixpkgs-stable, home-manager, nur, ... }@inputs:
|
||||
let
|
||||
lib = nixpkgs.lib;
|
||||
system = "x86_64-linux";
|
||||
|
||||
customOverlays = builtins.attrValues (import ./overlays) ++ [
|
||||
# Override kdenlive with stable version to work around ffmpeg shaderc issue
|
||||
(final: prev: {
|
||||
kdenlive = let
|
||||
stable = import nixpkgs-stable {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
in stable.kdenlive;
|
||||
})
|
||||
];
|
||||
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = customOverlays ++ [ nur.overlays.default ];
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
|
||||
src = lib.cleanSourceWith {
|
||||
src = ./.;
|
||||
filter = path: type:
|
||||
let baseName = lib.baseNameOf path;
|
||||
in baseName != ".git"
|
||||
&& baseName != ".direnv"
|
||||
&& baseName != "result";
|
||||
};
|
||||
|
||||
hostDirs = lib.filter (h: h != "template") (builtins.attrNames (builtins.readDir ./hosts));
|
||||
|
||||
mkHost = host:
|
||||
lib.nixosSystem {
|
||||
inherit system;
|
||||
|
||||
specialArgs = {
|
||||
inherit inputs src;
|
||||
};
|
||||
|
||||
modules = [
|
||||
./hosts/${host}/configuration.nix
|
||||
|
||||
{
|
||||
nixpkgs.overlays = customOverlays;
|
||||
}
|
||||
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.extraSpecialArgs = { inherit inputs src; };
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
in
|
||||
{
|
||||
nixosConfigurations =
|
||||
builtins.listToAttrs (
|
||||
map (host: {
|
||||
name = host;
|
||||
value = mkHost host;
|
||||
}) hostDirs
|
||||
);
|
||||
|
||||
devShells.${system} = {
|
||||
|
||||
golang = pkgs.mkShell {
|
||||
name = "golang-shell";
|
||||
|
||||
# -----------------------
|
||||
# Packages
|
||||
# -----------------------
|
||||
buildInputs = with pkgs; [
|
||||
go # Golang compiler & tooling
|
||||
git # for cloning repos
|
||||
curl # fetch templates/examples
|
||||
gnumake # optional, for builds
|
||||
bash # shell utilities
|
||||
];
|
||||
|
||||
# -----------------------
|
||||
# Shell setup
|
||||
# -----------------------
|
||||
shellHook = ''
|
||||
echo ""
|
||||
echo "🚀 Golang dev shell ready"
|
||||
|
||||
# Ensure GOPATH/bin is in PATH
|
||||
export GOPATH=$HOME/go
|
||||
export PATH=$GOPATH/bin:$PATH
|
||||
|
||||
# Go modules enabled
|
||||
export GO111MODULE=on
|
||||
|
||||
# Preinstall templ if missing
|
||||
if [ ! -x "$GOPATH/bin/templ" ]; then
|
||||
echo "Installing Templ..."
|
||||
mkdir -p $GOPATH/src/github.com/evanw/templ
|
||||
cd $GOPATH/src/github.com/evanw
|
||||
git clone https://github.com/evanw/templ.git
|
||||
cd templ
|
||||
go install ./...
|
||||
cd -
|
||||
fi
|
||||
|
||||
echo "Go version: $(go version)"
|
||||
echo "Templ location: $(command -v templ || echo 'not found')"
|
||||
echo "HTMX is front-end only: include <script src='https://unpkg.com/htmx.org@1.11.1'></script> in HTML"
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
# -----------------------
|
||||
# Jetzig dev shell
|
||||
# -----------------------
|
||||
jetzig = pkgs.mkShell {
|
||||
name = "jetzig-shell";
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
zig
|
||||
git
|
||||
gnumake
|
||||
pkg-config
|
||||
openssl
|
||||
];
|
||||
|
||||
shellHook = ''
|
||||
echo ""
|
||||
echo "🚀 Jetzig dev shell ready"
|
||||
|
||||
export JETZIG_HOME=$HOME/.jetzig
|
||||
export ZIG_GLOBAL_CACHE_DIR=$HOME/.cache/zig
|
||||
export PATH=$JETZIG_HOME/zig-out/bin:$PATH
|
||||
|
||||
# Clone if missing
|
||||
if [ ! -d "$JETZIG_HOME" ]; then
|
||||
echo "Cloning Jetzig into $JETZIG_HOME ..."
|
||||
git clone https://github.com/jetzig-framework/jetzig $JETZIG_HOME
|
||||
fi
|
||||
|
||||
# Build if not built yet
|
||||
if [ ! -f "$JETZIG_HOME/zig-out/bin/jetzig" ]; then
|
||||
echo "Building Jetzig..."
|
||||
cd $JETZIG_HOME
|
||||
zig build -Doptimize=ReleaseSafe
|
||||
cd -
|
||||
fi
|
||||
|
||||
echo "jetzig location: $(command -v jetzig || echo 'not found')"
|
||||
'';
|
||||
};
|
||||
|
||||
# -----------------------
|
||||
# MERN dev shell
|
||||
# -----------------------
|
||||
mern = pkgs.mkShell {
|
||||
name = "mern-shell";
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
nodejs
|
||||
yarn
|
||||
mongodb-tools
|
||||
git
|
||||
curl
|
||||
openssl
|
||||
gnumake
|
||||
];
|
||||
|
||||
shellHook = ''
|
||||
echo ""
|
||||
echo "🚀 MERN dev shell ready"
|
||||
|
||||
# Local node_modules bin
|
||||
export PATH=$(pwd)/node_modules/.bin:$PATH
|
||||
|
||||
# Default MongoDB URL
|
||||
export MONGO_URL="mongodb://localhost:27017"
|
||||
|
||||
echo "Node.js version: $(node -v)"
|
||||
echo "npm version: $(npm -v)"
|
||||
echo "MongoDB tools available: $(which mongo || echo 'not found')"
|
||||
'';
|
||||
};
|
||||
|
||||
# -----------------------
|
||||
# Flutter dev shell
|
||||
# -----------------------
|
||||
flutter = pkgs.mkShell {
|
||||
name = "flutter-shell";
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
flutter
|
||||
dart
|
||||
android-tools
|
||||
jdk21
|
||||
kotlin
|
||||
gradle
|
||||
];
|
||||
|
||||
shellHook = ''
|
||||
echo ""
|
||||
echo "🚀 Flutter dev shell ready"
|
||||
echo ""
|
||||
|
||||
export ANDROID_HOME="$HOME/Android/Sdk"
|
||||
export ANDROID_SDK_ROOT="$HOME/Android/Sdk"
|
||||
|
||||
echo "Flutter version: $(flutter --version)"
|
||||
echo "Dart version: $(dart --version)"
|
||||
echo "Android tools: adb, fastboot available"
|
||||
echo ""
|
||||
echo "Next steps:"
|
||||
echo " • flutter doctor (check setup)"
|
||||
echo " • flutter create my_app"
|
||||
echo " • cd my_app && flutter run"
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
201
hosts/nixos/configuration.nix
Normal file
@@ -0,0 +1,201 @@
|
||||
{ config, pkgs, inputs, lib, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix # Include hardware scan results.
|
||||
];
|
||||
|
||||
boot.loader.grub = {
|
||||
enable = true;
|
||||
efiSupport = true;
|
||||
device = "nodev";
|
||||
useOSProber = true;
|
||||
};
|
||||
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
networking = {
|
||||
hostName = "nixos";
|
||||
networkmanager.enable = true; # Enable NetworkManager
|
||||
nameservers = ["192.168.1.2"];
|
||||
};
|
||||
|
||||
time.timeZone = "America/Detroit";
|
||||
|
||||
i18n = {
|
||||
defaultLocale = "en_US.UTF-8";
|
||||
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";
|
||||
};
|
||||
};
|
||||
|
||||
programs.zsh.enable = true;
|
||||
|
||||
users.users.cody = {
|
||||
isNormalUser = true;
|
||||
description = "cody";
|
||||
extraGroups = [ "wheel" "networkmanager" "libvirtd" "kvm" "qemu" "docker" ];
|
||||
packages = with pkgs; [ ];
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
|
||||
home-manager.users.cody = import ./home.nix;
|
||||
|
||||
nixpkgs.overlays = [
|
||||
inputs.nur.overlays.default
|
||||
];
|
||||
|
||||
nixpkgs.config.android_sdk.accept_license = true;
|
||||
|
||||
services = {
|
||||
xserver = {
|
||||
enable = true;
|
||||
xkb.layout = "us";
|
||||
displayManager.lightdm = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
tailscale.enable = true;
|
||||
|
||||
displayManager.defaultSession = "hyprland";
|
||||
|
||||
pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
};
|
||||
|
||||
resolved.enable = false;
|
||||
|
||||
blueman.enable = true;
|
||||
};
|
||||
|
||||
|
||||
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
powerOnBoot = true;
|
||||
};
|
||||
|
||||
virtualisation = {
|
||||
libvirtd.enable = true; # Enables libvirt daemon and KVM support
|
||||
docker.enable = true; # Enable this only if you want Docker
|
||||
};
|
||||
|
||||
programs.virt-manager.enable = true;
|
||||
|
||||
programs.hyprland.enable = true;
|
||||
|
||||
boot.kernelModules = [
|
||||
"kvm"
|
||||
"kvm-intel"
|
||||
"v4l2loopback"
|
||||
];
|
||||
|
||||
fonts = {
|
||||
fontconfig.enable = true;
|
||||
fontconfig.defaultFonts.monospace = [ "Meslo LG M Regular Nerd Font Complete Mono" ];
|
||||
packages = with pkgs; [
|
||||
nerd-fonts.meslo-lg
|
||||
nerd-fonts.jetbrains-mono
|
||||
nerd-fonts.agave
|
||||
font-awesome
|
||||
powerline-fonts
|
||||
powerline-symbols
|
||||
];
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
vim
|
||||
lastpass-cli
|
||||
wget
|
||||
git
|
||||
docker
|
||||
xhost
|
||||
docker-compose
|
||||
gnumake42
|
||||
go
|
||||
cmake
|
||||
gcc
|
||||
gdb
|
||||
networkmanagerapplet
|
||||
kdenlive
|
||||
postman
|
||||
pywalfox-native
|
||||
vlc
|
||||
xcolor
|
||||
adb-sync
|
||||
wl-clipboard
|
||||
cliphist
|
||||
wtype
|
||||
nwg-look
|
||||
tailscale
|
||||
libsForQt5.qt5.qtgraphicaleffects
|
||||
linuxPackages.v4l2loopback # Kernel module for virtual webcam
|
||||
alsa-utils # Audio support
|
||||
v4l-utils # Video4Linux tools
|
||||
pipewire
|
||||
libsForQt5.qt5.qtmultimedia
|
||||
qemu
|
||||
libvirt
|
||||
virt-manager
|
||||
bridge-utils # For networking support
|
||||
dnsmasq # DHCP for VM networking
|
||||
ebtables # NAT support for VMs
|
||||
grim
|
||||
nload
|
||||
htop
|
||||
atop
|
||||
iftop
|
||||
slurp
|
||||
grimblast
|
||||
swappy
|
||||
dunst
|
||||
jq
|
||||
moreutils
|
||||
hyprland
|
||||
libnotify
|
||||
coreutils
|
||||
hyprshade
|
||||
unityhub
|
||||
pkg-config
|
||||
mkinitcpio-nfs-utils
|
||||
xorg.libX11
|
||||
xorg.libXcursor
|
||||
xorg.libXrandr
|
||||
xorg.libXinerama
|
||||
xorg.libXi
|
||||
mesa
|
||||
libGL
|
||||
alsa-lib
|
||||
adwaita-icon-theme
|
||||
papirus-icon-theme
|
||||
bibata-cursors
|
||||
blueman
|
||||
chromium
|
||||
|
||||
bind
|
||||
iproute2
|
||||
iputils
|
||||
traceroute
|
||||
mtr
|
||||
tcpdump
|
||||
];
|
||||
|
||||
# Miscellaneous Settings
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
|
||||
# System State Version
|
||||
system.stateVersion = "25.11";
|
||||
}
|
||||
31
hosts/nixos/hardware-configuration.nix
Normal file
@@ -0,0 +1,31 @@
|
||||
# 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" "thunderbolt" "nvme" "rtsx_pci_sdmmc" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/7f7c0193-c0bc-47ad-9be3-0d48d83e489a";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/E646-95CD";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0077" "dmask=0077" ];
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
100
hosts/nixos/home.nix
Normal file
@@ -0,0 +1,100 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../../modules
|
||||
];
|
||||
|
||||
home.username = "cody";
|
||||
home.homeDirectory = "/home/cody";
|
||||
home.stateVersion = "24.11";
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
home.packages = with pkgs; [
|
||||
kitty
|
||||
screenkey
|
||||
docker
|
||||
tree
|
||||
ffmpeg
|
||||
tilt
|
||||
unzip
|
||||
gimp
|
||||
ripgrep
|
||||
fzf
|
||||
lsd
|
||||
lazygit
|
||||
opencode
|
||||
neofetch
|
||||
fastfetch
|
||||
tree
|
||||
git
|
||||
nodejs_22
|
||||
zig
|
||||
tailwindcss
|
||||
templ
|
||||
imagemagick
|
||||
go-blueprint
|
||||
protobuf
|
||||
air
|
||||
pywal
|
||||
bat
|
||||
# go_1_24
|
||||
# go-tools
|
||||
# Protocol buffers
|
||||
# protobuf
|
||||
# Go protoc plugins
|
||||
# protoc-gen-go
|
||||
# protoc-gen-go-grpc
|
||||
cava
|
||||
w3m
|
||||
nwg-displays
|
||||
(writeShellScriptBin "protoc-gen-go" ''
|
||||
export PATH=$HOME/.go/bin:$PATH
|
||||
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
|
||||
'')
|
||||
|
||||
(writeShellScriptBin "protoc-gen-go-grpc" ''
|
||||
export PATH=$HOME/.go/bin:$PATH
|
||||
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
|
||||
'')
|
||||
];
|
||||
|
||||
modules.android = {
|
||||
enable = false;
|
||||
enableEmulator = false;
|
||||
apiLevel = 34;
|
||||
enableFlutterSupport = false;
|
||||
};
|
||||
|
||||
home.sessionVariables = {
|
||||
SHELL = "${pkgs.zsh}/bin/zsh";
|
||||
};
|
||||
|
||||
programs.dircolors.enable = true;
|
||||
|
||||
home.file.".p10k.zsh".source = ../../.p10k.zsh;
|
||||
|
||||
home.activation.copyScripts =
|
||||
lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||
mkdir -p ~/.local/share/bin
|
||||
rm -rf ~/.local/share/bin/*
|
||||
cp -r ${../../scripts}/* ~/.local/share/bin/
|
||||
chmod +x ~/.local/share/bin/*
|
||||
if [ -x ~/.local/share/bin/tmux-session-manager.sh ] && [ ! -e ~/.local/share/bin/tmux-session-manager ]; then
|
||||
ln -s ~/.local/share/bin/tmux-session-manager.sh ~/.local/share/bin/tmux-session-manager
|
||||
fi
|
||||
'';
|
||||
|
||||
home.activation.setupFirefoxCalendarProfile =
|
||||
lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||
bash ~/.local/share/bin/setup-firefox-calendar-profile.sh
|
||||
'';
|
||||
|
||||
home.activation.copyWallpapers =
|
||||
lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||
mkdir -p ~/Pictures/wallpapers
|
||||
rm -rf ~/Pictures/wallpapers/*
|
||||
cp -r ${../../wallpapers}/* ~/Pictures/wallpapers/
|
||||
'';
|
||||
}
|
||||
16
hosts/nixos/sddm-theme.nix
Normal file
@@ -0,0 +1,16 @@
|
||||
{ pkgs }:
|
||||
|
||||
pkgs.stdenv.mkDerivation {
|
||||
name = "sddm-theme";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "MarianArlt";
|
||||
repo = "sddm-sugar-dark";
|
||||
rev = "ceb2c455663429be03ba62d9f898c571650ef7fe";
|
||||
sha256 = "0153z1kylbhc9d12nxy9vpn0spxgrhgy36wy37pk6ysq7akaqlvy";
|
||||
};
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp -R ./* $out/
|
||||
'';
|
||||
}
|
||||
|
||||
188
hosts/template/configuration.nix
Normal file
@@ -0,0 +1,188 @@
|
||||
{ config, pkgs, inputs, lib, ... }:
|
||||
|
||||
{
|
||||
imports = [ ./hardware-configuration.nix ]; # Include hardware scan results.
|
||||
|
||||
boot.loader.grub = {
|
||||
enable = true;
|
||||
efiSupport = true;
|
||||
device = "nodev";
|
||||
useOSProber = true;
|
||||
};
|
||||
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
networking = {
|
||||
hostName = "REPLACE_HOST";
|
||||
networkmanager.enable = true; # Enable NetworkManager
|
||||
};
|
||||
|
||||
time.timeZone = "America/Detroit";
|
||||
|
||||
i18n = {
|
||||
defaultLocale = "en_US.UTF-8";
|
||||
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";
|
||||
};
|
||||
};
|
||||
|
||||
programs.zsh.enable = true;
|
||||
|
||||
users.users.REPLACE_USER = {
|
||||
isNormalUser = true;
|
||||
description = "REPLACE_USER";
|
||||
extraGroups = [ "wheel" "networkmanager" "libvirtd" "kvm" "qemu" "docker" ];
|
||||
packages = with pkgs; [ ];
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
|
||||
home-manager.users.REPLACE_USER = import ./home.nix;
|
||||
|
||||
nixpkgs.overlays = [
|
||||
inputs.nur.overlays.default
|
||||
];
|
||||
|
||||
services = {
|
||||
xserver = {
|
||||
enable = true;
|
||||
xkb.layout = "us";
|
||||
displayManager.sddm.enable = true;
|
||||
displayManager.defaultSession = "hyprland";
|
||||
};
|
||||
|
||||
displayManager.sddm = {
|
||||
enable = true;
|
||||
wayland.enable = true; # important for Hyprland
|
||||
theme = "sddm-sugar-dark";
|
||||
};
|
||||
|
||||
pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
virtualisation = {
|
||||
libvirtd.enable = true; # Enables libvirt daemon and KVM support
|
||||
docker.enable = true; # Enable this only if you want Docker
|
||||
};
|
||||
|
||||
programs.virt-manager.enable = true;
|
||||
|
||||
programs.hyprland.enable = true;
|
||||
|
||||
boot.kernelModules = [
|
||||
"kvm"
|
||||
"kvm-intel"
|
||||
"v4l2loopback"
|
||||
];
|
||||
|
||||
fonts = {
|
||||
fontconfig.enable = true;
|
||||
fontconfig.defaultFonts.monospace = [ "Meslo LG M Regular Nerd Font Complete Mono" ];
|
||||
packages = with pkgs; [
|
||||
nerd-fonts.meslo-lg
|
||||
nerd-fonts.jetbrains-mono
|
||||
nerd-fonts.agave
|
||||
font-awesome
|
||||
powerline-fonts
|
||||
powerline-symbols
|
||||
];
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
vim
|
||||
lastpass-cli
|
||||
wget
|
||||
git
|
||||
docker
|
||||
xhost
|
||||
docker-compose
|
||||
gnumake42
|
||||
go
|
||||
cmake
|
||||
gcc
|
||||
gdb
|
||||
networkmanagerapplet
|
||||
pywalfox-native
|
||||
# droidcam
|
||||
# kdenlive
|
||||
vlc
|
||||
xcolor
|
||||
adb-sync
|
||||
wl-clipboard
|
||||
stash
|
||||
nwg-look
|
||||
libsForQt5.qt5.qtgraphicaleffects
|
||||
linuxPackages.v4l2loopback # Kernel module for virtual webcam
|
||||
alsa-utils # Audio support
|
||||
v4l-utils # Video4Linux tools
|
||||
pipewire
|
||||
qemu
|
||||
libvirt
|
||||
virt-manager
|
||||
bridge-utils # For networking support
|
||||
dnsmasq # DHCP for VM networking
|
||||
ebtables # NAT support for VMs
|
||||
grim
|
||||
slurp
|
||||
grimblast
|
||||
swappy
|
||||
dunst
|
||||
jq
|
||||
moreutils
|
||||
hyprland
|
||||
libnotify
|
||||
coreutils
|
||||
hyprshade
|
||||
unityhub
|
||||
pkg-config
|
||||
xorg.libX11
|
||||
xorg.libXcursor
|
||||
xorg.libXrandr
|
||||
xorg.libXinerama
|
||||
xorg.libXi
|
||||
mesa
|
||||
libGL
|
||||
alsa-lib
|
||||
(pkgs.stdenv.mkDerivation {
|
||||
pname = "sugar-candy-sddm-theme";
|
||||
version = "latest";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "MarianArlt";
|
||||
repo = "sddm-sugar-dark";
|
||||
rev = "master";
|
||||
sha256 = "0153z1kylbhc9d12nxy9vpn0spxgrhgy36wy37pk6ysq7akaqlvy";
|
||||
};
|
||||
installPhase = ''
|
||||
mkdir -p $out/share/sddm/themes/sddm-sugar-dark
|
||||
cp -r * $out/share/sddm/themes/sddm-sugar-dark
|
||||
'';
|
||||
})
|
||||
|
||||
];
|
||||
|
||||
# Optional: Specify the SDDM theme configuration
|
||||
# environment.etc."sddm.conf".text = lib.mkForce ''
|
||||
# [Theme]
|
||||
# Current=sddm-sugar-dark
|
||||
# '';
|
||||
#
|
||||
# Miscellaneous Settings
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
|
||||
# System State Version
|
||||
system.stateVersion = "25.11";
|
||||
}
|
||||
|
||||
34
hosts/template/hardware-configuration.nix
Normal file
@@ -0,0 +1,34 @@
|
||||
# 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" "nvme" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{
|
||||
device = "/dev/disk/by-uuid/4555c094-debf-45c7-a330-b6f5d0a1e64f";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{
|
||||
device = "/dev/disk/by-uuid/A7D4-AE37";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0077" "dmask=0077" ];
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
88
hosts/template/home.nix
Normal file
@@ -0,0 +1,88 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../../modules
|
||||
];
|
||||
|
||||
home.username = "REPLACE_USER";
|
||||
home.homeDirectory = "/home/REPLACE_USER";
|
||||
home.stateVersion = "24.11";
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
home.packages = with pkgs; [
|
||||
kitty
|
||||
screenkey
|
||||
docker
|
||||
tree
|
||||
ffmpeg
|
||||
tilt
|
||||
unzip
|
||||
gimp
|
||||
ripgrep
|
||||
fzf
|
||||
lsd
|
||||
lazygit
|
||||
opencode
|
||||
neofetch
|
||||
fastfetch
|
||||
tree
|
||||
git
|
||||
nodejs_22
|
||||
zig
|
||||
tailwindcss
|
||||
templ
|
||||
imagemagick
|
||||
go-blueprint
|
||||
protobuf
|
||||
air
|
||||
pywal
|
||||
bat
|
||||
cava
|
||||
w3m
|
||||
nwg-displays
|
||||
(writeShellScriptBin "protoc-gen-go" ''
|
||||
export PATH=$HOME/.go/bin:$PATH
|
||||
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
|
||||
'')
|
||||
|
||||
(writeShellScriptBin "protoc-gen-go-grpc" ''
|
||||
export PATH=$HOME/.go/bin:$PATH
|
||||
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
|
||||
'')
|
||||
];
|
||||
|
||||
home.sessionVariables = {
|
||||
SHELL = "${pkgs.zsh}/bin/zsh";
|
||||
};
|
||||
|
||||
programs.dircolors.enable = true;
|
||||
|
||||
home.file.".p10k.zsh".source = ../../.p10k.zsh;
|
||||
|
||||
home.activation.copyScripts =
|
||||
lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||
mkdir -p ~/.local/share/bin
|
||||
rm -rf ~/.local/share/bin/*
|
||||
cp -r ${../../scripts}/* ~/.local/share/bin/
|
||||
chmod +x ~/.local/share/bin/*
|
||||
if [ -x ~/.local/share/bin/tmux-session-manager.sh ] && [ ! -e ~/.local/share/bin/tmux-session-manager ]; then
|
||||
ln -s ~/.local/share/bin/tmux-session-manager.sh ~/.local/share/bin/tmux-session-manager
|
||||
fi
|
||||
'';
|
||||
|
||||
home.activation.copyWallpapers =
|
||||
lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||
mkdir -p ~/Pictures/wallpapers
|
||||
rm -rf ~/Pictures/wallpapers/*
|
||||
cp -r ${../../wallpapers}/* ~/Pictures/wallpapers/
|
||||
'';
|
||||
|
||||
home.file.".config/lsd/colors.yaml".text = ''
|
||||
date: "white"
|
||||
user: "white"
|
||||
group: "white"
|
||||
# ...any other preferences
|
||||
'';
|
||||
}
|
||||
14
hosts/template/sddm-theme.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
pkgs.stdenv.mkDerivation {
|
||||
name = "sddm-theme";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "MarianArlt";
|
||||
repo = "sddm-sugar-dark";
|
||||
rev = "ceb2c455663429be03ba62d9f898c571650ef7fe";
|
||||
sha256 = "0153z1kylbhc9d12nxy9vpn0spxgrhgy36wy37pk6ysq7akaqlvy";
|
||||
};
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp -R ./* $out/
|
||||
'';
|
||||
}
|
||||
|
||||
BIN
imgs/260204_17h43m19s_screenshot.png
Normal file
|
After Width: | Height: | Size: 317 KiB |
BIN
imgs/260204_17h44m14s_screenshot.png
Normal file
|
After Width: | Height: | Size: 192 KiB |
BIN
imgs/260204_17h44m50s_screenshot.png
Normal file
|
After Width: | Height: | Size: 81 KiB |
BIN
imgs/260204_17h47m38s_screenshot.png
Normal file
|
After Width: | Height: | Size: 281 KiB |
BIN
imgs/260204_17h48m01s_screenshot.png
Normal file
|
After Width: | Height: | Size: 294 KiB |
BIN
imgs/260204_17h49m57s_screenshot.png
Normal file
|
After Width: | Height: | Size: 225 KiB |
BIN
imgs/260204_17h50m12s_screenshot.png
Normal file
|
After Width: | Height: | Size: 534 KiB |
BIN
imgs/260204_17h50m28s_screenshot.png
Normal file
|
After Width: | Height: | Size: 473 KiB |
BIN
imgs/260204_17h50m45s_screenshot.png
Normal file
|
After Width: | Height: | Size: 445 KiB |
BIN
imgs/260204_17h52m05s_screenshot.png
Normal file
|
After Width: | Height: | Size: 213 KiB |
56
install.sh
Executable file
@@ -0,0 +1,56 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
DOTFILES="$HOME/.dotfiles"
|
||||
|
||||
if [ ! -d "$DOTFILES" ]; then
|
||||
echo "❌ .dotfiles not found at $DOTFILES"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "🔍 Detecting hostname..."
|
||||
host=$(hostname)
|
||||
echo "✔ Hostname detected: $host"
|
||||
echo ""
|
||||
|
||||
read -rp "👤 Enter your username: " username
|
||||
if [ -z "$username" ]; then
|
||||
echo "❌ Username cannot be empty."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
HOST_DIR="$DOTFILES/hosts/$host"
|
||||
|
||||
if [ -d "$HOST_DIR" ]; then
|
||||
echo "❌ Host '$host' already exists."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "📁 Creating host directory..."
|
||||
mkdir -p "$HOST_DIR"
|
||||
|
||||
echo "📋 Copying template..."
|
||||
cp -r "$DOTFILES/hosts/template/"* "$HOST_DIR"
|
||||
|
||||
echo "✏️ Replacing placeholders..."
|
||||
|
||||
sed -i "s/REPLACE_HOST/$host/g" \
|
||||
"$HOST_DIR/configuration.nix"
|
||||
|
||||
sed -i "s/REPLACE_USER/$username/g" \
|
||||
"$HOST_DIR/configuration.nix"
|
||||
|
||||
sed -i "s/REPLACE_USER/$username/g" \
|
||||
"$HOST_DIR/home.nix"
|
||||
|
||||
echo "🖥 Generating hardware configuration..."
|
||||
sudo nixos-generate-config \
|
||||
--show-hardware-config > "$HOST_DIR/hardware-configuration.nix"
|
||||
|
||||
echo ""
|
||||
echo "🚀 Building system..."
|
||||
sudo nixos-rebuild switch --flake "$DOTFILES#$host"
|
||||
|
||||
echo ""
|
||||
echo "✅ Installation complete!"
|
||||
|
||||
271
modules/android/README.md
Normal file
@@ -0,0 +1,271 @@
|
||||
# Android Development Module for NixOS
|
||||
|
||||
This module provides Android development environment setup using NixOS-specific approaches that respect the immutable filesystem while maintaining full functionality.
|
||||
|
||||
## Features
|
||||
|
||||
- **Android Studio Full** - Includes FHS environment for compatibility
|
||||
- **androidenv** - Declarative Android SDK management (reproducible)
|
||||
- **Android Emulator** - Optimized for NixOS with GPU acceleration
|
||||
- **Flutter SDK** - Optional Dart and Flutter support
|
||||
- **Build Tools** - Gradle, Maven, Kotlin, Java
|
||||
- **Additional Tools** - scrcpy for device screen sharing, APK signing utilities
|
||||
|
||||
## Configuration
|
||||
|
||||
Add to your `home.nix`:
|
||||
|
||||
```nix
|
||||
modules.android = {
|
||||
enable = true;
|
||||
enableEmulator = true;
|
||||
apiLevel = 34;
|
||||
enableFlutterSupport = true;
|
||||
};
|
||||
```
|
||||
|
||||
## Configuration Options
|
||||
|
||||
- **enable** - Master switch for the module
|
||||
- **enableEmulator** - Include Android emulator (default: true)
|
||||
- **apiLevel** - Default Android API level (default: 34)
|
||||
- **enableFlutterSupport** - Install Flutter SDK (default: true)
|
||||
|
||||
## Why This Approach is Better for NixOS
|
||||
|
||||
### Problem with Standard Android Tools on NixOS
|
||||
|
||||
NixOS uses an immutable filesystem and unique file structure that standard Android tools struggle with:
|
||||
- Expected `/system`, `/data`, `/cache` paths don't exist
|
||||
- SDK expects mutable `/opt` directories
|
||||
- Dynamic library linking issues
|
||||
|
||||
### Solution: NixOS-Specific Tools
|
||||
|
||||
**android-studio-full** - The recommended approach for NixOS
|
||||
- Provides FHS (Filesystem Hierarchy Standard) environment
|
||||
- Works out-of-the-box with proper file hierarchy
|
||||
- Pre-configured with SDK, emulator, and build tools
|
||||
- Manages mutable state in `~/.android` directory
|
||||
- No immutability conflicts
|
||||
|
||||
## Initial Setup
|
||||
|
||||
After applying the module:
|
||||
|
||||
```bash
|
||||
# Accept Android licenses
|
||||
android-setup
|
||||
|
||||
# Or manually
|
||||
yes | sdkmanager --licenses
|
||||
|
||||
# Create and start emulator
|
||||
android-emulator
|
||||
|
||||
# Verify Flutter setup
|
||||
flutter doctor
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
### Launch Emulator
|
||||
|
||||
```bash
|
||||
# Default emulator (flutter-dev, API 34)
|
||||
android-emulator
|
||||
|
||||
# Custom name
|
||||
android-emulator my-device
|
||||
|
||||
# Custom name and API level
|
||||
android-emulator my-device 33
|
||||
```
|
||||
|
||||
### Launch Android Studio
|
||||
|
||||
```bash
|
||||
android-studio
|
||||
```
|
||||
|
||||
### Flutter Development
|
||||
|
||||
```bash
|
||||
# Create new project
|
||||
flutter create my_app
|
||||
|
||||
# Run on emulator
|
||||
cd my_app
|
||||
flutter run
|
||||
|
||||
# Run with verbose output
|
||||
flutter run -v
|
||||
```
|
||||
|
||||
### Physical Device Development
|
||||
|
||||
```bash
|
||||
# Check connected devices
|
||||
adb devices
|
||||
|
||||
# Screen sharing (requires scrcpy)
|
||||
scrcpy
|
||||
|
||||
# View logs
|
||||
adb logcat
|
||||
```
|
||||
|
||||
## Available API Levels
|
||||
|
||||
The module includes these Android API levels by default:
|
||||
- API 28 (Android 9)
|
||||
- API 31 (Android 12)
|
||||
- API 33 (Android 13)
|
||||
- API 34 (Android 14)
|
||||
- API 35 (Android 15)
|
||||
|
||||
To use a specific API level:
|
||||
|
||||
```bash
|
||||
android-emulator test-device 31
|
||||
android-emulator latest 35
|
||||
```
|
||||
|
||||
## Build Tools
|
||||
|
||||
Included by default:
|
||||
- Gradle (build system)
|
||||
- Maven (alternative build system)
|
||||
- Kotlin compiler
|
||||
- Java JDK (11 and 21)
|
||||
- CMake, Ninja, GNU Make
|
||||
|
||||
## Hyprland Keybind
|
||||
|
||||
The module includes a Hyprland keybind:
|
||||
|
||||
```
|
||||
SUPER + ALT + A → Launch Android emulator
|
||||
```
|
||||
|
||||
Edit `modules/hyprland/config.nix` to customize.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### "avdmanager: command not found"
|
||||
|
||||
Ensure the module is properly enabled and rebuilt:
|
||||
|
||||
```bash
|
||||
home-manager switch --flake .#cody@nixos
|
||||
```
|
||||
|
||||
Then source environment:
|
||||
|
||||
```bash
|
||||
exec $SHELL
|
||||
```
|
||||
|
||||
### Emulator won't start
|
||||
|
||||
Check that the system image is available:
|
||||
|
||||
```bash
|
||||
avdmanager list all
|
||||
```
|
||||
|
||||
If the API level isn't listed, it may not be in the androidenv configuration. Edit the module to add it.
|
||||
|
||||
### Flutter doctor shows issues
|
||||
|
||||
```bash
|
||||
flutter doctor --verbose
|
||||
|
||||
# Accept licenses
|
||||
yes | flutter doctor --android-licenses
|
||||
|
||||
# Clean cache
|
||||
flutter clean
|
||||
rm -rf pubspec.lock
|
||||
flutter pub get
|
||||
```
|
||||
|
||||
### Physical device not detected
|
||||
|
||||
```bash
|
||||
# Check ADB sees the device
|
||||
adb devices
|
||||
|
||||
# Reload udev rules if you added a new device
|
||||
sudo udevadm control --reload-rules
|
||||
sudo udevadm trigger
|
||||
|
||||
# Ensure user is in correct group
|
||||
groups # Check for adbusers
|
||||
```
|
||||
|
||||
## Environment Variables
|
||||
|
||||
Automatically configured:
|
||||
|
||||
```bash
|
||||
ANDROID_HOME # Points to androidenv SDK
|
||||
ANDROID_SDK_ROOT # Points to androidenv SDK
|
||||
ANDROID_USER_HOME # $HOME/.android
|
||||
JAVA_HOME # JDK path
|
||||
ANDROID_JAVA_HOME # JDK for Android tools
|
||||
```
|
||||
|
||||
## Nix-Specific Notes
|
||||
|
||||
**android-studio-full** provides:
|
||||
- Complete Android SDK with tools
|
||||
- Emulator with hardware acceleration
|
||||
- System images for multiple API levels
|
||||
- Proper FHS environment for compatibility with standard Android tools
|
||||
|
||||
The module automatically configures:
|
||||
- `ANDROID_HOME` environment variable
|
||||
- `ANDROID_SDK_ROOT` for SDK location
|
||||
- `JAVA_HOME` for Java toolchain
|
||||
- All necessary PATH entries
|
||||
|
||||
### Adding More API Levels
|
||||
|
||||
Android Studio's SDK Manager handles API level management. After installation:
|
||||
|
||||
1. Open Android Studio
|
||||
2. Go to SDK Manager (Tools → SDK Manager)
|
||||
3. Select additional API levels and download system images
|
||||
4. Use `android-emulator my-device 31` for the new level
|
||||
|
||||
## Advanced: Manual SDK Management
|
||||
|
||||
If you prefer not to use Android Studio, you can manage the SDK manually using `android-tools`:
|
||||
|
||||
```bash
|
||||
# List available SDK components
|
||||
sdkmanager --list
|
||||
|
||||
# Install specific SDK component
|
||||
sdkmanager "system-images;android-34;google_apis;x86_64"
|
||||
|
||||
# Create AVD
|
||||
avdmanager create avd --name test --package "system-images;android-34;google_apis;x86_64"
|
||||
```
|
||||
|
||||
## Additional Resources
|
||||
|
||||
- [NixOS Android Environment](https://search.nixos.org/packages?channel=unstable&query=androidenv)
|
||||
- [Android Studio on NixOS](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/android-studio)
|
||||
- [Android Developer Docs](https://developer.android.com/)
|
||||
- [Flutter Documentation](https://flutter.dev/docs)
|
||||
|
||||
## Module Implementation Details
|
||||
|
||||
The module uses:
|
||||
- `android-studio-full` for complete Android SDK with FHS environment
|
||||
- `android-tools` for command-line utilities
|
||||
- Standard Nix packages for build tools (Gradle, Maven, CMake)
|
||||
- Environment variable configuration for automatic tool discovery
|
||||
- Helper scripts for emulator management
|
||||
210
modules/android/default.nix
Normal file
@@ -0,0 +1,210 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
cfg = config.modules.android;
|
||||
in
|
||||
{
|
||||
options.modules.android = {
|
||||
enable = lib.mkEnableOption "Android development environment with emulator support";
|
||||
|
||||
enableEmulator = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = "Enable Android emulator for testing Flutter and Android apps";
|
||||
};
|
||||
|
||||
apiLevel = lib.mkOption {
|
||||
type = lib.types.int;
|
||||
default = 34;
|
||||
description = "Default Android API level for the emulator";
|
||||
};
|
||||
|
||||
enableFlutterSupport = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = "Enable Flutter SDK and related tools";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
# Android Studio Full with FHS environment (recommended for NixOS)
|
||||
# This includes SDK, emulator, and all necessary tools
|
||||
android-studio-full
|
||||
|
||||
# Core Android command-line tools
|
||||
android-tools
|
||||
|
||||
# Build and compilation tools
|
||||
gradle
|
||||
maven
|
||||
ninja
|
||||
cmake
|
||||
gnumake
|
||||
pkg-config
|
||||
|
||||
# Java/Kotlin development
|
||||
jdk
|
||||
jdk21
|
||||
kotlin
|
||||
|
||||
# Flutter SDK for app development
|
||||
(if cfg.enableFlutterSupport then flutter else null)
|
||||
|
||||
# Flutter Version Manager
|
||||
(if cfg.enableFlutterSupport then fvm else null)
|
||||
|
||||
# Additional Android tools
|
||||
scrcpy # Screen sharing for Android devices
|
||||
apksigner # Sign APKs
|
||||
];
|
||||
|
||||
# Environment variables for Android development
|
||||
home.sessionVariables = lib.mkIf cfg.enable {
|
||||
ANDROID_HOME = "$HOME/.android";
|
||||
ANDROID_SDK_ROOT = "$HOME/Android/Sdk";
|
||||
ANDROID_USER_HOME = "$HOME/.android";
|
||||
JAVA_HOME = "${pkgs.jdk}/lib/openjdk";
|
||||
# For Flutter development
|
||||
ANDROID_JAVA_HOME = "${pkgs.jdk}";
|
||||
};
|
||||
|
||||
# Create a script to launch the Android emulator
|
||||
# Note: This works with the NixOS androidenv setup
|
||||
home.file.".local/share/bin/android-emulator" = lib.mkIf cfg.enableEmulator {
|
||||
executable = true;
|
||||
text = ''
|
||||
#!/usr/bin/env bash
|
||||
# Android Emulator launcher script for NixOS
|
||||
# Uses android-studio-full's built-in tools
|
||||
|
||||
set -e
|
||||
|
||||
EMULATOR_NAME="''${1:-flutter-dev}"
|
||||
API_LEVEL="''${2:-${toString cfg.apiLevel}}"
|
||||
|
||||
echo "Starting Android Emulator: $EMULATOR_NAME (API $API_LEVEL)"
|
||||
|
||||
# Check if AVD exists, if not create it
|
||||
if ! grep -q "^[^#]*name=$EMULATOR_NAME" ~/.android/avd/devices.txt 2>/dev/null; then
|
||||
echo "Creating AVD: $EMULATOR_NAME..."
|
||||
|
||||
# Try using avdmanager from Android Studio
|
||||
if command -v avdmanager &> /dev/null; then
|
||||
echo "no" | avdmanager create avd \
|
||||
--name "$EMULATOR_NAME" \
|
||||
--package "system-images;android-$API_LEVEL;google_apis;x86_64" \
|
||||
--device "pixel_6" \
|
||||
--force 2>&1 || {
|
||||
echo "Error: Could not create AVD"
|
||||
echo "Try running: android-studio to set up SDK from the IDE"
|
||||
exit 1
|
||||
}
|
||||
else
|
||||
echo "Error: avdmanager not found"
|
||||
echo "Please open Android Studio and complete the SDK setup:"
|
||||
echo " android-studio"
|
||||
echo ""
|
||||
echo "Then use SDK Manager to download system images for API $API_LEVEL"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Launch emulator with optimizations for NixOS
|
||||
emulator -avd "$EMULATOR_NAME" \
|
||||
-memory 2048 \
|
||||
-partition-size 4096 \
|
||||
-dns-server 8.8.8.8 \
|
||||
-no-snapshot-load \
|
||||
-no-snapshot-save \
|
||||
-gpu auto \
|
||||
-no-boot-anim \
|
||||
&
|
||||
|
||||
EMULATOR_PID=$!
|
||||
echo "Emulator starting in background (PID: $EMULATOR_PID)"
|
||||
echo "Waiting for boot..."
|
||||
|
||||
# Wait for emulator to boot
|
||||
for i in {1..90}; do
|
||||
if adb shell getprop sys.boot_completed 2>/dev/null | grep -q "1"; then
|
||||
echo "✓ Emulator fully booted!"
|
||||
exit 0
|
||||
fi
|
||||
echo -n "."
|
||||
sleep 2
|
||||
done
|
||||
|
||||
echo ""
|
||||
echo "⚠ Timeout waiting for emulator to boot"
|
||||
exit 1
|
||||
'';
|
||||
};
|
||||
|
||||
# Create a setup script to initialize Android environment on first use
|
||||
home.file.".local/share/bin/android-setup" = lib.mkIf cfg.enable {
|
||||
executable = true;
|
||||
text = ''
|
||||
#!/usr/bin/env bash
|
||||
# One-time setup script for Android development on NixOS
|
||||
|
||||
echo "Setting up Android development environment..."
|
||||
echo ""
|
||||
|
||||
# Check if sdkmanager is available
|
||||
if ! command -v sdkmanager &> /dev/null; then
|
||||
echo "Warning: sdkmanager not found in PATH"
|
||||
echo "This is normal on NixOS. You'll need to use Android Studio to manage SDKs."
|
||||
echo ""
|
||||
echo "Opening Android Studio for SDK setup..."
|
||||
android-studio &
|
||||
echo ""
|
||||
echo "In Android Studio:"
|
||||
echo " 1. Go to Tools → SDK Manager"
|
||||
echo " 2. Select API levels you want to download"
|
||||
echo " 3. Click 'Apply' and 'OK'"
|
||||
echo " 4. Close Android Studio when done"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Accept Android licenses
|
||||
echo "Accepting Android licenses..."
|
||||
yes | sdkmanager --licenses 2>&1 | tail -10
|
||||
|
||||
echo ""
|
||||
echo "✓ Android environment setup complete!"
|
||||
echo ""
|
||||
echo "Next steps:"
|
||||
echo " 1. Run: android-emulator (to create and start emulator)"
|
||||
echo " 2. For Flutter: flutter doctor"
|
||||
echo " 3. For Android Studio: android-studio"
|
||||
echo ""
|
||||
'';
|
||||
};
|
||||
|
||||
# Optional: Add udev rules for Android devices
|
||||
# This allows debugging on physical devices without root
|
||||
home.file.".config/udev/rules.d/51-android.rules" = lib.mkIf cfg.enable {
|
||||
text = ''
|
||||
# Android debug bridge - allows USB debugging without sudo
|
||||
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666", GROUP="adbusers"
|
||||
SUBSYSTEM=="usb", ATTR{idVendor}=="0e79", MODE="0666", GROUP="adbusers"
|
||||
SUBSYSTEM=="usb", ATTR{idVendor}=="0502", MODE="0666", GROUP="adbusers"
|
||||
SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", MODE="0666", GROUP="adbusers"
|
||||
SUBSYSTEM=="usb", ATTR{idVendor}=="413c", MODE="0666", GROUP="adbusers"
|
||||
SUBSYSTEM=="usb", ATTR{idVendor}=="0489", MODE="0666", GROUP="adbusers"
|
||||
SUBSYSTEM=="usb", ATTR{idVendor}=="091e", MODE="0666", GROUP="adbusers"
|
||||
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666", GROUP="adbusers"
|
||||
SUBSYSTEM=="usb", ATTR{idVendor}=="0d4d", MODE="0666", GROUP="adbusers"
|
||||
SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", MODE="0666", GROUP="adbusers"
|
||||
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666", GROUP="adbusers"
|
||||
SUBSYSTEM=="usb", ATTR{idVendor}=="04da", MODE="0666", GROUP="adbusers"
|
||||
SUBSYSTEM=="usb", ATTR{idVendor}=="04b7", MODE="0666", GROUP="adbusers"
|
||||
SUBSYSTEM=="usb", ATTR{idVendor}=="04b8", MODE="0666", GROUP="adbusers"
|
||||
SUBSYSTEM=="usb", ATTR{idVendor}=="04b9", MODE="0666", GROUP="adbusers"
|
||||
SUBSYSTEM=="usb", ATTR{idVendor}=="0bed", MODE="0666", GROUP="adbusers"
|
||||
SUBSYSTEM=="usb", ATTR{idVendor}=="1d4d", MODE="0666", GROUP="adbusers"
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
52
modules/code/code.nix
Normal file
@@ -0,0 +1,52 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
|
||||
# Use the unwrapped package to avoid extension issues
|
||||
package = pkgs.vscode;
|
||||
|
||||
profiles.default = {
|
||||
extensions = with pkgs.vscode-extensions; [
|
||||
github.copilot
|
||||
vscodevim.vim
|
||||
esbenp.prettier-vscode
|
||||
ms-azuretools.vscode-docker
|
||||
];
|
||||
|
||||
userSettings = {
|
||||
## Editor
|
||||
"editor.fontFamily" = "Fira Code";
|
||||
"editor.fontLigatures" = true;
|
||||
"editor.formatOnSave" = true;
|
||||
"editor.minimap.enabled" = false;
|
||||
"editor.tabSize" = 4;
|
||||
|
||||
## Files
|
||||
"files.autoSave" = "afterDelay";
|
||||
|
||||
## Vim
|
||||
"vim.useSystemClipboard" = true;
|
||||
## Line numbers
|
||||
"editor.lineNumbers" = "relative";
|
||||
|
||||
## Vim polish
|
||||
"vim.smartRelativeLine" = true; # absolute number on current line
|
||||
"vim.hlsearch" = true; # highlight search matches
|
||||
|
||||
## UI
|
||||
"workbench.sideBar.location" = "right";
|
||||
"workbench.colorTheme" = "Pywal";
|
||||
|
||||
## Copilot
|
||||
"github.copilot.enable" = {
|
||||
"*" = true;
|
||||
"plaintext" = false;
|
||||
"markdown" = true;
|
||||
};
|
||||
"github.copilot.nextEditSuggestions.enabled" = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
4
modules/code/default.nix
Normal file
@@ -0,0 +1,4 @@
|
||||
{ inputs, ... }:
|
||||
{
|
||||
imports = [ (import ./code.nix) ];
|
||||
}
|
||||
20
modules/default.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
imports = [
|
||||
./kitty
|
||||
./hyprland
|
||||
./firefox
|
||||
./rofi
|
||||
./tmux
|
||||
./misc
|
||||
./swaync
|
||||
# ./opencode
|
||||
./waybar
|
||||
./wlogout
|
||||
./yazi
|
||||
./nvim
|
||||
./posting
|
||||
./code
|
||||
./fastfetch
|
||||
./android
|
||||
];
|
||||
}
|
||||
5
modules/dolphin/default.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
imports = [
|
||||
./dolphin.nix
|
||||
];
|
||||
}
|
||||
10
modules/dolphin/dolphin.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
dolphin
|
||||
ffmpegthumbs # Enables video thumbnails in Dolphin
|
||||
] ++ (pkgs.lib.optionals (pkgs ? kio-extras) [ pkgs.kio-extras ]);
|
||||
|
||||
}
|
||||
|
||||
5
modules/fastfetch/default.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
imports = [
|
||||
./fastfetch.nix
|
||||
];
|
||||
}
|
||||
131
modules/fastfetch/fastfetch.nix
Normal file
@@ -0,0 +1,131 @@
|
||||
{
|
||||
programs.fastfetch = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
display = {
|
||||
color = {
|
||||
keys = "35";
|
||||
output = "95";
|
||||
};
|
||||
separator = " ➜ ";
|
||||
};
|
||||
|
||||
logo = {
|
||||
source = ./me.png;
|
||||
type = "kitty-direct";
|
||||
height = 12;
|
||||
width = 30;
|
||||
padding = {
|
||||
top = 2;
|
||||
left = 2;
|
||||
};
|
||||
};
|
||||
|
||||
modules = [
|
||||
"break"
|
||||
{
|
||||
type = "os";
|
||||
key = "OS - GibbyDev's OS";
|
||||
keyColor = "31";
|
||||
}
|
||||
{
|
||||
type = "kernel";
|
||||
key = " ├ ";
|
||||
keyColor = "31";
|
||||
}
|
||||
{
|
||||
type = "packages";
|
||||
key = " ├ ";
|
||||
keyColor = "31";
|
||||
}
|
||||
{
|
||||
type = "shell";
|
||||
key = " └ ";
|
||||
keyColor = "31";
|
||||
}
|
||||
"break"
|
||||
{
|
||||
type = "wm";
|
||||
key = "WM ";
|
||||
keyColor = "32";
|
||||
}
|
||||
{
|
||||
type = "wmtheme";
|
||||
key = " ├ ";
|
||||
keyColor = "32";
|
||||
}
|
||||
{
|
||||
type = "icons";
|
||||
key = " ├ ";
|
||||
keyColor = "32";
|
||||
}
|
||||
{
|
||||
type = "cursor";
|
||||
key = " ├ ";
|
||||
keyColor = "32";
|
||||
}
|
||||
{
|
||||
type = "terminal";
|
||||
key = " ├ ";
|
||||
keyColor = "32";
|
||||
}
|
||||
{
|
||||
type = "terminalfont";
|
||||
key = " └ ";
|
||||
keyColor = "32";
|
||||
}
|
||||
"break"
|
||||
{
|
||||
type = "host";
|
||||
format = "{5} {1} Type {2}";
|
||||
key = "PC ";
|
||||
keyColor = "33";
|
||||
}
|
||||
{
|
||||
type = "cpu";
|
||||
format = "{1} ({3}) @ {7} GHz";
|
||||
key = " ├ ";
|
||||
keyColor = "33";
|
||||
}
|
||||
{
|
||||
type = "gpu";
|
||||
format = "{1} {2} @ {12} GHz";
|
||||
key = " ├ ";
|
||||
keyColor = "33";
|
||||
}
|
||||
{
|
||||
type = "memory";
|
||||
key = " ├ ";
|
||||
keyColor = "33";
|
||||
}
|
||||
{
|
||||
type = "disk";
|
||||
key = " ├ ";
|
||||
keyColor = "33";
|
||||
}
|
||||
{
|
||||
type = "monitor";
|
||||
key = " ├ ";
|
||||
keyColor = "33";
|
||||
}
|
||||
{
|
||||
type = "player";
|
||||
key = " ├ ";
|
||||
keyColor = "33";
|
||||
}
|
||||
{
|
||||
type = "media";
|
||||
key = " └ ";
|
||||
keyColor = "33";
|
||||
}
|
||||
"break"
|
||||
{
|
||||
type = "uptime";
|
||||
key = " Uptime ";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
BIN
modules/fastfetch/me.png
Normal file
|
After Width: | Height: | Size: 1.1 MiB |
BIN
modules/fastfetch/nixos.png
Normal file
|
After Width: | Height: | Size: 78 KiB |
4
modules/firefox/default.nix
Normal file
@@ -0,0 +1,4 @@
|
||||
{ inputs, ... }:
|
||||
{
|
||||
imports = [ (import ./firefox.nix) ];
|
||||
}
|
||||
991
modules/firefox/firefox.nix
Normal file
@@ -0,0 +1,991 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
firefoxAddons = pkgs.nur.repos.rycee.firefox-addons;
|
||||
in
|
||||
{
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
|
||||
profiles.default = {
|
||||
bookmarks = {
|
||||
force = true;
|
||||
settings = [
|
||||
{
|
||||
name = "Toolbar";
|
||||
toolbar = true;
|
||||
bookmarks = [
|
||||
{
|
||||
name = "Dev";
|
||||
bookmarks = [
|
||||
{ name = "GitHub"; url = "https://github.com/gibbyDev"; }
|
||||
{ name = "ChatGPT"; url = "https://chatgpt.com"; }
|
||||
{ name = "Hostinger"; url = "https://hostinger.com"; }
|
||||
{ name = "UpWork"; url = "https://www.upwork.com/nx/find-work/best-matches"; }
|
||||
{ name = "Servers"; bookmarks = [ { name = "8080"; url = "http://localhost:8080"; } { name = "3000"; url = "http://localhost:3000"; } { name = "5000"; url = "http://localhost:5000"; } ]; }
|
||||
];
|
||||
}
|
||||
{
|
||||
name = "Personal";
|
||||
bookmarks = [
|
||||
{ name = "Dropbox"; url = "https://www.dropbox.com/home"; }
|
||||
{ name = "Betterhelp"; url = "https://www.betterhelp.com/"; }
|
||||
];
|
||||
}
|
||||
|
||||
{
|
||||
name = "Mail";
|
||||
bookmarks = [
|
||||
{ name = "ProtonMail"; url = "https://protonmail.com"; }
|
||||
{ name = "Gmail"; url = "https://gmail.com"; }
|
||||
];
|
||||
}
|
||||
|
||||
{
|
||||
name = "Social";
|
||||
bookmarks = [
|
||||
{ name = "LinkedIn"; url = "https://linkedin.com"; }
|
||||
{ name = "YouTube"; url = "https://youtube.com"; }
|
||||
{ name = "YouTube Studio"; url = "https://studio.youtube.com/channel/UCrWyV9qsJOPCF2af1gYzDeQ"; }
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
# You can still mix in loose bookmarks if you want
|
||||
{ name = "Search"; url = "https://duckduckgo.com"; }
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
# ------------------------------
|
||||
# ⚙️ Firefox preferences
|
||||
# ------------------------------
|
||||
settings = {
|
||||
"places.favicons.enabled" = true;
|
||||
"privacy.donottrackheader.enabled" = true;
|
||||
"network.trr.mode" = 2;
|
||||
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
|
||||
};
|
||||
|
||||
# ------------------------------
|
||||
# 🧩 Extensions
|
||||
# ------------------------------
|
||||
extensions.packages = with firefoxAddons; [
|
||||
pywalfox
|
||||
vimium
|
||||
ublock-origin
|
||||
sponsorblock
|
||||
darkreader
|
||||
tridactyl
|
||||
youtube-shorts-block
|
||||
];
|
||||
userChrome = ''
|
||||
/* ===================================================================
|
||||
LATIN ACCENT - FIREFOX TRANSPARENT THEME
|
||||
Made with cariño by Acercandr0
|
||||
=================================================================== */
|
||||
|
||||
:root {
|
||||
/* 🎯 Core Transparency */
|
||||
--tabpanel-background-color: transparent !important;
|
||||
--chrome-content-separator-color: transparent !important;
|
||||
--toolbar-bgcolor: transparent !important;
|
||||
|
||||
/* 🌈 Adaptive Color System */
|
||||
--accent-color: color-mix(in srgb, AccentColor 100%, transparent) !important;
|
||||
--accent-color-subtle: color-mix(in srgb, AccentColor 30%, transparent) !important;
|
||||
|
||||
/* 💻 Opacity System */
|
||||
--inactive-opacity: 0.3 !important;
|
||||
--hover-opacity: 1 !important;
|
||||
--semi-opacity: 0.7 !important;
|
||||
|
||||
/* ⚡ Animation System */
|
||||
--transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
|
||||
--transition-bounce: all 0.45s cubic-bezier(0.65, -0.50, 0.260, 1.50) !important;
|
||||
--transition-quick: all 0.15s ease-out !important;
|
||||
|
||||
/* 📐 Layout Constants */
|
||||
--border-radius: 5px;
|
||||
--border-radius-large: 7px;
|
||||
|
||||
/* 🔍 Outline & Border System */
|
||||
--border-outline-width: 1px;
|
||||
|
||||
/* 🎨 Adaptive Interface Colors - Light/Dark aware */
|
||||
--base-bg: light-dark(rgb(245, 245, 245), rgb(20, 20, 20));
|
||||
--panel-bg: color-mix(in srgb, var(--accent-color) 1%, var(--base-bg) 99%) !important;
|
||||
--panel-border: var(--accent-color) !important;
|
||||
--panel-text: light-dark(rgb(40, 40, 40), white) !important;
|
||||
--hover-bg: light-dark(rgba(0, 0, 0, 0.08), rgba(255, 255, 255, 0.08)) !important;
|
||||
|
||||
/* 🔍 Focus System */
|
||||
--focus-outline-color: var(--accent-color) !important;
|
||||
--focus-outline-width: var(--border-outline-width) !important;
|
||||
--toolbarbutton-icon-fill-attention: var(--accent-color) !important;
|
||||
|
||||
/* 📋 Dropdown Styling */
|
||||
--arrowpanel-background: var(--panel-bg) !important;
|
||||
--arrowpanel-border-color: var(--panel-border) !important;
|
||||
--arrowpanel-color: var(--panel-text) !important;
|
||||
--urlbar-open-background: var(--panel-bg) !important;
|
||||
--urlbar-open-color: var(--panel-text) !important;
|
||||
|
||||
/* 🚫 Button Background Override */
|
||||
--toolbarbutton-hover-background: transparent !important;
|
||||
--toolbarbutton-active-background: transparent !important;
|
||||
}
|
||||
|
||||
/* ===========================
|
||||
🧹 GLOBAL RESETS
|
||||
=========================== */
|
||||
*,
|
||||
#content,
|
||||
#content > *,
|
||||
#main-window,
|
||||
#browser,
|
||||
#appcontent,
|
||||
#browserContainer,
|
||||
#tabbrowser-tabpanels,
|
||||
#tabbrowser-tabbox,
|
||||
#tabbrowser-arrowscrollbox,
|
||||
.tabbrowser-tabs,
|
||||
.webRenderCompositor,
|
||||
.browserContainer,
|
||||
.browserStack,
|
||||
#webrtcIndicator,
|
||||
#navigator-toolbox,
|
||||
#TabsToolbar,
|
||||
#PersonalToolbar {
|
||||
box-shadow: none !important;
|
||||
filter: none !important;
|
||||
}
|
||||
|
||||
/* ===========================
|
||||
📑 TAB SYSTEM
|
||||
=========================== */
|
||||
|
||||
#navigator-toolbox,
|
||||
#TabsToolbar,
|
||||
#nav-bar {
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
/* Tab Layout */
|
||||
.titlebar-spacer[type="pre-tabs"] {
|
||||
width: 1px !important;
|
||||
}
|
||||
|
||||
/* Mimized window tab spacing */
|
||||
#main-window[sizemode="maximized"] #TabsToolbar {
|
||||
padding-left: 2px !important;
|
||||
}
|
||||
|
||||
#main-window[sizemode="maximized"] .tabbrowser-tabs {
|
||||
margin-left: 0 !important;
|
||||
}
|
||||
|
||||
/* Post-tabs spacer - Windows */
|
||||
@supports not (-moz-bool-pref: "widget.macos.titlebar-blend") {
|
||||
.titlebar-spacer[type="post-tabs"] {
|
||||
width: 40px !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* Pre-tabs spacer - macOS */
|
||||
@supports (-moz-bool-pref: "widget.macos.titlebar-blend") {
|
||||
.titlebar-spacer[type="pre-tabs"] {
|
||||
width: 80px !important;
|
||||
}
|
||||
|
||||
.titlebar-spacer[type="post-tabs"] {
|
||||
width: 1px !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* Base Tab Styling */
|
||||
.tabbrowser-tab {
|
||||
transition: var(--transition-smooth) !important;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* Active Tab */
|
||||
.tabbrowser-tab[selected="true"] .tab-background {
|
||||
border: var(--border-outline-width) solid var(--accent-color) !important;
|
||||
background: transparent !important;
|
||||
border-radius: var(--border-radius) !important;
|
||||
animation: tabActivate 0.3s ease-out;
|
||||
}
|
||||
|
||||
/* Inactive Tabs */
|
||||
.tabbrowser-tab:not([selected]) .tab-icon-image,
|
||||
.tabbrowser-tab:not([selected]) .tab-label,
|
||||
#tabs-newtab-button {
|
||||
opacity: var(--inactive-opacity) !important;
|
||||
transition: var(--transition-smooth) !important;
|
||||
}
|
||||
|
||||
/* Tab Hover Effects */
|
||||
.tabbrowser-tab:hover .tab-text,
|
||||
.tabbrowser-tab:hover .tab-icon-image,
|
||||
#tabs-newtab-button:hover {
|
||||
opacity: var(--hover-opacity) !important;
|
||||
}
|
||||
|
||||
/* Tab Close Button */
|
||||
.tabbrowser-tab .tab-close-button {
|
||||
opacity: 0 !important;
|
||||
visibility: hidden !important;
|
||||
transform: scale(0.8) rotate(30deg) !important;
|
||||
transition: var(--transition-bounce) !important;
|
||||
}
|
||||
|
||||
.tabbrowser-tab:hover .tab-close-button {
|
||||
opacity: var(--semi-opacity) !important;
|
||||
visibility: visible !important;
|
||||
transform: scale(1) rotate(0deg) !important;
|
||||
}
|
||||
|
||||
.tabbrowser-tab .tab-close-button:hover {
|
||||
opacity: var(--hover-opacity) !important;
|
||||
transform: scale(1.1) !important;
|
||||
}
|
||||
|
||||
/* ===========================
|
||||
🏷️ TAB GROUPS STYLING
|
||||
=========================== */
|
||||
|
||||
/* Hide original underline */
|
||||
.tab-group-line {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* Hide label underline */
|
||||
.tab-group-label-container {
|
||||
#tabbrowser-tabs:is([orient="horizontal"], [orient="vertical"]:not([expanded])) tab-group:not([collapsed]) > &::after {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* Group outline */
|
||||
tab-group:not([collapsed]) .tabbrowser-tab .tab-background {
|
||||
outline: var(--border-outline-width) solid var(--tab-group-color) !important;
|
||||
outline-offset: -1px !important;
|
||||
}
|
||||
|
||||
/* Inactive tabs inside group */
|
||||
tab-group:not([collapsed]) .tabbrowser-tab:not([selected]) .tab-background {
|
||||
outline: var(--border-outline-width) solid color-mix(in srgb, var(--tab-group-color) 30%, transparent) !important;
|
||||
outline-offset: -1px !important;
|
||||
}
|
||||
|
||||
/* Active group tab */
|
||||
tab-group:not([collapsed]) .tabbrowser-tab[selected="true"] .tab-background {
|
||||
border: none !important;
|
||||
outline: var(--border-outline-width) solid var(--tab-group-color) !important;
|
||||
outline-offset: -1px !important;
|
||||
}
|
||||
|
||||
/* 🏷️ Label text - inactive/closed state */
|
||||
.tab-group-label {
|
||||
text-transform: uppercase !important;
|
||||
font-weight: 500 !important;
|
||||
letter-spacing: 0.5px !important;
|
||||
color: light-dark(#666666, #cccccc) !important;
|
||||
background-color: transparent !important;
|
||||
transition: var(--transition-smooth) !important;
|
||||
outline: var(--border-outline-width) solid var(--tab-group-color) !important;
|
||||
outline-offset: -1px !important;
|
||||
padding: 8px !important;
|
||||
border-radius: var(--border-radius) !important;
|
||||
}
|
||||
|
||||
/* 🌟 Label hover effect */
|
||||
.tab-group-label-container:hover .tab-group-label {
|
||||
color: light-dark(#333333, white) !important;
|
||||
background-color: color-mix(in srgb, var(--tab-group-color) 35%, light-dark(white, black)) !important;
|
||||
outline: var(--border-outline-width) solid var(--tab-group-color) !important;
|
||||
outline-offset: -1px !important;
|
||||
}
|
||||
|
||||
|
||||
/* ===========================
|
||||
📊 AUDIO TAB INDICATORS
|
||||
=========================== */
|
||||
|
||||
/* 🔊 Sound playing (not muted) */
|
||||
.tab-audio-button[soundplaying]:not([muted]) {
|
||||
background-image: url("chrome://global/skin/media/audio.svg") !important;
|
||||
background-repeat: no-repeat !important;
|
||||
background-position: center !important;
|
||||
background-size: contain !important;
|
||||
-moz-context-properties: fill, stroke !important;
|
||||
fill: currentColor !important;
|
||||
opacity: 0.6 !important;
|
||||
background-color: transparent !important;
|
||||
border: none !important;
|
||||
padding: 0 !important;
|
||||
padding-right: 4px !important;
|
||||
margin-inline-start: 4px !important;
|
||||
width: 10px !important;
|
||||
height: 10px !important;
|
||||
display: block !important;
|
||||
transform-origin: center;
|
||||
}
|
||||
|
||||
/* 🔇 Muted tab */
|
||||
.tab-audio-button[muted] {
|
||||
background-image: url("chrome://global/skin/media/audio-muted.svg") !important;
|
||||
background-repeat: no-repeat !important;
|
||||
background-position: center !important;
|
||||
background-size: contain !important;
|
||||
-moz-context-properties: fill, stroke !important;
|
||||
fill: var(--accent-color) !important;
|
||||
opacity: 0.8 !important;
|
||||
background-color: transparent !important;
|
||||
border: none !important;
|
||||
padding: 0 !important;
|
||||
padding-right: 4px !important;
|
||||
margin-inline-start: 4px !important;
|
||||
width: 10px !important;
|
||||
height: 10px !important;
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
/* ===========================
|
||||
🔍 URL BAR SYSTEM
|
||||
=========================== */
|
||||
|
||||
/* Closed State - Force transparent background */
|
||||
#urlbar:not([open]) #urlbar-background,
|
||||
#urlbar:not([open]) .urlbar-background,
|
||||
#searchbar:not([open]),
|
||||
#urlbar[breakout][breakout-extend]:not([open]) > #urlbar-background {
|
||||
background: transparent !important;
|
||||
background-color: transparent !important;
|
||||
background-clip: border-box !important;
|
||||
}
|
||||
|
||||
/* Open State - Updated selectors for new Firefox versions */
|
||||
#urlbar[open] > #urlbar-background,
|
||||
#urlbar[breakout][breakout-extend][open] > #urlbar-background,
|
||||
#urlbar[open] .urlbar-background {
|
||||
background: var(--urlbar-open-background) !important;
|
||||
background-color: var(--panel-bg) !important;
|
||||
background-clip: border-box !important;
|
||||
color: var(--urlbar-open-color) !important;
|
||||
border: var(--border-outline-width) solid var(--accent-color) !important;
|
||||
border-radius: var(--border-radius-large) !important;
|
||||
margin: 1px !important;
|
||||
animation: urlbarExpand 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
/* Fix for urlbar input container when closed */
|
||||
#urlbar:not([open]) #urlbar-input-container {
|
||||
background: transparent !important;
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
||||
/* Search Results - always transparent background, panel shows behind */
|
||||
#urlbar-results,
|
||||
#urlbar-results .urlbarView,
|
||||
#urlbar-results .urlbarView-body,
|
||||
#urlbar-results .urlbarView-row {
|
||||
background: transparent !important;
|
||||
}
|
||||
|
||||
/* Search Results Container */
|
||||
#urlbar[open] #urlbar-results,
|
||||
#urlbar[open] #urlbar-results .urlbarView,
|
||||
#urlbar[breakout][breakout-extend][open] #urlbar-results {
|
||||
background: transparent !important;
|
||||
}
|
||||
|
||||
#urlbar[open] #urlbar-results .urlbarView-body {
|
||||
background: transparent !important;
|
||||
}
|
||||
|
||||
/* Search Result Items */
|
||||
#urlbar-results .urlbarView-row {
|
||||
transition: var(--transition-quick) !important;
|
||||
border-radius: var(--border-radius) !important;
|
||||
margin-right: 8px !important;
|
||||
}
|
||||
|
||||
#urlbar-results .urlbarView-row:hover {
|
||||
background: var(--hover-bg) !important;
|
||||
transform: translateX(4px);
|
||||
margin-right: 8px !important;
|
||||
}
|
||||
|
||||
#urlbar-searchmode-switcher {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
||||
/* URL Input Styling */
|
||||
.urlbar-input-box {
|
||||
display: flex !important;
|
||||
justify-content: center !important;
|
||||
}
|
||||
|
||||
.urlbar-input {
|
||||
text-align: center !important;
|
||||
transition: var(--transition-smooth) !important;
|
||||
}
|
||||
|
||||
#urlbar[focused] .urlbar-input {
|
||||
transform: scale(1.02);
|
||||
}
|
||||
|
||||
/* ===========================
|
||||
📚 BOOKMARKS BAR
|
||||
=========================== */
|
||||
|
||||
/* Personal Toolbar (Bookmarks Bar) */
|
||||
#PersonalToolbar {
|
||||
background: transparent !important;
|
||||
border: none !important;
|
||||
padding: 2px 5px !important;
|
||||
}
|
||||
|
||||
/* Bookmark Items Container */
|
||||
#PlacesToolbarItems {
|
||||
display: flex !important;
|
||||
align-items: center !important;
|
||||
gap: 2px !important;
|
||||
}
|
||||
|
||||
/* Individual Bookmark Items */
|
||||
.bookmark-item {
|
||||
background: transparent !important;
|
||||
border: none !important;
|
||||
border-radius: var(--border-radius) !important;
|
||||
opacity: var(--inactive-opacity) !important;
|
||||
transition: var(--transition-smooth) !important;
|
||||
padding: 4px 8px !important;
|
||||
margin: 0 1px !important;
|
||||
min-height: 24px !important;
|
||||
max-height: 24px !important;
|
||||
display: flex !important;
|
||||
align-items: center !important;
|
||||
justify-content: center !important;
|
||||
white-space: nowrap !important;
|
||||
overflow: hidden !important;
|
||||
text-overflow: ellipsis !important;
|
||||
transform-origin: center !important;
|
||||
flex-shrink: 0 !important;
|
||||
}
|
||||
|
||||
/* Bookmark Icons */
|
||||
.bookmark-item .toolbarbutton-icon {
|
||||
width: 16px !important;
|
||||
height: 16px !important;
|
||||
margin-right: 4px !important;
|
||||
flex-shrink: 0 !important;
|
||||
}
|
||||
|
||||
/* Bookmark Text */
|
||||
.bookmark-item .toolbarbutton-text {
|
||||
font-size: 12px !important;
|
||||
max-width: 120px !important;
|
||||
overflow: hidden !important;
|
||||
text-overflow: ellipsis !important;
|
||||
white-space: nowrap !important;
|
||||
}
|
||||
|
||||
/* Bookmark Hover - Only opacity and subtle effects */
|
||||
.bookmark-item:hover {
|
||||
opacity: var(--hover-opacity) !important;
|
||||
background: var(--hover-bg) !important;
|
||||
transform: none !important;
|
||||
}
|
||||
|
||||
/* Bookmark Icon Color on Hover */
|
||||
.bookmark-item:hover .toolbarbutton-icon {
|
||||
fill: var(--accent-color) !important;
|
||||
}
|
||||
|
||||
/* Bookmarks Chevron Button */
|
||||
#PlacesChevron {
|
||||
background: transparent !important;
|
||||
border: none !important;
|
||||
opacity: var(--inactive-opacity) !important;
|
||||
transition: var(--transition-smooth) !important;
|
||||
min-width: 20px !important;
|
||||
max-width: 20px !important;
|
||||
margin-left: 5px !important;
|
||||
}
|
||||
|
||||
#PlacesChevron:hover {
|
||||
opacity: var(--hover-opacity) !important;
|
||||
background: var(--hover-bg) !important;
|
||||
transform: none !important;
|
||||
}
|
||||
|
||||
/* ===========================
|
||||
🎛️ REFINED BUTTON SYSTEM
|
||||
=========================== */
|
||||
|
||||
/* 🔧 COMPREHENSIVE BUTTON SELECTOR - keeping normal behavior for urlbar buttons */
|
||||
toolbarbutton:not(.bookmark-item):not([id*="identity"]):not([id*="tracking"]):not([id*="star"]):not([id*="picture"]):not([id*="reader"]),
|
||||
.toolbarbutton-1:not(.bookmark-item):not([id*="identity"]):not([id*="tracking"]):not([id*="star"]):not([id*="picture"]):not([id*="reader"]),
|
||||
#back-button,
|
||||
#forward-button,
|
||||
#reload-button,
|
||||
#stop-button,
|
||||
#home-button,
|
||||
#library-button,
|
||||
#fxa-toolbar-menu-button,
|
||||
#unified-extensions-button,
|
||||
#downloads-button,
|
||||
#bookmarks-menu-button,
|
||||
#history-panelmenu,
|
||||
#appMenu-button,
|
||||
#PanelUI-menu-button,
|
||||
#sidebar-switcher-target toolbarbutton,
|
||||
#sidebar-box .sidebar-placesTree toolbarbutton,
|
||||
.sidebar-placesTreechildren toolbarbutton,
|
||||
#sidebar-header .sidebar-close-button,
|
||||
#sidebar-header toolbarbutton,
|
||||
.sidebar-panel toolbarbutton,
|
||||
#sidebar toolbarbutton,
|
||||
#context-navigation toolbarbutton,
|
||||
#context-sep-navigation + toolbarbutton,
|
||||
.unified-extensions-item-action-button,
|
||||
.panel-subview-footer-button,
|
||||
toolbarpaletteitem > toolbarbutton,
|
||||
.chromeclass-toolbar-additional toolbarbutton,
|
||||
#addon-bar toolbarbutton,
|
||||
.tabs-newtab-button,
|
||||
#new-tab-button,
|
||||
.tab-close-button,
|
||||
.close-button,
|
||||
.button-background {
|
||||
background: transparent !important;
|
||||
opacity: var(--inactive-opacity) !important;
|
||||
transition: var(--transition-smooth) !important;
|
||||
border-radius: var(--border-radius) !important;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
border: none !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
/* Keep urlbar buttons with their normal transparent behavior */
|
||||
#urlbar-container toolbarbutton,
|
||||
#urlbar toolbarbutton,
|
||||
#identity-permission-box,
|
||||
#identity-icon-box,
|
||||
#tracking-protection-icon-container,
|
||||
#star-button-box,
|
||||
#picture-in-picture-button,
|
||||
#reader-mode-button,
|
||||
#pageAction-urlbar-_testpilot-containers,
|
||||
#pageAction-panel-bookmark,
|
||||
#pageAction-panel-copyURL,
|
||||
#pageAction-panel-emailLink,
|
||||
#pageAction-panel-pinTab,
|
||||
#pageAction-panel-sendToDevice,
|
||||
#page-action-buttons > toolbarbutton,
|
||||
.urlbar-page-action {
|
||||
background: transparent !important;
|
||||
opacity: var(--inactive-opacity) !important;
|
||||
transition: var(--transition-smooth) !important;
|
||||
border-radius: var(--border-radius) !important;
|
||||
border: none !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
/* 🚫 FORCE NO BACKGROUNDS */
|
||||
#navigator-toolbox toolbarbutton:not(.bookmark-item),
|
||||
#navigator-toolbox .toolbarbutton-1:not(.bookmark-item),
|
||||
#nav-bar > * > toolbarbutton:not(.bookmark-item),
|
||||
#nav-bar > toolbarbutton:not(.bookmark-item),
|
||||
#nav-bar toolbarbutton:not(.bookmark-item),
|
||||
#nav-bar .toolbarbutton-1:not(.bookmark-item),
|
||||
#back-button,
|
||||
#forward-button,
|
||||
#reload-button,
|
||||
#stop-button,
|
||||
#home-button,
|
||||
#library-button,
|
||||
#fxa-toolbar-menu-button,
|
||||
#unified-extensions-button,
|
||||
#downloads-button,
|
||||
#bookmarks-menu-button,
|
||||
#history-panelmenu,
|
||||
#appMenu-button,
|
||||
#PanelUI-menu-button,
|
||||
#sidebar-switcher-target toolbarbutton,
|
||||
.toolbarbutton-1:not(.bookmark-item),
|
||||
.button-background {
|
||||
background-color: transparent !important;
|
||||
background-image: none !important;
|
||||
background: transparent !important;
|
||||
}
|
||||
|
||||
#navigator-toolbox toolbarbutton:not(.bookmark-item):hover,
|
||||
#navigator-toolbox .toolbarbutton-1:not(.bookmark-item):hover,
|
||||
#nav-bar > * > toolbarbutton:not(.bookmark-item):hover,
|
||||
#nav-bar > toolbarbutton:not(.bookmark-item):hover,
|
||||
#nav-bar toolbarbutton:not(.bookmark-item):hover,
|
||||
#nav-bar .toolbarbutton-1:not(.bookmark-item):hover,
|
||||
#back-button:hover,
|
||||
#forward-button:hover,
|
||||
#reload-button:hover,
|
||||
#stop-button:hover,
|
||||
#home-button:hover,
|
||||
#library-button:hover,
|
||||
#fxa-toolbar-menu-button:hover,
|
||||
#unified-extensions-button:hover,
|
||||
#downloads-button:hover,
|
||||
#bookmarks-menu-button:hover,
|
||||
#history-panelmenu:hover,
|
||||
#appMenu-button:hover,
|
||||
#PanelUI-menu-button:hover,
|
||||
#sidebar-switcher-target toolbarbutton:hover,
|
||||
.toolbarbutton-1:not(.bookmark-item):hover,
|
||||
.toolbarbutton-1:not(.bookmark-item):hover:active,
|
||||
.button-background:hover {
|
||||
background-color: transparent !important;
|
||||
background-image: none !important;
|
||||
background: transparent !important;
|
||||
}
|
||||
|
||||
/* 🎯 REFINED HOVER EFFECTS - subtle scale only */
|
||||
toolbarbutton:not(.bookmark-item):not([id*="identity"]):not([id*="tracking"]):not([id*="star"]):not([id*="picture"]):not([id*="reader"]):hover,
|
||||
.toolbarbutton-1:not(.bookmark-item):not([id*="identity"]):not([id*="tracking"]):not([id*="star"]):not([id*="picture"]):not([id*="reader"]):hover,
|
||||
#nav-bar toolbarbutton:not(.bookmark-item):hover,
|
||||
#nav-bar-customization-target > toolbarbutton:not(.bookmark-item):hover,
|
||||
#back-button:hover,
|
||||
#forward-button:hover,
|
||||
#reload-button:hover,
|
||||
#stop-button:hover,
|
||||
#home-button:hover,
|
||||
#library-button:hover,
|
||||
#fxa-toolbar-menu-button:hover,
|
||||
#unified-extensions-button:hover,
|
||||
#downloads-button:hover,
|
||||
#bookmarks-menu-button:hover,
|
||||
#history-panelmenu:hover,
|
||||
#appMenu-button:hover,
|
||||
#PanelUI-menu-button:hover,
|
||||
#sidebar-switcher-target toolbarbutton:hover,
|
||||
#sidebar-box .sidebar-placesTree toolbarbutton:hover,
|
||||
.sidebar-placesTreechildren toolbarbutton:hover,
|
||||
#sidebar-header .sidebar-close-button:hover,
|
||||
#sidebar-header toolbarbutton:hover,
|
||||
.sidebar-panel toolbarbutton:hover,
|
||||
#sidebar toolbarbutton:hover,
|
||||
#context-navigation toolbarbutton:hover,
|
||||
#context-sep-navigation + toolbarbutton:hover,
|
||||
.unified-extensions-item-action-button:hover,
|
||||
.panel-subview-footer-button:hover,
|
||||
toolbarpaletteitem > toolbarbutton:hover,
|
||||
.chromeclass-toolbar-additional toolbarbutton:hover,
|
||||
#addon-bar toolbarbutton:hover,
|
||||
.tabs-newtab-button:hover,
|
||||
#new-tab-button:hover,
|
||||
.tab-close-button:hover,
|
||||
.close-button:hover,
|
||||
.button-background:hover {
|
||||
opacity: var(--hover-opacity) !important;
|
||||
transform: scale(1.05) !important;
|
||||
}
|
||||
|
||||
/* Keep urlbar buttons transparent on hover */
|
||||
#urlbar-container toolbarbutton:hover,
|
||||
#urlbar toolbarbutton:hover,
|
||||
#identity-permission-box:hover,
|
||||
#identity-icon-box:hover,
|
||||
#tracking-protection-icon-container:hover,
|
||||
#star-button-box:hover,
|
||||
#picture-in-picture-button:hover,
|
||||
#reader-mode-button:hover,
|
||||
.urlbar-page-action:hover {
|
||||
opacity: var(--hover-opacity) !important;
|
||||
background: transparent !important;
|
||||
transform: scale(1.05) !important;
|
||||
}
|
||||
|
||||
/* 🎨 ICON COLOR CHANGE ON HOVER */
|
||||
toolbarbutton:not(.bookmark-item):hover image,
|
||||
.toolbarbutton-1:not(.bookmark-item):hover image,
|
||||
#nav-bar toolbarbutton:not(.bookmark-item):hover image,
|
||||
#urlbar toolbarbutton:hover image,
|
||||
#urlbar #identity-icon-box:hover image,
|
||||
#urlbar #identity-permission-box:hover image,
|
||||
#urlbar #tracking-protection-icon-container:hover image,
|
||||
#urlbar #star-button-box:hover image,
|
||||
#urlbar #picture-in-picture-button:hover image,
|
||||
#urlbar #reader-mode-button:hover image,
|
||||
.urlbar-page-action:hover image,
|
||||
#sidebar toolbarbutton:hover image,
|
||||
toolbarpaletteitem > toolbarbutton:hover image,
|
||||
.panel-subview-footer-button:hover image {
|
||||
fill: var(--accent-color) !important;
|
||||
filter: none !important;
|
||||
}
|
||||
|
||||
.button-background:hover {
|
||||
& img {
|
||||
fill: var(--accent-color) !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* 🌟 SPECIAL STATES */
|
||||
toolbarbutton[checked="true"]:not(.bookmark-item),
|
||||
toolbarbutton[open="true"]:not(.bookmark-item),
|
||||
.toolbarbutton-1[checked="true"]:not(.bookmark-item),
|
||||
.toolbarbutton-1[open="true"]:not(.bookmark-item),
|
||||
#downloads-button[attention="true"],
|
||||
#library-button[attention="true"] {
|
||||
opacity: var(--hover-opacity) !important;
|
||||
background: var(--accent-color-subtle) !important;
|
||||
}
|
||||
|
||||
/* ===========================
|
||||
🎭 ELEMENT VISIBILITY
|
||||
=========================== */
|
||||
|
||||
#identity-icon-box label {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
#sidebar-tools-and-extensions-splitter {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
#forward-button[disabled="true"] {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
toolbarbutton[label="Bookmarks toolbar items"] {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* ===========================
|
||||
🎮 WINDOW CONTROLS
|
||||
=========================== */
|
||||
|
||||
/* Normal Window */
|
||||
#main-window:not([tabsintitlebar]) .titlebar-buttonbox toolbarbutton,
|
||||
#main-window[tabsintitlebar]:not([sizemode="maximized"]) .titlebar-buttonbox toolbarbutton {
|
||||
opacity: var(--semi-opacity) !important;
|
||||
transform: scale(0.9) !important;
|
||||
transition: var(--transition-smooth) !important;
|
||||
fill: currentColor !important;
|
||||
color: inherit !important;
|
||||
}
|
||||
|
||||
/* Hover - Normal Window - subtle scaling */
|
||||
#main-window:not([tabsintitlebar]) .titlebar-buttonbox toolbarbutton:hover,
|
||||
#main-window[tabsintitlebar]:not([sizemode="maximized"]) .titlebar-buttonbox toolbarbutton:hover {
|
||||
opacity: var(--hover-opacity) !important;
|
||||
transform: scale(1.05) !important;
|
||||
color: var(--accent-color) !important;
|
||||
}
|
||||
|
||||
/* Maximized Window */
|
||||
#main-window[tabsintitlebar][sizemode="maximized"] .titlebar-buttonbox toolbarbutton,
|
||||
.titlebar-buttonbox toolbarbutton {
|
||||
opacity: var(--hover-opacity) !important;
|
||||
transform: scale(0.9) !important;
|
||||
transition: var(--transition-smooth) !important;
|
||||
fill: currentColor !important;
|
||||
color: inherit !important;
|
||||
}
|
||||
|
||||
/* Hover - Maximized Window - subtle scaling */
|
||||
.titlebar-buttonbox toolbarbutton:hover {
|
||||
transform: scale(1.05) !important;
|
||||
color: var(--accent-color) !important;
|
||||
}
|
||||
|
||||
/* ===========================
|
||||
✨ ANIMATIONS & KEYFRAMES
|
||||
=========================== */
|
||||
|
||||
/* URL Bar Expand Animation */
|
||||
@keyframes urlbarExpand {
|
||||
0% {
|
||||
opacity: 0;
|
||||
transform: scale(0.95) translateY(-5px);
|
||||
}
|
||||
70% {
|
||||
transform: scale(1.02) translateY(0);
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
transform: scale(1) translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
/* Tab Activation Animation */
|
||||
@keyframes tabActivate {
|
||||
0% {
|
||||
transform: scale(0.98);
|
||||
opacity: 0.8;
|
||||
}
|
||||
50% {
|
||||
transform: scale(1.02);
|
||||
}
|
||||
100% {
|
||||
transform: scale(1);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* Dropdown Slide Animation */
|
||||
#urlbar-results {
|
||||
animation: slideDown 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55) !important;
|
||||
}
|
||||
|
||||
@keyframes slideDown {
|
||||
0% {
|
||||
opacity: 0;
|
||||
transform: translateY(-15px) scale(0.95);
|
||||
}
|
||||
60% {
|
||||
transform: translateY(2px) scale(1.01);
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
transform: translateY(0) scale(1);
|
||||
}
|
||||
}
|
||||
|
||||
/* Loading Indicator */
|
||||
.tab-throbber {
|
||||
transition: var(--transition-smooth) !important;
|
||||
}
|
||||
|
||||
.tab-throbber[busy] {
|
||||
animation: pulse 1.5s ease-in-out infinite;
|
||||
}
|
||||
|
||||
@keyframes pulse {
|
||||
0%, 100% { opacity: 1; }
|
||||
50% { opacity: 0.6; }
|
||||
}
|
||||
|
||||
/* Button Press Animation */
|
||||
@keyframes buttonPress {
|
||||
0% { transform: scale(1); }
|
||||
50% { transform: scale(0.95); }
|
||||
100% { transform: scale(1.05); }
|
||||
}
|
||||
|
||||
/* Bookmark Button Animation */
|
||||
toolbarbutton:not(.bookmark-item):active,
|
||||
.toolbarbutton-1:not(.bookmark-item):active {
|
||||
animation: buttonPress 0.15s ease-out !important;
|
||||
}
|
||||
'';
|
||||
userContent = ''
|
||||
/* ===================================================================
|
||||
LATIN ACCENT - FIREFOX TRANSPARENT THEME
|
||||
Made with cariño by Acercandr0
|
||||
=================================================================== */
|
||||
|
||||
@-moz-document url("about:home"), url("about:newtab"), url("about:blank") {
|
||||
html,
|
||||
body,
|
||||
#root,
|
||||
.outer-wrapper,
|
||||
main,
|
||||
.discovery-stream,
|
||||
.ds-layout,
|
||||
.sections-list,
|
||||
.top-sites,
|
||||
.search-wrapper {
|
||||
background: transparent !important;
|
||||
background-color: transparent !important;
|
||||
background-image: none !important;
|
||||
box-shadow: none !important;
|
||||
filter: none !important;
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
/* ===========================
|
||||
🎯 TOP SITES
|
||||
=========================== */
|
||||
|
||||
/* Remove ALL backgrounds from top sites */
|
||||
.top-sites .top-site-outer,
|
||||
.top-sites .top-site-inner,
|
||||
.top-site-outer .tile,
|
||||
.tile,
|
||||
.shortcuts-refresh .top-sites-list .top-site-outer .tile,
|
||||
.shortcuts-refresh .top-sites-list:not(.dnd-active) .top-site-outer:is(.active, :focus, :hover) .tile {
|
||||
background: transparent !important;
|
||||
background-color: transparent !important;
|
||||
background-image: none !important;
|
||||
box-shadow: none !important;
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
/* Only opacity changes on hover */
|
||||
.top-sites .top-site-outer {
|
||||
opacity: 0.3 !important;
|
||||
transition: opacity 0.3s ease !important;
|
||||
}
|
||||
|
||||
.top-sites .top-site-outer:hover {
|
||||
opacity: 1 !important;
|
||||
}
|
||||
|
||||
/* Force transparent background for topsites section */
|
||||
.top-sites {
|
||||
--newtab-background-color-secondary: transparent !important;
|
||||
}
|
||||
|
||||
/* ===========================
|
||||
🛠️ CUSTOMIZE MENU FIX
|
||||
=========================== */
|
||||
|
||||
/* Restore proper background for customize menu */
|
||||
.customize-menu,
|
||||
.customize-menu.customize-animate-enter-done {
|
||||
background: var(--newtab-background-color) !important;
|
||||
background-color: var(--newtab-background-color) !important;
|
||||
}
|
||||
|
||||
/* Ensure customize menu has proper styling */
|
||||
.customize-menu {
|
||||
box-shadow: none !important;
|
||||
border: none !important;
|
||||
border-radius: 0px !important;
|
||||
}
|
||||
|
||||
/* Fix text visibility in customize menu */
|
||||
.customize-menu .section-title,
|
||||
.customize-menu .section-disclaimer,
|
||||
.customize-menu .personalize-button,
|
||||
.customize-menu label,
|
||||
.customize-menu input,
|
||||
.customize-menu button {
|
||||
color: var(--newtab-text-primary-color) !important }
|
||||
}
|
||||
|
||||
/* ===========================
|
||||
🎭 HIDE ELEMENTS
|
||||
=========================== */
|
||||
|
||||
/* Recent Activity */
|
||||
.body-wrapper.on .section-title,
|
||||
.body-wrapper.on .sections-list .section:last-of-type,
|
||||
.body-wrapper.on .topics {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* Search bar */
|
||||
.search-wrapper .search-inner-wrapper {
|
||||
display: none !important;
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
236
modules/hyprland/config.nix
Normal file
@@ -0,0 +1,236 @@
|
||||
{ config, pkgs, ... }: {
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
settings = {
|
||||
monitor = [ ",preferred,auto,auto" ];
|
||||
|
||||
exec-once = [
|
||||
"${pkgs.swww}/bin/swww-daemon &"
|
||||
"networkmanagerapplet --indicator &"
|
||||
"$HOME/.local/share/bin/set-wallpaper.sh &"
|
||||
"${pkgs.procps}/bin/pkill -f '/bin/stash watch' || true"
|
||||
"${pkgs.pyprland}/bin/pypr &"
|
||||
];
|
||||
|
||||
env = [
|
||||
"PATH,$PATH:$HOME/.local/share/bin"
|
||||
];
|
||||
|
||||
input = {
|
||||
kb_layout = "us,us";
|
||||
kb_variant = ",dvorak";
|
||||
kb_options = "grp:alt_shift_toggle";
|
||||
follow_mouse = 1;
|
||||
sensitivity = 0;
|
||||
force_no_accel = 1;
|
||||
numlock_by_default = true;
|
||||
touchpad.natural_scroll = false;
|
||||
};
|
||||
|
||||
device = [
|
||||
{
|
||||
name = "epic mouse V1";
|
||||
sensitivity = -0.5;
|
||||
}
|
||||
];
|
||||
|
||||
dwindle = {
|
||||
pseudotile = true;
|
||||
preserve_split = true;
|
||||
single_window_aspect_ratio = "1 1";
|
||||
};
|
||||
|
||||
master.new_status = "master";
|
||||
|
||||
general = {
|
||||
gaps_in = 2;
|
||||
gaps_out = 4;
|
||||
border_size = 2;
|
||||
};
|
||||
|
||||
decoration = {
|
||||
rounding = 0;
|
||||
blur = {
|
||||
enabled = true;
|
||||
size = 6;
|
||||
passes = 4;
|
||||
};
|
||||
};
|
||||
|
||||
animations = {
|
||||
enabled = true;
|
||||
bezier = [
|
||||
"myBezier, 0.05, 0.9, 0.1, 1.05"
|
||||
"dropdownCurve, 0.34, 1.56, 0.64, 1"
|
||||
];
|
||||
animation = [
|
||||
"windows, 1, 3, myBezier"
|
||||
"border, 1, 10, default"
|
||||
"fade, 1, 10, default"
|
||||
"workspaces, 1, 2, default"
|
||||
"windowsMove, 1, 2, dropdownCurve"
|
||||
];
|
||||
};
|
||||
|
||||
misc = {
|
||||
vrr = 0;
|
||||
disable_hyprland_logo = true;
|
||||
disable_splash_rendering = true;
|
||||
force_default_wallpaper = 0;
|
||||
};
|
||||
|
||||
xwayland.force_zero_scaling = true;
|
||||
|
||||
bindm = [
|
||||
# "SUPER, mouse_down, exec, $HOME/.local/share/bin/switch-workspace.sh down"
|
||||
# "SUPER, mouse_up, exec, $HOME/.local/share/bin/switch-workspace.sh up"
|
||||
"SUPER, mouse:272, movewindow"
|
||||
"SUPER, Z, movewindow"
|
||||
"SUPER, X, resizewindow"
|
||||
];
|
||||
|
||||
bind = [
|
||||
"SUPER, Q, exec, $HOME/.local/share/bin/dontkillsteam.sh"
|
||||
"ALT, F4, exec, $HOME/.local/share/bin/dontkillsteam.sh"
|
||||
"SUPER, Delete, exit"
|
||||
"SUPER, W, togglefloating"
|
||||
"SUPER, G, togglegroup"
|
||||
"ALT, Return, fullscreen"
|
||||
"SUPER, L, exec, hyprlock"
|
||||
"SUPER+SHIFT, F, exec, $HOME/.local/share/bin/windowpin.sh"
|
||||
"SUPER, Backspace, exec, wlogout"
|
||||
"SUPER+CTRL+ALT, Backspace, exec, $HOME/.local/share/bin/center-window.sh"
|
||||
|
||||
"SUPER, T, exec, kitty"
|
||||
"SUPER, return, exec, kitty"
|
||||
"SUPER, E, exec, kitty -e yazi"
|
||||
"SUPER, C, exec, kitty -e nvim"
|
||||
"SUPER, F, exec, firefox"
|
||||
"SUPER+ALT, T, exec, pypr toggle term"
|
||||
|
||||
|
||||
"SUPER, A, exec, pkill -x rofi || $HOME/.local/share/bin/rofilaunch.sh d"
|
||||
"SUPER, Tab, exec, pkill -x rofi || $HOME/.local/share/bin/rofilaunch.sh w"
|
||||
"SUPER+SHIFT, E, exec, pkill -x rofi || $HOME/.local/share/bin/rofilaunch.sh f"
|
||||
|
||||
"SUPER, V, exec, $HOME/.dotfiles/scripts/cliphist-paste.sh"
|
||||
"CTRL SHIFT, ESCAPE, exec, kitty -e btop -t"
|
||||
|
||||
"SUPER, B, exec, sh -c 'systemctl --user is-active waybar && systemctl --user stop waybar || systemctl --user start waybar'"
|
||||
|
||||
"SUPER, K, exec, $HOME/.local/share/bin/keybinds_hint.sh"
|
||||
|
||||
"SUPER+ALT, A, exec, android-emulator"
|
||||
|
||||
"SUPER, N, exec, swaync-client -t"
|
||||
|
||||
", F10, exec, $HOME/.local/share/bin/volumecontrol.sh -o m"
|
||||
", F11, exec, $HOME/.local/share/bin/volumecontrol.sh -o d"
|
||||
", F12, exec, $HOME/.local/share/bin/volumecontrol.sh -o i"
|
||||
|
||||
", XF86AudioMute, exec, $HOME/.local/share/bin/volumecontrol.sh -o m"
|
||||
", XF86AudioLowerVolume, exec, $HOME/.local/share/bin/volumecontrol.sh -o d"
|
||||
", XF86AudioRaiseVolume, exec, $HOME/.local/share/bin/volumecontrol.sh -o i"
|
||||
", XF86AudioPlay, exec, playerctl play-pause"
|
||||
", XF86AudioNext, exec, playerctl next"
|
||||
", XF86AudioPrev, exec, playerctl previous"
|
||||
|
||||
", XF86MonBrightnessUp, exec, $HOME/.local/share/bin/brightnesscontrol.sh i"
|
||||
", XF86MonBrightnessDown, exec, $HOME/.local/share/bin/brightnesscontrol.sh d"
|
||||
|
||||
"SUPER, P, exec, $HOME/.local/share/bin/screenshot.sh s"
|
||||
"SUPER+CTRL, P, exec, $HOME/.local/share/bin/screenshot.sh sf"
|
||||
"SUPER+ALT, P, exec, $HOME/.local/share/bin/screenshot.sh m"
|
||||
", Print, exec, $HOME/.local/share/bin/screenshot.sh p"
|
||||
|
||||
"SUPER+ALT, G, exec, $HOME/.local/share/bin/gamemode.sh"
|
||||
"SUPER+ALT, Right, exec, $HOME/.local/share/bin/set-wallpaper.sh next"
|
||||
"SUPER+ALT, Left, exec, $HOME/.local/share/bin/set-wallpaper.sh prev"
|
||||
"SUPER+SHIFT, W, exec, $HOME/.local/share/bin/set-wallpaper.sh rofi"
|
||||
|
||||
"SUPER, Left, movefocus, l"
|
||||
"SUPER, Right, movefocus, r"
|
||||
"SUPER, Up, movefocus, u"
|
||||
"SUPER, Down, movefocus, d"
|
||||
"ALT, <Tab>, movefocus, d"
|
||||
|
||||
"SUPER+Ctrl, Down, workspace, empty"
|
||||
|
||||
"SUPER+Shift, Right, resizeactive, 30 0"
|
||||
"SUPER+Shift, Left, resizeactive, -30 0"
|
||||
"SUPER+Shift, Up, resizeactive, 0 -30"
|
||||
"SUPER+Shift, Down, resizeactive, 0 30"
|
||||
"SUPER+Shift, minus, resizeactive, -30% -30%"
|
||||
"SUPER+Shift, equal, resizeactive, 30% 30%"
|
||||
|
||||
|
||||
"SUPER+SHIFT+CTRL, left, exec, $HOME/.local/share/bin/move-floating.sh l"
|
||||
"SUPER+SHIFT+CTRL, right, exec, $HOME/.local/share/bin/move-floating.sh r"
|
||||
"SUPER+SHIFT+CTRL, up, exec, $HOME/.local/share/bin/move-floating.sh u"
|
||||
"SUPER+SHIFT+CTRL, down, exec, $HOME/.local/share/bin/move-floating.sh d"
|
||||
|
||||
"SUPER, 1, workspace, 1"
|
||||
"SUPER, 2, workspace, 2"
|
||||
"SUPER, 3, workspace, 3"
|
||||
"SUPER, 4, workspace, 4"
|
||||
"SUPER, 5, workspace, 5"
|
||||
"SUPER, 6, workspace, 6"
|
||||
"SUPER, 7, workspace, 7"
|
||||
"SUPER, 8, workspace, 8"
|
||||
"SUPER, 9, workspace, 9"
|
||||
"SUPER, 0, workspace, 10"
|
||||
|
||||
"SUPER+SHIFT, 1, movetoworkspace, 1"
|
||||
"SUPER+SHIFT, 2, movetoworkspace, 2"
|
||||
"SUPER+SHIFT, 3, movetoworkspace, 3"
|
||||
"SUPER+SHIFT, 4, movetoworkspace, 4"
|
||||
"SUPER+SHIFT, 5, movetoworkspace, 5"
|
||||
"SUPER+SHIFT, 6, movetoworkspace, 6"
|
||||
"SUPER+SHIFT, 7, movetoworkspace, 7"
|
||||
"SUPER+SHIFT, 8, movetoworkspace, 8"
|
||||
"SUPER+SHIFT, 9, movetoworkspace, 9"
|
||||
"SUPER+SHIFT, 0, movetoworkspace, 10"
|
||||
|
||||
"SUPER+Alt, S, movetoworkspacesilent, special"
|
||||
"SUPER, S, togglespecialworkspace"
|
||||
|
||||
"SUPER, J, togglesplit"
|
||||
|
||||
"SUPER+Alt, 1, movetoworkspacesilent, 1"
|
||||
"SUPER+Alt, 2, movetoworkspacesilent, 2"
|
||||
"SUPER+Alt, 3, movetoworkspacesilent, 3"
|
||||
"SUPER+Alt, 4, movetoworkspacesilent, 4"
|
||||
"SUPER+Alt, 5, movetoworkspacesilent, 5"
|
||||
"SUPER+Alt, 6, movetoworkspacesilent, 6"
|
||||
"SUPER+Alt, 7, movetoworkspacesilent, 7"
|
||||
"SUPER+Alt, 8, movetoworkspacesilent, 8"
|
||||
"SUPER+Alt, 9, movetoworkspacesilent, 9"
|
||||
"SUPER+Alt, 0, movetoworkspacesilent, 10"
|
||||
];
|
||||
};
|
||||
|
||||
extraConfig = ''
|
||||
source = ~/.cache/wal/colors-hyprland.conf
|
||||
|
||||
general {
|
||||
col.active_border = $color4
|
||||
col.inactive_border = $color8
|
||||
}
|
||||
'';
|
||||
};
|
||||
systemd.user.services.cliphist-watcher = {
|
||||
Unit = {
|
||||
Description = "Wayland clipboard watcher for cliphist";
|
||||
PartOf = [ "hyprland-session.target" ];
|
||||
After = [ "hyprland-session.target" ];
|
||||
};
|
||||
|
||||
Service = {
|
||||
ExecStart = "/run/current-system/sw/bin/wl-paste --watch /run/current-system/sw/bin/cliphist store";
|
||||
Restart = "always";
|
||||
RestartSec = 1;
|
||||
};
|
||||
|
||||
Install.WantedBy = [ "hyprland-session.target" ];
|
||||
};
|
||||
}
|
||||
10
modules/hyprland/default.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
{ inputs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./hyprland.nix
|
||||
./hyprlock.nix
|
||||
# ./hypridle.nix
|
||||
./config.nix
|
||||
./pyprland.nix
|
||||
];
|
||||
}
|
||||
26
modules/hyprland/hypridle.nix
Normal file
@@ -0,0 +1,26 @@
|
||||
{...}: {
|
||||
services = {
|
||||
hypridle = {
|
||||
enable = true;
|
||||
systemdTarget = "hyprland-session.target";
|
||||
settings = {
|
||||
general = {
|
||||
after_sleep_cmd = "hyprctl dispatch dpms on";
|
||||
ignore_dbus_inhibit = false;
|
||||
lock_cmd = "hyprlock";
|
||||
};
|
||||
listener = [
|
||||
{
|
||||
timeout = 900;
|
||||
on-timeout = "hyprlock";
|
||||
}
|
||||
{
|
||||
timeout = 1200;
|
||||
on-timeout = "hyprctl dispatch dpms off";
|
||||
on-resume = "hyprctl dispatch dpms on";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
23
modules/hyprland/hyprland.nix
Normal file
@@ -0,0 +1,23 @@
|
||||
{ inputs, pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
swww
|
||||
# hyprpicker
|
||||
# wofi
|
||||
];
|
||||
systemd.user.targets.hyprland-session.Unit.Wants = [ "xdg-desktop-autostart.target" ];
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
xwayland = {
|
||||
enable = true;
|
||||
# hidpi = true;
|
||||
};
|
||||
# enableNvidiaPatches = false;
|
||||
# systemd.enable = true;
|
||||
};
|
||||
wayland.windowManager.hyprland.extraConfig = ''
|
||||
source = ~/.config/hypr/monitors.conf
|
||||
source = ~/.config/hypr/workspaces.conf
|
||||
'';
|
||||
|
||||
}
|
||||
71
modules/hyprland/hyprlock.nix
Normal file
@@ -0,0 +1,71 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
programs.hyprlock = {
|
||||
enable = true;
|
||||
settings = {
|
||||
general = {
|
||||
disable_loading_bar = true;
|
||||
grace = 10;
|
||||
hide_cursor = true;
|
||||
no_fade_in = false;
|
||||
};
|
||||
background = [
|
||||
{
|
||||
# Wallpaper path will be managed by set-wallpaper.sh script
|
||||
# which symlinks the current wallpaper to this location
|
||||
path = "$HOME/.cache/hyprlock_wallpaper";
|
||||
blur_passes = 3;
|
||||
blur_size = 3;
|
||||
}
|
||||
];
|
||||
image = [
|
||||
{
|
||||
path = "$HOME/.dotfiles/modules/fastfetch/me.png";
|
||||
size = 150;
|
||||
border_size = 4;
|
||||
# Border color will use color4 from pywal
|
||||
border_color = "rgb(142, 115, 113)";
|
||||
rounding = -1; # Negative means circle
|
||||
position = "0, 200";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
}
|
||||
];
|
||||
label = [
|
||||
{
|
||||
# Media player information
|
||||
monitor = "";
|
||||
text = "cmd[update:1000] $HOME/.local/share/bin/media-player-info.sh";
|
||||
text_align = "center";
|
||||
font_size = 12;
|
||||
font_family = "Monospace";
|
||||
position = "0, 100";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
color = "rgb(205, 188, 187)";
|
||||
}
|
||||
];
|
||||
input-field = [
|
||||
{
|
||||
size = "200, 50";
|
||||
position = "0, -80";
|
||||
monitor = "";
|
||||
dots_center = true;
|
||||
fade_on_empty = false;
|
||||
# Foreground color from pywal
|
||||
font_color = "rgb(205, 188, 187)";
|
||||
# Color2 from pywal for inner color
|
||||
inner_color = "rgb(118, 96, 95)";
|
||||
# Background from pywal for outer color
|
||||
outer_color = "rgb(10, 10, 10)";
|
||||
outline_thickness = 5;
|
||||
placeholder_text = "Password...";
|
||||
shadow_passes = 2;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
17
modules/hyprland/pyprland.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [pyprland];
|
||||
|
||||
home.file.".config/hypr/pyprland.toml".text = ''
|
||||
[pyprland]
|
||||
plugins = ["scratchpads"]
|
||||
|
||||
[scratchpads.term]
|
||||
animation = "fromTop"
|
||||
command = "kitty --class floating-term"
|
||||
class = "floating-term"
|
||||
size = "60% 60%"
|
||||
position = "center"
|
||||
on_open = "move cursor 0 0"
|
||||
lazy = true
|
||||
'';
|
||||
}
|
||||
4
modules/kitty/default.nix
Normal file
@@ -0,0 +1,4 @@
|
||||
{ inputs, ... }:
|
||||
{
|
||||
imports = [ (import ./kitty.nix) ];
|
||||
}
|
||||
54
modules/kitty/kitty.nix
Normal file
@@ -0,0 +1,54 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
|
||||
font = {
|
||||
name = "JetBrainsMono Nerd Font";
|
||||
size = 12;
|
||||
};
|
||||
|
||||
settings = {
|
||||
confirm_os_window_close = 0;
|
||||
window_padding_width = 10;
|
||||
scrollback_lines = 10000;
|
||||
enable_audio_bell = false;
|
||||
mouse_hide_wait = 60;
|
||||
|
||||
tab_title_template = "{index}";
|
||||
active_tab_font_style = "normal";
|
||||
inactive_tab_font_style = "normal";
|
||||
|
||||
tab_bar_style = "powerline";
|
||||
tab_powerline_style = "round";
|
||||
|
||||
active_tab_foreground = "#1e1e2e";
|
||||
active_tab_background = "#cba6f7";
|
||||
inactive_tab_foreground = "#bac2de";
|
||||
inactive_tab_background = "#313244";
|
||||
};
|
||||
|
||||
keybindings = {
|
||||
"alt+1" = "goto_tab 1";
|
||||
"alt+2" = "goto_tab 2";
|
||||
"alt+3" = "goto_tab 3";
|
||||
"alt+4" = "goto_tab 4";
|
||||
"ctrl+v" = "paste_from_clipboard";
|
||||
|
||||
"ctrl+shift+left" = "no_op";
|
||||
"ctrl+shift+right" = "no_op";
|
||||
};
|
||||
|
||||
extraConfig = ''
|
||||
export QT_QPA_PLATFORMTHEME=qt5ct
|
||||
export QT_STYLE_OVERRIDE=kvantum
|
||||
|
||||
mouse_map right press ungrabbed paste_from_clipboard
|
||||
mouse_map right press grabbed paste_from_clipboard
|
||||
|
||||
# Load pywal colors if they exist
|
||||
include ~/.cache/wal/colors-kitty.conf
|
||||
'';
|
||||
};
|
||||
}
|
||||
45
modules/lightdm/aqua-theme.nix
Normal file
@@ -0,0 +1,45 @@
|
||||
{ pkgs, lib, config, ... }:
|
||||
|
||||
let
|
||||
aqua-theme = pkgs.stdenv.mkDerivation {
|
||||
pname = "aqua-lightdm-webkit-theme";
|
||||
version = "1.0";
|
||||
|
||||
src = pkgs.fetchzip {
|
||||
url = "https://github.com/paysonwallach/aqua-lightdm-webkit-theme/archive/master.zip";
|
||||
sha256 = "sha256-+nn2JN+l/SF6fNH/caT/JIptHilRdwLZ7FlFMD68VxA=";
|
||||
stripRoot = true;
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/share/lightdm-webkit/themes/aqua
|
||||
cp -r . $out/share/lightdm-webkit/themes/aqua/
|
||||
'';
|
||||
|
||||
meta = with pkgs.lib; {
|
||||
description = "macOS-inspired LightDM Webkit greeter theme";
|
||||
homepage = "https://github.com/paysonwallach/aqua-lightdm-webkit-theme";
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
config = lib.mkIf config.services.xserver.displayManager.lightdm.enable {
|
||||
# Install the aqua theme (for future webkit greeter use)
|
||||
environment.systemPackages = [
|
||||
aqua-theme
|
||||
];
|
||||
|
||||
# Create symlink for theme to be accessible to lightdm
|
||||
system.activationScripts.aqua-lightdm-theme = {
|
||||
text = ''
|
||||
mkdir -p /usr/share/lightdm-webkit/themes
|
||||
if [ -L /usr/share/lightdm-webkit/themes/aqua ]; then
|
||||
rm /usr/share/lightdm-webkit/themes/aqua
|
||||
fi
|
||||
ln -sf ${aqua-theme}/share/lightdm-webkit/themes/aqua /usr/share/lightdm-webkit/themes/aqua
|
||||
'';
|
||||
deps = [];
|
||||
};
|
||||
};
|
||||
}
|
||||
6
modules/lightdm/default.nix
Normal file
@@ -0,0 +1,6 @@
|
||||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./aqua-theme.nix
|
||||
];
|
||||
}
|
||||
14
modules/misc/btop.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.btop = {
|
||||
enable = true;
|
||||
settings = {
|
||||
# color_theme = "gruvbox-dark"; # You can change this to any other theme
|
||||
theme_background = false;
|
||||
vim_keys = true;
|
||||
# You can add more settings from: https://github.com/aristocratos/btop#configuration
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
17
modules/misc/default.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
imports = [
|
||||
# ./discord.nix
|
||||
./git.nix
|
||||
./gtk.nix
|
||||
./btop.nix
|
||||
./pipewire.nix
|
||||
./pywal.nix
|
||||
./obsidian.nix
|
||||
./obs-studio.nix
|
||||
./dunst.nix
|
||||
# ./sddm.nix
|
||||
./spotify.nix
|
||||
./zsh.nix
|
||||
./zoxide.nix
|
||||
];
|
||||
}
|
||||
8
modules/misc/discord.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
(discord.override {
|
||||
withVencord = true;
|
||||
})
|
||||
];
|
||||
}
|
||||
58
modules/misc/dunst.nix
Normal file
@@ -0,0 +1,58 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
dunst
|
||||
jq
|
||||
];
|
||||
|
||||
home.file.".config/dunst/dunstrc".text = ''
|
||||
#!/usr/bin/env sh
|
||||
WAL_COLORS="$HOME/.cache/wal/colors.json"
|
||||
|
||||
if [ -f "$WAL_COLORS" ]; then
|
||||
BG=$(jq -r '.special.background' "$WAL_COLORS")
|
||||
FG=$(jq -r '.special.foreground' "$WAL_COLORS")
|
||||
LOW=$(jq -r '.colors.color2' "$WAL_COLORS")
|
||||
NORMAL=$(jq -r '.colors.color1' "$WAL_COLORS")
|
||||
CRITICAL=$(jq -r '.colors.color3' "$WAL_COLORS")
|
||||
else
|
||||
BG="#0f1016"
|
||||
FG="#c6c3da"
|
||||
LOW="#6F6C91"
|
||||
NORMAL="#6B6691"
|
||||
CRITICAL="#877AB1"
|
||||
fi
|
||||
|
||||
cat <<EOL > "$HOME/.config/dunst/dunstrc"
|
||||
[global]
|
||||
font = Monospace 10
|
||||
geometry = "300x50-10+50"
|
||||
timeouts = { low = 1000, normal = 1500, critical = 3000 }
|
||||
frame_color = "$NORMAL"
|
||||
background = "$BG"
|
||||
foreground = "$FG"
|
||||
separator_height = 2
|
||||
padding = 8
|
||||
transparency = 10
|
||||
sort = newest
|
||||
ignore_new_urgency = false
|
||||
|
||||
[urgency_low]
|
||||
background = "$BG"
|
||||
foreground = "$FG"
|
||||
frame_color = "$LOW"
|
||||
|
||||
[urgency_normal]
|
||||
background = "$BG"
|
||||
foreground = "$FG"
|
||||
frame_color = "$NORMAL"
|
||||
|
||||
[urgency_critical]
|
||||
background = "$BG"
|
||||
foreground = "$FG"
|
||||
frame_color = "$CRITICAL"
|
||||
EOL
|
||||
'';
|
||||
}
|
||||
|
||||
21
modules/misc/git.nix
Normal file
@@ -0,0 +1,21 @@
|
||||
{ pkgs, ... }: {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
user.name = "gibbyDev";
|
||||
user.email = "gibbyDEV@protonmail.com";
|
||||
init.defaultBranch = "main";
|
||||
credential.helper = "store";
|
||||
};
|
||||
};
|
||||
|
||||
home.packages = [
|
||||
pkgs.gh
|
||||
pkgs.git-lfs
|
||||
pkgs.copilot-cli
|
||||
pkgs.noto-fonts
|
||||
pkgs.noto-fonts-color-emoji # renamed
|
||||
];
|
||||
}
|
||||
|
||||
60
modules/misc/gtk.nix
Normal file
@@ -0,0 +1,60 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
cacheDir = config.xdg.cacheHome;
|
||||
isValidUser = config.home.username != "cody";
|
||||
in
|
||||
{
|
||||
fonts.fontconfig.enable = true;
|
||||
|
||||
home.packages = with pkgs; [
|
||||
nerd-fonts.jetbrains-mono
|
||||
twemoji-color-font
|
||||
noto-fonts-color-emoji
|
||||
];
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
|
||||
font = {
|
||||
name = "JetBrainsMono Nerd Font";
|
||||
size = 11;
|
||||
};
|
||||
|
||||
theme = {
|
||||
name = "Adwaita-dark";
|
||||
package = pkgs.gnome-themes-extra;
|
||||
};
|
||||
|
||||
iconTheme = {
|
||||
name = "Papirus-Dark";
|
||||
package = pkgs.papirus-icon-theme;
|
||||
};
|
||||
|
||||
cursorTheme = {
|
||||
name = "Bibata-Modern-Classic";
|
||||
package = pkgs.bibata-cursors;
|
||||
size = 16;
|
||||
};
|
||||
|
||||
gtk3.extraCss = lib.mkIf isValidUser ''
|
||||
@import url("file://${cacheDir}/wal/colors.css");
|
||||
'';
|
||||
|
||||
gtk4.extraCss = lib.mkIf isValidUser ''
|
||||
@import url("file://${cacheDir}/wal/colors.css");
|
||||
'';
|
||||
};
|
||||
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme.name = "gtk";
|
||||
style.name = "adwaita-dark";
|
||||
};
|
||||
|
||||
home.pointerCursor = {
|
||||
name = "Bibata-Modern-Classic";
|
||||
package = pkgs.bibata-cursors;
|
||||
size = 16;
|
||||
};
|
||||
}
|
||||
35
modules/misc/obs-studio.nix
Normal file
@@ -0,0 +1,35 @@
|
||||
{ pkgs, config, ... }: {
|
||||
programs.obs-studio = {
|
||||
enable = true;
|
||||
#enableVirtualCamera = true;
|
||||
plugins = with pkgs.obs-studio-plugins; [
|
||||
wlrobs
|
||||
obs-pipewire-audio-capture
|
||||
obs-vkcapture
|
||||
obs-source-clone
|
||||
obs-move-transition
|
||||
obs-composite-blur
|
||||
obs-backgroundremoval
|
||||
];
|
||||
};
|
||||
|
||||
# Create Videos directory for OBS recordings
|
||||
home.file."Videos/.keep".text = "";
|
||||
|
||||
# Configure OBS to use ~/Videos for recordings
|
||||
home.file.".config/obs-studio/basic/profiles/Untitled/basic.ini" = {
|
||||
text = ''
|
||||
[Output]
|
||||
FilePath=${config.home.homeDirectory}/Videos
|
||||
FilenameFormatting=%CCYY-%MM-%DD %HH-%mm-%SS
|
||||
'';
|
||||
};
|
||||
|
||||
# Also set the global OBS settings to use Videos directory
|
||||
home.file.".config/obs-studio/global.ini" = {
|
||||
text = ''
|
||||
[General]
|
||||
RecordPath=${config.home.homeDirectory}/Videos
|
||||
'';
|
||||
};
|
||||
}
|
||||
33
modules/misc/obsidian.nix
Normal file
@@ -0,0 +1,33 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [ obsidian ];
|
||||
|
||||
# NOTE: vault is at ~/Documents/Notebook
|
||||
# Commented out symlink due to pure eval restrictions
|
||||
# home.file.".config/obsidian" = {
|
||||
# source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/Documents/Notebook";
|
||||
# };
|
||||
|
||||
# systemd.user.services.obsidian-git-sync = {
|
||||
# Unit = {
|
||||
# Description = "Auto-commit and push Obsidian Vault";
|
||||
# After = [ "network-online.target" ];
|
||||
# };
|
||||
|
||||
# Service = {
|
||||
# ExecStart = pkgs.writeShellScript "obsidian-git-sync" ''
|
||||
# cd ${vaultPath}
|
||||
# if [ -n "$(git status --porcelain)" ]; then
|
||||
# git add .
|
||||
# git commit -m "Auto-sync: $(date)"
|
||||
# git push origin main
|
||||
# fi
|
||||
# '';
|
||||
# Restart = "always";
|
||||
# };
|
||||
|
||||
# Install = { WantedBy = [ "default.target" ]; };
|
||||
# };
|
||||
}
|
||||
|
||||
29
modules/misc/pipewire.nix
Normal file
@@ -0,0 +1,29 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Enable PipeWire
|
||||
# services.pipewire = {
|
||||
# enable = true;
|
||||
# audio.enable = true;
|
||||
# alsa = {
|
||||
# enable = true;
|
||||
# support32Bit = true;
|
||||
# };
|
||||
# pulse.enable = true;
|
||||
# jack.enable = true;
|
||||
# };
|
||||
|
||||
# Enable real-time scheduling for better audio performance
|
||||
# security.rtkit.enable = true;
|
||||
|
||||
# Disable PulseAudio (ensure it's removed if previously enabled)
|
||||
# hardware.pulseaudio.enable = false;
|
||||
|
||||
# Optional: Install `pavucontrol` for a GUI to manage audio
|
||||
home.packages = with pkgs; [
|
||||
pavucontrol
|
||||
helvum # For managing audio routing visually
|
||||
qpwgraph # Graph-based PipeWire manager
|
||||
];
|
||||
}
|
||||
|
||||
38
modules/misc/pywal.nix
Normal file
@@ -0,0 +1,38 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
config = lib.mkIf config.programs.pywal.enable {
|
||||
home.sessionVariables = {
|
||||
PYWAL_CACHE_DIR = "${config.xdg.cacheHome}/wal";
|
||||
};
|
||||
|
||||
home.file.".config/waybar/colors.css".source =
|
||||
"${config.xdg.cacheHome}/wal/colors-waybar.css";
|
||||
|
||||
home.file.".config/rofi/colors.rasi".text = ''
|
||||
* {
|
||||
background: #''${palette.background};
|
||||
foreground: #''${palette.foreground};
|
||||
normal-background: #''${palette.background};
|
||||
normal-foreground: #''${palette.foreground};
|
||||
alternate-normal-background: #''${palette.background};
|
||||
alternate-normal-foreground: #''${palette.foreground};
|
||||
selected-normal-background: #''${palette.color7};
|
||||
selected-normal-foreground: #''${palette.background};
|
||||
active-background: #''${palette.background};
|
||||
active-foreground: #''${palette.color2};
|
||||
alternate-active-background: #''${palette.background};
|
||||
alternate-active-foreground: #''${palette.color2};
|
||||
selected-active-background: #''${palette.color2};
|
||||
selected-active-foreground: #''${palette.background};
|
||||
urgent-background: #''${palette.color1};
|
||||
urgent-foreground: #''${palette.background};
|
||||
alternate-urgent-background: #''${palette.background};
|
||||
alternate-urgent-foreground: #''${palette.color1};
|
||||
selected-urgent-background: #''${palette.color1};
|
||||
selected-urgent-foreground: #''${palette.background};
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
||||
10
modules/misc/sddm.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
# SDDM configuration has been migrated to LightDM
|
||||
# This file is kept for reference only
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
11
modules/misc/spotify.nix
Normal file
@@ -0,0 +1,11 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = [
|
||||
pkgs.spotify
|
||||
];
|
||||
|
||||
# Prevent Spotify from launching on startup by removing its autostart entry
|
||||
# xdg.configFile."autostart/spotify.desktop".force = false;
|
||||
}
|
||||
|
||||
24
modules/misc/thunar.nix
Normal file
@@ -0,0 +1,24 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Enable Thunar via Home Manager
|
||||
programs.thunar = {
|
||||
enable = true;
|
||||
|
||||
# Enable thumbnails for supported file types
|
||||
enableThumbnailing = true;
|
||||
|
||||
# Set Thunar as the default file manager
|
||||
defaultFileManager = true;
|
||||
|
||||
# Enable the Thunar custom actions (e.g., opening a terminal in the current directory)
|
||||
customActions = [
|
||||
{
|
||||
}
|
||||
];
|
||||
|
||||
# Optional: Customize the icon theme for Thunar
|
||||
iconTheme = "Papirus-Dark"; # Adjust as needed based on your icon theme
|
||||
};
|
||||
}
|
||||
|
||||
12
modules/misc/zoxide.nix
Normal file
@@ -0,0 +1,12 @@
|
||||
_: {
|
||||
programs = {
|
||||
zoxide = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
enableBashIntegration = true;
|
||||
options = [
|
||||
"--cmd cd"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
68
modules/misc/zsh.nix
Normal file
@@ -0,0 +1,68 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
|
||||
syntaxHighlighting.enable = true;
|
||||
autosuggestion.enable = true;
|
||||
|
||||
initContent = ''
|
||||
# Powerlevel10k
|
||||
source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme
|
||||
[[ -f ~/.p10k.zsh ]] && source ~/.p10k.zsh
|
||||
'';
|
||||
|
||||
shellAliases = {
|
||||
# Defaults – hosts may override
|
||||
ls = lib.mkDefault "lsd --color=auto";
|
||||
ll = lib.mkDefault "lsd -lah --color=auto";
|
||||
".." = lib.mkDefault "cd ../";
|
||||
v = lib.mkDefault "nvim .";
|
||||
c = lib.mkDefault "clear";
|
||||
z = lib.mkDefault "zoxide";
|
||||
op = lib.mkDefault "opencode .";
|
||||
ff = lib.mkDefault "fastfetch";
|
||||
gs = lib.mkDefault "git status";
|
||||
gc = lib.mkDefault "git commit -m";
|
||||
gp = lib.mkDefault "git push -u origin";
|
||||
tsm = lib.mkDefault "tmux-session-manager";
|
||||
# rgi = lib.mkDefault ''
|
||||
# rg --color=always --line-number --no-heading --smart-case . |
|
||||
# fzf --ansi --delimiter : \
|
||||
# --preview "bat --style=full --color=always --highlight-line {2} {1}" \
|
||||
# --preview-window "~4,+{2}+4/3,<80(up)"
|
||||
# '';
|
||||
rgi = lib.mkDefault ''
|
||||
rg --color=always --line-number --no-heading --smart-case . |
|
||||
fzf --ansi --delimiter : \
|
||||
--preview "bat --style=full --color=always --highlight-line {2} {1}" \
|
||||
--preview-window "~4,+{2}+4/3,<80(up)" \
|
||||
--bind "enter:become(nvim +{2} {1})"
|
||||
'';
|
||||
hmr = lib.mkDefault "sudo nixos-rebuild switch --flake .#$(hostname)";
|
||||
snr = lib.mkDefault "sudo nixos-rebuild switch --flake .";
|
||||
ncg = "nix-collect-garbage --delete-old && sudo nix-collect-garbage -d && sudo /run/current-system/bin/switch-to-configuration boot";
|
||||
reload = lib.mkDefault "exec zsh";
|
||||
};
|
||||
};
|
||||
|
||||
################################
|
||||
# Fonts (for p10k icons)
|
||||
################################
|
||||
fonts.fontconfig.enable = true;
|
||||
|
||||
################################
|
||||
# Packages
|
||||
################################
|
||||
home.packages = with pkgs; [
|
||||
nerd-fonts.fira-code
|
||||
nerd-fonts.hack
|
||||
nerd-fonts.jetbrains-mono
|
||||
|
||||
zsh-powerlevel10k
|
||||
zsh-autosuggestions
|
||||
zsh-syntax-highlighting
|
||||
];
|
||||
}
|
||||
5
modules/nvim/default.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
imports = [
|
||||
./nvim.nix
|
||||
];
|
||||
}
|
||||
26
modules/nvim/nvim.nix
Normal file
@@ -0,0 +1,26 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
nvimConfigDir = "${config.home.homeDirectory}/.config/nvim";
|
||||
nvimGitRepo = "https://github.com/gibbyDev/nvim.git"; # Change this
|
||||
git = "${pkgs.git}/bin/git";
|
||||
in
|
||||
{
|
||||
home.activation.cloneNvimConfig = config.lib.dag.entryAfter [ "writeBoundary" ] ''
|
||||
if [ ! -d "${nvimConfigDir}/.git" ]; then
|
||||
echo "Cloning Neovim config..."
|
||||
${git} clone --depth=1 ${nvimGitRepo} ${nvimConfigDir}
|
||||
else
|
||||
echo "Neovim config already exists, pulling latest changes..."
|
||||
${git} -C ${nvimConfigDir} pull
|
||||
fi
|
||||
'';
|
||||
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
package = pkgs.neovim-unwrapped;
|
||||
extraPackages = with pkgs; [ wl-clipboard xclip xsel ];
|
||||
};
|
||||
}
|
||||
|
||||
5
modules/opencode/default.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
imports = [
|
||||
./opencode.nix
|
||||
];
|
||||
}
|
||||
19
modules/opencode/opencode.nix
Normal file
@@ -0,0 +1,19 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.programs.opencode;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.packages = [ pkgs.gh ];
|
||||
|
||||
xdg.configFile."opencode/config.toml".text = ''
|
||||
[ai]
|
||||
provider = "github-copilot"
|
||||
|
||||
[ai.github]
|
||||
auth = "gh"
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
||||
5
modules/posting/default.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
imports = [
|
||||
./posting.nix
|
||||
];
|
||||
}
|
||||
148
modules/posting/posting.nix
Normal file
@@ -0,0 +1,148 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
# Script to generate posting theme from pywal colors
|
||||
generate-posting-theme = pkgs.writeShellScriptBin "generate-posting-theme" ''
|
||||
#!/bin/bash
|
||||
|
||||
# Get pywal colors
|
||||
WAL_COLORS="''${XDG_CACHE_HOME:-$HOME/.cache}/wal/colors"
|
||||
|
||||
if [ ! -f "$WAL_COLORS" ]; then
|
||||
echo "Error: pywal colors file not found at $WAL_COLORS"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Read colors from wal
|
||||
mapfile -t COLORS < "$WAL_COLORS"
|
||||
|
||||
# Extract colors (wal provides 16 colors)
|
||||
BG="''${COLORS[0]}" # background
|
||||
FG_DARK="''${COLORS[8]}" # dark foreground
|
||||
COLOR1="''${COLORS[1]}" # red
|
||||
COLOR2="''${COLORS[2]}" # green
|
||||
COLOR3="''${COLORS[3]}" # yellow
|
||||
COLOR4="''${COLORS[4]}" # blue
|
||||
COLOR5="''${COLORS[5]}" # magenta
|
||||
COLOR6="''${COLORS[6]}" # cyan
|
||||
COLOR7="''${COLORS[7]}" # white
|
||||
|
||||
POSTING_THEME_DIR="''${XDG_DATA_HOME:-$HOME/.local/share}/posting/themes"
|
||||
mkdir -p "$POSTING_THEME_DIR"
|
||||
|
||||
# Generate theme from pywal colors with proper variable substitution
|
||||
cat > "$POSTING_THEME_DIR/pywal.yaml" <<THEMEOF
|
||||
# Posting theme generated from pywal colors
|
||||
name: pywal
|
||||
primary: '$COLOR4' # Blue from wal
|
||||
secondary: '$COLOR3' # Yellow from wal
|
||||
accent: '$COLOR6' # Cyan from wal
|
||||
background: '$BG' # Black background from wal
|
||||
surface: '$COLOR1' # Dark red for panels
|
||||
panel: '$COLOR2' # Green for panel backgrounds
|
||||
error: '$COLOR1' # Red for errors
|
||||
success: '$COLOR2' # Green for success
|
||||
warning: '$COLOR3' # Yellow for warnings
|
||||
dark: true
|
||||
|
||||
author: "pywal"
|
||||
description: "Posting theme synchronized with pywal colors"
|
||||
|
||||
text_area:
|
||||
gutter: "bold $COLOR6"
|
||||
cursor: "reverse"
|
||||
cursor_line: "dim"
|
||||
selection: "reverse"
|
||||
|
||||
url:
|
||||
base: "italic $COLOR6"
|
||||
protocol: "bold $COLOR4"
|
||||
separator: "dim"
|
||||
|
||||
syntax:
|
||||
json_key: "italic $COLOR4"
|
||||
json_string: "$COLOR2"
|
||||
json_number: "$COLOR6"
|
||||
json_boolean: "$COLOR2"
|
||||
json_null: "underline $COLOR6"
|
||||
|
||||
method:
|
||||
get: "$COLOR4"
|
||||
post: "$COLOR2"
|
||||
put: "$COLOR3"
|
||||
delete: "$COLOR1"
|
||||
patch: "$COLOR6"
|
||||
options: "$COLOR5"
|
||||
head: "$COLOR5"
|
||||
|
||||
variable:
|
||||
resolved: "black on $COLOR2"
|
||||
unresolved: "black on $COLOR1"
|
||||
THEMEOF
|
||||
|
||||
echo "Generated posting theme at $POSTING_THEME_DIR/pywal.yaml"
|
||||
echo "Restart posting to see the new colors"
|
||||
'';
|
||||
|
||||
in
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
posting
|
||||
generate-posting-theme
|
||||
];
|
||||
|
||||
# Activation script to generate theme on profile activation
|
||||
home.activation.generatePostingTheme = lib.hm.dag.entryAfter ["writeBoundary"] ''
|
||||
$DRY_RUN_CMD ${generate-posting-theme}/bin/generate-posting-theme || true
|
||||
'';
|
||||
|
||||
# Main posting configuration
|
||||
xdg.configFile."posting/config.yaml" = {
|
||||
text = ''
|
||||
# Posting Configuration
|
||||
# Synchronized with pywal color scheme
|
||||
|
||||
theme: pywal
|
||||
layout: vertical
|
||||
|
||||
# UI Components
|
||||
heading:
|
||||
visible: true
|
||||
show_host: false
|
||||
show_version: false
|
||||
|
||||
collection_browser:
|
||||
position: left
|
||||
show_on_startup: true
|
||||
|
||||
url_bar:
|
||||
show_value_preview: true
|
||||
hide_secrets_in_value_preview: true
|
||||
|
||||
response:
|
||||
prettify_json: true
|
||||
show_size_and_time: true
|
||||
|
||||
text_input:
|
||||
blinking_cursor: true
|
||||
|
||||
# Focus behavior
|
||||
focus:
|
||||
on_startup: url
|
||||
|
||||
# Theme settings
|
||||
watch_themes: true
|
||||
load_user_themes: true
|
||||
load_builtin_themes: true
|
||||
|
||||
# Environment
|
||||
use_host_environment: false
|
||||
watch_env_files: true
|
||||
watch_collection_files: true
|
||||
|
||||
# External tools
|
||||
pager: less
|
||||
editor: nvim
|
||||
'';
|
||||
};
|
||||
}
|
||||
6
modules/rofi/default.nix
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
imports = [
|
||||
./rofi.nix
|
||||
# ./style.nix
|
||||
];
|
||||
}
|
||||
367
modules/rofi/rofi.nix
Normal file
@@ -0,0 +1,367 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
package = pkgs.rofi;
|
||||
theme = "user"; # default theme
|
||||
};
|
||||
|
||||
xdg.configFile."rofi/user.rasi".text = ''
|
||||
// Config //
|
||||
configuration {
|
||||
modi: "drun,run,window";
|
||||
show-icons: true;
|
||||
font: "JetBrainsMono Nerd Font 12"; // slightly bigger
|
||||
icon-theme: "Tela-circle-dracula";
|
||||
}
|
||||
|
||||
@theme "~/.config/rofi/colors.rasi"
|
||||
|
||||
// Main window //
|
||||
window {
|
||||
width: 25em;
|
||||
height: 14em;
|
||||
transparency: "real";
|
||||
fullscreen: false;
|
||||
cursor: "default";
|
||||
border-color: @foreground;
|
||||
border-width: 2px;
|
||||
background-color: @foreground;
|
||||
padding: 0.15em;
|
||||
}
|
||||
|
||||
// Mainbox (vertical stack: input on top, list below)
|
||||
mainbox {
|
||||
orientation: vertical;
|
||||
spacing: 0.5em;
|
||||
padding: 0.25em;
|
||||
background-color: @background;
|
||||
}
|
||||
|
||||
// Input bar at top with border
|
||||
inputbar {
|
||||
enabled: true;
|
||||
children: [ "entry" ];
|
||||
background-color: @background;
|
||||
border-color: @foreground;
|
||||
border-width: 2px;
|
||||
padding: 0.4em 0.5em;
|
||||
}
|
||||
|
||||
entry {
|
||||
enabled: true;
|
||||
text-color: @foreground;
|
||||
background-color: @background;
|
||||
padding: 0.2em 0.4em;
|
||||
}
|
||||
|
||||
// List view //
|
||||
listbox {
|
||||
spacing: 0.5em;
|
||||
padding: 0.5em;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
listview {
|
||||
enabled: true;
|
||||
columns: 1;
|
||||
lines: 6;
|
||||
cycle: true;
|
||||
dynamic: true;
|
||||
scrollbar: false;
|
||||
layout: vertical;
|
||||
background-color: transparent;
|
||||
text-color: @foreground;
|
||||
}
|
||||
|
||||
// Elements (programs) //
|
||||
element {
|
||||
enabled: true;
|
||||
spacing: 0.5em;
|
||||
padding: 0.3em 0.5em;
|
||||
cursor: pointer;
|
||||
background-color: transparent;
|
||||
text-color: @foreground;
|
||||
}
|
||||
|
||||
// Highlight both selection and mouse hover
|
||||
element selected.normal,
|
||||
element selected.active,
|
||||
element selected.focused,
|
||||
element hovered {
|
||||
background-color: @foreground;
|
||||
text-color: @background;
|
||||
}
|
||||
|
||||
element-icon {
|
||||
size: 1.5em;
|
||||
background-color: transparent;
|
||||
text-color: inherit;
|
||||
}
|
||||
|
||||
element-text {
|
||||
cursor: inherit;
|
||||
background-color: transparent;
|
||||
text-color: inherit;
|
||||
}
|
||||
|
||||
// Error messages //
|
||||
error-message {
|
||||
text-color: @foreground;
|
||||
background-color: @background;
|
||||
}
|
||||
|
||||
textbox {
|
||||
text-color: @foreground;
|
||||
background-color: inherit;
|
||||
}
|
||||
'';
|
||||
|
||||
xdg.configFile."rofi/wallpaper.rasi".text = ''
|
||||
configuration {
|
||||
modi: "drun";
|
||||
show-icons: true;
|
||||
drun-display-format: "{name}";
|
||||
}
|
||||
|
||||
@theme "~/.config/rofi/colors.rasi"
|
||||
|
||||
window {
|
||||
enabled: true;
|
||||
fullscreen: false;
|
||||
width: 100%;
|
||||
transparency: "real";
|
||||
cursor: "default";
|
||||
spacing: 0px;
|
||||
padding: 0px;
|
||||
border: 0px;
|
||||
border-radius: 0px;
|
||||
border-color: transparent;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
mainbox {
|
||||
enabled: true;
|
||||
children: [ "listview" ];
|
||||
background-color: @background;
|
||||
}
|
||||
|
||||
listview {
|
||||
enabled: true;
|
||||
columns: 6;
|
||||
lines: 1;
|
||||
spacing: 10px 20px;
|
||||
padding: 20px 10px;
|
||||
cycle: true;
|
||||
dynamic: false;
|
||||
scrollbar: false;
|
||||
layout: vertical;
|
||||
reverse: false;
|
||||
fixed-height: false;
|
||||
height: 40px;
|
||||
fixed-columns: true;
|
||||
cursor: "default";
|
||||
background-color: transparent;
|
||||
text-color: transparent;
|
||||
}
|
||||
|
||||
element {
|
||||
enabled: true;
|
||||
orientation: horizontal;
|
||||
spacing: 0px;
|
||||
padding: 4px;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
background-color: transparent;
|
||||
text-color: transparent;
|
||||
}
|
||||
|
||||
@media(max-aspect-ratio: 1.8) {
|
||||
element {
|
||||
orientation: vertical;
|
||||
}
|
||||
}
|
||||
|
||||
element selected.normal {
|
||||
background-color: @foreground;
|
||||
text-color: transparent;
|
||||
}
|
||||
|
||||
element-icon {
|
||||
size: 50%;
|
||||
border-radius: 4px;
|
||||
cursor: inherit;
|
||||
background-color: transparent;
|
||||
text-color: transparent;
|
||||
}
|
||||
|
||||
element-text {
|
||||
enabled: false;
|
||||
}
|
||||
'';
|
||||
|
||||
xdg.configFile."rofi/network.rasi".text = ''
|
||||
@theme "~/.config/rofi/colors.rasi"
|
||||
|
||||
configuration {
|
||||
show-icons: false;
|
||||
display-drun: "";
|
||||
display-run: "";
|
||||
display-window: "";
|
||||
font: "JetBrainsMono Nerd Font 11";
|
||||
}
|
||||
|
||||
window {
|
||||
width: 420px;
|
||||
height: 300px;
|
||||
transparency: "real";
|
||||
fullscreen: false;
|
||||
enabled: true;
|
||||
border-radius: 8px;
|
||||
border-color: @foreground;
|
||||
border-width: 2px;
|
||||
background-color: @background;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
mainbox {
|
||||
orientation: vertical;
|
||||
spacing: 0.5em;
|
||||
padding: 0.5em;
|
||||
background-color: @background;
|
||||
}
|
||||
|
||||
inputbar {
|
||||
enabled: true;
|
||||
children: [ "entry" ];
|
||||
background-color: @background;
|
||||
border-color: @foreground;
|
||||
border-width: 2px;
|
||||
border-radius: 4px;
|
||||
padding: 0.4em 0.5em;
|
||||
spacing: 0.5em;
|
||||
}
|
||||
|
||||
entry {
|
||||
enabled: true;
|
||||
text-color: @foreground;
|
||||
background-color: @background;
|
||||
placeholder: "Search networks...";
|
||||
placeholder-color: @normal-background;
|
||||
}
|
||||
|
||||
listbox {
|
||||
spacing: 0.5em;
|
||||
padding: 0.25em;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
listview {
|
||||
enabled: true;
|
||||
columns: 1;
|
||||
lines: 10;
|
||||
cycle: true;
|
||||
dynamic: true;
|
||||
scrollbar: false;
|
||||
layout: vertical;
|
||||
background-color: transparent;
|
||||
text-color: @foreground;
|
||||
}
|
||||
|
||||
element {
|
||||
enabled: true;
|
||||
spacing: 0.5em;
|
||||
padding: 0.5em 0.6em;
|
||||
cursor: pointer;
|
||||
background-color: transparent;
|
||||
text-color: @foreground;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
element selected {
|
||||
background-color: @foreground;
|
||||
text-color: @background;
|
||||
}
|
||||
|
||||
element-text {
|
||||
cursor: inherit;
|
||||
background-color: transparent;
|
||||
text-color: inherit;
|
||||
}
|
||||
|
||||
element-icon {
|
||||
size: 1.2em;
|
||||
background-color: transparent;
|
||||
text-color: inherit;
|
||||
}
|
||||
|
||||
textbox {
|
||||
text-color: @foreground;
|
||||
background-color: @background;
|
||||
padding: 0.5em;
|
||||
border-radius: 4px;
|
||||
}
|
||||
'';
|
||||
|
||||
xdg.configFile."rofi/fullscreen-grid.rasi".text = ''
|
||||
@theme "~/.config/rofi/colors.rasi"
|
||||
configuration {
|
||||
show-icons: true;
|
||||
drun-display-format: "{name}";
|
||||
icon-theme: "Papirus-Dark";
|
||||
location: 5;
|
||||
}
|
||||
|
||||
* {
|
||||
background-color: @background;
|
||||
text-color: @foreground;
|
||||
}
|
||||
|
||||
window {
|
||||
fullscreen: true;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
font: "UW Ttyp0 10";
|
||||
background-color: @background;
|
||||
}
|
||||
|
||||
prompt { enabled: false; }
|
||||
|
||||
entry {
|
||||
padding: 10px 0 10px 0;
|
||||
horizontal-align: 0.5;
|
||||
margin: 65px 40% 0 40%;
|
||||
color: @normal-foreground;
|
||||
background-color: @normal-background;
|
||||
font: "UW Ttyp0 11";
|
||||
border-radius: 30px;
|
||||
placeholder: "Search";
|
||||
}
|
||||
|
||||
listview {
|
||||
columns: 7;
|
||||
margin: 10% 10% 10% 10%;
|
||||
}
|
||||
|
||||
element {
|
||||
padding: 0.8%;
|
||||
margin: 1%;
|
||||
orientation: vertical;
|
||||
}
|
||||
|
||||
element selected {
|
||||
text-color: @foreground;
|
||||
background-color: @background;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
element-icon {
|
||||
size: 64;
|
||||
}
|
||||
|
||||
element-text {
|
||||
horizontal-align: 0.5;
|
||||
}
|
||||
'';
|
||||
}
|
||||
163
modules/rofi/style.nix
Normal file
@@ -0,0 +1,163 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
programs.rofi.theme = "user";
|
||||
|
||||
xdg.configFile."rofi/user.rasi".text = ''
|
||||
// Config //
|
||||
configuration {
|
||||
modi: "drun,filebrowser,window,run";
|
||||
show-icons: true;
|
||||
display-drun: " ";
|
||||
display-run: " ";
|
||||
display-filebrowser: " ";
|
||||
display-window: " ";
|
||||
drun-display-format: "{name}";
|
||||
window-format: "{w}{t}";
|
||||
font: "JetBrainsMono Nerd Font 10";
|
||||
icon-theme: "Tela-circle-dracula";
|
||||
}
|
||||
|
||||
@theme "~/.config/rofi/theme.rasi"
|
||||
|
||||
|
||||
// Main //
|
||||
window {
|
||||
height: 33em;
|
||||
width: 63em;
|
||||
transparency: "real";
|
||||
fullscreen: false;
|
||||
enabled: true;
|
||||
cursor: "default";
|
||||
spacing: 0em;
|
||||
padding: 0em;
|
||||
border-color: @main-br;
|
||||
background-color: @main-bg;
|
||||
}
|
||||
mainbox {
|
||||
enabled: true;
|
||||
spacing: 0em;
|
||||
padding: 0em;
|
||||
orientation: horizontal;
|
||||
children: [ "dummywall" , "listbox" ];
|
||||
background-color: transparent;
|
||||
}
|
||||
dummywall {
|
||||
spacing: 0em;
|
||||
padding: 0em;
|
||||
width: 37em;
|
||||
expand: false;
|
||||
orientation: horizontal;
|
||||
children: [ "mode-switcher" , "inputbar" ];
|
||||
background-color: transparent;
|
||||
background-image: url("~/.cache/hyde/wall.thmb", height);
|
||||
}
|
||||
|
||||
|
||||
// Modes //
|
||||
mode-switcher{
|
||||
orientation: vertical;
|
||||
enabled: true;
|
||||
width: 3.8em;
|
||||
padding: 9.2em 0.5em 9.2em 0.5em;
|
||||
spacing: 1.2em;
|
||||
background-color: transparent;
|
||||
background-image: url("~/.cache/hyde/wall.blur", height);
|
||||
}
|
||||
button {
|
||||
cursor: pointer;
|
||||
border-radius: 2em;
|
||||
background-color: @main-bg;
|
||||
text-color: @main-fg;
|
||||
}
|
||||
button selected {
|
||||
background-color: @main-fg;
|
||||
text-color: @main-bg;
|
||||
}
|
||||
|
||||
|
||||
// Inputs //
|
||||
inputbar {
|
||||
enabled: true;
|
||||
children: [ "entry" ];
|
||||
background-color: transparent;
|
||||
}
|
||||
entry {
|
||||
enabled: false;
|
||||
}
|
||||
|
||||
|
||||
// Lists //
|
||||
listbox {
|
||||
spacing: 0em;
|
||||
padding: 2em;
|
||||
children: [ "dummy" , "listview" , "dummy" ];
|
||||
background-color: transparent;
|
||||
}
|
||||
listview {
|
||||
enabled: true;
|
||||
spacing: 0em;
|
||||
padding: 0em;
|
||||
columns: 1;
|
||||
lines: 8;
|
||||
cycle: true;
|
||||
dynamic: true;
|
||||
scrollbar: false;
|
||||
layout: vertical;
|
||||
reverse: false;
|
||||
expand: false;
|
||||
fixed-height: true;
|
||||
fixed-columns: true;
|
||||
cursor: "default";
|
||||
background-color: transparent;
|
||||
text-color: @main-fg;
|
||||
}
|
||||
dummy {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
|
||||
// Elements //
|
||||
element {
|
||||
enabled: true;
|
||||
spacing: 0.8em;
|
||||
padding: 0.4em 0.4em 0.4em 1.5em;
|
||||
cursor: pointer;
|
||||
background-color: transparent;
|
||||
text-color: @main-fg;
|
||||
}
|
||||
element selected.normal {
|
||||
background-color: @select-bg;
|
||||
text-color: @select-fg;
|
||||
}
|
||||
element-icon {
|
||||
size: 2.8em;
|
||||
cursor: inherit;
|
||||
background-color: transparent;
|
||||
text-color: inherit;
|
||||
}
|
||||
element-text {
|
||||
vertical-align: 0.5;
|
||||
horizontal-align: 0.0;
|
||||
cursor: inherit;
|
||||
background-color: transparent;
|
||||
text-color: inherit;
|
||||
}
|
||||
|
||||
// Error message //
|
||||
error-message {
|
||||
text-color: @main-fg;
|
||||
background-color: @main-bg;
|
||||
text-transform: capitalize;
|
||||
children: [ "textbox" ];
|
||||
}
|
||||
|
||||
textbox {
|
||||
text-color: inherit;
|
||||
background-color: inherit;
|
||||
vertical-align: 0.5;
|
||||
horizontal-align: 0.5;
|
||||
}
|
||||
'';
|
||||
}
|
||||
|
||||
5
modules/swaync/default.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
{ inputs, ... }:
|
||||
{
|
||||
imports = [ (import ./swaync.nix) ];
|
||||
}
|
||||
|
||||
600
modules/swaync/swaync.nix
Normal file
@@ -0,0 +1,600 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
gamemode = pkgs.writeShellScriptBin "gamemode" ''
|
||||
# Toggle animations on/off for gaming mode
|
||||
status=$(${pkgs.hyprland}/bin/hyprctl getoption animations:enabled | grep -oP 'int: \K[0-9]+')
|
||||
|
||||
if [ "$status" = "1" ]; then
|
||||
# Disable animations
|
||||
${pkgs.hyprland}/bin/hyprctl keyword animations:enabled 0
|
||||
${pkgs.libnotify}/bin/notify-send "Gamemode: ON" "Animations disabled"
|
||||
else
|
||||
# Enable animations
|
||||
${pkgs.hyprland}/bin/hyprctl keyword animations:enabled 1
|
||||
${pkgs.libnotify}/bin/notify-send "Gamemode: OFF" "Animations enabled"
|
||||
fi
|
||||
'';
|
||||
|
||||
togglepowermode = pkgs.writeShellScriptBin "togglepowermode" ''
|
||||
# Toggle between performance and power saving mode
|
||||
config_dir="$HOME/.config/hypr"
|
||||
power_mode_file="$config_dir/power_mode"
|
||||
|
||||
mkdir -p "$config_dir"
|
||||
|
||||
# Read current mode or default to balanced
|
||||
current_mode=$(cat "$power_mode_file" 2>/dev/null || echo "balanced")
|
||||
|
||||
if [ "$current_mode" = "powersave" ]; then
|
||||
# Switch to performance mode
|
||||
echo "performance" > "$power_mode_file"
|
||||
echo "Performance Mode"
|
||||
else
|
||||
# Switch to powersave mode
|
||||
echo "powersave" > "$power_mode_file"
|
||||
echo "Power Saving Mode"
|
||||
fi
|
||||
'';
|
||||
|
||||
walColors = "${config.xdg.cacheHome}/wal/colors-waybar.css";
|
||||
isValidUser = config.home.username == "cody";
|
||||
in
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
swaynotificationcenter
|
||||
nerd-fonts.jetbrains-mono
|
||||
playerctl
|
||||
pamixer
|
||||
brightnessctl
|
||||
blueman
|
||||
networkmanager
|
||||
libnotify
|
||||
grimblast
|
||||
swappy
|
||||
];
|
||||
|
||||
services.swaync = {
|
||||
enable = true;
|
||||
settings = {
|
||||
"$schema" = "/etc/xdg/swaync/configSchema.json";
|
||||
positionX = "right";
|
||||
positionY = "top";
|
||||
cssPriority = "user";
|
||||
control-center-margin-top = 10;
|
||||
control-center-margin-bottom = 10;
|
||||
control-center-margin-right = 10;
|
||||
control-center-margin-left = 0;
|
||||
notification-icon-size = 64;
|
||||
notification-body-image-height = 100;
|
||||
notification-body-image-width = 200;
|
||||
timeout = 6;
|
||||
timeout-low = 3;
|
||||
timeout-critical = 0;
|
||||
fit-to-screen = false;
|
||||
control-center-width = 400;
|
||||
control-center-height = 740;
|
||||
notification-window-width = 375;
|
||||
keyboard-shortcuts = true;
|
||||
image-visibility = "when-available";
|
||||
transition-time = 200;
|
||||
hide-on-clear = false;
|
||||
hide-on-action = true;
|
||||
script-fail-notify = true;
|
||||
widgets = [
|
||||
"title"
|
||||
"dnd"
|
||||
"menubar#desktop"
|
||||
"volume"
|
||||
"mpris"
|
||||
"notifications"
|
||||
"buttons-grid"
|
||||
];
|
||||
widget-config = {
|
||||
title = {
|
||||
text = " Quick settings";
|
||||
clear-all-button = true;
|
||||
button-text = "";
|
||||
};
|
||||
"menubar#desktop" = {
|
||||
"backlight" = {
|
||||
label = " ";
|
||||
};
|
||||
"menu#screenshot" = {
|
||||
label = " Screenshot";
|
||||
position = "left";
|
||||
actions = [
|
||||
{
|
||||
label = "Whole screen";
|
||||
command = "sh -c 'swaync-client -cp; sleep 1; ${pkgs.grimblast}/bin/grimblast copysave output \"/tmp/screenshot.png\"; ${pkgs.swappy}/bin/swappy -f \"/tmp/screenshot.png\"'";
|
||||
}
|
||||
{
|
||||
label = "Whole window / Select region";
|
||||
command = "sh -c 'swaync-client -cp; ${pkgs.grimblast}/bin/grimblast copysave area \"/tmp/screenshot.png\"; ${pkgs.swappy}/bin/swappy -f \"/tmp/screenshot.png\"'";
|
||||
}
|
||||
];
|
||||
};
|
||||
"menu#power" = {
|
||||
label = " Power Menu";
|
||||
position = "left";
|
||||
actions = [
|
||||
{
|
||||
label = " Shut down";
|
||||
command = "systemctl poweroff";
|
||||
}
|
||||
{
|
||||
label = " Reboot";
|
||||
command = "systemctl reboot";
|
||||
}
|
||||
{
|
||||
label = " Suspend";
|
||||
command = "systemctl suspend";
|
||||
}
|
||||
{
|
||||
label = " Logout";
|
||||
command = "hyprctl dispatch exit 0";
|
||||
}
|
||||
{
|
||||
label = " Lock";
|
||||
command = "hyprlock";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
volume = {
|
||||
label = "";
|
||||
expand-button-label = "";
|
||||
collapse-button-label = "";
|
||||
show-per-app = true;
|
||||
show-per-app-icon = true;
|
||||
show-per-app-label = true;
|
||||
};
|
||||
dnd = {
|
||||
text = " Do Not Disturb";
|
||||
};
|
||||
mpris = {
|
||||
image-size = 96;
|
||||
image-radius = 4;
|
||||
};
|
||||
notifications = {
|
||||
text = "Notifications";
|
||||
clear-all-button = true;
|
||||
button-text = " Clear";
|
||||
};
|
||||
"buttons-grid" = {
|
||||
actions = [
|
||||
{
|
||||
label = "";
|
||||
type = "toggle";
|
||||
command = "${pkgs.pamixer}/bin/pamixer -t";
|
||||
update-command = "sh -c '${pkgs.pamixer}/bin/pamixer --get-mute | grep -q true && echo true || echo false'";
|
||||
}
|
||||
{
|
||||
label = "";
|
||||
type = "toggle";
|
||||
command = "${pkgs.pamixer}/bin/pamixer --default-source -t";
|
||||
update-command = "sh -c '${pkgs.pamixer}/bin/pamixer --get-mute --default-source | grep true && echo true || echo false'";
|
||||
}
|
||||
{
|
||||
label = "";
|
||||
type = "toggle";
|
||||
command = "blueman-manager";
|
||||
update-command = "sh -c 'bluetoothctl show | grep -q \"Powered: yes\" && echo true || echo false'";
|
||||
}
|
||||
{
|
||||
label = "";
|
||||
type = "toggle";
|
||||
command = "sh -c '[ \"$SWAYNC_TOGGLE_STATE\" = true ] && ${pkgs.networkmanager}/bin/nmcli radio wifi on || ${pkgs.networkmanager}/bin/nmcli radio wifi off'";
|
||||
update-command = "sh -c '${pkgs.networkmanager}/bin/nmcli radio wifi | grep -q enabled && echo true || echo false'";
|
||||
}
|
||||
{
|
||||
label = "🎮";
|
||||
type = "toggle";
|
||||
command = "${gamemode}/bin/gamemode";
|
||||
update-command = "hyprctl getoption animations:enabled | grep -q 'int: 1' && echo false || echo true";
|
||||
}
|
||||
{
|
||||
label = "";
|
||||
type = "toggle";
|
||||
command = "sh -c '${pkgs.procps}/bin/pgrep -x hyprsunset >/dev/null && ${pkgs.procps}/bin/pkill hyprsunset || nohup ${pkgs.hyprsunset}/bin/hyprsunset --temperature 3500 > /tmp/hyprsunset_output.log 2>&1 &'";
|
||||
update-command = "sh -c 'pgrep -x hyprsunset >/dev/null && echo true || echo false'";
|
||||
}
|
||||
{
|
||||
label = "☕";
|
||||
command = "systemctl --user is-active --quiet hypridle.service && systemctl --user stop hypridle.service || systemctl --user start hypridle.service";
|
||||
type = "toggle";
|
||||
update-command = "pgrep -x hypridle > /dev/null && echo false || echo true";
|
||||
}
|
||||
{
|
||||
label = "";
|
||||
type = "toggle";
|
||||
command = "${togglepowermode}/bin/togglepowermode";
|
||||
update-command = "test -f \"$HOME/.config/hypr/power_mode\" && grep -q \"^powersave$\" \"$HOME/.config/hypr/power_mode\" && echo true || echo false";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
scripts = {
|
||||
example-script = {
|
||||
exec = "echo 'Do something...'";
|
||||
urgency = "Normal";
|
||||
};
|
||||
};
|
||||
notification-visibility = {
|
||||
spotify = {
|
||||
state = "enabled";
|
||||
urgency = "Low";
|
||||
app-name = "Spotify";
|
||||
};
|
||||
youtube-music = {
|
||||
state = "enabled";
|
||||
urgency = "Low";
|
||||
app-name = "com.github.th_ch.youtube_music";
|
||||
};
|
||||
};
|
||||
};
|
||||
style = lib.mkIf isValidUser ''
|
||||
@import url("file://${walColors}");
|
||||
|
||||
@define-color shadow rgba(0, 0, 0, 0.25);
|
||||
|
||||
* {
|
||||
font-family: "JetBrainsMono NFM SemiBold", monospace;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.notification {
|
||||
background: @background;
|
||||
color: @foreground;
|
||||
border: 1px solid @color4;
|
||||
border-radius: 4px;
|
||||
margin: 6px 0;
|
||||
}
|
||||
|
||||
.notification-action {
|
||||
border: 2px solid;
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
.close-button {
|
||||
background: transparent;
|
||||
color: transparent;
|
||||
}
|
||||
|
||||
.summary {
|
||||
color: @foreground;
|
||||
font-size: 16px;
|
||||
background: transparent;
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
.time {
|
||||
color: @color7;
|
||||
font-size: 16px;
|
||||
background: transparent;
|
||||
text-shadow: none;
|
||||
margin-right: 18px;
|
||||
}
|
||||
|
||||
.body {
|
||||
background: transparent;
|
||||
font-size: 15px;
|
||||
font-weight: 500;
|
||||
color: @color7;
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
.top-action-title {
|
||||
color: @foreground;
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
.control-center {
|
||||
background: @background;
|
||||
border-radius: 4px;
|
||||
border: 1px solid @color4;
|
||||
}
|
||||
|
||||
.control-center .notification-row:focus,
|
||||
.control-center .notification-row:hover {
|
||||
opacity: 1;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.notification-row {
|
||||
outline: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background: transparent;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.notification-group {
|
||||
background: transparent;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.widget-title {
|
||||
margin: 0px;
|
||||
background: transparent;
|
||||
border-radius: 4px;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.widget-title > label {
|
||||
margin: 18px 10px;
|
||||
font-size: 20px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.widget-title > button {
|
||||
font-weight: 700;
|
||||
padding: 7px 3px;
|
||||
margin-right: 10px;
|
||||
background: transparent;
|
||||
color: @foreground;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.widget-title > button:hover {
|
||||
background: @color2;
|
||||
}
|
||||
|
||||
.widget-label {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
min-height: 5px;
|
||||
background: alpha(@background, 0.80);
|
||||
border-radius: 0px 0px 4px 4px;
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
.widget-label > label {
|
||||
font-size: 15px;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.widget-menubar {
|
||||
background: transparent;
|
||||
border-radius: 4px;
|
||||
border-top: none;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.widget-menubar > box > box {
|
||||
margin: 5px 5px 5px 5px;
|
||||
min-height: 40px;
|
||||
border-radius: 4px;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.widget-menubar > box > box > button {
|
||||
background: alpha(@background, 0.80);
|
||||
min-width: 185px;
|
||||
min-height: 50px;
|
||||
margin-right: 25px;
|
||||
font-size: 14px;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.widget-menubar > box > box > button:nth-child(2) {
|
||||
margin-right: 0px;
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
.widget-menubar button:hover {
|
||||
background: @color2;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.widget-menubar > box > revealer > box {
|
||||
margin: 5px 10px 5px 10px;
|
||||
background: alpha(@background, 0.80);
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.widget-menubar > box > revealer > box > button {
|
||||
background: transparent;
|
||||
min-height: 50px;
|
||||
padding: 0px;
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
.widget-buttons-grid {
|
||||
background: transparent;
|
||||
border-top: none;
|
||||
border-bottom: none;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
.widget-buttons-grid > flowbox > flowboxchild {
|
||||
background: @background;
|
||||
border-radius: 4px;
|
||||
min-height: 40px;
|
||||
min-width: 85px;
|
||||
margin: 5px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.widget-buttons-grid > flowbox > flowboxchild > button {
|
||||
background: transparent;
|
||||
border-radius: 4px;
|
||||
margin: 0px;
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.widget-buttons-grid > flowbox > flowboxchild > button:hover {
|
||||
background: @color2;
|
||||
}
|
||||
|
||||
.widget-mpris {
|
||||
padding: 8px;
|
||||
border-radius: 8px;
|
||||
padding-bottom: 15px;
|
||||
margin-bottom: 0px;
|
||||
background: alpha(@color1, 0.25);
|
||||
border: 1px solid @color4;
|
||||
}
|
||||
|
||||
.widget-mpris > box > button,
|
||||
.widget-mpris-player,
|
||||
.widget-mpris-album-art {
|
||||
box-shadow: none;
|
||||
margin: 10px 0 0 0;
|
||||
padding: 5px 10px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.widget-mpris button {
|
||||
background: alpha(@color2, 0.5);
|
||||
color: @foreground;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.widget-mpris button:hover {
|
||||
background: @color2;
|
||||
}
|
||||
|
||||
.widget-backlight,
|
||||
.widget-volume {
|
||||
background: transparent;
|
||||
border-top: none;
|
||||
border-bottom: none;
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
border-radius: 0px;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.widget-volume > box {
|
||||
background: alpha(@background, 0.80);
|
||||
border-radius: 4px;
|
||||
margin: 5px 10px 5px 10px;
|
||||
min-height: 50px;
|
||||
}
|
||||
|
||||
.widget-volume > box > label {
|
||||
min-width: 50px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.widget-volume > box > button {
|
||||
min-width: 50px;
|
||||
box-shadow: none;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.widget-volume > box > button:hover {
|
||||
background: @color2;
|
||||
}
|
||||
|
||||
.widget-volume > revealer > list {
|
||||
background: alpha(@background, 0.80);
|
||||
border-radius: 4px;
|
||||
margin-top: 5px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.widget-volume > revealer > list > row {
|
||||
padding-left: 10px;
|
||||
min-height: 40px;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.widget-volume > revealer > list > row:hover {
|
||||
background: transparent;
|
||||
box-shadow: none;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.widget-backlight > scale {
|
||||
background: alpha(@background, 0.80);
|
||||
border-radius: 0px 4px 4px 0px;
|
||||
margin: 5px 10px 5px 0px;
|
||||
padding: 0px 10px 0px 0px;
|
||||
min-height: 50px;
|
||||
}
|
||||
|
||||
.widget-backlight > label {
|
||||
background: @color2;
|
||||
margin: 5px 0px 5px 10px;
|
||||
border-radius: 4px 0px 0px 4px;
|
||||
padding: 0px;
|
||||
min-height: 50px;
|
||||
min-width: 50px;
|
||||
}
|
||||
|
||||
.widget-dnd {
|
||||
margin: 6px 10px;
|
||||
padding: 0 12px;
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
|
||||
.widget-dnd > switch {
|
||||
background: alpha(@background, 0.80);
|
||||
font-size: initial;
|
||||
border-radius: 8px;
|
||||
box-shadow: none;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.widget-dnd > switch:hover {
|
||||
background: alpha(@color2, 0.80);
|
||||
}
|
||||
|
||||
.widget-dnd > switch:checked {
|
||||
background: @color2;
|
||||
}
|
||||
|
||||
.widget-dnd > switch:checked:hover {
|
||||
background: alpha(@color2, 0.80);
|
||||
}
|
||||
|
||||
.widget-dnd > switch slider {
|
||||
background: alpha(@color2, 0.80);
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.toggle:checked {
|
||||
background: @color2;
|
||||
}
|
||||
|
||||
.toggle:checked:hover {
|
||||
background: alpha(@color2, 0.75);
|
||||
}
|
||||
|
||||
scale trough {
|
||||
border-radius: 4px;
|
||||
background: @color2;
|
||||
}
|
||||
|
||||
scale slider {
|
||||
background: @color2;
|
||||
}
|
||||
|
||||
scrollbar,
|
||||
scrollbar * {
|
||||
all: unset;
|
||||
min-width: 0px;
|
||||
min-height: 0px;
|
||||
}
|
||||
|
||||
scrollbar slider {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
scrollbar.vertical,
|
||||
scrollbar.horizontal {
|
||||
background: transparent;
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
5
modules/tmux/default.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
imports = [
|
||||
./tmux.nix
|
||||
];
|
||||
}
|
||||
104
modules/tmux/tmux.nix
Normal file
@@ -0,0 +1,104 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
terminal = "screen-256color"; # Ensures proper color support
|
||||
shell = "${pkgs.zsh}/bin/zsh"; # Forces tmux to use Zsh by default
|
||||
clock24 = true;
|
||||
|
||||
plugins = with pkgs.tmuxPlugins; [
|
||||
vim-tmux-navigator
|
||||
{
|
||||
plugin = rose-pine;
|
||||
extraConfig = ''
|
||||
set -g @rose_pine_variant 'main'
|
||||
set -g @rose_pine_host 'on'
|
||||
set -g @rose_pine_user 'on'
|
||||
set -g @rose_pine_directory 'on'
|
||||
set -g @rose_pine_date_time '%a %b %d %H:%M:%S %Y'
|
||||
set -g @rose_pine_left_separator ' > '
|
||||
set -g @rose_pine_right_separator ' < '
|
||||
set -g @rose_pine_field_separator ' | '
|
||||
set -g @rose_pine_window_separator ' - '
|
||||
set -g @rose_pine_window_status_separator " "
|
||||
set -g @rose_pine_hostname_icon ''
|
||||
set -g @rose_pine_date_time_icon ''
|
||||
'';
|
||||
}
|
||||
{
|
||||
plugin = resurrect;
|
||||
extraConfig = ''
|
||||
# Resurrect Configuration - Save/restore tmux sessions with all details
|
||||
set -g @resurrect-strategy-nvim 'session'
|
||||
set -g @resurrect-strategy-vim 'session'
|
||||
set -g @resurrect-strategy-pane 'bash'
|
||||
set -g @resurrect-capture-pane-contents 'on'
|
||||
set -g @resurrect-processes 'nvim vim ssh "~zsh" "~bash" opencode ranger fzf'
|
||||
set -g @resurrect-dir '$HOME/.local/share/tmux/resurrect'
|
||||
# Save command history in panes
|
||||
set -g @resurrect-save-shell-history 'on'
|
||||
'';
|
||||
}
|
||||
{
|
||||
plugin = continuum;
|
||||
extraConfig = ''
|
||||
# Continuum Configuration - Automatically save and restore sessions
|
||||
set -g @continuum-restore 'on'
|
||||
set -g @continuum-save-interval '5' # Save every 5 minutes for better persistence
|
||||
set -g @continuum-boot 'on' # Start tmux automatically on boot
|
||||
set -g @continuum-boot-options 'new-session -d -s main' # Create default session on boot
|
||||
'';
|
||||
}
|
||||
];
|
||||
|
||||
extraConfig = ''
|
||||
# Basic terminal setup
|
||||
set -g default-terminal "screen-256color"
|
||||
set-option -ga terminal-overrides ",xterm-256color:Tc"
|
||||
set-option -g default-command "zsh -l"
|
||||
setw -g mode-keys vi
|
||||
set -g base-index 1
|
||||
set -g pane-base-index 1
|
||||
set -g status-position top
|
||||
set -g status-style "bg=default"
|
||||
|
||||
# Pane navigation
|
||||
bind-key h select-pane -L
|
||||
bind-key j select-pane -D
|
||||
bind-key k select-pane -U
|
||||
bind-key l select-pane -R
|
||||
bind-key % split-window -h -c "#{pane_current_path}"
|
||||
bind-key '"' split-window -v -c "#{pane_current_path}"
|
||||
bind-key c new-window -c "#{pane_current_path}"
|
||||
|
||||
# Prefix key
|
||||
set -g prefix C-s
|
||||
bind C-s send-prefix
|
||||
|
||||
# Session management keybindings
|
||||
bind-key n new-session -d # Create new session
|
||||
bind-key C-n new-session # Create and attach new session
|
||||
bind-key C-l list-sessions # List all sessions
|
||||
bind-key C-d kill-session # Delete current session
|
||||
|
||||
# Enable mouse and scrollback
|
||||
set -g mouse on
|
||||
setw -g history-limit 10000
|
||||
|
||||
# Automatic system clipboard copy for selections
|
||||
bind -T copy-mode-vi y send -X copy-pipe-and-cancel "wl-copy"
|
||||
bind -T copy-mode-vi Enter send -X copy-pipe-and-cancel "wl-copy"
|
||||
|
||||
# Create resurrect directory if it doesn't exist
|
||||
run-shell 'mkdir -p ~/.local/share/tmux/resurrect'
|
||||
|
||||
# Pywal support - Load AFTER plugins so colors override rose-pine
|
||||
if-shell "test -f ~/.cache/wal/colors-tmux.sh" \
|
||||
"source-file ~/.cache/wal/colors-tmux.sh"
|
||||
# Watch for updates
|
||||
run-shell "while inotifywait -e close_write ~/.cache/wal/colors-tmux.sh 2>/dev/null; do tmux source-file ~/.cache/wal/colors-tmux.sh; done &"
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
||||
21
modules/virtualization/blackarch.nix
Normal file
@@ -0,0 +1,21 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
let
|
||||
blackarchISO = "https://blackarch.org/blackarch-linux-live-2023.12.01-x86_64.iso"; # Change URL if outdated
|
||||
vmStorage = "/var/lib/libvirt/images/blackarch.qcow2"; # Change this path if needed
|
||||
in
|
||||
pkgs.stdenv.mkDerivation {
|
||||
name = "blackarch-vm";
|
||||
buildInputs = [ pkgs.qemu ];
|
||||
|
||||
unpackPhase = "true"; # No unpacking needed
|
||||
|
||||
installPhase = ''
|
||||
echo "Creating BlackArch VM disk..."
|
||||
qemu-img create -f qcow2 ${vmStorage} 50G
|
||||
echo "BlackArch VM disk created at ${vmStorage}"
|
||||
'';
|
||||
|
||||
meta.description = "BlackArch Linux VM installation";
|
||||
}
|
||||
|
||||
6
modules/virtualization/default.nix
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
imports = [
|
||||
./vm.nix
|
||||
./blackarch.nix
|
||||
];
|
||||
}
|
||||
37
modules/virtualization/vm.nix
Normal file
@@ -0,0 +1,37 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
qemu
|
||||
libvirt
|
||||
uefi-run
|
||||
lxc
|
||||
swtpm
|
||||
bottles
|
||||
dosfstools
|
||||
virt-manager
|
||||
virt-viewer
|
||||
dnsmasq
|
||||
bridge-utils
|
||||
ebtables
|
||||
iptables
|
||||
];
|
||||
|
||||
virtualisation = {
|
||||
libvirtd = {
|
||||
enable = true;
|
||||
qemu.runAsRoot = false;
|
||||
};
|
||||
};
|
||||
|
||||
users.groups.libvirtd.members = [ "cody" ]; # Replace "cody" with your username
|
||||
|
||||
systemd.services.libvirtd.wantedBy = [ "multi-user.target" ];
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 5900 ]; # VNC for VM access
|
||||
|
||||
services.udev.packages = [ pkgs.qemu_kvm ];
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
}
|
||||
|
||||
6
modules/waybar/default.nix
Normal file
@@ -0,0 +1,6 @@
|
||||
{ ... }:
|
||||
{
|
||||
imports = [ (import ./waybar.nix) ]
|
||||
++ [ (import ./settings.nix) ]
|
||||
++ [ (import ./style.nix) ];
|
||||
}
|
||||
244
modules/waybar/settings.nix
Normal file
@@ -0,0 +1,244 @@
|
||||
{ ... }:
|
||||
{
|
||||
programs.waybar.settings.mainBar = {
|
||||
position= "top";
|
||||
layer= "top";
|
||||
height= 30;
|
||||
margin-top= 4;
|
||||
margin-bottom= 0;
|
||||
margin-left= 4;
|
||||
margin-right= 4;
|
||||
|
||||
modules-left= [
|
||||
"custom/icon"
|
||||
"custom/separator"
|
||||
"custom/separator"
|
||||
"custom/separator"
|
||||
"custom/separator"
|
||||
"clock"
|
||||
"custom/separator"
|
||||
"custom/swaync"
|
||||
];
|
||||
|
||||
modules-center= [
|
||||
"hyprland/workspaces"
|
||||
];
|
||||
|
||||
modules-right= [
|
||||
#"hyprland/window"
|
||||
"custom/cava_mviz"
|
||||
"network"
|
||||
"pulseaudio#audio"
|
||||
"pulseaudio#mic"
|
||||
"battery"
|
||||
"custom/power"
|
||||
"custom/separator"
|
||||
];
|
||||
|
||||
"hyprland/window" = {
|
||||
format = "<b>{}</b>";
|
||||
exec = "hyprctl activewindow | grep class | awk '{print $2}'";
|
||||
separate-outputs = true;
|
||||
max-length = 35;
|
||||
};
|
||||
|
||||
# clock= {
|
||||
# calendar = {
|
||||
# format = { today = "<span color='#b4befe'><b>{}</b></span>"; };
|
||||
# };
|
||||
# # format = " {:%H:%M}";
|
||||
# format = "{:%H:%M}";
|
||||
# tooltip= "true";
|
||||
# tooltip-format= "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
|
||||
# format-alt= " {:%d/%m}";
|
||||
# };
|
||||
#
|
||||
clock = {
|
||||
format = "{:%H:%M}";
|
||||
tooltip = true;
|
||||
tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
|
||||
on-click = "$HOME/.local/share/bin/open-calendar-floating.sh";
|
||||
};
|
||||
|
||||
"hyprland/workspaces" = {
|
||||
format = "{icon}";
|
||||
|
||||
format-icons = {
|
||||
active = ""; # filled circle
|
||||
default = ""; # empty circle
|
||||
};
|
||||
|
||||
persistent-workspaces = {
|
||||
"*" = 2; # always show exactly 3 workspaces
|
||||
};
|
||||
|
||||
sort-by-number = true;
|
||||
|
||||
on-scroll-up = "hyprctl dispatch workspace e-1";
|
||||
on-scroll-down = "hyprctl dispatch workspace e+1";
|
||||
on-click = "activate";
|
||||
};
|
||||
|
||||
memory= {
|
||||
format= " {}%";
|
||||
interval= 2;
|
||||
};
|
||||
|
||||
cpu= {
|
||||
format= " {usage}%";
|
||||
format-alt= " {avg_frequency} GHz";
|
||||
interval= 2;
|
||||
};
|
||||
|
||||
|
||||
network = {
|
||||
format-wifi = " ";
|
||||
format-ethernet = "";
|
||||
tooltip-format = "Connected to {essid} {ifname} via {gwaddr}";
|
||||
format-linked = "{ifname} (No IP)";
|
||||
format-disconnected = " ";
|
||||
on-click = "bash $HOME/.dotfiles/scripts/rofi-network.sh";
|
||||
|
||||
};
|
||||
|
||||
# network = {
|
||||
# format-wifi = " ";
|
||||
# format-ethernet = "";
|
||||
# tooltip-format = "Connected to {essid} {ifname} via {gwaddr}";
|
||||
# format-linked = "{ifname} (No IP)";
|
||||
# format-disconnected = " ";
|
||||
# };
|
||||
#
|
||||
backlight = {
|
||||
format = "{icon} {percent}%";
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
interval = 2;
|
||||
};
|
||||
|
||||
"custom/right-arr" = {
|
||||
format = " ";
|
||||
};
|
||||
|
||||
battery = {
|
||||
format = "{icon} {capacity}% ";
|
||||
format-alt = "{icon} {time}";
|
||||
format-charging = " {capacity}% ";
|
||||
format-icons = [" " " " " " " "];
|
||||
|
||||
};
|
||||
|
||||
tray= {
|
||||
icon-size= 20;
|
||||
spacing= 8;
|
||||
};
|
||||
|
||||
"pulseaudio#audio" = {
|
||||
format = "{format_source}";
|
||||
format-source = " {volume} ";
|
||||
format-source-muted = " {volume} ";
|
||||
on-click = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
|
||||
on-scroll-up = "wpctl set-volume @DEFAULT_AUDIO_SINK@ -1%";
|
||||
on-scroll-down = "wpctl set-volume @DEFAULT_AUDIO_SINK@ +1%";
|
||||
scroll-step = 5;
|
||||
tooltip = false;
|
||||
};
|
||||
|
||||
"pulseaudio#mic" = {
|
||||
format = "{format_source}";
|
||||
format-source = " {volume} ";
|
||||
format-source-muted = " {volume} ";
|
||||
on-click = "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle";
|
||||
on-scroll-up = "wpctl set-volume @DEFAULT_AUDIO_SOURCE@ -1%";
|
||||
on-scroll-down = "wpctl set-volume @DEFAULT_AUDIO_SOURCE@ +1%";
|
||||
scroll-step = 5;
|
||||
tooltip = true;
|
||||
};
|
||||
|
||||
"pulseaudio/slider" = {
|
||||
min = 0;
|
||||
max = 100;
|
||||
orientation = "horizontal";
|
||||
};
|
||||
|
||||
# pulseaudio= {
|
||||
# format= "{icon} <b>{volume}</b> {format_source}";
|
||||
# format-source = " <b>{volume}</b> ";
|
||||
# format-source-muted = " ";
|
||||
# format-bluetooth = " ᛒ <b>{volume}</b> ";
|
||||
# format-bluetooth-muted = " ";
|
||||
# format-muted= " {format_source}";
|
||||
# format-icons= {
|
||||
# default= ["" "" ""];
|
||||
# };
|
||||
# scroll-step= 5;
|
||||
#
|
||||
# };
|
||||
#
|
||||
|
||||
"custom/cava_mviz" = {
|
||||
exec = "~/.local/share/bin/waybar-cava.sh";
|
||||
format = "<span></span> {} <span></span>";
|
||||
tooltip = false;
|
||||
};
|
||||
|
||||
"custom/swaync" = {
|
||||
tooltip = true;
|
||||
"tooltip-format" = "Left Click: Launch Notification Center\nRight Click: Do not Disturb";
|
||||
format = " {icon} ";
|
||||
"format-icons" = {
|
||||
notification = "<span foreground='red'><sup></sup></span>";
|
||||
none = "";
|
||||
"dnd-notification" = "<span foreground='red'><sup></sup></span>";
|
||||
"dnd-none" = "";
|
||||
"inhibited-notification" = "<span foreground='red'><sup></sup></span>";
|
||||
"inhibited-none" = "";
|
||||
"dnd-inhibited-notification" = "<span foreground='red'><sup></sup></span>";
|
||||
"dnd-inhibited-none" = "";
|
||||
};
|
||||
"return-type" = "json";
|
||||
"exec-if" = "which swaync-client";
|
||||
exec = "swaync-client -swb";
|
||||
"on-click" = "systemctl --user start swaync.service; swaync-client -t";
|
||||
"on-click-right" = "systemctl --user start swaync.service; swaync-client -d";
|
||||
escape = true;
|
||||
};
|
||||
|
||||
|
||||
"custom/icon"= {
|
||||
format= "";
|
||||
on-click= "sh -c 'rofi -show drun -theme fullscreen-grid &'";
|
||||
tooltip= "App Launcher";
|
||||
};
|
||||
|
||||
"custom/separtor" = {
|
||||
format = " ";
|
||||
};
|
||||
|
||||
"custom/browser" = {
|
||||
format = " ";
|
||||
};
|
||||
|
||||
"custom/window-icon" = {
|
||||
# to be added
|
||||
};
|
||||
|
||||
"custom/power" = {
|
||||
format = " ";
|
||||
tooltip = "Power menu";
|
||||
on-click = "sh -c 'wlogout &'";
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
183
modules/waybar/style.nix
Normal file
@@ -0,0 +1,183 @@
|
||||
{ ... }:
|
||||
let custom = {
|
||||
font = "JetBrainsMono Nerd Font";
|
||||
font_size = "14px";
|
||||
font_weight = "bold";
|
||||
};
|
||||
in
|
||||
{
|
||||
programs.waybar.style = ''
|
||||
|
||||
@import url("colors-waybar.css"); /* Dynamically generated by pywal */
|
||||
|
||||
* {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
font-family: ${custom.font};
|
||||
font-size: ${custom.font_size};
|
||||
font-weight: ${custom.font_weight};
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.modules-left {
|
||||
background-color: @color0;
|
||||
opacity: 0.9;
|
||||
border-radius: 4px;
|
||||
padding-right: 8px;
|
||||
padding-left: 15px;
|
||||
}
|
||||
|
||||
.modules-center {
|
||||
background-color: @color0;
|
||||
border-radius: 4px;
|
||||
opacity: 0.9;
|
||||
padding-right: 10px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.modules-right {
|
||||
background-color: @color0;
|
||||
border-radius: 4px;
|
||||
opacity: 0.9;
|
||||
padding-right: 15px;
|
||||
padding-left: 15px;
|
||||
}
|
||||
|
||||
#custom-icon {
|
||||
font-size: 24px;
|
||||
color: @color4;
|
||||
padding-right: 10px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
#cpu,
|
||||
#memory,
|
||||
#temperature {
|
||||
font-size: 14px;
|
||||
background: @color0;
|
||||
margin-top: 5px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
#cpu {
|
||||
color: #8ec07c;
|
||||
padding: 0px 10px 0px 12px;
|
||||
border-radius: 5px 0px 0px 5px;
|
||||
}
|
||||
|
||||
#memory {
|
||||
color: #000000;
|
||||
padding: 0px 10px 0px 0px;
|
||||
}
|
||||
|
||||
#temperature {
|
||||
color: #000000;
|
||||
padding: 0px 12px 0px 0px;
|
||||
border-radius: 0px 5px 5px 0px;
|
||||
}
|
||||
|
||||
#window {
|
||||
margin-right: 10px;
|
||||
margin-left: 10px;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
#workspaces button:nth-child(1) label {
|
||||
color: @color4;
|
||||
margin: 0px 8px;
|
||||
}
|
||||
|
||||
#workspaces button:nth-child(2) label {
|
||||
color: @color5;
|
||||
margin: 0px 8px;
|
||||
}
|
||||
|
||||
#workspaces button:nth-child(3) label {
|
||||
color: @color6;
|
||||
margin: 0px 8px;
|
||||
}
|
||||
|
||||
#workspaces button:nth-child(4) label {
|
||||
color: @color7;
|
||||
margin: 0px 8px;
|
||||
}
|
||||
|
||||
#workspaces button:nth-child(5) label {
|
||||
color: @color8;
|
||||
margin: 0px 8px;
|
||||
}
|
||||
|
||||
#workspaces button:nth-child(6) label {
|
||||
color: @color8;
|
||||
margin: 0px 8px;
|
||||
}
|
||||
|
||||
#battery {
|
||||
color: @color8;
|
||||
margin: 0px 10px 0px 0px;
|
||||
}
|
||||
|
||||
#pulseaudio,
|
||||
#backlight {
|
||||
font-size: 14px;
|
||||
background: @color0;
|
||||
margin-top: 5px;
|
||||
margin-bottom: 5px;
|
||||
color: @color4;
|
||||
padding: 0px 10px 0px 10px;
|
||||
border-radius: 5px 0px 0px 5px;
|
||||
}
|
||||
|
||||
#pulseaudio {
|
||||
color: @color5;
|
||||
padding: 0px 10px 0px 0px;
|
||||
border-radius: 0px 5px 5px 0px;
|
||||
}
|
||||
|
||||
#custom-swaync {
|
||||
color: @color7;
|
||||
}
|
||||
|
||||
#custom-cava_mviz {
|
||||
color: @color8;
|
||||
}
|
||||
|
||||
#custom-right-arr {
|
||||
color: @color4;
|
||||
}
|
||||
|
||||
#custom-power {
|
||||
color: @color7
|
||||
}
|
||||
|
||||
#network {
|
||||
color: @color4;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
#custom-dot {
|
||||
color: @color5;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
#custom-dot-alt {
|
||||
color: #a5adcb;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
#clock {
|
||||
padding-left: 10px;
|
||||
color: @color4;
|
||||
background-color: @color0;
|
||||
padding-right: 10px;
|
||||
margin-top: 5px;
|
||||
margin-bottom: 5px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
'';
|
||||
}
|
||||
9
modules/waybar/waybar.nix
Normal file
@@ -0,0 +1,9 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
};
|
||||
programs.waybar.package = pkgs.waybar.overrideAttrs (oa: {
|
||||
mesonFlags = (oa.mesonFlags or [ ]) ++ [ "-Dexperimental=true" ];
|
||||
});
|
||||
}
|
||||
6
modules/wlogout/default.nix
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
imports = [
|
||||
./wlogout.nix
|
||||
];
|
||||
}
|
||||
|
||||
BIN
modules/wlogout/icons/hibernate.png
Normal file
|
After Width: | Height: | Size: 4.6 KiB |
BIN
modules/wlogout/icons/lock.png
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
modules/wlogout/icons/logout.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
modules/wlogout/icons/reboot.png
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
BIN
modules/wlogout/icons/shutdown.png
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
modules/wlogout/icons/suspend.png
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
112
modules/wlogout/wlogout.nix
Normal file
@@ -0,0 +1,112 @@
|
||||
{ config, lib, ... }: {
|
||||
programs.wlogout = {
|
||||
enable = true;
|
||||
layout = [
|
||||
{
|
||||
label = "shutdown";
|
||||
action = "sleep 1; systemctl poweroff";
|
||||
text = "Shutdown";
|
||||
keybind = "s";
|
||||
}
|
||||
{
|
||||
label = "reboot";
|
||||
action = "sleep 1; systemctl reboot";
|
||||
text = "Reboot";
|
||||
keybind = "r";
|
||||
}
|
||||
{
|
||||
label = "logout";
|
||||
action = "sleep 1; hyprctl dispatch exit";
|
||||
text = "Exit";
|
||||
keybind = "e";
|
||||
}
|
||||
{
|
||||
label = "suspend";
|
||||
action = "sleep 1; systemctl suspend";
|
||||
text = "Suspend";
|
||||
keybind = "u";
|
||||
}
|
||||
{
|
||||
label = "lock";
|
||||
action = "sleep 1; hyprlock";
|
||||
text = "Lock";
|
||||
keybind = "l";
|
||||
}
|
||||
{
|
||||
label = "hibernate";
|
||||
action = "sleep 1; systemctl hibernate";
|
||||
text = "Hibernate";
|
||||
keybind = "h";
|
||||
}
|
||||
];
|
||||
style = ''
|
||||
@import url("./colors-waybar.css");
|
||||
|
||||
* {
|
||||
font-family: "JetBrainsMono NF", FontAwesome, sans-serif;
|
||||
background-image: none;
|
||||
transition: 20ms;
|
||||
}
|
||||
window {
|
||||
background-color: alpha(@background, 0.9);
|
||||
}
|
||||
button {
|
||||
color: @foreground;
|
||||
font-size: 20px;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-size: 15%;
|
||||
border-style: solid;
|
||||
background-color: alpha(@background, 0.3);
|
||||
border: 3px solid @foreground;
|
||||
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
|
||||
}
|
||||
button:focus,
|
||||
button:active,
|
||||
button:hover {
|
||||
color: @color2;
|
||||
background-color: alpha(@background, 0.5);
|
||||
border: 3px solid @color2;
|
||||
}
|
||||
#logout {
|
||||
margin: 10px;
|
||||
border-radius: 20px;
|
||||
background-image: image(url("icons/logout.png"));
|
||||
}
|
||||
#suspend {
|
||||
margin: 10px;
|
||||
border-radius: 20px;
|
||||
background-image: image(url("icons/suspend.png"));
|
||||
}
|
||||
#shutdown {
|
||||
margin: 10px;
|
||||
border-radius: 20px;
|
||||
background-image: image(url("icons/shutdown.png"));
|
||||
}
|
||||
#reboot {
|
||||
margin: 10px;
|
||||
border-radius: 20px;
|
||||
background-image: image(url("icons/reboot.png"));
|
||||
}
|
||||
#lock {
|
||||
margin: 10px;
|
||||
border-radius: 20px;
|
||||
background-image: image(url("icons/lock.png"));
|
||||
}
|
||||
#hibernate {
|
||||
margin: 10px;
|
||||
border-radius: 20px;
|
||||
background-image: image(url("icons/hibernate.png"));
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
home.file.".config/wlogout/icons" = {
|
||||
source = ./icons;
|
||||
recursive = true;
|
||||
};
|
||||
|
||||
# Note: colors.css is managed by set-wallpaper.sh script which copies from pywal cache
|
||||
# It cannot be managed by home-manager due to pure evaluation restrictions
|
||||
}
|
||||
|
||||
30
modules/yazi/default.nix
Normal file
@@ -0,0 +1,30 @@
|
||||
{pkgs, ...}: let
|
||||
settings = import ./yazi.nix;
|
||||
keymap = import ./keymap.nix;
|
||||
theme = import ./theme.nix;
|
||||
in {
|
||||
programs.yazi = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
enableBashIntegration = true;
|
||||
enableFishIntegration = true;
|
||||
shellWrapperName = "yy";
|
||||
settings = settings;
|
||||
keymap = keymap;
|
||||
theme = theme;
|
||||
plugins = {
|
||||
lazygit = pkgs.yaziPlugins.lazygit;
|
||||
full-border = pkgs.yaziPlugins.full-border;
|
||||
git = pkgs.yaziPlugins.git;
|
||||
smart-enter = pkgs.yaziPlugins.smart-enter;
|
||||
};
|
||||
|
||||
initLua = ''
|
||||
require("full-border"):setup()
|
||||
require("git"):setup()
|
||||
require("smart-enter"):setup {
|
||||
open_multi = true,
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
1201
modules/yazi/keymap.nix
Normal file
3404
modules/yazi/theme.nix
Normal file
387
modules/yazi/yazi.nix
Normal file
@@ -0,0 +1,387 @@
|
||||
{
|
||||
settings = {
|
||||
manager = {
|
||||
ratio = [1 4 3];
|
||||
sort_by = "alphabetical";
|
||||
sort_sensitive = false;
|
||||
sort_reverse = false;
|
||||
sort_dir_first = true;
|
||||
sort_translit = false;
|
||||
linemode = "none";
|
||||
show_hidden = false;
|
||||
show_symlink = true;
|
||||
scrolloff = 5;
|
||||
mouse_events = ["click" "scroll"];
|
||||
title_format = "Yazi: {cwd}";
|
||||
};
|
||||
preview = {
|
||||
wrap = "no";
|
||||
tab_size = 2;
|
||||
max_width = 600;
|
||||
max_height = 900;
|
||||
cache_dir = "";
|
||||
image_delay = 30;
|
||||
image_filter = "triangle";
|
||||
image_quality = 75;
|
||||
sixel_fraction = 15;
|
||||
ueberzug_scale = 1;
|
||||
ueberzug_offset = [0 0 0 0];
|
||||
};
|
||||
opener = {
|
||||
edit = [
|
||||
{
|
||||
run = ''nvim "$@"'';
|
||||
desc = "nvim";
|
||||
block = true;
|
||||
for = "unix";
|
||||
}
|
||||
{
|
||||
run = "code %*";
|
||||
orphan = true;
|
||||
desc = "code";
|
||||
for = "windows";
|
||||
}
|
||||
{
|
||||
run = "code -w %*";
|
||||
block = true;
|
||||
desc = "code (block)";
|
||||
for = "windows";
|
||||
}
|
||||
];
|
||||
open = [
|
||||
{
|
||||
run = ''xdg-open "$1"'';
|
||||
desc = "Open";
|
||||
for = "linux";
|
||||
}
|
||||
{
|
||||
run = ''open "$@"'';
|
||||
desc = "Open";
|
||||
for = "macos";
|
||||
}
|
||||
{
|
||||
run = ''start "" "%1"'';
|
||||
orphan = true;
|
||||
desc = "Open";
|
||||
for = "windows";
|
||||
}
|
||||
{
|
||||
run = ''termux-open "$1"'';
|
||||
desc = "Open";
|
||||
for = "android";
|
||||
}
|
||||
];
|
||||
reveal = [
|
||||
{
|
||||
run = ''xdg-open "$(dirname "$1")"'';
|
||||
desc = "Reveal";
|
||||
for = "linux";
|
||||
}
|
||||
{
|
||||
run = ''open -R "$1"'';
|
||||
desc = "Reveal";
|
||||
for = "macos";
|
||||
}
|
||||
{
|
||||
run = ''explorer /select,"%1"'';
|
||||
orphan = true;
|
||||
desc = "Reveal";
|
||||
for = "windows";
|
||||
}
|
||||
{
|
||||
run = ''termux-open "$(dirname "$1")"'';
|
||||
desc = "Reveal";
|
||||
for = "android";
|
||||
}
|
||||
{
|
||||
run = ''exiftool "$1"; echo "Press enter to exit"; read _'';
|
||||
block = true;
|
||||
desc = "Show EXIF";
|
||||
for = "unix";
|
||||
}
|
||||
];
|
||||
extract = [
|
||||
{
|
||||
run = ''ya pub extract --list "$@"'';
|
||||
desc = "Extract here";
|
||||
for = "unix";
|
||||
}
|
||||
{
|
||||
run = "ya pub extract --list %*";
|
||||
desc = "Extract here";
|
||||
for = "windows";
|
||||
}
|
||||
];
|
||||
play = [
|
||||
{
|
||||
run = ''mpv --force-window "$@"'';
|
||||
orphan = true;
|
||||
for = "unix";
|
||||
}
|
||||
{
|
||||
run = "mpv --force-window %*";
|
||||
orphan = true;
|
||||
for = "windows";
|
||||
}
|
||||
{
|
||||
run = ''mediainfo "$1"; echo "Press enter to exit"; read _'';
|
||||
block = true;
|
||||
desc = "Show media info";
|
||||
for = "unix";
|
||||
}
|
||||
];
|
||||
};
|
||||
open = {
|
||||
rules = [
|
||||
{
|
||||
name = "*/";
|
||||
use = ["edit" "open" "reveal"];
|
||||
}
|
||||
{
|
||||
mime = "text/*";
|
||||
use = ["edit" "reveal"];
|
||||
}
|
||||
{
|
||||
mime = "image/*";
|
||||
use = ["open" "reveal"];
|
||||
}
|
||||
{
|
||||
mime = "{audio,video}/*";
|
||||
use = ["play" "reveal"];
|
||||
}
|
||||
{
|
||||
mime = "application/{zip,rar,7z*,tar,gzip,xz,zstd,bzip*,lzma,compress,archive,cpio,arj,xar,ms-cab*}";
|
||||
use = ["extract" "reveal"];
|
||||
}
|
||||
{
|
||||
mime = "application/{json,ndjson}";
|
||||
use = ["edit" "reveal"];
|
||||
}
|
||||
{
|
||||
mime = "*/javascript";
|
||||
use = ["edit" "reveal"];
|
||||
}
|
||||
{
|
||||
mime = "inode/empty";
|
||||
use = ["edit" "reveal"];
|
||||
}
|
||||
{
|
||||
name = "*";
|
||||
use = ["open" "reveal"];
|
||||
}
|
||||
];
|
||||
};
|
||||
tasks = {
|
||||
micro_workers = 10;
|
||||
macro_workers = 10;
|
||||
bizarre_retry = 3;
|
||||
image_alloc = 536870912;
|
||||
image_bound = [0 0];
|
||||
suppress_preload = false;
|
||||
};
|
||||
plugin = {
|
||||
fetchers = [
|
||||
{
|
||||
id = "mime";
|
||||
name = "*";
|
||||
run = "mime";
|
||||
prio = "high";
|
||||
}
|
||||
];
|
||||
spotters = [
|
||||
{
|
||||
name = "*/";
|
||||
run = "folder";
|
||||
}
|
||||
{
|
||||
mime = "text/*";
|
||||
run = "code";
|
||||
}
|
||||
{
|
||||
mime = "application/{mbox,javascript,wine-extension-ini}";
|
||||
run = "code";
|
||||
}
|
||||
{
|
||||
mime = "image/{avif,hei?,jxl,svg+xml}";
|
||||
run = "magick";
|
||||
}
|
||||
{
|
||||
mime = "image/*";
|
||||
run = "image";
|
||||
}
|
||||
{
|
||||
mime = "video/*";
|
||||
run = "video";
|
||||
}
|
||||
{
|
||||
name = "*";
|
||||
run = "file";
|
||||
}
|
||||
];
|
||||
preloaders = [
|
||||
{
|
||||
mime = "image/{avif,hei?,jxl,svg+xml}";
|
||||
run = "magick";
|
||||
}
|
||||
{
|
||||
mime = "image/*";
|
||||
run = "image";
|
||||
}
|
||||
{
|
||||
mime = "video/*";
|
||||
run = "video";
|
||||
}
|
||||
{
|
||||
mime = "application/pdf";
|
||||
run = "pdf";
|
||||
}
|
||||
{
|
||||
mime = "font/*";
|
||||
run = "font";
|
||||
}
|
||||
{
|
||||
mime = "application/ms-opentype";
|
||||
run = "font";
|
||||
}
|
||||
];
|
||||
previewers = [
|
||||
{
|
||||
name = "*/";
|
||||
run = "folder";
|
||||
sync = true;
|
||||
}
|
||||
{
|
||||
mime = "text/*";
|
||||
run = "code";
|
||||
}
|
||||
{
|
||||
mime = "application/{mbox,javascript,wine-extension-ini}";
|
||||
run = "code";
|
||||
}
|
||||
{
|
||||
mime = "application/{json,ndjson}";
|
||||
run = "json";
|
||||
}
|
||||
{
|
||||
mime = "image/{avif,hei?,jxl,svg+xml}";
|
||||
run = "magick";
|
||||
}
|
||||
{
|
||||
mime = "image/*";
|
||||
run = "image";
|
||||
}
|
||||
{
|
||||
mime = "video/*";
|
||||
run = "video";
|
||||
}
|
||||
{
|
||||
mime = "application/pdf";
|
||||
run = "pdf";
|
||||
}
|
||||
{
|
||||
mime = "application/{zip,rar,7z*,tar,gzip,xz,zstd,bzip*,lzma,compress,archive,cpio,arj,xar,ms-cab*}";
|
||||
run = "archive";
|
||||
}
|
||||
{
|
||||
mime = "application/{debian*-package,redhat-package-manager,rpm,android.package-archive}";
|
||||
run = "archive";
|
||||
}
|
||||
{
|
||||
name = "*.{AppImage,appimage}";
|
||||
run = "archive";
|
||||
}
|
||||
{
|
||||
mime = "application/{iso9660-image,qemu-disk,ms-wim,apple-diskimage}";
|
||||
run = "archive";
|
||||
}
|
||||
{
|
||||
mime = "application/virtualbox-{vhd,vhdx}";
|
||||
run = "archive";
|
||||
}
|
||||
{
|
||||
name = "*.{img,fat,ext,ext2,ext3,ext4,squashfs,ntfs,hfs,hfsx}";
|
||||
run = "archive";
|
||||
}
|
||||
{
|
||||
mime = "font/*";
|
||||
run = "font";
|
||||
}
|
||||
{
|
||||
mime = "application/ms-opentype";
|
||||
run = "font";
|
||||
}
|
||||
{
|
||||
mime = "inode/empty";
|
||||
run = "empty";
|
||||
}
|
||||
{
|
||||
name = "*";
|
||||
run = "file";
|
||||
}
|
||||
];
|
||||
prepend_fetchers = [
|
||||
{
|
||||
id = "git";
|
||||
name = "*";
|
||||
run = "git";
|
||||
}
|
||||
{
|
||||
id = "git";
|
||||
name = "*/";
|
||||
run = "git";
|
||||
}
|
||||
];
|
||||
};
|
||||
input = {
|
||||
cursor_blink = false;
|
||||
cd_title = "Change directory:";
|
||||
cd_origin = "top-center";
|
||||
cd_offset = [0 2 50 3];
|
||||
create_title = ["Create:" "Create (dir):"];
|
||||
create_origin = "top-center";
|
||||
create_offset = [0 2 50 3];
|
||||
rename_title = "Rename:";
|
||||
rename_origin = "hovered";
|
||||
rename_offset = [0 1 50 3];
|
||||
filter_title = "Filter:";
|
||||
filter_origin = "top-center";
|
||||
filter_offset = [0 2 50 3];
|
||||
find_title = ["Find next:" "Find previous:"];
|
||||
find_origin = "top-center";
|
||||
find_offset = [0 2 50 3];
|
||||
search_title = "Search via {n}:";
|
||||
search_origin = "top-center";
|
||||
search_offset = [0 2 50 3];
|
||||
shell_title = ["Shell:" "Shell (block):"];
|
||||
shell_origin = "top-center";
|
||||
shell_offset = [0 2 50 3];
|
||||
};
|
||||
confirm = {
|
||||
trash_title = "Trash {n} selected file{s}?";
|
||||
trash_origin = "center";
|
||||
trash_offset = [0 0 70 20];
|
||||
delete_title = "Permanently delete {n} selected file{s}?";
|
||||
delete_origin = "center";
|
||||
delete_offset = [0 0 70 20];
|
||||
overwrite_title = "Overwrite file?";
|
||||
overwrite_content = "Will overwrite the following file:";
|
||||
overwrite_origin = "center";
|
||||
overwrite_offset = [0 0 50 15];
|
||||
quit_title = "Quit?";
|
||||
quit_content = "The following tasks are still running, are you sure you want to quit?";
|
||||
quit_origin = "center";
|
||||
quit_offset = [0 0 50 15];
|
||||
};
|
||||
pick = {
|
||||
open_title = "Open with:";
|
||||
open_origin = "hovered";
|
||||
open_offset = [0 1 50 7];
|
||||
};
|
||||
which = {
|
||||
sort_by = "none";
|
||||
sort_sensitive = false;
|
||||
sort_reverse = false;
|
||||
sort_translit = false;
|
||||
};
|
||||
};
|
||||
}
|
||||
8
overlays/default.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
# Overlay custom derivations into nixpkgs so you can use pkgs.<name>
|
||||
# These packages are automatically available in all modules and configurations
|
||||
customPackages = final: _prev:
|
||||
import ../pkgs {
|
||||
pkgs = final;
|
||||
};
|
||||
}
|
||||
7
pkgs/default.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
# SDDM theme packages
|
||||
# These will be overlayed into nixpkgs automatically
|
||||
# Usage: pkgs.sddm-sugar-dark-theme
|
||||
sddm-sugar-dark-theme = pkgs.callPackage ./sddm-themes/sugar-dark.nix { };
|
||||
}
|
||||
27
pkgs/sddm-themes/sugar-dark.nix
Normal file
@@ -0,0 +1,27 @@
|
||||
{
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
}:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "sddm-sugar-dark-theme";
|
||||
version = "ceb2c45";
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/share/sddm/themes
|
||||
cp -aR $src $out/share/sddm/themes/sugar-dark
|
||||
'';
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "MarianArlt";
|
||||
repo = "sddm-sugar-dark";
|
||||
rev = "ceb2c455663429be03ba62d9f898c571650ef7fe";
|
||||
sha256 = "0153z1kylbhc9d12nxy9vpn0spxgrhgy36wy37pk6ysq7akaqlvy";
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "Sugar Dark Theme for SDDM";
|
||||
homepage = "https://github.com/MarianArlt/sddm-sugar-dark";
|
||||
license = "GPL-3.0-or-later";
|
||||
};
|
||||
}
|
||||
83
scripts/amdgpu.py
Executable file
@@ -0,0 +1,83 @@
|
||||
import pyamdgpuinfo
|
||||
import json
|
||||
|
||||
def format_frequency(frequency_hz: int) -> str:
|
||||
"""
|
||||
Takes a frequency (in Hz) and normalizes it: `Hz`, `MHz`, or `GHz`
|
||||
|
||||
Returns:
|
||||
str: frequency string with the appropriate suffix applied
|
||||
"""
|
||||
return (
|
||||
format_size(frequency_hz, binary=False)
|
||||
.replace("B", "Hz")
|
||||
.replace("bytes", "Hz")
|
||||
)
|
||||
|
||||
def format_size(size: int, binary=True) -> str:
|
||||
"""
|
||||
Format size in bytes to a human-readable format.
|
||||
|
||||
Args:
|
||||
size (int): Size in bytes.
|
||||
binary (bool): If True, use binary (base 1024) units.
|
||||
|
||||
Returns:
|
||||
str: Formatted size string.
|
||||
"""
|
||||
suffixes = ["B", "KiB", "MiB", "GiB", "TiB"] if binary else ["B", "KB", "MB", "GB", "TB"]
|
||||
base = 1024 if binary else 1000
|
||||
index = 0
|
||||
|
||||
while size >= base and index < len(suffixes) - 1:
|
||||
size /= base
|
||||
index += 1
|
||||
|
||||
return f"{size:.0f} {suffixes[index]}"
|
||||
|
||||
def main():
|
||||
# Detect the number of GPUs available
|
||||
n_devices = pyamdgpuinfo.detect_gpus()
|
||||
|
||||
if n_devices == 0:
|
||||
print("No AMD GPUs detected.")
|
||||
return
|
||||
|
||||
# Get GPU information for the first GPU (index 0)
|
||||
first_gpu = pyamdgpuinfo.get_gpu(0)
|
||||
|
||||
try:
|
||||
# Query GPU temperature
|
||||
temperature = first_gpu.query_temperature()
|
||||
temperature = f"{temperature:.0f}°C" # Format temperature to 2 digits with "°C"
|
||||
|
||||
# Query GPU core clock
|
||||
core_clock_hz = first_gpu.query_sclk() # In Hz
|
||||
formatted_core_clock = format_frequency(core_clock_hz)
|
||||
|
||||
# Query GPU power consumption
|
||||
power_usage = first_gpu.query_power()
|
||||
|
||||
# Query GPU load
|
||||
gpu_load = first_gpu.query_load()
|
||||
formatted_gpu_load = f"{gpu_load:.1f}%" # Format GPU load to 1 decimal place
|
||||
|
||||
# Create a dictionary with the GPU information
|
||||
gpu_info = {
|
||||
"GPU Temperature": temperature,
|
||||
"GPU Load": formatted_gpu_load,
|
||||
"GPU Core Clock": formatted_core_clock,
|
||||
"GPU Power Usage": f"{power_usage} Watts"
|
||||
}
|
||||
|
||||
# Convert the dictionary to a JSON string, ensure_ascii=False to prevent escaping
|
||||
json_output = json.dumps(gpu_info, ensure_ascii=False)
|
||||
|
||||
# Print the JSON string
|
||||
print(json_output)
|
||||
|
||||
except Exception as e:
|
||||
print(f"Error: {str(e)}")
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
84
scripts/animations.sh
Executable file
@@ -0,0 +1,84 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Define paths
|
||||
scrDir=$(dirname "$(realpath "$0")")
|
||||
source "$scrDir/globalcontrol.sh"
|
||||
config_dir="$HOME/.config"
|
||||
animations_dir="$config_dir/hypr/animations"
|
||||
animations_conf="$config_dir/hypr/animations.conf"
|
||||
rofi_theme="$config_dir/rofi/clipboard.rasi"
|
||||
|
||||
# Set rofi scaling
|
||||
[[ "${rofiScale}" =~ ^[0-9]+$ ]] || rofiScale=10
|
||||
r_scale="configuration {font: \"JetBrainsMono Nerd Font ${rofiScale}\";}"
|
||||
wind_border=$((hypr_border * 3 / 2))
|
||||
elem_border=$([ $hypr_border -eq 0 ] && echo "5" || echo $hypr_border)
|
||||
|
||||
# Evaluate spawn position
|
||||
readarray -t curPos < <(hyprctl cursorpos -j | jq -r '.x,.y')
|
||||
readarray -t monRes < <(hyprctl -j monitors | jq '.[] | select(.focused==true) | .width,.height,.scale,.x,.y')
|
||||
readarray -t offRes < <(hyprctl -j monitors | jq -r '.[] | select(.focused==true).reserved | map(tostring) | join("\n")')
|
||||
monRes[2]="$(echo "${monRes[2]}" | sed "s/\.//")"
|
||||
monRes[0]="$(( ${monRes[0]} * 100 / ${monRes[2]} ))"
|
||||
monRes[1]="$(( ${monRes[1]} * 100 / ${monRes[2]} ))"
|
||||
curPos[0]="$(( ${curPos[0]} - ${monRes[3]} ))"
|
||||
curPos[1]="$(( ${curPos[1]} - ${monRes[4]} ))"
|
||||
|
||||
if [ "${curPos[0]}" -ge "$((${monRes[0]} / 2))" ] ; then
|
||||
x_pos="east"
|
||||
x_off="-$(( ${monRes[0]} - ${curPos[0]} - ${offRes[2]} ))"
|
||||
else
|
||||
x_pos="west"
|
||||
x_off="$(( ${curPos[0]} - ${offRes[0]} ))"
|
||||
fi
|
||||
|
||||
if [ "${curPos[1]}" -ge "$((${monRes[1]} / 2))" ] ; then
|
||||
y_pos="south"
|
||||
y_off="-$(( ${monRes[1]} - ${curPos[1]} - ${offRes[3]} ))"
|
||||
else
|
||||
y_pos="north"
|
||||
y_off="$(( ${curPos[1]} - ${offRes[1]} ))"
|
||||
fi
|
||||
|
||||
r_override="window{location:${x_pos} ${y_pos};anchor:${x_pos} ${y_pos};x-offset:${x_off}px;y-offset:${y_off}px;border:${hypr_width}px;border-radius:${wind_border}px;} wallbox{border-radius:${elem_border}px;} element{border-radius:${elem_border}px;}"
|
||||
|
||||
# Ensure the animations directory exists
|
||||
if [ ! -d "$animations_dir" ]; then
|
||||
notify-send "Error" "Animations directory does not exist at $animations_dir"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# List available .conf files in animations directory
|
||||
animation_files=$(ls "$animations_dir"/*.conf 2>/dev/null)
|
||||
if [ -z "$animation_files" ]; then
|
||||
notify-send "Error" "No .conf files found in $animations_dir"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Display options using Rofi with custom scaling, positioning, and placeholder
|
||||
selected_animation=$(echo "$animation_files" | awk -F/ '{print $NF}' | \
|
||||
rofi -dmenu \
|
||||
-p "Select animation" \
|
||||
-theme-str "entry { placeholder: \"Select animation...\"; }" \
|
||||
-theme-str "${r_scale}" \
|
||||
-theme-str "${r_override}" \
|
||||
-theme "$rofi_theme")
|
||||
|
||||
# Exit if no selection was made
|
||||
if [ -z "$selected_animation" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Generate the new source line
|
||||
selected_path="$animations_dir/$selected_animation"
|
||||
new_source_line="source = $selected_path"
|
||||
|
||||
# Update the animations.conf file
|
||||
if grep -q "^source = " "$animations_conf"; then
|
||||
sed -i "s|^source = .*|$new_source_line|" "$animations_conf"
|
||||
else
|
||||
echo "$new_source_line" >> "$animations_conf"
|
||||
fi
|
||||
|
||||
# Notify the user
|
||||
notify-send "Animation Updated" "Sourced $selected_animation"
|
||||
228
scripts/batterynotify.sh
Executable file
@@ -0,0 +1,228 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
undock=false
|
||||
scrDir=$(dirname "$(realpath "$0")")
|
||||
source $scrDir/globalcontrol.sh
|
||||
batterynotify_conf="${hydeConfDir}/hyde.conf" # Shared with hyde configuration
|
||||
config_info() {
|
||||
cat << EOF
|
||||
|
||||
Modify $batterynotify_conf to set options.
|
||||
|
||||
STATUS THRESHOLD INTERVAL
|
||||
Full $battery_full_threshold $notify Minutes
|
||||
Critical $battery_critical_threshold $timer Seconds then '$execute_critical'
|
||||
Low $battery_low_threshold $interval Percent then '$execute_low'
|
||||
Unplug $unplug_charger_threshold $interval Percent then '$execute_unplug'
|
||||
|
||||
Charging: $execute_charging
|
||||
Discharging: $execute_discharging
|
||||
EOF
|
||||
}
|
||||
|
||||
is_laptop() { # Check if the system is a laptop
|
||||
if grep -q "Battery" /sys/class/power_supply/BAT*/type; then
|
||||
return 0 # It's a laptop
|
||||
else
|
||||
echo "No battery detected. If you think this is an error please post a report to the repo"
|
||||
exit 0 # It's not a laptop
|
||||
fi
|
||||
}
|
||||
is_laptop
|
||||
fn_verbose () {
|
||||
if $verbose; then
|
||||
cat << VERBOSE
|
||||
=============================================
|
||||
Battery Status: $battery_status
|
||||
Battery Percentage: $battery_percentage
|
||||
=============================================
|
||||
VERBOSE
|
||||
fi
|
||||
}
|
||||
fn_notify () { # Send notification
|
||||
|
||||
notify-send -a "Power" $1 -u $2 "$3" "$4" -p # Call the notify-send command with the provided arguments \$1 is the flags \$2 is the urgency \$3 is the title \$4 is the message
|
||||
}
|
||||
fn_percentage () {
|
||||
if [[ "$battery_percentage" -ge "$unplug_charger_threshold" ]] && [[ "$battery_status" != "Discharging" ]] && [[ "$battery_status" != "Full" ]] && (( (battery_percentage - last_notified_percentage) >= $interval )); then if $verbose; then echo "Prompt:UNPLUG: $battery_unplug_threshold $battery_status $battery_percentage" ; fi
|
||||
fn_notify "-t 5000 " "CRITICAL" "Battery Charged" "Battery is at $battery_percentage%. You can unplug the charger!"
|
||||
last_notified_percentage=$battery_percentage
|
||||
elif [[ "$battery_percentage" -le "$battery_critical_threshold" ]]; then
|
||||
count=$(( timer > $mnt ? timer : $mnt )) # reset count
|
||||
while [ $count -gt 0 ] && [[ $battery_status == "Discharging"* ]]; do
|
||||
for battery in /sys/class/power_supply/BAT*; do battery_status=$(< "$battery/status") ; done
|
||||
if [[ $battery_status != "Discharging" ]] ; then break ; fi
|
||||
fn_notify "-t 5000 -r 69 " "CRITICAL" "Battery Critically Low" "$battery_percentage% is critically low. Device will execute $execute_critical in $((count/60)):$((count%60)) ."
|
||||
count=$((count-1))
|
||||
sleep 1
|
||||
done
|
||||
[ $count -eq 0 ] && fn_action
|
||||
elif [[ "$battery_percentage" -le "$battery_low_threshold" ]] && [[ "$battery_status" == "Discharging" ]] && (( (last_notified_percentage - battery_percentage) >= $interval )); then if $verbose; then echo "Prompt:LOW: $battery_low_threshold $battery_status $battery_percentage" ; fi
|
||||
fn_notify "-t 5000 " "CRITICAL" "Battery Low" "Battery is at $battery_percentage%. Connect the charger."
|
||||
last_notified_percentage=$battery_percentage
|
||||
fi
|
||||
}
|
||||
fn_action () { #handles the $execute_critical command #? This is special as it will try to execute always
|
||||
count=$(( timer > $mnt ? timer : $mnt )) # reset count
|
||||
nohup $execute_critical
|
||||
}
|
||||
|
||||
fn_status () {
|
||||
if [[ $battery_percentage -ge $battery_full_threshold ]] && [[ "$battery_status" != *"Discharging"* ]]; then echo "Full and $battery_status"
|
||||
battery_status="Full" ;fi
|
||||
case "$battery_status" in # Handle the power supply status
|
||||
"Discharging") if $verbose; then echo "Case:$battery_status Level: $battery_percentage" ;fi
|
||||
if [[ "$prev_status" != "Discharging" ]] || [[ "$prev_status" == "Full" ]] ; then
|
||||
prev_status=$battery_status
|
||||
urgency=$([[ $battery_percentage -le "$battery_low_threshold" ]] && echo "CRITICAL" || echo "NORMAL")
|
||||
fn_notify "-t 5000 -r 54321 " "$urgency" "Charger Plug OUT" "Battery is at $battery_percentage%."
|
||||
$execute_discharging
|
||||
fi
|
||||
fn_percentage
|
||||
;;
|
||||
"Not"*|"Charging") if $verbose; then echo "Case:$battery_status Level: $battery_percentage" ;fi
|
||||
if [[ "$prev_status" == "Discharging" ]] || [[ "$prev_status" == "Not"* ]] ; then
|
||||
prev_status=$battery_status
|
||||
count=$(( timer > $mnt ? timer : $mnt )) # reset count
|
||||
urgency=$([[ "$battery_percentage" -ge $unplug_charger_threshold ]] && echo "CRITICAL" || echo "NORMAL")
|
||||
fn_notify "-t 5000 -r 54321 " "$urgency" "Charger Plug In" "Battery is at $battery_percentage%."
|
||||
$execute_charging
|
||||
fi
|
||||
fn_percentage
|
||||
;;
|
||||
"Full") if $verbose; then echo "Case:$battery_status Level: $battery_percentage" ;fi
|
||||
if [[ $battery_status != "Discharging" ]]; then
|
||||
now=$(date +%s)
|
||||
if [[ "$prev_status" == *"harging"* ]] || ((now - lt >= $((notify*60)) )); then
|
||||
fn_notify "-t 5000 -r 54321" "CRITICAL" "Battery Full" "Please unplug your Charger"
|
||||
prev_status=$battery_status lt=$now
|
||||
$execute_charging
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
if [[ ! -f "/tmp/hyprdots.batterynotify.status.fallback.$battery_status-$$" ]]; then
|
||||
echo "Status: '==>> "$battery_status" <<==' Script on Fallback mode,Unknown power supply status.Please copy this line and raise an issue to the Github Repo.Also run 'ls /tmp/hyprdots.batterynotify' to see the list of lock files.*"
|
||||
touch "/tmp/hyprdots.batterynotify.status.fallback.$battery_status-$$"
|
||||
fi
|
||||
fn_percentage
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
get_battery_info() { #TODO Might change this if we can get an effective way to parse dbus. I will do it some time...
|
||||
total_percentage=0 battery_count=0
|
||||
for battery in /sys/class/power_supply/BAT*; do
|
||||
battery_status=$(<"$battery/status") battery_percentage=$(<"$battery/capacity")
|
||||
total_percentage=$((total_percentage + battery_percentage))
|
||||
battery_count=$((battery_count + 1))
|
||||
done
|
||||
battery_percentage=$((total_percentage / battery_count)) #? For Multiple Battery
|
||||
}
|
||||
|
||||
fn_status_change () { # Handle when status changes
|
||||
get_battery_info
|
||||
# Add these two lines at the beginning of the function
|
||||
local executed_low=false
|
||||
local executed_unplug=false
|
||||
|
||||
if [ "$battery_status" != "$last_battery_status" ] || [ "$battery_percentage" != "$last_battery_percentage" ]; then
|
||||
last_battery_status=$battery_status
|
||||
last_battery_percentage=$battery_percentage # Check if battery status or percentage has changed
|
||||
fn_verbose
|
||||
fn_percentage
|
||||
|
||||
if [[ "$battery_percentage" -le "$battery_low_threshold" ]] && ! $executed_low; then $execute_low
|
||||
executed_low=true executed_unplug=false
|
||||
fi
|
||||
if [[ "$battery_percentage" -ge "$unplug_charger_threshold" ]] && ! $executed_unplug; then $execute_unplug
|
||||
executed_unplug=true executed_low=false
|
||||
fi
|
||||
|
||||
if $undock; then fn_status; fi
|
||||
fi
|
||||
}
|
||||
|
||||
# resume_processes() { for pid in $pids ; do if [ "$pid" -ne "$current_pid" ] ; then kill -CONT $pid ; notify-send -a "Battery Notify" -t 2000 -r 9889 -u "CRITICAL" "Debugging ENDED, Resuming Regular Process" ; fi ; done }
|
||||
|
||||
main() { # Main function
|
||||
rm -fr /tmp/hyprdots.batterynotify* # Cleaning the lock file
|
||||
battery_full_threshold=${battery_full_threshold:-100}
|
||||
battery_critical_threshold=${battery_critical_threshold:-5}
|
||||
unplug_charger_threshold=${unplug_charger_threshold:-80}
|
||||
battery_low_threshold=${battery_low_threshold:-20}
|
||||
timer=${timer:-120}
|
||||
notify=${notify:-1140}
|
||||
interval=${interval:-5}
|
||||
execute_critical=${execute_critical:-"systemctl suspend"}
|
||||
execute_low=${execute_low:-}
|
||||
execute_unplug=${execute_unplug:-}
|
||||
|
||||
config_info
|
||||
if $verbose; then for line in "Verbose Mode is ON..." "" "" "" "" ; do echo $line ; done;
|
||||
#TODO Might still need this in the future but for now we don't have any battery notify issues
|
||||
# current_pid=$$
|
||||
# pids=$(pgrep -f "/usr/bin/env bash ${scrDir}/batterynotify.sh" )
|
||||
# for pid in $pids ; do if [ "$pid" -ne $current_pid ] ;then kill -STOP "$pid" ;notify-send -a "Battery Notify" -t 2000 -r 9889 -u "CRITICAL" "Debugging STARTED, Pausing Regular Process" ;fi ; done ; trap resume_processes SIGINT ;
|
||||
fi
|
||||
get_battery_info # initiate the function
|
||||
last_notified_percentage=$battery_percentage
|
||||
prev_status=$battery_status
|
||||
dbus-monitor --system "type='signal',interface='org.freedesktop.DBus.Properties',path='$(upower -e | grep battery)'" 2> /dev/null | while read -r battery_status_change; do fn_status_change ; done
|
||||
}
|
||||
|
||||
verbose=false
|
||||
case "$1" in
|
||||
-m|--modify)
|
||||
EDITOR="${EDITOR:-code}" #* Use VS Code as the default editor
|
||||
echo -e "[Editor]: $EDITOR \n To change editor, run 'export EDITOR=preferred-editor' \n[Modifying]: $batterynotify_conf \nPress Any Key if done editing"
|
||||
#kitty -o allow_remote_control=yes -o listen_on=unix:/tmp/mykitty $(which $EDITOR) "$batterynotify_conf" > /dev/null 2>&1 &
|
||||
kitty "$(which $EDITOR)" "$batterynotify_conf" > /dev/null 2>&1 &
|
||||
LAST_MD5SUM=$(md5sum "$batterynotify_conf")
|
||||
while true; do CURRENT_MD5SUM=$(md5sum "$batterynotify_conf")
|
||||
if [ "$CURRENT_MD5SUM" != "$LAST_MD5SUM" ]; then
|
||||
notify-send "Config Changed: Needs reboot or restart $0"
|
||||
LAST_MD5SUM="$CURRENT_MD5SUM"
|
||||
fi ; read -t 2 -n 1 > /dev/null && break #? loop every 2 seconds
|
||||
done
|
||||
exit 0
|
||||
;;
|
||||
-i|--info)
|
||||
config_info
|
||||
exit 0
|
||||
;;
|
||||
-v|--verbose)
|
||||
verbose=true
|
||||
;;
|
||||
-*)
|
||||
cat << HELP
|
||||
Usage: $0 [options]
|
||||
|
||||
[-m|--modify] Modify configuration file
|
||||
[-i|--info] Display configuration information
|
||||
[-v|--verbose] Debugging mode
|
||||
[-h|--help] This Message
|
||||
HELP
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
mnc=2 mxc=50 mnl=10 mxl=80 mnu=50 mxu=100 mnt=60 mxt=1000 mnf=80 mxf=100 mnn=1 mxn=1140 mni=1 mxi=10 #Defaults Ranges
|
||||
check_range() {
|
||||
local var=$1 min=$2 max=$3 error_message=$4
|
||||
if [[ $var =~ ^[0-9]+$ ]] && (( var >= min && var <= max )); then
|
||||
var=$var ; shift 2
|
||||
else
|
||||
echo -e "$1 WARNING: $error_message must be $min - $max." >&2
|
||||
fi
|
||||
}
|
||||
|
||||
check_range "$battery_full_threshold" $mnf $mxf "Full Threshold"
|
||||
check_range "$battery_critical_threshold" $mnc $mxc "Critical Threshold"
|
||||
check_range "$battery_low_threshold" $mnl $mxl "Low Threshold"
|
||||
check_range "$unplug_charger_threshold" $mnu $mxu "Unplug Threshold"
|
||||
check_range "$timer" $mnt $mxt "Timer"
|
||||
check_range "$notify" $mnn $mxn "Notify"
|
||||
check_range "$interval" $mni $mxi "Interval"
|
||||
|
||||
main
|
||||