dentritic refactor

This commit is contained in:
elwrcl committed 2026-07-30 22:58:52 +03:00
1 parent fc386c4053
commit 301ad158d5
140 files changed
+2285 -2622

No files matched your search

-1
View File
@@ -1 +0,0 @@
AGENTS.md
+13 -1
View File
@@ -1 +1,13 @@
i love nixos...
# nixoconf
Nix config for one machine running two OS :
- `copland`: NixOS (x86_64-linux)
- `sohryu_darwin`: Hackintosh (x86_64-darwin), via [nix-darwin](https://github.com/nix-darwin/nix-darwin)
## Rebuild
```bash
nh os switch . # nixos
nh darwin switch . # macos
```
Generated
+24 -3
View File
@@ -187,7 +187,9 @@
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
"nixpkgs-lib": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1782949081,
@@ -204,6 +206,24 @@
}
},
"flake-parts_2": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1782949081,
"narHash": "sha256-vp6Y/Grm98ESt6ceOkWiHWyZRDV3J1RID4w+6NWK9yA=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "17c9d6cdfc60c64f4ee8d306f9bc0b4ccb51481e",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_3": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib_2"
},
@@ -771,7 +791,7 @@
"cachyos-kernel": "cachyos-kernel",
"cachyos-kernel-patches": "cachyos-kernel-patches",
"flake-compat": "flake-compat_4",
"flake-parts": "flake-parts",
"flake-parts": "flake-parts_2",
"nixpkgs": "nixpkgs_2"
},
"locked": {
@@ -854,7 +874,7 @@
"nixcord": {
"inputs": {
"flake-compat": "flake-compat_5",
"flake-parts": "flake-parts_2",
"flake-parts": "flake-parts_3",
"nixpkgs": [
"nixpkgs"
],
@@ -1046,6 +1066,7 @@
"inputs": {
"chaotic": "chaotic",
"copetch": "copetch",
"flake-parts": "flake-parts",
"helium": "helium",
"home-manager": "home-manager_2",
"hyprland": "hyprland",
Executable → Regular
+62 -92
View File
@@ -1,27 +1,38 @@
{
description = "copland, linux/darwin";
description = "copland, linux/darwin dentritic flake";
nixConfig = {
experimental-features = [
"flakes"
"nix-command"
"pipe-operators"
];
builders-use-substitutes = true;
http-connections = 50;
show-trace = true;
warn-dirty = false;
};
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
niri = {
url = "github:sodiboo/niri-flake";
inputs.nixpkgs.follows = "nixpkgs";
};
chaotic = {
url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
inputs.nixpkgs.follows = "nixpkgs";
flake-parts = {
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
nix-darwin = {
url = "github:nix-darwin/nix-darwin/master";
inputs.nixpkgs.follows = "nixpkgs";
};
zen-browser = {
url = "github:0xc000022070/zen-browser-flake";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
copetch = {
url = "github:elwrcl/copetch";
niri = {
url = "github:sodiboo/niri-flake";
inputs.nixpkgs.follows = "nixpkgs";
};
hyprland = {
@@ -32,24 +43,30 @@
url = "github:hyprwm/hyprland-plugins";
inputs.hyprland.follows = "hyprland";
};
home-manager = {
url = "github:nix-community/home-manager";
noctalia = {
url = "github:noctalia-dev/noctalia-shell";
inputs.nixpkgs.follows = "nixpkgs";
};
chaotic = {
url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-cachyos-kernel = {
url = "github:xddxdd/nix-cachyos-kernel/release";
};
soryu-kernel = {
url = "github:elwrcl/soryu-kernel";
};
zen-browser = {
url = "github:0xc000022070/zen-browser-flake";
inputs.nixpkgs.follows = "nixpkgs";
};
helium = {
url = "github:AlvaroParker/helium-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
noctalia = {
url = "github:noctalia-dev/noctalia-shell";
inputs.nixpkgs.follows = "nixpkgs";
};
soryu-kernel = {
url = "github:elwrcl/soryu-kernel";
};
nix-alien = {
url = "github:thiagokokada/nix-alien";
};
nixcord = {
url = "github:FlameFlag/nixcord";
inputs.nixpkgs.follows = "nixpkgs";
@@ -58,77 +75,30 @@
url = "github:nix-community/nix-vscode-extensions";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-cachyos-kernel = {
url = "github:xddxdd/nix-cachyos-kernel/release";
nix-alien = {
url = "github:thiagokokada/nix-alien";
};
copetch = {
url = "github:elwrcl/copetch";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
inputs@{
self,
nixpkgs,
nix-darwin,
home-manager,
nix-cachyos-kernel,
chaotic,
niri,
...
}:
let
linuxSystem = "x86_64-linux";
darwinSystem = "x86_64-darwin";
in
{
nixosConfigurations.copland = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs;
system = linuxSystem;
};
modules = [
{ nixpkgs.hostPlatform = linuxSystem; }
home-manager.nixosModules.home-manager
chaotic.nixosModules.default
{
nixpkgs.config.allowUnfree = true;
nixpkgs.overlays = [ inputs.nix-vscode-extensions.overlays.default ];
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
sharedModules = [ inputs.niri.homeModules.niri ];
extraSpecialArgs = {
inherit inputs;
system = linuxSystem;
};
users.elars = import ./main/nixos/home.nix;
};
}
./main/nixos/machine.nix
inputs@{ flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } (
{ lib, ... }:
let
inherit (lib.filesystem) listFilesRecursive;
inherit (lib.lists) filter;
inherit (lib.strings) hasSuffix;
in
{
systems = [
"x86_64-linux"
"x86_64-darwin"
];
};
darwinConfigurations.sohryu-darwin = nix-darwin.lib.darwinSystem {
specialArgs = {
inherit inputs;
system = darwinSystem;
};
modules = [
home-manager.darwinModules.home-manager
{
nixpkgs.config.allowUnfree = true;
nixpkgs.config.allowDeprecatedx86_64Darwin = true;
nixpkgs.overlays = [ inputs.nix-vscode-extensions.overlays.default ];
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = {
inherit inputs;
system = darwinSystem;
};
users.sohryu = import ./main/darwin/home.nix;
};
}
./main/darwin/machine.nix
];
};
};
imports = filter (hasSuffix ".ulu.nix") (listFilesRecursive ./.);
}
);
}
View File
File renamed without changes.
+111
View File
@@ -0,0 +1,111 @@
{ config, inputs, ... }:
let
system = "x86_64-linux";
in
{
flake.nixosConfigurations.copland = inputs.nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs system;
};
modules = [
{ nixpkgs.hostPlatform = system; }
inputs.home-manager.nixosModules.home-manager
inputs.chaotic.nixosModules.default
{
nixpkgs.config.allowUnfree = true;
nixpkgs.config.permittedInsecurePackages = [ "pnpm-10.29.2" ];
nixpkgs.overlays = [ inputs.nix-vscode-extensions.overlays.default ];
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
sharedModules = [ inputs.niri.homeModules.niri ];
extraSpecialArgs = {
inherit inputs system;
};
users.elars = {
imports = [
config.flake.homeModules.home-base
config.flake.homeModules.home-ghostty
config.flake.homeModules.home-nushell
config.flake.homeModules.home-zsh
config.flake.homeModules.home-shell-tools
config.flake.homeModules.home-session-vars
config.flake.homeModules.home-cursor
config.flake.homeModules.home-gtk
config.flake.homeModules.home-qt
config.flake.homeModules.home-mimeapps
config.flake.homeModules.home-easyeffects
config.flake.homeModules.home-discord
config.flake.homeModules.desktop-niri-home
config.flake.homeModules.desktop-niri-env
config.flake.homeModules.desktop-niri-execs
config.flake.homeModules.desktop-niri-general
config.flake.homeModules.desktop-niri-keybinds
config.flake.homeModules.desktop-niri-rules
];
home.username = "elars";
home.homeDirectory = "/home/elars";
home.stateVersion = "25.05";
};
};
}
config.flake.nixosModules.hostname-assert
{ elars.expectedHostName = "copland"; }
# pool
config.flake.nixosModules.common-boot
config.flake.nixosModules.hw-bluetooth
config.flake.nixosModules.hw-graphics
config.flake.nixosModules.hw-udev
config.flake.nixosModules.net-network-manager
config.flake.nixosModules.net-vpn
config.flake.nixosModules.service-appimage
config.flake.nixosModules.service-flatpak
config.flake.nixosModules.service-fwupd
config.flake.nixosModules.service-kde-connect
config.flake.nixosModules.service-ollama
config.flake.nixosModules.service-performance
config.flake.nixosModules.service-printing
config.flake.nixosModules.service-security
config.flake.nixosModules.service-ssh
config.flake.nixosModules.common-locale
config.flake.nixosModules.common-nix
config.flake.nixosModules.common-fonts
config.flake.nixosModules.common-kmscon
config.flake.nixosModules.desktop-display
config.flake.nixosModules.desktop-audio
config.flake.nixosModules.desktop-niri
config.flake.nixosModules.desktop-xdg-mime
config.flake.nixosModules.gaming-steam
config.flake.nixosModules.gaming-gamemode
config.flake.nixosModules.common-users
config.flake.nixosModules.service-docker
config.flake.nixosModules.service-virt-manager
config.flake.nixosModules.common-git
config.flake.nixosModules.common-packages
# import
./copland-hardware.nix
{
elars.hardware.graphics.driver = "intel";
zramSwap = {
enable = true;
memoryPercent = 100;
algorithm = "zstd";
priority = 100;
};
environment.pathsToLink = [
"/share/applications"
"/share/icons"
"/share/mime"
"/share/X11"
];
}
];
};
}
+58
View File
@@ -0,0 +1,58 @@
{ config, inputs, ... }:
let
system = "x86_64-darwin";
in
{
flake.darwinConfigurations.sohryu-darwin = inputs.nix-darwin.lib.darwinSystem {
specialArgs = {
inherit inputs system;
};
modules = [
{ nixpkgs.hostPlatform = system; }
inputs.home-manager.darwinModules.home-manager
{
nixpkgs.config.allowUnfree = true;
nixpkgs.config.allowDeprecatedx86_64Darwin = true;
nixpkgs.overlays = [ inputs.nix-vscode-extensions.overlays.default ];
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = {
inherit inputs system;
};
users.sohryu = {
imports = [
config.flake.homeModules.home-base
config.flake.homeModules.home-ghostty
config.flake.homeModules.home-nushell
];
home.username = "sohryu";
home.homeDirectory = "/Users/sohryu";
home.stateVersion = "25.05";
};
};
}
config.flake.darwinModules.hostname-assert
{ elars.expectedHostName = "sohryu-darwin"; }
# pool
config.flake.darwinModules.common-git
config.flake.darwinModules.common-homebrew
config.flake.darwinModules.common-system
config.flake.darwinModules.common-user
config.flake.darwinModules.common-packages
# import
{
networking.hostName = "sohryu-darwin";
networking.computerName = "sohryu-darwin";
system.stateVersion = 5;
}
];
};
}
-12
View File
@@ -1,12 +0,0 @@
{ ... }:
{
imports = [
../../modules/home
];
home.username = "sohryu";
home.homeDirectory = "/Users/sohryu";
home.stateVersion = "25.05";
# nu or zsh
}
-20
View File
@@ -1,20 +0,0 @@
{ pkgs, system, ... }:
let
packages = import ./packages.nix { inherit pkgs; };
in
{
imports = [
../../modules/darwin
];
networking.hostName = "sohryu-darwin";
networking.computerName = "sohryu-darwin";
nixpkgs.hostPlatform = system;
system.stateVersion = 5;
system.primaryUser = "sohryu";
environment.systemPackages = packages.system;
}
-24
View File
@@ -1,24 +0,0 @@
{ pkgs }:
with pkgs;
{
system = [
pinentry_mac
fastfetch
starship
clinfo
zoxide
unzip
gnupg
btop
htop
tree
wget
eza
bat
git
fzf
zip
fd
];
}
-12
View File
@@ -1,12 +0,0 @@
{ ... }:
{
imports = [
../../modules/home
../../modules/home/linux.nix
];
home.username = "elars";
home.homeDirectory = "/home/elars";
home.stateVersion = "25.05";
}
-27
View File
@@ -1,27 +0,0 @@
{ pkgs, inputs, system, ... }:
let
packages = import ./packages.nix { inherit pkgs inputs system; };
in
{
imports = [
./hardware.nix
../../modules/nixos
];
elars.hardware.graphics.driver = "intel";
zramSwap = {
enable = true;
memoryPercent = 100;
algorithm = "zstd";
priority = 100;
};
environment.systemPackages = packages.system;
environment.pathsToLink = [
"/share/applications"
"/share/icons"
"/share/mime"
"/share/X11"
];
}
-200
View File
@@ -1,200 +0,0 @@
{
pkgs,
inputs,
system,
...
}:
let
uxplay-fixed = pkgs.uxplay.override {
avahi = pkgs.avahi.override { withLibdnssdCompat = true; };
};
in
with pkgs;
{
system = [
# apps
onlyoffice-desktopeditors
whatsapp-electron
telegram-desktop
prismlauncher
moonlight-qt
qbittorrent
antigravity
obs-studio
localsend
picotool
sunshine
spotify
equibop
heroic
loupe
gimp
wine
# file-manager
kdePackages.kdegraphics-thumbnailers
kdePackages.plasma-integration
kdePackages.breeze-icons
kdePackages.kio-extras
kdePackages.qtwayland
kdePackages.kio-admin
kdePackages.kio-fuse
kdePackages.kservice
kdePackages.konsole
kdePackages.dolphin
kdePackages.qtsvg
kdePackages.ark
kdePackages.kio
kdePackages.kdf
nautilus
# utils
poppler-utils
wl-clipboard
wf-recorder
tesseract
mpvpaper
swappy
slurp
grim
# phone
libimobiledevice
android-tools
uxplay-fixed
usbmuxd
libmtp
jmtpfs
scrcpy
ifuse
# agents
github-copilot-cli
claude-mergetool
claude-monitor
claude-code
# cli
fastfetch
trash-cli
tailscale
dos2unix
autossh
ani-cli
zoxide
cachix
direnv
rsync
unzip
kitty
tree
tldr
perf
file
wget
fish
htop
tmux
btop
yazi
zip
eza
bat
git
rar
jq
fd
# hardware
xkeyboard-config
intel-gpu-tools
smartmontools
brightnessctl
gsmartcontrol
vulkan-tools
libva-utils
mesa-demos
lm_sensors
exfatprogs
dmidecode
libsecret
apfs-fuse
gptfdisk
pciutils
usbutils
hfsprogs
dmg2img
ddcutil
clinfo
hidapi
parted
p7zip
xar
# themes/icons
whitesur-icon-theme
whitesur-gtk-theme
gnome-themes-extra
whitesur-kde
adwaita-qt6
adwaita-qt
# langs
alejandra
binutils
python3
rustup
nodejs
jdk25
gcc
ghc
zig
lua
glm
go
# dev tools
jdt-language-server
rust-analyzer
clang-tools
cargo-tauri
pkg-config
gnumake
openssl
pyright
rustfmt
lazygit
nixfmt
zellij
sqlite
aubio
delta
trunk
nixd
nil
uv
# editors
lite-xl
neovim
vscode
# media
ffmpegthumbnailer
imagemagick
pavucontrol
pamixer
ffmpeg
yt-dlp
cava
mpv
inputs.zen-browser.packages.${system}.default
inputs.nix-alien.packages.${system}.nix-alien
inputs.noctalia.packages.${system}.default
inputs.copetch.packages.${system}.default
inputs.helium.packages.${system}.default
pkgs.qt6Packages.qtwebsockets
];
}
+17
View File
@@ -0,0 +1,17 @@
{ ... }:
{
flake.darwinModules.common-homebrew =
{ ... }:
{
homebrew = {
enable = true;
onActivation = {
autoUpdate = true;
upgrade = true;
cleanup = "none";
};
brews = [ ];
casks = [ ];
};
};
}
+26
View File
@@ -0,0 +1,26 @@
{ ... }:
{
flake.darwinModules.common-packages =
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
pinentry_mac
fastfetch
starship
clinfo
zoxide
unzip
gnupg
btop
htop
tree
wget
eza
bat
git
fzf
zip
fd
];
};
}
+73
View File
@@ -0,0 +1,73 @@
{ ... }:
{
flake.darwinModules.common-system =
{
pkgs,
config,
lib,
...
}:
let
inherit (lib) mkAfter;
in
{
nix.enable = false;
time.timeZone = "Europe/Istanbul";
fonts.packages = with pkgs; [
noto-fonts
noto-fonts-cjk-sans
noto-fonts-cjk-serif
noto-fonts-color-emoji
nerd-fonts.jetbrains-mono
];
system.defaults = {
NSGlobalDomain = {
AppleInterfaceStyle = "Dark";
InitialKeyRepeat = 15;
KeyRepeat = 2;
ApplePressAndHoldEnabled = false;
AppleShowAllFiles = true;
AppleShowAllExtensions = true;
"com.apple.springing.enabled" = true;
"com.apple.springing.delay" = 0.0;
};
CustomSystemPreferences = {
"com.apple.desktopservices" = {
DSDontWriteNetworkStores = true;
DSDontWriteUSBStores = true;
};
"com.apple.AdLib" = {
allowApplePersonalizedAdvertising = false;
allowIdentifierForAdvertising = false;
forceLimitAdTracking = true;
personalizedAdsMigrated = false;
};
};
dock = {
autohide = true;
orientation = "bottom";
tilesize = 48;
};
finder = {
AppleShowAllExtensions = true;
ShowPathbar = true;
FXEnableExtensionChangeWarning = false;
NewWindowTarget = "Home";
FXPreferredViewStyle = "Nlsv";
};
loginwindow = {
DisableConsoleAccess = true;
GuestEnabled = false;
};
LaunchServices.LSQuarantine = false;
};
system.activationScripts.postActivation.text = mkAfter ''
echo "unhiding ${config.users.users.${config.system.primaryUser}.home}/Library..."
/usr/bin/chflags nohidden ${config.users.users.${config.system.primaryUser}.home}/Library
'';
};
}
+17
View File
@@ -0,0 +1,17 @@
{ ... }:
{
flake.darwinModules.common-user =
{ pkgs, ... }:
{
system.primaryUser = "sohryu";
users.users.sohryu = {
name = "sohryu";
home = "/Users/sohryu";
shell = pkgs.zsh;
};
programs.zsh.enable = true;
environment.systemPackages = [ pkgs.nh ];
environment.variables.NH_FLAKE = "/Users/sohryu/copland";
};
}
-10
View File
@@ -1,10 +0,0 @@
{ ... }:
{
imports = [
../home/git.nix
./homebrew
./system
./user
];
}
-14
View File
@@ -1,14 +0,0 @@
{ ... }:
{
homebrew = {
enable = true;
onActivation = {
autoUpdate = true;
upgrade = true;
cleanup = "none";
};
brews = [ ];
casks = [ ];
};
}
-65
View File
@@ -1,65 +0,0 @@
{ pkgs, config, lib, ... }:
let
inherit (lib) mkAfter;
in
{
nix.enable = false;
time.timeZone = "Europe/Istanbul";
fonts.packages = with pkgs; [
noto-fonts
noto-fonts-cjk-sans
noto-fonts-cjk-serif
noto-fonts-color-emoji
nerd-fonts.jetbrains-mono
];
system.defaults = {
NSGlobalDomain = {
AppleInterfaceStyle = "Dark";
InitialKeyRepeat = 15;
KeyRepeat = 2;
ApplePressAndHoldEnabled = false;
AppleShowAllFiles = true;
AppleShowAllExtensions = true;
"com.apple.springing.enabled" = true;
"com.apple.springing.delay" = 0.0;
};
CustomSystemPreferences = {
"com.apple.desktopservices" = {
DSDontWriteNetworkStores = true;
DSDontWriteUSBStores = true;
};
"com.apple.AdLib" = {
allowApplePersonalizedAdvertising = false;
allowIdentifierForAdvertising = false;
forceLimitAdTracking = true;
personalizedAdsMigrated = false;
};
};
dock = {
autohide = true;
orientation = "bottom";
tilesize = 48;
};
finder = {
AppleShowAllExtensions = true;
ShowPathbar = true;
FXEnableExtensionChangeWarning = false;
NewWindowTarget = "Home";
FXPreferredViewStyle = "Nlsv";
};
loginwindow = {
DisableConsoleAccess = true;
GuestEnabled = false;
};
LaunchServices.LSQuarantine = false;
};
system.activationScripts.postActivation.text = mkAfter ''
echo "unhiding ${config.users.users.${config.system.primaryUser}.home}/Library..."
/usr/bin/chflags nohidden ${config.users.users.${config.system.primaryUser}.home}/Library
'';
}
-14
View File
@@ -1,14 +0,0 @@
{ pkgs, ... }:
{
system.primaryUser = "sohryu";
users.users.sohryu = {
name = "sohryu";
home = "/Users/sohryu";
shell = pkgs.zsh;
};
programs.zsh.enable = true;
environment.systemPackages = [ pkgs.nh ];
environment.variables.NH_FLAKE = "/Users/sohryu/copland";
}
-10
View File
@@ -1,10 +0,0 @@
{ ... }:
{
imports = [
./programs
];
programs.home-manager.enable = true;
fonts.fontconfig.enable = true;
}
-24
View File
@@ -1,24 +0,0 @@
{ pkgs, lib, ... }:
let
base = ''
[user]
name = elwrcl
email = elwerici@proton.me
signingkey = 5EA48F7312A42B84
[commit]
gpgsign = true
[tag]
gpgsign = true
'';
darwinExtra = ''
[credential]
helper = osxkeychain
'';
gitconfig = pkgs.writeText "gitconfig" (base + lib.optionalString pkgs.stdenv.isDarwin darwinExtra);
in
{
environment.variables.GIT_CONFIG_SYSTEM = "${gitconfig}";
}
+9
View File
@@ -0,0 +1,9 @@
{ ... }:
{
flake.homeModules.home-base =
{ ... }:
{
programs.home-manager.enable = true;
fonts.fontconfig.enable = true;
};
}
+15
View File
@@ -0,0 +1,15 @@
{ ... }:
{
flake.homeModules.home-cursor =
{ pkgs, ... }:
{
home.pointerCursor = {
enable = true;
name = "macOS";
package = pkgs.apple-cursor;
size = 24;
gtk.enable = true;
x11.enable = true;
};
};
}
+24
View File
@@ -0,0 +1,24 @@
{ ... }:
{
flake.homeModules.home-discord =
{ inputs, ... }:
{
imports = [
inputs.nixcord.homeModules.nixcord
];
programs.nixcord = {
enable = true;
legcord = {
enable = true;
settings = {
channel = "stable";
tray = "dynamic";
minimizeToTray = true;
mods = [ "shelter" ];
doneSetup = true;
};
};
};
};
}
+8
View File
@@ -0,0 +1,8 @@
{ ... }:
{
flake.homeModules.home-easyeffects =
{ ... }:
{
services.easyeffects.enable = true;
};
}
+127
View File
@@ -0,0 +1,127 @@
{ ... }:
{
flake.homeModules.home-ghostty =
{ pkgs, lib, ... }:
let
isDarwin = pkgs.stdenv.isDarwin;
linuxKeybinds = [
"alt+r=reload_config"
"alt+q=close_surface"
"ctrl+space=new_tab"
"ctrl+page_down=next_tab"
"ctrl+page_up=previous_tab"
"alt+comma=move_tab:-1"
"alt+period=move_tab:1"
"alt+1=goto_tab:1"
"alt+2=goto_tab:2"
"alt+3=goto_tab:3"
"alt+4=goto_tab:4"
"alt+5=goto_tab:5"
"alt+6=goto_tab:6"
"alt+7=goto_tab:7"
"alt+8=goto_tab:8"
"alt+9=goto_tab:9"
"ctrl+shift+backslash=new_split:right"
"ctrl+shift+minus=new_split:down"
"alt+h=goto_split:left"
"alt+j=goto_split:bottom"
"alt+k=goto_split:top"
"alt+l=goto_split:right"
"ctrl+shift+z=toggle_split_zoom"
"ctrl+shift+e=equalize_splits"
];
darwinKeybinds = [
"cmd+s>r=reload_config"
"cmd+s>x=close_surface"
"cmd+s>n=new_window"
"cmd+s>c=new_tab"
"cmd+s>shift+l=next_tab"
"cmd+s>shift+h=previous_tab"
"cmd+s>comma=move_tab:-1"
"cmd+s>period=move_tab:1"
"cmd+s>1=goto_tab:1"
"cmd+s>2=goto_tab:2"
"cmd+s>3=goto_tab:3"
"cmd+s>4=goto_tab:4"
"cmd+s>5=goto_tab:5"
"cmd+s>6=goto_tab:6"
"cmd+s>7=goto_tab:7"
"cmd+s>8=goto_tab:8"
"cmd+s>9=goto_tab:9"
"cmd+s>\\=new_split:right"
"cmd+s>-=new_split:down"
"cmd+s>h=goto_split:left"
"cmd+s>j=goto_split:bottom"
"cmd+s>k=goto_split:top"
"cmd+s>l=goto_split:right"
"cmd+s>z=toggle_split_zoom"
"cmd+s>e=equalize_splits"
];
in
{
programs.ghostty = {
enable = true;
installBatSyntax = true;
enableZshIntegration = true;
settings = {
font-family = "JetBrainsMono Nerd Font";
font-size = 11;
window-padding-x = 10;
window-padding-y = 10;
window-padding-balance = true;
window-save-state = "always";
mouse-hide-while-typing = true;
mouse-scroll-multiplier = 2;
shell-integration-features = "no-cursor,sudo,no-title";
palette = [
"0=#090E13"
"1=#c4746e"
"2=#8a9a7b"
"3=#c4b28a"
"4=#8ba4b0"
"5=#a292a3"
"6=#8ea4a2"
"7=#a4a7a4"
"8=#5C6066"
"9=#e46876"
"10=#87a987"
"11=#e6c384"
"12=#7fb4ca"
"13=#938aa9"
"14=#7aa89f"
"15=#c5c9c7"
];
background = "#090E13";
foreground = "#c5c9c7";
cursor-color = "#c5c9c7";
cursor-text = "#9cdef2";
selection-background = "#22262D";
selection-foreground = "#c5c9c7";
cursor-style = "block";
cursor-style-blink = true;
adjust-cell-height = "35%";
background-opacity = 0.96;
keybind = linuxKeybinds ++ lib.optionals isDarwin darwinKeybinds;
}
// lib.optionalAttrs isDarwin {
macos-titlebar-style = "transparent";
};
};
};
}
+26
View File
@@ -0,0 +1,26 @@
{ ... }:
{
flake.homeModules.home-gtk =
{ pkgs, ... }:
{
gtk = {
enable = true;
theme.name = "WhiteSur-Dark";
theme.package = pkgs.whitesur-gtk-theme;
gtk4.theme.name = "WhiteSur-Dark";
gtk4.theme.package = pkgs.whitesur-gtk-theme;
iconTheme.name = "WhiteSur-dark";
iconTheme.package = pkgs.whitesur-icon-theme;
font = {
name = "JetBrainsMono Nerd Font";
size = 11;
};
};
dconf.settings."org/gnome/desktop/interface" = {
color-scheme = "prefer-dark";
gtk-application-prefer-dark-theme = true;
gtk-theme = "WhiteSur-Dark";
};
};
}
+17
View File
@@ -0,0 +1,17 @@
{ ... }:
{
flake.homeModules.home-mimeapps =
{ ... }:
{
xdg.mimeApps = {
enable = true;
defaultApplications = {
"inode/directory" = [ "org.kde.dolphin.desktop" ];
"x-scheme-handler/http" = [ "zen-beta.desktop" ];
"x-scheme-handler/https" = [ "zen-beta.desktop" ];
"x-scheme-handler/about" = [ "zen-beta.desktop" ];
"x-scheme-handler/unknown" = [ "zen-beta.desktop" ];
};
};
};
}
+72
View File
@@ -0,0 +1,72 @@
{ ... }:
{
flake.homeModules.home-nushell =
{ ... }:
{
programs.nushell = {
enable = true;
shellAliases = {
ls = "eza --icons --group-directories-first";
ll = "eza -lah --icons --group-directories-first";
la = "eza -a --icons --group-directories-first";
lt = "eza --tree --level=2 --icons";
cat = "bat";
df = "df -h";
du = "du -h";
free = "free -h";
rm = "trash-put";
sysinfo = "fastfetch";
monitor = "sudo btop";
ports = "sudo ss -tulpn";
myip = "curl ifconfig.me";
gs = "git status";
ga = "git add";
gp = "git push";
gl = "git log --oneline --graph --decorate";
".." = "cd ..";
"..." = "cd ../..";
"...." = "cd ../../..";
};
environmentVariables = {
MESA_SHADER_CACHE_MAX_SIZE = "2G";
MESA_SHADER_CACHE_DIR = "/tmp/mesa_shader_cache";
};
extraEnv = ''
$env.PATH = ($env.PATH | prepend $"($env.HOME)/.local/bin")
'';
extraConfig = ''
$env.config.show_banner = false
def gc [msg: string] { git commit -m $msg }
def rebuild [] {
git -C ~/copland add -A
git -C ~/copland commit -m "update"
nh os switch
}
def rebuild-dry [] { nh os switch --dry }
def rebuild-cop [] {
nix flake update --flake ~/copland
git -C ~/copland add -A
git -C ~/copland commit -m $"flake update (date now | format date '%Y-%m-%d')"
nh os switch
}
def extract [file: string] {
let ext = ($file | path parse | get extension)
match $ext {
"gz" => { tar xzf $file },
"bz2" => { tar xjf $file },
"tar" => { tar xf $file },
"zip" => { unzip $file },
"7z" => { 7z x $file },
"rar" => { unrar e $file },
_ => { print $"'($file)' can't be extracted" }
}
}
'';
};
};
}
+31
View File
@@ -0,0 +1,31 @@
{ ... }:
{
flake.homeModules.home-qt =
{ pkgs, ... }:
{
qt = {
enable = true;
platformTheme.name = "kde";
style.name = "kvantum";
};
xdg.configFile."Kvantum/WhiteSur-Dark/WhiteSur-Dark.kvconfig".source =
"${pkgs.whitesur-kde}/share/Kvantum/WhiteSur/WhiteSurDark.kvconfig";
xdg.configFile."Kvantum/WhiteSur-Dark/WhiteSur-Dark.svg".source =
"${pkgs.whitesur-kde}/share/Kvantum/WhiteSur/WhiteSurDark.svg";
xdg.configFile."Kvantum/kvantum.kvconfig".text = ''
[General]
theme=WhiteSur-Dark
'';
xdg.configFile."kdeglobals".text = ''
[General]
font=JetBrainsMono Nerd Font,11,-1,5,50,0,0,0,0,0
fixed=JetBrainsMono Nerd Font,11,-1,5,50,0,0,0,0,0
menuFont=JetBrainsMono Nerd Font,11,-1,5,50,0,0,0,0,0
toolBarFont=JetBrainsMono Nerd Font,11,-1,5,50,0,0,0,0,0
smallestReadableFont=JetBrainsMono Nerd Font,9,-1,5,50,0,0,0,0,0
'';
};
}
+10
View File
@@ -0,0 +1,10 @@
{ ... }:
{
flake.homeModules.home-session-vars =
{ ... }:
{
home.sessionVariables = {
BROWSER = "zen-beta.desktop";
};
};
}
+10
View File
@@ -0,0 +1,10 @@
{ ... }:
{
flake.homeModules.home-shell-tools =
{ ... }:
{
programs.starship.enable = true;
programs.fzf.enable = true;
programs.zoxide.enable = true;
};
}
+80
View File
@@ -0,0 +1,80 @@
{ ... }:
{
flake.homeModules.home-zsh =
{ ... }:
{
# TODO nu
programs.zsh = {
enable = true;
enableCompletion = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
initContent = ''
export FZF_DEFAULT_OPTS='--height 40% --layout=reverse --border'
export FZF_DEFAULT_COMMAND='fd --type f --hidden --follow --exclude .git'
alias ls='eza --icons --group-directories-first'
alias ll='eza -lah --icons --group-directories-first'
alias la='eza -a --icons --group-directories-first'
alias lt='eza --tree --level=2 --icons'
alias cd='z'
alias cat='bat'
alias grep='grep --color=auto'
alias df='df -h'
alias du='du -h'
alias free='free -h'
alias cp='cp -i'
alias mv='mv -i'
alias rm='trash-put'
alias sysinfo='fastfetch'
alias monitor='sudo btop'
alias ports='sudo ss -tulpn'
alias myip='curl ifconfig.me'
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias ~='cd ~'
alias -- -='cd -'
alias gs='git status'
alias ga='git add'
alias gc='git commit -m'
alias gp='git push'
alias gl='git log --oneline --graph --decorate'
alias rebuild='git -C ~/copland add -A && git -C ~/copland commit -m "update" && nh os switch'
alias rebuild-dry='nh os switch --dry'
alias rebuild-cop='nix flake update --flake ~/copland && git -C ~/copland add -A && git -C ~/copland commit -m "flake update $(date +%Y-%m-%d)" && nh os switch'
extract() {
if [ -f "$1" ]; then
case "$1" in
*.tar.bz2) tar xjf "$1" ;; *.tar.gz) tar xzf "$1" ;;
*.bz2) bunzip2 "$1" ;; *.rar) unrar e "$1" ;;
*.gz) gunzip "$1" ;; *.tar) tar xf "$1" ;;
*.zip) unzip "$1" ;; *.7z) 7z x "$1" ;;
*) echo "'$1' can't be extracted" ;;
esac
fi
}
HISTSIZE=10000
SAVEHIST=10000
HISTFILE=~/.zsh_history
setopt HIST_IGNORE_DUPS HIST_IGNORE_SPACE SHARE_HISTORY AUTO_CD
zstyle ':completion:*' menu select
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
export MESA_SHADER_CACHE_MAX_SIZE=2G
export MESA_SHADER_CACHE_DIR=/tmp/mesa_shader_cache
export PATH="$HOME/.local/bin:$PATH"
/home/elars/.config/copetch/animated-copetch.sh
'';
};
};
}
-10
View File
@@ -1,10 +0,0 @@
{ ... }:
{
imports = [
./hyprland/env.nix
./hyprland/execs.nix
./hyprland/general.nix
./hyprland/rules.nix
./hyprland/keybinds.nix
];
}
-17
View File
@@ -1,17 +0,0 @@
{ ... }:
{
wayland.windowManager.hyprland.settings = {
env = [
"XCURSOR_SIZE,24"
"XCURSOR_THEME,Bibata-Modern-Classic"
"QT_STYLE_OVERRIDE,adwaita-dark"
"GDK_BACKEND,wayland,x11"
"QT_QPA_PLATFORM,wayland;xcb"
"QT_QPA_PLATFORMTHEME,gtk3"
"ELECTRON_OZONE_PLATFORM_HINT,auto"
"TERMINAL,ghostty"
"MESA_GL_VERSION_OVERRIDE,4.6"
"MESA_GLSL_VERSION_OVERRIDE,460"
];
};
}
-11
View File
@@ -1,11 +0,0 @@
{ ... }:
{
wayland.windowManager.hyprland.settings = {
exec-once = [
"noctalia-shell"
"hyprctl setcursor Bibata-Modern-Classic 24"
"wl-paste --type text --watch cliphist store"
"wl-paste --type image --watch cliphist store"
];
};
}
-102
View File
@@ -1,102 +0,0 @@
{ ... }:
{
wayland.windowManager.hyprland.settings = {
monitor = ",preferred,auto,1";
general = {
gaps_in = 5;
gaps_out = 7;
border_size = 2;
"col.active_border" = "rgba(61afefff) ";
"col.inactive_border" = "rgba(444444ff)";
resize_on_border = true;
allow_tearing = true;
layout = "dwindle";
};
decoration = {
rounding = 1;
rounding_power = 2;
active_opacity = 1.0;
inactive_opacity = 1.0;
blur = {
size = 2;
passes = 1;
brightness = 0.4;
};
shadow = {
enabled = true;
range = 5;
render_power = 4;
color = "rgba(1fbeffee)";
};
};
input = {
kb_layout = "tr";
numlock_by_default = true;
repeat_delay = 250;
repeat_rate = 35;
sensitivity = -5;
accel_profile = "adaptive";
follow_mouse = 1;
touchpad = {
natural_scroll = true;
disable_while_typing = true;
clickfinger_behavior = true;
scroll_factor = 0.5;
};
};
gestures = {
workspace_swipe_distance = 700;
workspace_swipe_cancel_ratio = 0.2;
workspace_swipe_min_speed_to_force = 5;
workspace_swipe_direction_lock = true;
workspace_swipe_create_new = true;
};
misc = {
disable_hyprland_logo = true;
disable_splash_rendering = true;
mouse_move_enables_dpms = true;
key_press_enables_dpms = true;
animate_manual_resizes = false;
focus_on_activate = false;
};
bezier = [
"omniDecel, 0.05, 0.9, 0.1, 1"
"omniAccel, 0.3, 0, 0.8, 0.15"
"omniSmooth, 0.25, 0.1, 0.25, 1"
"omniOvershoot, 0.16, 1, 0.3, 1"
"menu_decel, 0.1, 1, 0, 1"
"menu_accel, 0.52, 0.03, 0.72, 0.08"
];
animation = [
"windowsIn, 1, 6, omniOvershoot, popin 86%"
"windowsOut, 1, 5, omniAccel, popin 92%"
"windowsMove, 1, 6, omniDecel, slide"
"fadeIn, 1, 5, omniDecel"
"fadeOut, 1, 4, omniAccel"
"border, 1, 10, omniSmooth"
"layersIn, 1, 5, omniDecel, popin 92%"
"layersOut, 1, 4, omniAccel, popin 94%"
"fadeLayersIn, 1, 3, omniDecel"
"fadeLayersOut, 1, 3, omniAccel"
"workspaces, 1, 8, omniDecel, slide"
"specialWorkspaceIn, 1, 5, omniDecel, slidevert"
"specialWorkspaceOut, 1, 4, omniAccel, slidevert"
];
device = [
{
name = "hp--inc-hyperx-cloud-alpha-s-consumer-control";
enabled = false;
}
];
};
}
-121
View File
@@ -1,121 +0,0 @@
{ ... }:
let
ipc = "noctalia-shell ipc call";
in
{
wayland.windowManager.hyprland.settings = {
"$mainMod" = "SUPER";
bindr = [
"$mainMod, SUPER_L, exec, ${ipc} launcher toggle"
];
bind = [
# workspace
"CTRL $mainMod, right, workspace, r+1"
"CTRL $mainMod, left, workspace, r-1"
"CTRL $mainMod, down, workspace, r+1"
"CTRL $mainMod, up, workspace, r-1"
"CTRL $mainMod SHIFT, right, movetoworkspace, r+1"
"CTRL $mainMod SHIFT, left, movetoworkspace, r-1"
"CTRL $mainMod SHIFT, down, movetoworkspace, r+1"
"CTRL $mainMod SHIFT, up, movetoworkspace, r-1"
# interface
"$mainMod, P, exec, ${ipc} bar toggle"
"CTRL ALT, Delete, exec, ${ipc} sessionMenu toggle"
# plugins
"$mainMod SHIFT, S, exec, ${ipc} plugin:screen-shot-and-record screenshot"
"$mainMod SHIFT, Z, exec, ${ipc} plugin:screen-shot-and-record search"
"$mainMod SHIFT, X, exec, ${ipc} plugin:screen-shot-and-record ocr"
"$mainMod SHIFT, C, exec, ${ipc} plugin:music panel"
# launchers
"$mainMod, Return, exec, ghostty"
"$mainMod, W, exec, zen-beta"
"$mainMod, E, exec, dolphin"
"$mainMod, Z, exec, code"
"$mainMod ALT, V, exec, pavucontrol"
"$mainMod SHIFT, V, exec, ${ipc} launcher clipboard"
"$mainMod SHIFT, L, exec, ${ipc} lockScreen lock"
"CTRL SHIFT, Escape, exec, ghostty -e sudo btop"
# window management
"$mainMod, Q, killactive"
"$mainMod ALT, SPACE, togglefloating"
"$mainMod, F, fullscreen, 0"
"$mainMod, D, fullscreen, 1"
"$mainMod ALT, P, pin"
# focus windows
"$mainMod, left, movefocus, l"
"$mainMod, right, movefocus, r"
"$mainMod, up, movefocus, u"
"$mainMod, down, movefocus, d"
"$mainMod SHIFT, left, movewindow, l"
"$mainMod SHIFT, right, movewindow, r"
"$mainMod SHIFT, up, movewindow, u"
"$mainMod SHIFT, down, movewindow, d"
# workspace navigation
"$mainMod, 1, workspace, 1"
"$mainMod, 2, workspace, 2"
"$mainMod, 3, workspace, 3"
"$mainMod, 4, workspace, 4"
"$mainMod, 5, workspace, 5"
"$mainMod, 6, workspace, 6"
"$mainMod, 7, workspace, 7"
"$mainMod, 8, workspace, 8"
"$mainMod, 9, workspace, 9"
"$mainMod, 0, workspace, 10"
# move windows to workspace
"$mainMod SHIFT, 1, movetoworkspace, 1"
"$mainMod SHIFT, 2, movetoworkspace, 2"
"$mainMod SHIFT, 3, movetoworkspace, 3"
"$mainMod SHIFT, 4, movetoworkspace, 4"
"$mainMod SHIFT, 5, movetoworkspace, 5"
"$mainMod SHIFT, 6, movetoworkspace, 6"
"$mainMod SHIFT, 7, movetoworkspace, 7"
"$mainMod SHIFT, 8, movetoworkspace, 8"
"$mainMod SHIFT, 9, movetoworkspace, 9"
"$mainMod SHIFT, 0, movetoworkspace, 10"
# special workspaces
"$mainMod, S, togglespecialworkspace"
"$mainMod ALT, S, movetoworkspacesilent, special"
# mouse workspace navigation
"$mainMod, mouse_up, workspace, +1"
"$mainMod, mouse_down, workspace, -1"
# media keys
"$mainMod SHIFT, N, exec, playerctl next"
"$mainMod SHIFT, B, exec, playerctl previous"
"$mainMod SHIFT, P, exec, playerctl play-pause"
];
bindm = [
"$mainMod, mouse:272, movewindow"
"$mainMod, mouse:273, resizewindow"
];
bindel = [
", XF86AudioRaiseVolume, exec, ${ipc} volume increase"
", XF86AudioLowerVolume, exec, ${ipc} volume decrease"
", XF86MonBrightnessUp, exec, ${ipc} brightness increase"
", XF86MonBrightnessDown, exec, ${ipc} brightness decrease"
];
bindl = [
", XF86AudioMute, exec, ${ipc} volume muteOutput"
", XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_SOURCE@ toggle"
", XF86AudioNext, exec, playerctl next"
", XF86AudioPrev, exec, playerctl previous"
", XF86AudioPlay, exec, playerctl play-pause"
", XF86AudioPause, exec, playerctl play-pause"
];
};
}
-22
View File
@@ -1,22 +0,0 @@
{ ... }:
{
wayland.windowManager.hyprland.settings = {
windowrule = [
"float on, match:title ^(Open File)(.*)$"
"center on, match:title ^(Open File)(.*)$"
"float on, match:title ^(Save As)(.*)$"
"center on, match:title ^(Save As)(.*)$"
"float on, match:title ^(File Upload)(.*)$"
"center on, match:title ^(File Upload)(.*)$"
"float on, match:class ^(pavucontrol)$"
"center on, match:class ^(pavucontrol)$"
"size 45% 45%, match:class ^(pavucontrol)$"
"float on, match:title ^([Pp]icture[-\\s]?[Ii]n[-\\s]?[Pp]icture)(.*)$"
"pin on, match:title ^([Pp]icture[-\\s]?[Ii]n[-\\s]?[Pp]icture)(.*)$"
"keep_aspect_ratio on, match:title ^([Pp]icture[-\\s]?[Ii]n[-\\s]?[Pp]icture)(.*)$"
"immediate on, match:class ^(steam_app).*"
"float on, match:class ^(steam)$"
"float off, match:class ^(steam)$, match:title ^(Steam)$"
];
};
}
-16
View File
@@ -1,16 +0,0 @@
{ pkgs, inputs, ... }:
{
imports = [ ./hypr/default.nix ];
wayland.windowManager.hyprland = {
enable = true;
package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
configType = "hyprlang";
xwayland.enable = true;
systemd.enable = false;
systemd.variables = [ "-all" ];
plugins = [
inputs.hyprland-plugins.packages.${pkgs.stdenv.hostPlatform.system}.csgo-vulkan-fix
];
};
}
-156
View File
@@ -1,156 +0,0 @@
{ pkgs, ... }:
{
imports = [
./niri.nix
./programs/discord
];
home.sessionVariables = {
BROWSER = "zen-beta.desktop";
};
# TODO nu
programs.zsh = {
enable = true;
enableCompletion = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
initContent = ''
export FZF_DEFAULT_OPTS='--height 40% --layout=reverse --border'
export FZF_DEFAULT_COMMAND='fd --type f --hidden --follow --exclude .git'
alias ls='eza --icons --group-directories-first'
alias ll='eza -lah --icons --group-directories-first'
alias la='eza -a --icons --group-directories-first'
alias lt='eza --tree --level=2 --icons'
alias cd='z'
alias cat='bat'
alias grep='grep --color=auto'
alias df='df -h'
alias du='du -h'
alias free='free -h'
alias cp='cp -i'
alias mv='mv -i'
alias rm='trash-put'
alias sysinfo='fastfetch'
alias monitor='sudo btop'
alias ports='sudo ss -tulpn'
alias myip='curl ifconfig.me'
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias ~='cd ~'
alias -- -='cd -'
alias gs='git status'
alias ga='git add'
alias gc='git commit -m'
alias gp='git push'
alias gl='git log --oneline --graph --decorate'
alias rebuild='git -C ~/copland add -A && git -C ~/copland commit -m "update" && nh os switch'
alias rebuild-dry='nh os switch --dry'
alias rebuild-cop='nix flake update --flake ~/copland && git -C ~/copland add -A && git -C ~/copland commit -m "flake update $(date +%Y-%m-%d)" && nh os switch'
extract() {
if [ -f "$1" ]; then
case "$1" in
*.tar.bz2) tar xjf "$1" ;; *.tar.gz) tar xzf "$1" ;;
*.bz2) bunzip2 "$1" ;; *.rar) unrar e "$1" ;;
*.gz) gunzip "$1" ;; *.tar) tar xf "$1" ;;
*.zip) unzip "$1" ;; *.7z) 7z x "$1" ;;
*) echo "'$1' can't be extracted" ;;
esac
fi
}
HISTSIZE=10000
SAVEHIST=10000
HISTFILE=~/.zsh_history
setopt HIST_IGNORE_DUPS HIST_IGNORE_SPACE SHARE_HISTORY AUTO_CD
zstyle ':completion:*' menu select
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
export MESA_SHADER_CACHE_MAX_SIZE=2G
export MESA_SHADER_CACHE_DIR=/tmp/mesa_shader_cache
export PATH="$HOME/.local/bin:$PATH"
/home/elars/.config/copetch/animated-copetch.sh
'';
};
programs.starship.enable = true;
programs.fzf.enable = true;
programs.zoxide.enable = true;
home.pointerCursor = {
enable = true;
name = "macOS";
package = pkgs.apple-cursor;
size = 24;
gtk.enable = true;
x11.enable = true;
};
gtk = {
enable = true;
theme.name = "WhiteSur-Dark";
theme.package = pkgs.whitesur-gtk-theme;
gtk4.theme.name = "WhiteSur-Dark";
gtk4.theme.package = pkgs.whitesur-gtk-theme;
iconTheme.name = "WhiteSur-dark";
iconTheme.package = pkgs.whitesur-icon-theme;
font = {
name = "JetBrainsMono Nerd Font";
size = 11;
};
};
dconf.settings."org/gnome/desktop/interface" = {
color-scheme = "prefer-dark";
gtk-application-prefer-dark-theme = true;
gtk-theme = "WhiteSur-Dark";
};
qt = {
enable = true;
platformTheme.name = "kde";
style.name = "kvantum";
};
xdg.configFile."Kvantum/WhiteSur-Dark/WhiteSur-Dark.kvconfig".source =
"${pkgs.whitesur-kde}/share/Kvantum/WhiteSur/WhiteSurDark.kvconfig";
xdg.configFile."Kvantum/WhiteSur-Dark/WhiteSur-Dark.svg".source =
"${pkgs.whitesur-kde}/share/Kvantum/WhiteSur/WhiteSurDark.svg";
xdg.configFile."Kvantum/kvantum.kvconfig".text = ''
[General]
theme=WhiteSur-Dark
'';
xdg.configFile."kdeglobals".text = ''
[General]
font=JetBrainsMono Nerd Font,11,-1,5,50,0,0,0,0,0
fixed=JetBrainsMono Nerd Font,11,-1,5,50,0,0,0,0,0
menuFont=JetBrainsMono Nerd Font,11,-1,5,50,0,0,0,0,0
toolBarFont=JetBrainsMono Nerd Font,11,-1,5,50,0,0,0,0,0
smallestReadableFont=JetBrainsMono Nerd Font,9,-1,5,50,0,0,0,0,0
'';
xdg.mimeApps = {
enable = true;
defaultApplications = {
"inode/directory" = [ "org.kde.dolphin.desktop" ];
"x-scheme-handler/http" = [ "zen-beta.desktop" ];
"x-scheme-handler/https" = [ "zen-beta.desktop" ];
"x-scheme-handler/about" = [ "zen-beta.desktop" ];
"x-scheme-handler/unknown" = [ "zen-beta.desktop" ];
};
};
services.easyeffects.enable = true;
}
-9
View File
@@ -1,9 +0,0 @@
{ config, pkgs, inputs, ... }:
{
imports = [ ./niri/default.nix ];
programs.niri = {
enable = true;
};
}
-10
View File
@@ -1,10 +0,0 @@
{ ... }:
{
imports = [
./niri/env.nix
./niri/execs.nix
./niri/general.nix
./niri/rules.nix
./niri/keybinds.nix
];
}
@@ -0,0 +1,21 @@
{ ... }:
{
flake.homeModules.desktop-niri-env =
{ ... }:
{
programs.niri.settings = {
environment = {
DISPLAY = ":0";
XCURSOR_SIZE = "24";
TERMINAL = "ghostty";
XCURSOR_THEME = "macOS";
GDK_BACKEND = "wayland,x11";
QT_QPA_PLATFORMTHEME = "kde";
QT_QPA_PLATFORM = "wayland;xcb";
MESA_GL_VERSION_OVERRIDE = "4.6";
MESA_GLSL_VERSION_OVERRIDE = "460";
ELECTRON_OZONE_PLATFORM_HINT = "auto";
};
};
};
}
@@ -0,0 +1,28 @@
{ ... }:
{
flake.homeModules.desktop-niri-execs =
{ ... }:
{
programs.niri.settings = {
"prefer-no-csd" = true;
spawn-at-startup = [
{ command = [ "noctalia" ]; }
{ command = [ "xwayland-satellite" ]; }
{
command = [
"sh"
"-c"
"wl-paste --type text --watch cliphist store"
];
}
{
command = [
"sh"
"-c"
"wl-paste --type image --watch cliphist store"
];
}
];
};
};
}
@@ -0,0 +1,84 @@
{ ... }:
{
flake.homeModules.desktop-niri-general =
{ ... }:
{
programs.niri.settings = {
input = {
keyboard = {
xkb = {
layout = "tr";
};
repeat-delay = 250;
repeat-rate = 35;
};
mouse = {
accel-speed = 0.0;
accel-profile = "flat";
};
touchpad = {
tap = true;
natural-scroll = true;
scroll-factor = 0.5;
click-method = "clickfinger";
};
focus-follows-mouse = {
max-scroll-amount = "0%";
};
};
outputs = {
"LVDS-1" = {
position = {
x = 0;
y = 0;
};
};
"HDMI-A-1" = {
position = {
x = -277;
y = -1080;
};
};
};
animations = {
slowdown = 0.8;
};
layout = {
gaps = 5;
struts = {
left = -5;
right = -5;
top = -5;
bottom = -5;
};
center-focused-column = "never";
preset-column-widths = [
{ proportion = 0.33333; }
{ proportion = 0.5; }
{ proportion = 0.66667; }
];
default-column-width = {
proportion = 1.0;
};
focus-ring = {
enable = false;
};
border = {
enable = false;
};
};
layer-rules = [
{
matches = [
{ namespace = "^noctalia-backdrop"; }
];
place-within-backdrop = true;
}
];
};
};
}
@@ -0,0 +1,8 @@
{ ... }:
{
flake.homeModules.desktop-niri-home =
{ ... }:
{
programs.niri.enable = true;
};
}
@@ -0,0 +1,168 @@
{ ... }:
{
flake.homeModules.desktop-niri-keybinds =
{ ... }:
{
programs.niri.settings = {
binds = {
# --- Workspace Navigation ---
"Ctrl+Mod+Right".action.focus-column-right = [ ];
"Ctrl+Mod+Left".action.focus-column-left = [ ];
"Ctrl+Mod+Down".action.focus-workspace-down = [ ];
"Ctrl+Mod+Up".action.focus-workspace-up = [ ];
"Ctrl+Mod+Shift+Right".action.move-column-right = [ ];
"Ctrl+Mod+Shift+Left".action.move-column-left = [ ];
"Ctrl+Mod+Shift+Down".action.move-window-to-workspace-down = [ ];
"Ctrl+Mod+Shift+Up".action.move-window-to-workspace-up = [ ];
"Ctrl+Mod+WheelScrollUp" = {
"cooldown-ms" = 150;
action.focus-column-right = [ ];
};
"Ctrl+Mod+WheelScrollDown" = {
"cooldown-ms" = 150;
action.focus-column-left = [ ];
};
# --- Interface ---
"Mod+Space".action.spawn-sh = "noctalia msg panel-toggle launcher";
"Mod+P".action.spawn-sh = "noctalia msg panel-toggle control-center";
"Mod+Tab".action.toggle-overview = [ ];
"Ctrl+Alt+Delete".action.spawn-sh = "noctalia msg panel-toggle session";
# --- Launchers ---
"Mod+Return".action.spawn = [ "ghostty" ];
"Mod+W".action.spawn = [ "zen-beta" ];
"Mod+E".action.spawn = [ "dolphin" ];
"Mod+Z".action.spawn = [ "code" ];
"Mod+Alt+V".action.spawn = [ "pavucontrol" ];
"Mod+Shift+V".action.spawn-sh = "noctalia msg panel-toggle clipboard";
"Mod+Shift+L".action.spawn-sh = "noctalia msg lock";
"Mod+Shift+S".action.spawn-sh = "noctalia msg screenshot-region";
"Ctrl+Shift+Escape".action.spawn = [
"ghostty"
"-e"
"sudo"
"btop"
];
# --- Window Management ---
"Mod+Q".action.close-window = [ ];
"Mod+Alt+Space".action.toggle-window-floating = [ ];
"Mod+F".action.fullscreen-window = [ ];
"Mod+D".action.maximize-column = [ ];
# --- Focus ---
"Mod+Left".action.focus-column-left = [ ];
"Mod+Right".action.focus-column-right = [ ];
"Mod+Up".action.focus-window-up = [ ];
"Mod+Down".action.focus-window-down = [ ];
# --- Move Windows ---
"Mod+Shift+Left".action.move-column-left = [ ];
"Mod+Shift+Right".action.move-column-right = [ ];
"Mod+Shift+Up".action.move-window-up = [ ];
"Mod+Shift+Down".action.move-window-down = [ ];
# --- Workspaces by Number ---
"Mod+1".action.focus-workspace = 1;
"Mod+2".action.focus-workspace = 2;
"Mod+3".action.focus-workspace = 3;
"Mod+4".action.focus-workspace = 4;
"Mod+5".action.focus-workspace = 5;
"Mod+6".action.focus-workspace = 6;
"Mod+7".action.focus-workspace = 7;
"Mod+8".action.focus-workspace = 8;
"Mod+9".action.focus-workspace = 9;
"Mod+0".action.focus-workspace = 10;
"Mod+Shift+1".action.move-window-to-workspace = 1;
"Mod+Shift+2".action.move-window-to-workspace = 2;
"Mod+Shift+3".action.move-window-to-workspace = 3;
"Mod+Shift+4".action.move-window-to-workspace = 4;
"Mod+Shift+5".action.move-window-to-workspace = 5;
"Mod+Shift+6".action.move-window-to-workspace = 6;
"Mod+Shift+7".action.move-window-to-workspace = 7;
"Mod+Shift+8".action.move-window-to-workspace = 8;
"Mod+Shift+9".action.move-window-to-workspace = 9;
"Mod+Shift+0".action.move-window-to-workspace = 10;
# --- Mouse Workspace Scroll ---
"Mod+WheelScrollDown" = {
"cooldown-ms" = 150;
action.focus-workspace-down = [ ];
};
"Mod+WheelScrollUp" = {
"cooldown-ms" = 150;
action.focus-workspace-up = [ ];
};
# --- Media & Hardware Keys ---
"Mod+Shift+N".action.spawn = [
"playerctl"
"next"
];
"Mod+Shift+B".action.spawn = [
"playerctl"
"previous"
];
"Mod+Shift+P".action.spawn = [
"playerctl"
"play-pause"
];
"XF86AudioRaiseVolume" = {
"allow-when-locked" = true;
action.spawn-sh = "noctalia msg volume-up";
};
"XF86AudioLowerVolume" = {
"allow-when-locked" = true;
action.spawn-sh = "noctalia msg volume-down";
};
"XF86AudioMute" = {
"allow-when-locked" = true;
action.spawn-sh = "noctalia msg volume-mute";
};
"XF86AudioMicMute" = {
"allow-when-locked" = true;
action.spawn = [
"wpctl"
"set-mute"
"@DEFAULT_SOURCE@"
"toggle"
];
};
"XF86MonBrightnessUp".action.spawn-sh = "noctalia msg brightness-up";
"XF86MonBrightnessDown".action.spawn-sh = "noctalia msg brightness-down";
"XF86AudioNext" = {
"allow-when-locked" = true;
action.spawn = [
"playerctl"
"next"
];
};
"XF86AudioPrev" = {
"allow-when-locked" = true;
action.spawn = [
"playerctl"
"previous"
];
};
"XF86AudioPlay" = {
"allow-when-locked" = true;
action.spawn = [
"playerctl"
"play-pause"
];
};
"XF86AudioPause" = {
"allow-when-locked" = true;
action.spawn = [
"playerctl"
"play-pause"
];
};
};
};
};
}
@@ -0,0 +1,62 @@
{ ... }:
{
flake.homeModules.desktop-niri-rules =
{ ... }:
{
programs.niri.settings = {
window-rules = [
{
matches = [ { title = "Open File.*"; } ];
open-floating = true;
}
{
matches = [ { title = "Save As.*"; } ];
open-floating = true;
}
{
matches = [ { title = "File Upload.*"; } ];
open-floating = true;
}
{
matches = [ { "app-id" = "pavucontrol"; } ];
open-floating = true;
default-column-width = {
fixed = 800;
};
}
{
matches = [ { title = "(?i)picture.in.picture"; } ];
open-floating = true;
}
{
matches = [ { "app-id" = "steam"; } ];
open-floating = true;
}
{
matches = [
{
"app-id" = "steam";
title = "Steam";
}
];
open-floating = false;
}
{
matches = [
{
"app-id" = "steam";
title = "^notificationtoasts_.*";
}
];
open-floating = true;
open-focused = false;
default-floating-position = {
x = 20;
y = 20;
"relative-to" = "bottom-right";
};
}
];
};
};
}
-18
View File
@@ -1,18 +0,0 @@
{ ... }:
{
programs.niri.settings = {
environment = {
DISPLAY = ":0";
XCURSOR_SIZE = "24";
TERMINAL = "ghostty";
XCURSOR_THEME = "macOS";
GDK_BACKEND = "wayland,x11";
QT_QPA_PLATFORMTHEME = "kde";
QT_QPA_PLATFORM = "wayland;xcb";
MESA_GL_VERSION_OVERRIDE = "4.6";
MESA_GLSL_VERSION_OVERRIDE = "460";
ELECTRON_OZONE_PLATFORM_HINT = "auto";
};
};
}
-13
View File
@@ -1,13 +0,0 @@
{ ... }:
{
programs.niri.settings = {
"prefer-no-csd" = true;
spawn-at-startup = [
{ command = [ "noctalia" ]; }
{ command = [ "xwayland-satellite" ]; }
{ command = [ "sh" "-c" "wl-paste --type text --watch cliphist store" ]; }
{ command = [ "sh" "-c" "wl-paste --type image --watch cliphist store" ]; }
];
};
}
-81
View File
@@ -1,81 +0,0 @@
{ ... }:
{
programs.niri.settings = {
input = {
keyboard = {
xkb = {
layout = "tr";
};
repeat-delay = 250;
repeat-rate = 35;
};
mouse = {
accel-speed = 0.0;
accel-profile = "flat";
};
touchpad = {
tap = true;
natural-scroll = true;
scroll-factor = 0.5;
click-method = "clickfinger";
};
focus-follows-mouse = {
max-scroll-amount = "0%";
};
};
outputs = {
"LVDS-1" = {
position = {
x = 0;
y = 0;
};
};
"HDMI-A-1" = {
position = {
x = -277;
y = -1080;
};
};
};
animations = {
slowdown = 0.8;
};
layout = {
gaps = 5;
struts = {
left = -5;
right = -5;
top = -5;
bottom = -5;
};
center-focused-column = "never";
preset-column-widths = [
{ proportion = 0.33333; }
{ proportion = 0.5; }
{ proportion = 0.66667; }
];
default-column-width = {
proportion = 1.0;
};
focus-ring = {
enable = false;
};
border = {
enable = false;
};
};
layer-rules = [
{
matches = [
{ namespace = "^noctalia-backdrop"; }
];
place-within-backdrop = true;
}
];
};
}
-165
View File
@@ -1,165 +0,0 @@
{ ... }:
{
programs.niri.settings = {
binds = {
# --- Workspace Navigation ---
"Ctrl+Mod+Right".action.focus-column-right = [ ];
"Ctrl+Mod+Left".action.focus-column-left = [ ];
"Ctrl+Mod+Down".action.focus-workspace-down = [ ];
"Ctrl+Mod+Up".action.focus-workspace-up = [ ];
"Ctrl+Mod+Shift+Right".action.move-column-right = [ ];
"Ctrl+Mod+Shift+Left".action.move-column-left = [ ];
"Ctrl+Mod+Shift+Down".action.move-window-to-workspace-down = [ ];
"Ctrl+Mod+Shift+Up".action.move-window-to-workspace-up = [ ];
"Ctrl+Mod+WheelScrollUp" = {
"cooldown-ms" = 150;
action.focus-column-right = [ ];
};
"Ctrl+Mod+WheelScrollDown" = {
"cooldown-ms" = 150;
action.focus-column-left = [ ];
};
# --- Interface ---
"Mod+Space".action.spawn-sh = "noctalia msg panel-toggle launcher";
"Mod+P".action.spawn-sh = "noctalia msg panel-toggle control-center";
"Mod+Tab".action.toggle-overview = [ ];
"Ctrl+Alt+Delete".action.spawn-sh = "noctalia msg panel-toggle session";
# --- Launchers ---
"Mod+Return".action.spawn = [ "ghostty" ];
"Mod+W".action.spawn = [ "zen-beta" ];
"Mod+E".action.spawn = [ "dolphin" ];
"Mod+Z".action.spawn = [ "code" ];
"Mod+Alt+V".action.spawn = [ "pavucontrol" ];
"Mod+Shift+V".action.spawn-sh = "noctalia msg panel-toggle clipboard";
"Mod+Shift+L".action.spawn-sh = "noctalia msg lock";
"Mod+Shift+S".action.spawn-sh = "noctalia msg screenshot-region";
"Ctrl+Shift+Escape".action.spawn = [
"ghostty"
"-e"
"sudo"
"btop"
];
# --- Window Management ---
"Mod+Q".action.close-window = [ ];
"Mod+Alt+Space".action.toggle-window-floating = [ ];
"Mod+F".action.fullscreen-window = [ ];
"Mod+D".action.maximize-column = [ ];
# --- Focus ---
"Mod+Left".action.focus-column-left = [ ];
"Mod+Right".action.focus-column-right = [ ];
"Mod+Up".action.focus-window-up = [ ];
"Mod+Down".action.focus-window-down = [ ];
# --- Move Windows ---
"Mod+Shift+Left".action.move-column-left = [ ];
"Mod+Shift+Right".action.move-column-right = [ ];
"Mod+Shift+Up".action.move-window-up = [ ];
"Mod+Shift+Down".action.move-window-down = [ ];
# --- Workspaces by Number ---
"Mod+1".action.focus-workspace = 1;
"Mod+2".action.focus-workspace = 2;
"Mod+3".action.focus-workspace = 3;
"Mod+4".action.focus-workspace = 4;
"Mod+5".action.focus-workspace = 5;
"Mod+6".action.focus-workspace = 6;
"Mod+7".action.focus-workspace = 7;
"Mod+8".action.focus-workspace = 8;
"Mod+9".action.focus-workspace = 9;
"Mod+0".action.focus-workspace = 10;
"Mod+Shift+1".action.move-window-to-workspace = 1;
"Mod+Shift+2".action.move-window-to-workspace = 2;
"Mod+Shift+3".action.move-window-to-workspace = 3;
"Mod+Shift+4".action.move-window-to-workspace = 4;
"Mod+Shift+5".action.move-window-to-workspace = 5;
"Mod+Shift+6".action.move-window-to-workspace = 6;
"Mod+Shift+7".action.move-window-to-workspace = 7;
"Mod+Shift+8".action.move-window-to-workspace = 8;
"Mod+Shift+9".action.move-window-to-workspace = 9;
"Mod+Shift+0".action.move-window-to-workspace = 10;
# --- Mouse Workspace Scroll ---
"Mod+WheelScrollDown" = {
"cooldown-ms" = 150;
action.focus-workspace-down = [ ];
};
"Mod+WheelScrollUp" = {
"cooldown-ms" = 150;
action.focus-workspace-up = [ ];
};
# --- Media & Hardware Keys ---
"Mod+Shift+N".action.spawn = [
"playerctl"
"next"
];
"Mod+Shift+B".action.spawn = [
"playerctl"
"previous"
];
"Mod+Shift+P".action.spawn = [
"playerctl"
"play-pause"
];
"XF86AudioRaiseVolume" = {
"allow-when-locked" = true;
action.spawn-sh = "noctalia msg volume-up";
};
"XF86AudioLowerVolume" = {
"allow-when-locked" = true;
action.spawn-sh = "noctalia msg volume-down";
};
"XF86AudioMute" = {
"allow-when-locked" = true;
action.spawn-sh = "noctalia msg volume-mute";
};
"XF86AudioMicMute" = {
"allow-when-locked" = true;
action.spawn = [
"wpctl"
"set-mute"
"@DEFAULT_SOURCE@"
"toggle"
];
};
"XF86MonBrightnessUp".action.spawn-sh = "noctalia msg brightness-up";
"XF86MonBrightnessDown".action.spawn-sh = "noctalia msg brightness-down";
"XF86AudioNext" = {
"allow-when-locked" = true;
action.spawn = [
"playerctl"
"next"
];
};
"XF86AudioPrev" = {
"allow-when-locked" = true;
action.spawn = [
"playerctl"
"previous"
];
};
"XF86AudioPlay" = {
"allow-when-locked" = true;
action.spawn = [
"playerctl"
"play-pause"
];
};
"XF86AudioPause" = {
"allow-when-locked" = true;
action.spawn = [
"playerctl"
"play-pause"
];
};
};
};
}
-47
View File
@@ -1,47 +0,0 @@
{ ... }:
{
programs.niri.settings = {
window-rules = [
{
matches = [ { title = "Open File.*"; } ];
open-floating = true;
}
{
matches = [ { title = "Save As.*"; } ];
open-floating = true;
}
{
matches = [ { title = "File Upload.*"; } ];
open-floating = true;
}
{
matches = [ { "app-id" = "pavucontrol"; } ];
open-floating = true;
default-column-width = { fixed = 800; };
}
{
matches = [ { title = "(?i)picture.in.picture"; } ];
open-floating = true;
}
{
matches = [ { "app-id" = "steam"; } ];
open-floating = true;
}
{
matches = [ { "app-id" = "steam"; title = "Steam"; } ];
open-floating = false;
}
{
matches = [ { "app-id" = "steam"; title = "^notificationtoasts_.*"; } ];
open-floating = true;
open-focused = false;
default-floating-position = {
x = 20;
y = 20;
"relative-to" = "bottom-right";
};
}
];
};
}
-7
View File
@@ -1,7 +0,0 @@
{ ... }:
{
imports = [
./ghostty
./shell
];
}
-21
View File
@@ -1,21 +0,0 @@
{ inputs, ... }:
{
imports = [
inputs.nixcord.homeModules.nixcord
];
programs.nixcord = {
enable = true;
legcord = {
enable = true;
settings = {
channel = "stable";
tray = "dynamic";
minimizeToTray = true;
mods = [ "shelter" ];
doneSetup = true;
};
};
};
}
-124
View File
@@ -1,124 +0,0 @@
{ pkgs, lib, ... }:
let
isDarwin = pkgs.stdenv.isDarwin;
linuxKeybinds = [
"alt+r=reload_config"
"alt+q=close_surface"
"ctrl+space=new_tab"
"ctrl+page_down=next_tab"
"ctrl+page_up=previous_tab"
"alt+comma=move_tab:-1"
"alt+period=move_tab:1"
"alt+1=goto_tab:1"
"alt+2=goto_tab:2"
"alt+3=goto_tab:3"
"alt+4=goto_tab:4"
"alt+5=goto_tab:5"
"alt+6=goto_tab:6"
"alt+7=goto_tab:7"
"alt+8=goto_tab:8"
"alt+9=goto_tab:9"
"ctrl+shift+backslash=new_split:right"
"ctrl+shift+minus=new_split:down"
"alt+h=goto_split:left"
"alt+j=goto_split:bottom"
"alt+k=goto_split:top"
"alt+l=goto_split:right"
"ctrl+shift+z=toggle_split_zoom"
"ctrl+shift+e=equalize_splits"
];
darwinKeybinds = [
"cmd+s>r=reload_config"
"cmd+s>x=close_surface"
"cmd+s>n=new_window"
"cmd+s>c=new_tab"
"cmd+s>shift+l=next_tab"
"cmd+s>shift+h=previous_tab"
"cmd+s>comma=move_tab:-1"
"cmd+s>period=move_tab:1"
"cmd+s>1=goto_tab:1"
"cmd+s>2=goto_tab:2"
"cmd+s>3=goto_tab:3"
"cmd+s>4=goto_tab:4"
"cmd+s>5=goto_tab:5"
"cmd+s>6=goto_tab:6"
"cmd+s>7=goto_tab:7"
"cmd+s>8=goto_tab:8"
"cmd+s>9=goto_tab:9"
"cmd+s>\\=new_split:right"
"cmd+s>-=new_split:down"
"cmd+s>h=goto_split:left"
"cmd+s>j=goto_split:bottom"
"cmd+s>k=goto_split:top"
"cmd+s>l=goto_split:right"
"cmd+s>z=toggle_split_zoom"
"cmd+s>e=equalize_splits"
];
in
{
programs.ghostty = {
enable = true;
installBatSyntax = true;
enableZshIntegration = true;
settings = {
font-family = "JetBrainsMono Nerd Font";
font-size = 11;
window-padding-x = 10;
window-padding-y = 10;
window-padding-balance = true;
window-save-state = "always";
mouse-hide-while-typing = true;
mouse-scroll-multiplier = 2;
shell-integration-features = "no-cursor,sudo,no-title";
palette = [
"0=#090E13"
"1=#c4746e"
"2=#8a9a7b"
"3=#c4b28a"
"4=#8ba4b0"
"5=#a292a3"
"6=#8ea4a2"
"7=#a4a7a4"
"8=#5C6066"
"9=#e46876"
"10=#87a987"
"11=#e6c384"
"12=#7fb4ca"
"13=#938aa9"
"14=#7aa89f"
"15=#c5c9c7"
];
background = "#090E13";
foreground = "#c5c9c7";
cursor-color = "#c5c9c7";
cursor-text = "#9cdef2";
selection-background = "#22262D";
selection-foreground = "#c5c9c7";
cursor-style = "block";
cursor-style-blink = true;
adjust-cell-height = "35%";
background-opacity = 0.96;
keybind = linuxKeybinds ++ lib.optionals isDarwin darwinKeybinds;
}
// lib.optionalAttrs isDarwin {
macos-titlebar-style = "transparent";
};
};
}
-7
View File
@@ -1,7 +0,0 @@
{ ... }:
{
imports = [
./nu.nix
];
}
-69
View File
@@ -1,69 +0,0 @@
{ ... }:
{
programs.nushell = {
enable = true;
shellAliases = {
ls = "eza --icons --group-directories-first";
ll = "eza -lah --icons --group-directories-first";
la = "eza -a --icons --group-directories-first";
lt = "eza --tree --level=2 --icons";
cat = "bat";
df = "df -h";
du = "du -h";
free = "free -h";
rm = "trash-put";
sysinfo = "fastfetch";
monitor = "sudo btop";
ports = "sudo ss -tulpn";
myip = "curl ifconfig.me";
gs = "git status";
ga = "git add";
gp = "git push";
gl = "git log --oneline --graph --decorate";
".." = "cd ..";
"..." = "cd ../..";
"...." = "cd ../../..";
};
environmentVariables = {
MESA_SHADER_CACHE_MAX_SIZE = "2G";
MESA_SHADER_CACHE_DIR = "/tmp/mesa_shader_cache";
};
extraEnv = ''
$env.PATH = ($env.PATH | prepend $"($env.HOME)/.local/bin")
'';
extraConfig = ''
$env.config.show_banner = false
def gc [msg: string] { git commit -m $msg }
def rebuild [] {
git -C ~/copland add -A
git -C ~/copland commit -m "update"
nh os switch
}
def rebuild-dry [] { nh os switch --dry }
def rebuild-cop [] {
nix flake update --flake ~/copland
git -C ~/copland add -A
git -C ~/copland commit -m $"flake update (date now | format date '%Y-%m-%d')"
nh os switch
}
def extract [file: string] {
let ext = ($file | path parse | get extension)
match $ext {
"gz" => { tar xzf $file },
"bz2" => { tar xjf $file },
"tar" => { tar xf $file },
"zip" => { unzip $file },
"7z" => { 7z x $file },
"rar" => { unrar e $file },
_ => { print $"'($file)' can't be extracted" }
}
}
'';
};
}
-47
View File
@@ -1,47 +0,0 @@
{
pkgs,
lib,
inputs,
...
}:
{
imports = [ ];
environment.systemPackages = [ pkgs.efibootmgr ];
nixpkgs.overlays = [ inputs.nix-cachyos-kernel.overlays.pinned ];
boot.kernelPackages = pkgs.cachyosKernels.linuxPackages-cachyos-bore-lto;
boot.kernelParams = [
"mitigations=off"
"nmi_watchdog=1"
"transparent_hugepage=madvise"
];
boot.kernelModules = [
"tcp_bbr"
"sch_fq"
];
boot.kernel.sysctl = {
"net.core.default_qdisc" = "fq";
"net.ipv4.tcp_congestion_control" = "bbr";
"kernel.softlockup_panic" = 1;
"kernel.hardlockup_panic" = 1;
"kernel.hung_task_panic" = 1;
"kernel.panic" = 50;
};
boot.loader = {
timeout = 5;
efi = {
canTouchEfiVariables = false;
efiSysMountPoint = "/boot";
};
systemd-boot = {
enable = true;
configurationLimit = 5;
};
};
}
+48
View File
@@ -0,0 +1,48 @@
{ ... }:
{
flake.nixosModules.common-boot =
{
pkgs,
inputs,
...
}:
{
environment.systemPackages = [ pkgs.efibootmgr ];
nixpkgs.overlays = [ inputs.nix-cachyos-kernel.overlays.pinned ];
boot.kernelPackages = pkgs.cachyosKernels.linuxPackages-cachyos-bore-lto;
boot.kernelParams = [
"mitigations=off"
"nmi_watchdog=1"
"transparent_hugepage=madvise"
];
boot.kernelModules = [
"tcp_bbr"
"sch_fq"
];
boot.kernel.sysctl = {
"net.core.default_qdisc" = "fq";
"net.ipv4.tcp_congestion_control" = "bbr";
"kernel.softlockup_panic" = 1;
"kernel.hardlockup_panic" = 1;
"kernel.hung_task_panic" = 1;
"kernel.panic" = 50;
};
boot.loader = {
timeout = 5;
efi = {
canTouchEfiVariables = false;
efiSysMountPoint = "/boot";
};
systemd-boot = {
enable = true;
configurationLimit = 5;
};
};
};
}
+58
View File
@@ -0,0 +1,58 @@
{ ... }:
{
flake.nixosModules.common-fonts =
{ pkgs, ... }:
{
fonts = {
packages = with pkgs; [
nerd-fonts.jetbrains-mono
nerd-fonts.caskaydia-cove
noto-fonts-color-emoji
noto-fonts-cjk-serif
noto-fonts-cjk-sans
nerd-fonts.hurmit
noto-fonts
ipaexfont
];
fontconfig = {
enable = true;
antialias = true;
hinting = {
enable = true;
style = "slight";
autohint = false;
};
subpixel = {
rgba = "rgb";
lcdfilter = "default";
};
defaultFonts = {
serif = [
"JetBrainsMono Nerd Font"
"Noto Serif CJK JP"
"Noto Serif"
"IPAexMincho"
];
sansSerif = [
"JetBrainsMono Nerd Font"
"Noto Sans CJK JP"
"Noto Sans"
"IPAexGothic"
];
monospace = [
"JetBrainsMono Nerd Font Mono"
"JetBrainsMono Nerd Font"
"Noto Sans Mono CJK JP"
"Noto Sans CJK JP"
"IPAexGothic"
];
emoji = [ "Noto Color Emoji" ];
};
};
};
};
}
+27
View File
@@ -0,0 +1,27 @@
{ ... }:
{
commonModules.common-git =
{ pkgs, lib, ... }:
let
base = ''
[user]
name = elwrcl
email = elwerici@proton.me
signingkey = 5EA48F7312A42B84
[commit]
gpgsign = true
[tag]
gpgsign = true
'';
darwinExtra = ''
[credential]
helper = osxkeychain
'';
gitconfig = pkgs.writeText "gitconfig" (base + lib.optionalString pkgs.stdenv.isDarwin darwinExtra);
in
{
environment.variables.GIT_CONFIG_SYSTEM = "${gitconfig}";
};
}
@@ -0,0 +1,19 @@
{ ... }:
{
flake.nixosModules.common-kmscon =
{ pkgs, ... }:
{
fonts.packages = [
pkgs.nerd-fonts.jetbrains-mono
];
services.kmscon = {
enable = true;
config = {
font-name = "JetBrainsMono Nerd Font";
font-size = 18;
hwaccel = true;
};
};
};
}
@@ -0,0 +1,41 @@
{ ... }:
{
flake.nixosModules.common-locale =
{ ... }:
{
time.timeZone = "Europe/Istanbul";
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "tr_TR.UTF-8";
LC_IDENTIFICATION = "tr_TR.UTF-8";
LC_MEASUREMENT = "tr_TR.UTF-8";
LC_MONETARY = "tr_TR.UTF-8";
LC_NAME = "tr_TR.UTF-8";
LC_NUMERIC = "tr_TR.UTF-8";
LC_PAPER = "tr_TR.UTF-8";
LC_TELEPHONE = "tr_TR.UTF-8";
LC_TIME = "tr_TR.UTF-8";
};
services.timesyncd.enable = false;
services.chrony = {
enable = true;
extraConfig = ''
makestep 1.0 -1
server 162.159.200.1 iburst
server 216.239.35.0 iburst
server time.cloudflare.com iburst
server time.google.com iburst
'';
};
systemd.services.chronyd = {
after = [ "network-online.target" ];
wants = [ "network-online.target" ];
};
console.font = "LatArCyrHeb-16";
system.stateVersion = "25.05";
console.keyMap = "trq";
console.earlySetup = true;
};
}
+44
View File
@@ -0,0 +1,44 @@
{ ... }:
{
flake.nixosModules.common-nix =
{ ... }:
{
nix.settings = {
experimental-features = [
"nix-command"
"flakes"
];
max-jobs = 4;
cores = 4;
substituters = [
"https://cache.nixos.org"
"https://nix-community.cachix.org"
"https://ezkea.cachix.org"
"https://noctalia.cachix.org"
"https://hyprland.cachix.org"
"https://attic.xuyh0120.win/lantian"
"https://soryu-kernel.cachix.org"
];
trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"ezkea.cachix.org-1:ioBmUbJTZIKsHmWWXPe1FSFbeVe+afhfgqgTSNd34eI="
"noctalia.cachix.org-1:pCOR47nnMEo5thcxNDtzWpOxNFQsBRglJzxWPp3dkU4="
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
"lantian:EeAUQ+W+6r7EtwnmYjeVwx5kOGEBpjlBfPlzGlTNvHc="
"soryu-kernel.cachix.org-1:2/Tm90ibGjLQWo/uX4qo/kbFB5yjQG/CzfE1oelHdWw="
];
};
documentation = {
man.enable = true;
doc.enable = false;
info.enable = false;
nixos.enable = false;
};
programs.nix-ld.enable = true;
};
}
@@ -0,0 +1,206 @@
{ ... }:
{
flake.nixosModules.common-packages =
{
pkgs,
inputs,
system,
...
}:
let
uxplay-fixed = pkgs.uxplay.override {
avahi = pkgs.avahi.override { withLibdnssdCompat = true; };
};
in
{
environment.systemPackages = with pkgs; [
# apps
onlyoffice-desktopeditors
whatsapp-electron
telegram-desktop
prismlauncher
moonlight-qt
qbittorrent
antigravity
obs-studio
localsend
picotool
sunshine
spotify
equibop
heroic
loupe
gimp
wine
# file-manager
kdePackages.kdegraphics-thumbnailers
kdePackages.plasma-integration
kdePackages.breeze-icons
kdePackages.kio-extras
kdePackages.qtwayland
kdePackages.kio-admin
kdePackages.kio-fuse
kdePackages.kservice
kdePackages.konsole
kdePackages.dolphin
kdePackages.qtsvg
kdePackages.ark
kdePackages.kio
kdePackages.kdf
nautilus
# utils
poppler-utils
wl-clipboard
wf-recorder
tesseract
mpvpaper
swappy
slurp
grim
# phone
libimobiledevice
android-tools
uxplay-fixed
usbmuxd
libmtp
jmtpfs
scrcpy
ifuse
# agents
github-copilot-cli
claude-mergetool
claude-monitor
claude-code
# cli
fastfetch
trash-cli
lazyjj
jj-fzf
meld
jujutsu
tailscale
dos2unix
autossh
ani-cli
zoxide
cachix
direnv
rsync
unzip
kitty
tree
tldr
perf
file
wget
fish
htop
tmux
btop
yazi
zip
eza
bat
git
rar
jq
fd
# hardware
xkeyboard-config
intel-gpu-tools
smartmontools
brightnessctl
gsmartcontrol
vulkan-tools
libva-utils
mesa-demos
lm_sensors
exfatprogs
dmidecode
libsecret
apfs-fuse
gptfdisk
pciutils
usbutils
hfsprogs
dmg2img
ddcutil
clinfo
hidapi
parted
p7zip
xar
# themes/icons
whitesur-icon-theme
whitesur-gtk-theme
gnome-themes-extra
whitesur-kde
adwaita-qt6
adwaita-qt
# langs
alejandra
binutils
python3
rustup
nodejs
jdk25
gcc
ghc
zig
lua
glm
go
# dev tools
jdt-language-server
rust-analyzer
clang-tools
cargo-tauri
pkg-config
gnumake
openssl
pyright
rustfmt
lazygit
nixfmt
zellij
sqlite
aubio
delta
trunk
nixd
nil
uv
# editors
lite-xl
neovim
vscode
# media
ffmpegthumbnailer
imagemagick
pavucontrol
pamixer
ffmpeg
yt-dlp
cava
mpv
inputs.zen-browser.packages.${system}.default
inputs.nix-alien.packages.${system}.nix-alien
inputs.noctalia.packages.${system}.default
inputs.copetch.packages.${system}.default
inputs.helium.packages.${system}.default
pkgs.qt6Packages.qtwebsockets
];
};
}
+39
View File
@@ -0,0 +1,39 @@
{ ... }:
{
flake.nixosModules.common-users =
{ pkgs, ... }:
{
users.users.elars = {
isNormalUser = true;
linger = true;
description = "elars";
extraGroups = [
"networkmanager"
"libvirtd"
"scanner"
"plugdev"
"docker"
"video"
"input"
"audio"
"wheel"
"lp"
];
shell = pkgs.zsh;
};
programs.nh = {
enable = true;
clean.enable = true;
clean.extraArgs = "--keep-since 4d --keep 3";
flake = "/home/elars/copland";
};
programs.zsh = {
enable = true;
enableCompletion = true;
autosuggestions.enable = true;
syntaxHighlighting.enable = true;
};
};
}
-15
View File
@@ -1,15 +0,0 @@
{ ... }:
{
imports = [
../home/git.nix
./boot
./desktop
./gaming
./hardware
./networking
./services
./system
./users
./virtualization
];
}
-7
View File
@@ -1,7 +0,0 @@
{ ... }:
{
imports = [
./pipewire.nix
];
}
-39
View File
@@ -1,39 +0,0 @@
{ ... }:
{
services.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
wireplumber.enable = true;
extraConfig.pipewire."10-realtime" = {
"context.modules" = [
{
name = "libpipewire-module-rt";
args = {
"nice.level" = -15;
"rt.prio" = 88;
"rt.time.soft" = 200000;
"rt.time.hard" = 400000;
};
flags = [
"ifexists"
"nofail"
];
}
];
};
extraConfig.pipewire."92-quantum" = {
"context.properties" = {
"default.clock.rate" = 48000;
"default.clock.allowed-rates" = [ 48000 ];
"default.clock.quantum" = 1024;
"default.clock.min-quantum" = 1024;
"default.clock.max-quantum" = 1024;
};
};
};
}
-58
View File
@@ -1,58 +0,0 @@
{ pkgs, ... }:
{
imports = [
./display
./window-managers
./audio
];
xdg = {
mime = {
enable = true;
defaultApplications = {
# gui
"text/html" = "zen-beta.desktop";
"x-scheme-handler/http" = "zen-beta.desktop";
"x-scheme-handler/https" = "zen-beta.desktop";
"x-scheme-handler/about" = "zen-beta.desktop";
"x-scheme-handler/unknown" = "zen-beta.desktop";
"x-scheme-handler/steam" = "steam.desktop";
# media
"image/png" = "org.gnome.Loupe.desktop";
"image/jpeg" = "org.gnome.Loupe.desktop";
"image/gif" = "org.gnome.Loupe.desktop";
"image/bmp" = "org.gnome.Loupe.desktop";
"image/svg+xml" = "org.gnome.Loupe.desktop";
"image/webp" = "org.gnome.Loupe.desktop";
"image/tiff" = "org.gnome.Loupe.desktop";
"video/mp4" = "mpv.desktop";
"video/x-matroska" = "mpv.desktop";
"video/webm" = "mpv.desktop";
"video/avi" = "mpv.desktop";
"video/quicktime" = "mpv.desktop";
"audio/mpeg" = "mpv.desktop";
"audio/flac" = "mpv.desktop";
"audio/ogg" = "mpv.desktop";
# text
"text/plain" = "code.desktop";
"text/x-rust" = "code.desktop";
"text/x-nix" = "code.desktop";
"text/x-csrc" = "code.desktop";
"text/x-chdr" = "code.desktop";
"text/x-python" = "code.desktop";
"text/x-shellscript" = "code.desktop";
"application/json" = "code.desktop";
"application/x-shellscript" = "code.desktop";
};
};
menus.enable = true;
};
environment.etc."xdg/menus/applications.menu".text =
builtins.readFile "${pkgs.kdePackages.plasma-workspace}/etc/xdg/menus/plasma-applications.menu";
}
@@ -0,0 +1,42 @@
{ ... }:
{
flake.nixosModules.desktop-audio =
{ ... }:
{
services.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
wireplumber.enable = true;
extraConfig.pipewire."10-realtime" = {
"context.modules" = [
{
name = "libpipewire-module-rt";
args = {
"nice.level" = -15;
"rt.prio" = 88;
"rt.time.soft" = 200000;
"rt.time.hard" = 400000;
};
flags = [
"ifexists"
"nofail"
];
}
];
};
extraConfig.pipewire."92-quantum" = {
"context.properties" = {
"default.clock.rate" = 48000;
"default.clock.allowed-rates" = [ 48000 ];
"default.clock.quantum" = 1024;
"default.clock.min-quantum" = 1024;
"default.clock.max-quantum" = 1024;
};
};
};
};
}
@@ -0,0 +1,32 @@
{ ... }:
{
flake.nixosModules.desktop-display =
{ ... }:
{
services.xserver.enable = true;
services.displayManager.ly = {
enable = true;
settings = {
animation = "colormix";
colormix_col1 = "0x00FFFFFF";
colormix_col2 = "0x00808080";
colormix_col3 = "0x00080808";
bigclock = "en";
bigclock_12hr = false;
fg = "0x00FFFFFF";
bg = "0x00000000";
border_fg = "0x00FFFFFF";
error_fg = "0x01FF0000";
blank_box = true;
hide_borders = false;
margin_box_h = 2;
margin_box_v = 1;
};
};
services.xserver.xkb = {
layout = "tr";
variant = "";
};
};
}
@@ -0,0 +1,12 @@
{ ... }:
{
flake.nixosModules.desktop-niri =
{ pkgs, ... }:
{
programs.niri.enable = true;
environment.systemPackages = with pkgs; [
xwayland-satellite
];
};
}
@@ -0,0 +1,55 @@
{ ... }:
{
flake.nixosModules.desktop-xdg-mime =
{ pkgs, ... }:
{
xdg = {
mime = {
enable = true;
defaultApplications = {
# gui
"text/html" = "zen-beta.desktop";
"x-scheme-handler/http" = "zen-beta.desktop";
"x-scheme-handler/https" = "zen-beta.desktop";
"x-scheme-handler/about" = "zen-beta.desktop";
"x-scheme-handler/unknown" = "zen-beta.desktop";
"x-scheme-handler/steam" = "steam.desktop";
# media
"image/png" = "org.gnome.Loupe.desktop";
"image/jpeg" = "org.gnome.Loupe.desktop";
"image/gif" = "org.gnome.Loupe.desktop";
"image/bmp" = "org.gnome.Loupe.desktop";
"image/svg+xml" = "org.gnome.Loupe.desktop";
"image/webp" = "org.gnome.Loupe.desktop";
"image/tiff" = "org.gnome.Loupe.desktop";
"video/mp4" = "mpv.desktop";
"video/x-matroska" = "mpv.desktop";
"video/webm" = "mpv.desktop";
"video/avi" = "mpv.desktop";
"video/quicktime" = "mpv.desktop";
"audio/mpeg" = "mpv.desktop";
"audio/flac" = "mpv.desktop";
"audio/ogg" = "mpv.desktop";
# text
"text/plain" = "code.desktop";
"text/x-rust" = "code.desktop";
"text/x-nix" = "code.desktop";
"text/x-csrc" = "code.desktop";
"text/x-chdr" = "code.desktop";
"text/x-python" = "code.desktop";
"text/x-shellscript" = "code.desktop";
"application/json" = "code.desktop";
"application/x-shellscript" = "code.desktop";
};
};
menus.enable = true;
};
environment.etc."xdg/menus/applications.menu".text =
builtins.readFile "${pkgs.kdePackages.plasma-workspace}/etc/xdg/menus/plasma-applications.menu";
};
}
-29
View File
@@ -1,29 +0,0 @@
{ ... }:
{
services.xserver.enable = true;
services.displayManager.ly = {
enable = true;
settings = {
animation = "colormix";
colormix_col1 = "0x00FFFFFF";
colormix_col2 = "0x00808080";
colormix_col3 = "0x00080808";
bigclock = "en";
bigclock_12hr = false;
fg = "0x00FFFFFF";
bg = "0x00000000";
border_fg = "0x00FFFFFF";
error_fg = "0x01FF0000";
blank_box = true;
hide_borders = false;
margin_box_h = 2;
margin_box_v = 1;
};
};
services.xserver.xkb = {
layout = "tr";
variant = "";
};
}
@@ -1,7 +0,0 @@
{ ... }:
{
imports = [
./niri.nix
];
}
@@ -1,34 +0,0 @@
{ pkgs, inputs, ... }:
{
programs.hyprland = {
enable = true;
package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
portalPackage =
inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
xwayland.enable = true;
withUWSM = true;
};
xdg.portal = {
enable = true;
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
config.hyprland.default = [
"hyprland"
"gtk"
];
};
services = {
dbus.enable = true;
};
security.polkit.enable = true;
environment.systemPackages = with pkgs; [
glib
dconf
dconf-editor
xdg-utils
xdg-user-dirs
];
}
@@ -1,8 +0,0 @@
{ pkgs, ... }:
{
programs.niri.enable = true;
environment.systemPackages = with pkgs; [
xwayland-satellite
];
}
@@ -1,9 +0,0 @@
{ pkgs, ... }:
{
programs.sway = {
enable = true;
wrapperFeatures.gtk = true;
extraPackages = with pkgs; [ foot dmenu ];
};
}
-17
View File
@@ -1,17 +0,0 @@
{ pkgs, ... }:
{
imports = [
./steam
];
programs.gamemode = {
enable = true;
enableRenice = true;
};
environment.systemPackages = with pkgs; [
protonup-qt
mangohud
];
}
@@ -0,0 +1,16 @@
{ ... }:
{
flake.nixosModules.gaming-gamemode =
{ pkgs, ... }:
{
programs.gamemode = {
enable = true;
enableRenice = true;
};
environment.systemPackages = with pkgs; [
protonup-qt
mangohud
];
};
}
+26
View File
@@ -0,0 +1,26 @@
{ ... }:
{
flake.nixosModules.gaming-steam =
{ pkgs, ... }:
{
programs.steam = {
enable = true;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true;
protontricks.enable = true;
extraCompatPackages = with pkgs; [
proton-ge-bin
];
};
programs.gamescope = {
enable = true;
capSysNice = true;
env = {
INTEL_DEBUG = "noccs";
};
};
hardware.steam-hardware.enable = true;
};
}
-22
View File
@@ -1,22 +0,0 @@
{ pkgs, ... }:
{
programs.steam = {
enable = true;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true;
protontricks.enable = true;
extraCompatPackages = with pkgs; [
proton-ge-bin
];
};
programs.gamescope = {
enable = true;
capSysNice = true;
env = {
INTEL_DEBUG = "noccs";
};
};
hardware.steam-hardware.enable = true;
}
@@ -1,5 +0,0 @@
{ ... }:
{
hardware.bluetooth.enable = true;
}
-9
View File
@@ -1,9 +0,0 @@
{ ... }:
{
imports = [
./bluetooth
./graphics
./udev
];
}
-10
View File
@@ -1,10 +0,0 @@
{ pkgs, ... }:
{
hardware.graphics.extraPackages = with pkgs; [
amdvlk
rocmPackages.clr.icd
];
services.xserver.videoDrivers = [ "amdgpu" ];
}
@@ -1,36 +0,0 @@
{ config, lib, pkgs, ... }:
let
driver = config.elars.hardware.graphics.driver;
in
{
options.elars.hardware.graphics.driver = lib.mkOption {
type = lib.types.enum [
"intel"
"amd"
"nvidia"
"hybrid-amd-nvidia"
];
default = "intel";
};
config = lib.mkMerge [
{
hardware.graphics = {
enable = true;
enable32Bit = true;
};
}
(lib.mkIf (driver == "intel") (import ./intel.nix { inherit config lib pkgs; }))
(lib.mkIf (driver == "amd") (import ./amd.nix { inherit config lib pkgs; }))
(lib.mkIf (driver == "nvidia") (import ./nvidia.nix { inherit config lib pkgs; }))
(lib.mkIf (driver == "hybrid-amd-nvidia") (
lib.mkMerge [
(import ./amd.nix { inherit config lib pkgs; })
(import ./nvidia.nix { inherit config lib pkgs; })
(import ./prime.nix { inherit config lib pkgs; })
]
))
];
}
-44
View File
@@ -1,44 +0,0 @@
{ pkgs, ... }:
let
wayland-intel-vaapi-driver = pkgs.intel-vaapi-driver.overrideAttrs (oldAttrs: {
version = "2.4.4-wayland-fix";
src = pkgs.fetchFromGitHub {
owner = "irql-notlessorequal";
repo = "intel-vaapi-driver";
rev = "929e936ec1f451a5daa12b0c7367687b712b8c2c";
hash = "sha256-tZ1rZ+4bRxarcFQhP8V2Mfz0sJ5rBgHYLu2ulrQwL+U=";
};
});
wayland-intel-vaapi-driver-32 = pkgs.pkgsi686Linux.intel-vaapi-driver.overrideAttrs (oldAttrs: {
version = "2.4.4-wayland-fix";
src = pkgs.fetchFromGitHub {
owner = "irql-notlessorequal";
repo = "intel-vaapi-driver";
rev = "929e936ec1f451a5daa12b0c7367687b712b8c2c";
hash = "sha256-tZ1rZ+4bRxarcFQhP8V2Mfz0sJ5rBgHYLu2ulrQwL+U=";
};
});
#hasvk14-layer = pkgs.callPackage ./vk { };
#hasvk14-layer-32 = pkgs.pkgsi686Linux.callPackage ./vk { };
in
{
hardware.graphics = {
extraPackages = [
#hasvk14-layer
wayland-intel-vaapi-driver
pkgs.libvdpau-va-gl
pkgs.pocl
];
extraPackages32 = [
#hasvk14-layer-32
wayland-intel-vaapi-driver-32
pkgs.pkgsi686Linux.libvdpau-va-gl
];
};
services.xserver.videoDrivers = [ "modesetting" ];
environment.variables = {
LIBVA_DRIVER_NAME = "i965";
};
}
@@ -1,12 +0,0 @@
{ config, ... }:
{
services.xserver.videoDrivers = [ "nvidia" ];
hardware.nvidia = {
modesetting.enable = true;
open = false;
nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.stable;
};
}
@@ -1,9 +0,0 @@
{ ... }:
{
hardware.nvidia.prime = {
offload.enable = true;
amdgpuBusId = "PCI:X:X:X";
nvidiaBusId = "PCI:X:X:X";
};
}
@@ -1,28 +0,0 @@
{ pkgs }:
let
is32 = pkgs.stdenv.hostPlatform.system == "i686-linux";
layerName = "VK_LAYER_hasvk14_version_override" + pkgs.lib.optionalString is32 "_32";
in
pkgs.stdenv.mkDerivation {
name = "vulkan-layer-hasvk14" + pkgs.lib.optionalString is32 "-32bit";
src = ./.;
buildInputs = [ pkgs.vulkan-headers ];
buildPhase = ''
$CC -shared -fPIC -O2 -o libVkLayer_hasvk14.so hasvk14_layer.c \
-I${pkgs.vulkan-headers}/include
'';
installPhase = ''
mkdir -p $out/lib $out/share/vulkan/implicit_layer.d
cp libVkLayer_hasvk14.so $out/lib/
substitute hasvk14_layer.json \
$out/share/vulkan/implicit_layer.d/hasvk14_layer.json \
--subst-var out \
--subst-var-by layer_name "${layerName}"
'';
}
@@ -1,199 +0,0 @@
/*
* Vulkan implicit layer forces VK 1.4.x (e.g. 1.4.348 via headers)
*/
#include <vulkan/vulkan.h>
#include <vulkan/vk_layer.h>
#include <string.h>
static PFN_vkGetInstanceProcAddr g_next_gipa = NULL;
static PFN_vkGetPhysicalDeviceProperties g_next_gdp = NULL;
static PFN_vkGetPhysicalDeviceProperties2 g_next_gdp2 = NULL;
static PFN_vkGetPhysicalDeviceFeatures g_next_gdf = NULL;
static PFN_vkGetPhysicalDeviceFeatures2 g_next_gdf2 = NULL;
#define HASVK14_API_VERSION VK_MAKE_API_VERSION(0, 1, 4, VK_HEADER_VERSION)
#define INTEL_VENDOR_ID 0x8086
static int is_intel_below_14(uint32_t vendorID, uint32_t apiVersion)
{
return vendorID == INTEL_VENDOR_ID && VK_API_VERSION_MAJOR(apiVersion) == 1 && VK_API_VERSION_MINOR(apiVersion) < 4;
}
static int is_intel_device(VkPhysicalDevice device)
{
if (!g_next_gdp) return 0;
VkPhysicalDeviceProperties props;
g_next_gdp(device, &props);
return props.vendorID == INTEL_VENDOR_ID;
}
static void patch_features(VkPhysicalDeviceFeatures *f)
{
f->shaderInt16 = VK_TRUE;
}
VKAPI_ATTR VkResult VKAPI_CALL
HaVK14_EnumerateInstanceVersion(uint32_t *pApiVersion)
{
*pApiVersion = HASVK14_API_VERSION;
return VK_SUCCESS;
}
VKAPI_ATTR VkResult VKAPI_CALL
HaVK14_CreateInstance(const VkInstanceCreateInfo *pCreateInfo,
const VkAllocationCallbacks *pAllocator,
VkInstance *pInstance)
{
VkLayerInstanceCreateInfo *link =
(VkLayerInstanceCreateInfo *)pCreateInfo->pNext;
while (link &&
!(link->sType == VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO &&
link->function == VK_LAYER_LINK_INFO))
link = (VkLayerInstanceCreateInfo *)link->pNext;
if (!link)
return VK_ERROR_INITIALIZATION_FAILED;
g_next_gipa = link->u.pLayerInfo->pfnNextGetInstanceProcAddr;
link->u.pLayerInfo = link->u.pLayerInfo->pNext;
PFN_vkCreateInstance next_ci =
(PFN_vkCreateInstance)g_next_gipa(NULL, "vkCreateInstance");
VkResult res = next_ci(pCreateInfo, pAllocator, pInstance);
if (res != VK_SUCCESS)
return res;
g_next_gdp = (PFN_vkGetPhysicalDeviceProperties)
g_next_gipa(*pInstance, "vkGetPhysicalDeviceProperties");
g_next_gdp2 = (PFN_vkGetPhysicalDeviceProperties2)
g_next_gipa(*pInstance, "vkGetPhysicalDeviceProperties2");
if (!g_next_gdp2)
{
g_next_gdp2 = (PFN_vkGetPhysicalDeviceProperties2)
g_next_gipa(*pInstance, "vkGetPhysicalDeviceProperties2KHR");
}
g_next_gdf = (PFN_vkGetPhysicalDeviceFeatures)
g_next_gipa(*pInstance, "vkGetPhysicalDeviceFeatures");
g_next_gdf2 = (PFN_vkGetPhysicalDeviceFeatures2)
g_next_gipa(*pInstance, "vkGetPhysicalDeviceFeatures2");
if (!g_next_gdf2)
{
g_next_gdf2 = (PFN_vkGetPhysicalDeviceFeatures2)
g_next_gipa(*pInstance, "vkGetPhysicalDeviceFeatures2KHR");
}
return VK_SUCCESS;
}
VKAPI_ATTR void VKAPI_CALL
HaVK14_GetPhysicalDeviceProperties(VkPhysicalDevice device,
VkPhysicalDeviceProperties *props)
{
if (g_next_gdp)
g_next_gdp(device, props);
if (props && is_intel_below_14(props->vendorID, props->apiVersion))
{
props->apiVersion = HASVK14_API_VERSION;
}
}
VKAPI_ATTR void VKAPI_CALL
HaVK14_GetPhysicalDeviceProperties2(VkPhysicalDevice device,
VkPhysicalDeviceProperties2 *props2)
{
if (g_next_gdp2)
g_next_gdp2(device, props2);
if (!props2)
return;
VkPhysicalDeviceProperties *props = &props2->properties;
if (!is_intel_below_14(props->vendorID, props->apiVersion))
return;
props->apiVersion = HASVK14_API_VERSION;
VkBaseOutStructure *s = (VkBaseOutStructure *)props2->pNext;
while (s)
{
if (s->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_PROPERTIES)
{
VkPhysicalDeviceVulkan12Properties *p12 =
(VkPhysicalDeviceVulkan12Properties *)s;
p12->conformanceVersion = (VkConformanceVersion){1, 4, 1, 1};
}
if (s->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES)
{
VkPhysicalDeviceDriverProperties *drv =
(VkPhysicalDeviceDriverProperties *)s;
drv->conformanceVersion = (VkConformanceVersion){1, 4, 1, 1};
}
s = s->pNext;
}
}
VKAPI_ATTR void VKAPI_CALL
HaVK14_GetPhysicalDeviceFeatures(VkPhysicalDevice device,
VkPhysicalDeviceFeatures *features)
{
if (g_next_gdf)
g_next_gdf(device, features);
if (features && is_intel_device(device))
patch_features(features);
}
VKAPI_ATTR void VKAPI_CALL
HaVK14_GetPhysicalDeviceFeatures2(VkPhysicalDevice device,
VkPhysicalDeviceFeatures2 *features2)
{
if (g_next_gdf2)
g_next_gdf2(device, features2);
if (!features2 || !is_intel_device(device))
return;
patch_features(&features2->features);
/* Also patch Vulkan 1.1/1.2 feature structs in pNext chain */
VkBaseOutStructure *s = (VkBaseOutStructure *)features2->pNext;
while (s)
{
if (s->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES)
{
VkPhysicalDeviceShaderDrawParametersFeatures *f =
(VkPhysicalDeviceShaderDrawParametersFeatures *)s;
f->shaderDrawParameters = VK_TRUE;
}
if (s->sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES)
{
VkPhysicalDeviceVulkan12Features *f12 =
(VkPhysicalDeviceVulkan12Features *)s;
f12->shaderInt8 = VK_TRUE;
f12->storageBuffer8BitAccess = VK_TRUE;
f12->uniformAndStorageBuffer8BitAccess = VK_TRUE;
}
s = s->pNext;
}
}
VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL
HaVK14_GetInstanceProcAddr(VkInstance instance, const char *pName)
{
#define INTERCEPT(fn) \
if (strcmp(pName, "vk" #fn) == 0) \
return (PFN_vkVoidFunction)HaVK14_##fn;
INTERCEPT(GetInstanceProcAddr)
INTERCEPT(EnumerateInstanceVersion)
INTERCEPT(CreateInstance)
INTERCEPT(GetPhysicalDeviceProperties)
INTERCEPT(GetPhysicalDeviceProperties2)
INTERCEPT(GetPhysicalDeviceFeatures)
INTERCEPT(GetPhysicalDeviceFeatures2)
if (strcmp(pName, "vkGetPhysicalDeviceProperties2KHR") == 0)
return (PFN_vkVoidFunction)HaVK14_GetPhysicalDeviceProperties2;
if (strcmp(pName, "vkGetPhysicalDeviceFeatures2KHR") == 0)
return (PFN_vkVoidFunction)HaVK14_GetPhysicalDeviceFeatures2;
#undef INTERCEPT
return g_next_gipa ? g_next_gipa(instance, pName) : NULL;
}
@@ -1,17 +0,0 @@
{
"file_format_version": "1.1.2",
"layer": {
"name": "@layer_name@",
"type": "GLOBAL",
"library_path": "@out@/lib/libVkLayer_hasvk14.so",
"api_version": "1.4.0",
"implementation_version": "1",
"description": "Intel Hard Graphics",
"functions": {
"vkGetInstanceProcAddr": "HaVK14_GetInstanceProcAddr"
},
"disable_environment": {
"DISABLE_HASVK14_LAYER": "1"
}
}
}
-21
View File
@@ -1,21 +0,0 @@
{ ... }:
{
programs.gpu-screen-recorder.enable = true;
services.udev.extraRules = ''
KERNEL=="ttyACM[0-9]*", MODE="0666"
KERNEL=="ttyUSB[0-9]*", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", MODE="0666", GROUP="plugdev"
'';
services.udisks2.enable = true;
services.gnome.sushi.enable = true;
services.gvfs.enable = true;
security.polkit.extraConfig = ''
polkit.addRule(function(action, subject) {
if (action.id.match("org.freedesktop.udisks2.") &&
subject.isInGroup("wheel")) {
return polkit.Result.YES;
}
});
'';
}
+8
View File
@@ -0,0 +1,8 @@
{ ... }:
{
flake.nixosModules.hw-bluetooth =
{ ... }:
{
hardware.bluetooth.enable = true;
};
}
+116
View File
@@ -0,0 +1,116 @@
{ ... }:
{
flake.nixosModules.hw-graphics =
{
config,
lib,
pkgs,
...
}:
let
driver = config.elars.hardware.graphics.driver;
amd = {
hardware.graphics.extraPackages = with pkgs; [
amdvlk
rocmPackages.clr.icd
];
services.xserver.videoDrivers = [ "amdgpu" ];
};
intel =
let
wayland-intel-vaapi-driver = pkgs.intel-vaapi-driver.overrideAttrs (oldAttrs: {
version = "2.4.4-wayland-fix";
src = pkgs.fetchFromGitHub {
owner = "irql-notlessorequal";
repo = "intel-vaapi-driver";
rev = "929e936ec1f451a5daa12b0c7367687b712b8c2c";
hash = "sha256-tZ1rZ+4bRxarcFQhP8V2Mfz0sJ5rBgHYLu2ulrQwL+U=";
};
});
wayland-intel-vaapi-driver-32 = pkgs.pkgsi686Linux.intel-vaapi-driver.overrideAttrs (oldAttrs: {
version = "2.4.4-wayland-fix";
src = pkgs.fetchFromGitHub {
owner = "irql-notlessorequal";
repo = "intel-vaapi-driver";
rev = "929e936ec1f451a5daa12b0c7367687b712b8c2c";
hash = "sha256-tZ1rZ+4bRxarcFQhP8V2Mfz0sJ5rBgHYLu2ulrQwL+U=";
};
});
#hasvk14-layer = pkgs.callPackage ./vk { };
#hasvk14-layer-32 = pkgs.pkgsi686Linux.callPackage ./vk { };
in
{
hardware.graphics = {
extraPackages = [
#hasvk14-layer
wayland-intel-vaapi-driver
pkgs.libvdpau-va-gl
pkgs.pocl
];
extraPackages32 = [
#hasvk14-layer-32
wayland-intel-vaapi-driver-32
pkgs.pkgsi686Linux.libvdpau-va-gl
];
};
services.xserver.videoDrivers = [ "modesetting" ];
environment.variables = {
LIBVA_DRIVER_NAME = "i965";
};
};
nvidia = {
services.xserver.videoDrivers = [ "nvidia" ];
hardware.nvidia = {
modesetting.enable = true;
open = false;
nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.stable;
};
};
prime = {
hardware.nvidia.prime = {
offload.enable = true;
amdgpuBusId = "PCI:X:X:X";
nvidiaBusId = "PCI:X:X:X";
};
};
in
{
options.elars.hardware.graphics.driver = lib.mkOption {
type = lib.types.enum [
"intel"
"amd"
"nvidia"
"hybrid-amd-nvidia"
];
default = "intel";
};
config = lib.mkMerge [
{
hardware.graphics = {
enable = true;
enable32Bit = true;
};
}
(lib.mkIf (driver == "intel") intel)
(lib.mkIf (driver == "amd") amd)
(lib.mkIf (driver == "nvidia") nvidia)
(lib.mkIf (driver == "hybrid-amd-nvidia") (
lib.mkMerge [
amd
nvidia
prime
]
))
];
};
}
Loaded 100 of 140 files, more files were not shown because too many files have changed in this diff. Show more