big refactor
This commit is contained in:
commit
76d68230f6
81 changed files with 3065 additions and 0 deletions
BIN
assets/grub/background.png
Normal file
BIN
assets/grub/background.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.2 MiB |
57
devices/ideapad-slim-5/configuration.nix
Executable file
57
devices/ideapad-slim-5/configuration.nix
Executable file
|
|
@ -0,0 +1,57 @@
|
|||
{
|
||||
libs,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
(libs.root "/host/desktop/default.nix")
|
||||
(libs.root "/home/asakiyuki/configuration.nix")
|
||||
];
|
||||
|
||||
networking.hostName = "nixos";
|
||||
networking.networkmanager.enable = true;
|
||||
time.timeZone = "Asia/Ho_Chi_Minh";
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
programs.firefox.enable = true;
|
||||
|
||||
nix.settings.experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
|
||||
device = {
|
||||
flake-name = "ideapad-slim-5";
|
||||
cursors = "aemeath";
|
||||
|
||||
dm.sddm.enable = true;
|
||||
dm.gdm.enable = false;
|
||||
|
||||
de.kdePlasma.enable = false;
|
||||
de.gnome.enable = false;
|
||||
|
||||
wm.niri.enable = false;
|
||||
wm.hyprland.enable = true;
|
||||
|
||||
bluetooth.enable = true;
|
||||
flatpak.enable = true;
|
||||
|
||||
programs = {
|
||||
terminal = "ghostty";
|
||||
obs-studio.enable = true;
|
||||
nixcord.enable = true;
|
||||
tmux.enable = true;
|
||||
starship.enable = true;
|
||||
fastfetch.enable = true;
|
||||
cider-2.enable = true;
|
||||
steam.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
boot.extraModulePackages = [ pkgs.linuxPackages_latest.zenpower ];
|
||||
system.stateVersion = "25.11";
|
||||
}
|
||||
33
devices/ideapad-slim-5/hardware-configuration.nix
Executable file
33
devices/ideapad-slim-5/hardware-configuration.nix
Executable file
|
|
@ -0,0 +1,33 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usb_storage" "usbhid" "sd_mod" "sdhci_pci" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/85ab0f38-b6e7-4046-a33b-ce7b9812b959";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/2221-C55B";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/20e229eb-f32e-4369-be96-25275ebc8ae3"; }
|
||||
];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
1063
flake.lock
generated
Normal file
1063
flake.lock
generated
Normal file
File diff suppressed because it is too large
Load diff
70
flake.nix
Normal file
70
flake.nix
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
{
|
||||
description = "The Asa's nix configurations";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
|
||||
unstablepkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
||||
catppuccin.url = "github:catppuccin/nix";
|
||||
|
||||
niri.url = "github:sodiboo/niri-flake";
|
||||
hyprland.url = "github:hyprwm/Hyprland";
|
||||
nixcord.url = "github:FlameFlag/nixcord";
|
||||
|
||||
honkai-railway-grub-theme.url = "github:voidlhf/StarRailGrubThemes/4a84e576bb544afbdfc76dbe40ffc50a5c2b16de";
|
||||
|
||||
nix-index-database = {
|
||||
url = "github:nix-community/nix-index-database";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/release-25.11";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
nixvim = {
|
||||
url = "github:nix-community/nixvim/nixos-25.11";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs =
|
||||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
unstablepkgs,
|
||||
...
|
||||
}@inputs:
|
||||
let
|
||||
libs = import ./libs/default.nix inputs;
|
||||
custom = import ./packages/default.nix inputs;
|
||||
unstable = import unstablepkgs {
|
||||
system = "x86_64-linux";
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
in
|
||||
{
|
||||
nixosConfigurations = {
|
||||
ideapad-slim-5 = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = {
|
||||
inherit
|
||||
self
|
||||
custom
|
||||
libs
|
||||
unstable
|
||||
inputs
|
||||
;
|
||||
};
|
||||
modules = [
|
||||
inputs.nixos-hardware.nixosModules.lenovo-ideapad-slim-5
|
||||
inputs.nix-index-database.nixosModules.default
|
||||
inputs.home-manager.nixosModules.default
|
||||
(libs.root "/devices/ideapad-slim-5/configuration.nix")
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
43
home/asakiyuki/configuration.nix
Normal file
43
home/asakiyuki/configuration.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{
|
||||
inputs,
|
||||
config,
|
||||
pkgs,
|
||||
custom,
|
||||
...
|
||||
}:
|
||||
let
|
||||
osconfig = config;
|
||||
in
|
||||
{
|
||||
users.users.asakiyuki = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ];
|
||||
};
|
||||
|
||||
home-manager.users.asakiyuki = {
|
||||
_module.args = { inherit inputs osconfig custom; };
|
||||
imports = [
|
||||
./modules/programs.nix
|
||||
./modules/files.nix
|
||||
|
||||
../../modules/features/home/theme.nix
|
||||
|
||||
inputs.catppuccin.homeModules.catppuccin
|
||||
inputs.nixvim.homeModules.nixvim
|
||||
inputs.nixcord.homeModules.nixcord
|
||||
inputs.niri.homeModules.niri
|
||||
];
|
||||
|
||||
home = {
|
||||
username = "asakiyuki";
|
||||
stateVersion = "25.11";
|
||||
pointerCursor =
|
||||
(custom.cursors {
|
||||
name = osconfig.device.cursors;
|
||||
size = 48;
|
||||
})
|
||||
{ pkgs = pkgs; };
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
5
home/asakiyuki/modules/env.nix
Normal file
5
home/asakiyuki/modules/env.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{ ... }: {
|
||||
home.sessionVariables = {
|
||||
QT_QPA_PLATFORMTHEME = "qt6ct";
|
||||
};
|
||||
}
|
||||
19
home/asakiyuki/modules/files.nix
Normal file
19
home/asakiyuki/modules/files.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{ pkgs, osconfig, ... }:
|
||||
{
|
||||
home.file = {
|
||||
".config/qt5ct/colors/Catppuccin-Mocha.conf".source = "${pkgs.catppuccin-qt5ct}/share/qt5ct/colors/Catppuccin-Mocha.conf";
|
||||
".config/qt6ct/colors/Catppuccin-Mocha.conf".source = "${pkgs.catppuccin-qt5ct}/share/qt5ct/colors/Catppuccin-Mocha.conf";
|
||||
};
|
||||
|
||||
xdg.configFile = {
|
||||
kdeglobals.text = builtins.readFile ((pkgs.catppuccin-kde.override { flavour = ["mocha"]; accents = ["sapphire"]; }) + "/share/color-schemes/CatppuccinMochaSapphire.colors") +
|
||||
''
|
||||
|
||||
[UiSettings]
|
||||
ColorScheme=qt6ct
|
||||
|
||||
[General]
|
||||
TerminalApplication=${osconfig.device.programs.terminal}
|
||||
'';
|
||||
};
|
||||
}
|
||||
20
home/asakiyuki/modules/programs.nix
Normal file
20
home/asakiyuki/modules/programs.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{ lib, osconfig, ... }: {
|
||||
imports = [
|
||||
(../../../modules/features/home/ghostty.nix)
|
||||
(../../../modules/features/home/kitty.nix)
|
||||
|
||||
(../../../modules/features/home/bash.nix)
|
||||
(../../../modules/features/home/starship.nix)
|
||||
(../../../modules/features/home/tmux.nix)
|
||||
(../../../modules/features/home/fastfetch.nix)
|
||||
(../../../modules/features/home/vscode.nix)
|
||||
(../../../modules/features/home/obs-studio.nix)
|
||||
(../../../modules/features/home/xdg.nix)
|
||||
(../../../modules/features/home/packages.nix)
|
||||
|
||||
(../../../modules/programs/nixvim/_nixvim.nix)
|
||||
(../../../modules/programs/nixcord/default.nix)
|
||||
(../../../modules/features/home/niri.nix)
|
||||
(../../../modules/programs/hyprland/default.nix)
|
||||
];
|
||||
}
|
||||
28
host/desktop/default.nix
Normal file
28
host/desktop/default.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{ libs, ... }:
|
||||
{
|
||||
imports = [
|
||||
(libs.root "/modules/hardware/default.nix")
|
||||
|
||||
(libs.root "/modules/fonts.nix")
|
||||
|
||||
(libs.root "/modules/features/system/packages.nix")
|
||||
(libs.root "/modules/features/system/boot.nix")
|
||||
(libs.root "/modules/features/system/sddm.nix")
|
||||
(libs.root "/modules/features/system/gdm.nix")
|
||||
(libs.root "/modules/features/system/kde-plasma.nix")
|
||||
(libs.root "/modules/features/system/gnome.nix")
|
||||
(libs.root "/modules/features/system/niri.nix")
|
||||
(libs.root "/modules/features/system/hyprland.nix")
|
||||
(libs.root "/modules/features/system/input-method.nix")
|
||||
(libs.root "/modules/features/system/steam.nix")
|
||||
(libs.root "/modules/features/system/nix-dl.nix")
|
||||
(libs.root "/modules/features/system/flatpak.nix")
|
||||
|
||||
(libs.root "/modules/services/default.nix")
|
||||
(libs.root "/modules/home-manager.nix")
|
||||
|
||||
(libs.root "/options/desktop/default.nix")
|
||||
(libs.root "/overlays/nixpkgs.nix")
|
||||
];
|
||||
}
|
||||
|
||||
3
libs/default.nix
Normal file
3
libs/default.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{ ... }: {
|
||||
root = path: ../. + path;
|
||||
}
|
||||
62
modules/features/home/bash.nix
Normal file
62
modules/features/home/bash.nix
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
{ lib, osconfig, ... }: {
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
shellAliases = {
|
||||
cls = "clear";
|
||||
cleanup = "sudo nix-collect-garbage -d";
|
||||
cls-log = "sudo journalctl --vacuum-time=1s";
|
||||
|
||||
logout = "pkill -KILL -u $USER";
|
||||
|
||||
nrs = "sudo nixos-rebuild switch --flake /etc/nixos#${osconfig.device.flake-name}";
|
||||
wss = "waydroid session stop; exit;";
|
||||
flake-upgrade = "nix flake update";
|
||||
spf = "superfile";
|
||||
};
|
||||
|
||||
shellOptions = [
|
||||
"histappend"
|
||||
"checkwinsize"
|
||||
"extglob"
|
||||
"globstar"
|
||||
"checkjobs"
|
||||
"autocd"
|
||||
];
|
||||
|
||||
initExtra = ''
|
||||
function git-commit() {
|
||||
git add .
|
||||
git commit -m "$1"
|
||||
}
|
||||
|
||||
function git-push() {
|
||||
git-commit "$1"
|
||||
git push origin HEAD
|
||||
}
|
||||
|
||||
function git-pull() {
|
||||
git fetch origin HEAD
|
||||
git pull origin HEAD
|
||||
}
|
||||
|
||||
function get-hash() {
|
||||
nix hash to-sri --type sha256 $(nix-prefetch-url --unpack "$1")
|
||||
}
|
||||
'' +
|
||||
lib.optionalString osconfig.device.programs.tmux.enable ''
|
||||
allowed_terms=("xterm-kitty" "xterm-ghostty")
|
||||
|
||||
should_run_tmux=false
|
||||
for term in "${"$" + "{allowed_terms[@]" + "}"}"; do
|
||||
if [[ "$TERM" == "$term" ]]; then
|
||||
should_run_tmux=true
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -z "$TMUX" ] && [ "$should_run_tmux" = true ]; then
|
||||
exec tmux
|
||||
fi
|
||||
'';
|
||||
};
|
||||
}
|
||||
176
modules/features/home/fastfetch.nix
Normal file
176
modules/features/home/fastfetch.nix
Normal file
|
|
@ -0,0 +1,176 @@
|
|||
{ lib, osconfig, ... }:
|
||||
{
|
||||
programs.fastfetch = lib.mkIf osconfig.device.programs.fastfetch.enable {
|
||||
enable = true;
|
||||
settings = {
|
||||
logo = {
|
||||
padding.top = 1;
|
||||
color = {
|
||||
"1" = "#89b4fa";
|
||||
"2" = "#cdd6f4";
|
||||
"3" = "#89b4fa";
|
||||
"4" = "#cdd6f4";
|
||||
"5" = "#89b4fa";
|
||||
"6" = "#cdd6f4";
|
||||
};
|
||||
};
|
||||
|
||||
display = {
|
||||
color = {
|
||||
title = "#cdd6f4";
|
||||
output = "#cdd6f4";
|
||||
separator = "black";
|
||||
};
|
||||
|
||||
bar = {
|
||||
width = 10;
|
||||
charTotal = " ";
|
||||
border.left = "[";
|
||||
border.right = "]";
|
||||
char.elapsed = "█";
|
||||
color = {
|
||||
border = "green";
|
||||
elapsed = "green";
|
||||
total = "black";
|
||||
};
|
||||
};
|
||||
|
||||
percent = {
|
||||
type = 3;
|
||||
color = {
|
||||
green = "green";
|
||||
yellow = "yellow";
|
||||
red = "red";
|
||||
};
|
||||
};
|
||||
|
||||
separator = " ";
|
||||
brightColor = true;
|
||||
};
|
||||
|
||||
modules = [
|
||||
{
|
||||
type = "title";
|
||||
format = " {user-name}@{host-name}";
|
||||
outputColor = "bright_yellow";
|
||||
}
|
||||
|
||||
{
|
||||
type = "separator";
|
||||
string = "─";
|
||||
length = 24;
|
||||
outputColor = "white";
|
||||
}
|
||||
|
||||
{
|
||||
type = "os";
|
||||
key = "╭─";
|
||||
keyColor = "green";
|
||||
}
|
||||
{
|
||||
type = "kernel";
|
||||
key = "├─";
|
||||
keyColor = "green";
|
||||
}
|
||||
{
|
||||
type = "shell";
|
||||
key = "├─";
|
||||
keyColor = "green";
|
||||
}
|
||||
{
|
||||
type = "packages";
|
||||
key = "├─";
|
||||
keyColor = "green";
|
||||
}
|
||||
{
|
||||
type = "uptime";
|
||||
key = "╰─";
|
||||
keyColor = "green";
|
||||
}
|
||||
|
||||
"break"
|
||||
|
||||
{
|
||||
type = "host";
|
||||
keyColor = "blue";
|
||||
key = "╭─";
|
||||
}
|
||||
{
|
||||
type = "cpu";
|
||||
key = "├─";
|
||||
keyColor = "blue";
|
||||
}
|
||||
{
|
||||
type = "gpu";
|
||||
key = "├─";
|
||||
keyColor = "blue";
|
||||
}
|
||||
{
|
||||
type = "sound";
|
||||
key = "├─";
|
||||
format = "{name}";
|
||||
keyColor = "blue";
|
||||
}
|
||||
{
|
||||
type = "memory";
|
||||
format = "{percentage-bar} {used} / {total}";
|
||||
key = "├─";
|
||||
keyColor = "blue";
|
||||
}
|
||||
{
|
||||
type = "disk";
|
||||
format = "{size-percentage-bar} {name} ({mountpoint}) {size-used} / {size-total} - {filesystem}";
|
||||
key = "├─";
|
||||
keyColor = "blue";
|
||||
}
|
||||
{
|
||||
type = "localip";
|
||||
key = "╰─";
|
||||
keyColor = "blue";
|
||||
}
|
||||
|
||||
"break"
|
||||
|
||||
{
|
||||
type = "terminal";
|
||||
key = "╭─";
|
||||
keyColor = "yellow";
|
||||
}
|
||||
{
|
||||
type = "wm";
|
||||
key = "├─";
|
||||
keyColor = "yellow";
|
||||
}
|
||||
{
|
||||
type = "de";
|
||||
key = "├─";
|
||||
keyColor = "yellow";
|
||||
}
|
||||
{
|
||||
type = "bios";
|
||||
key = "├─";
|
||||
keyColor = "yellow";
|
||||
}
|
||||
{
|
||||
type = "theme";
|
||||
key = "├─";
|
||||
keyColor = "yellow";
|
||||
}
|
||||
{
|
||||
type = "icons";
|
||||
key = "├─";
|
||||
keyColor = "yellow";
|
||||
}
|
||||
{
|
||||
type = "cursor";
|
||||
key = "╰─";
|
||||
keyColor = "yellow";
|
||||
}
|
||||
|
||||
"break"
|
||||
"colors"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
50
modules/features/home/ghostty.nix
Normal file
50
modules/features/home/ghostty.nix
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
{ lib, osconfig, ... }: {
|
||||
programs.ghostty = lib.mkIf (osconfig.device.programs.terminal == "ghostty") {
|
||||
enable = true;
|
||||
settings = {
|
||||
theme = "catppuccin-mocha";
|
||||
|
||||
font-size = 10;
|
||||
font-family = "SauceCodePro NFP Bold";
|
||||
|
||||
window-width = 230;
|
||||
window-height = 68;
|
||||
|
||||
window-padding-x = 5;
|
||||
window-padding-y = 0;
|
||||
|
||||
keybind = [
|
||||
"ctrl+shift+n=unbind"
|
||||
"ctrl+shift+i=unbind"
|
||||
];
|
||||
};
|
||||
|
||||
themes = {
|
||||
catppuccin-mocha = {
|
||||
background = "1e1e2e";
|
||||
cursor-color = "f5e0dc";
|
||||
foreground = "cdd6f4";
|
||||
palette = [
|
||||
"0=#45475a"
|
||||
"1=#f38ba8"
|
||||
"2=#a6e3a1"
|
||||
"3=#f9e2af"
|
||||
"4=#89b4fa"
|
||||
"5=#f5c2e7"
|
||||
"6=#94e2d5"
|
||||
"7=#bac2de"
|
||||
"8=#585b70"
|
||||
"9=#f38ba8"
|
||||
"10=#a6e3a1"
|
||||
"11=#f9e2af"
|
||||
"12=#89b4fa"
|
||||
"13=#f5c2e7"
|
||||
"14=#94e2d5"
|
||||
"15=#a6adc8"
|
||||
];
|
||||
selection-background = "353749";
|
||||
selection-foreground = "cdd6f4";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
75
modules/features/home/kitty.nix
Normal file
75
modules/features/home/kitty.nix
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
{ lib, osconfig, ... }: {
|
||||
programs.kitty = lib.mkIf (osconfig.device.programs.terminal == "kitty") {
|
||||
enable = true;
|
||||
|
||||
keybindings = {
|
||||
"ctrl+c" = "copy_to_clipboard";
|
||||
"ctrl+v" = "paste_from_clipboard";
|
||||
};
|
||||
|
||||
settings = {
|
||||
window_padding_width = 2;
|
||||
window_padding_height = 2;
|
||||
|
||||
cursor_shape = "beam";
|
||||
# background_opacity = 0.5;
|
||||
|
||||
font_family = "Tahoma";
|
||||
font_size = 9;
|
||||
|
||||
foreground = "#cdd6f4";
|
||||
background = "#1e1e2e";
|
||||
selection_foreground = "#1e1e2e";
|
||||
selection_background = "#f5e0dc";
|
||||
|
||||
cursor = "#f5e0dc";
|
||||
cursor_text_color = "#1e1e2e";
|
||||
|
||||
url_color = "#f5e0dc";
|
||||
|
||||
active_border_color = "#b4befe";
|
||||
inactive_border_color = "#6c7086";
|
||||
bell_border_color = "#f9e2af";
|
||||
|
||||
wayland_titlebar_color = "system";
|
||||
macos_titlebar_color = "system";
|
||||
|
||||
active_tab_foreground = "#11111b";
|
||||
active_tab_background = "#cba6f7";
|
||||
inactive_tab_foreground = "#cdd6f4";
|
||||
inactive_tab_background = "#181825";
|
||||
tab_bar_background = "#11111b";
|
||||
|
||||
mark1_foreground = "#1e1e2e";
|
||||
mark1_background = "#b4befe";
|
||||
mark2_foreground = "#1e1e2e";
|
||||
mark2_background = "#cba6f7";
|
||||
mark3_foreground = "#1e1e2e";
|
||||
mark3_background = "#74c7ec";
|
||||
|
||||
color0 = "#45475a";
|
||||
color8 = "#585b70";
|
||||
|
||||
color1 = "#f38ba8";
|
||||
color9 = "#f38ba8";
|
||||
|
||||
color2 = "#a6e3a1";
|
||||
color10 = "#a6e3a1";
|
||||
|
||||
color3 = "#f9e2af";
|
||||
color11 = "#f9e2af";
|
||||
|
||||
color4 = "#89b4fa";
|
||||
color12 = "#89b4fa";
|
||||
|
||||
color5 = "#f5c2e7";
|
||||
color13 = "#f5c2e7";
|
||||
|
||||
color6 = "#94e2d5";
|
||||
color14 = "#94e2d5";
|
||||
|
||||
color7 = "#bac2de";
|
||||
color15 = "#a6adc8";
|
||||
};
|
||||
};
|
||||
}
|
||||
11
modules/features/home/niri.nix
Normal file
11
modules/features/home/niri.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{ osconfig, lib, ... }: {
|
||||
programs.niri = lib.mkIf osconfig.device.wm.niri.enable {
|
||||
enable = true;
|
||||
settings = {
|
||||
binds = {
|
||||
# "Ctrl+Alt+T" = "ghostty";
|
||||
# "Mod+D" = "fuzzel";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
5
modules/features/home/obs-studio.nix
Normal file
5
modules/features/home/obs-studio.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{ pkgs, custom, lib, osconfig, ... }:
|
||||
lib.mkIf osconfig.device.programs.obs-studio.enable {
|
||||
programs.obs-studio.enable = true;
|
||||
home.file.".config/obs-studio/themes".source = pkgs.callPackage custom.catppuccin-obs { };
|
||||
}
|
||||
14
modules/features/home/packages.nix
Normal file
14
modules/features/home/packages.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
osconfig,
|
||||
...
|
||||
}:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
hyprshot
|
||||
antigravity
|
||||
|
||||
(lib.mkIf osconfig.device.programs.cider-2.enable cider-2)
|
||||
];
|
||||
}
|
||||
81
modules/features/home/starship.nix
Normal file
81
modules/features/home/starship.nix
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
{ lib, osconfig, ... }: {
|
||||
programs.starship = lib.mkIf osconfig.device.programs.starship.enable {
|
||||
enable = true;
|
||||
settings = {
|
||||
add_newline = true;
|
||||
scan_timeout = 10;
|
||||
|
||||
format = ''
|
||||
$os $shell $cmake$java$nodejs$git_branch$character
|
||||
$cmd_duration$sudo$directory > '';
|
||||
|
||||
sudo = {
|
||||
format = "[$symbol]($style) ";
|
||||
symbol = "";
|
||||
disabled = false;
|
||||
};
|
||||
|
||||
java = {
|
||||
format = "[$symbol $version]($style) ";
|
||||
symbol = "";
|
||||
};
|
||||
|
||||
cmake = {
|
||||
format = "[$symbol $version](bold blue) ";
|
||||
symbol = "";
|
||||
};
|
||||
|
||||
nodejs = {
|
||||
format = "[$symbol $version](bold green) ";
|
||||
symbol = "";
|
||||
};
|
||||
|
||||
git_branch = {
|
||||
format = "[$symbol $branch]($style) ";
|
||||
symbol = "";
|
||||
style = "red";
|
||||
disabled = false;
|
||||
};
|
||||
|
||||
directory = {
|
||||
format = "[$read_only]($read_only_style)[$path]($style)";
|
||||
style = "#2e8be8";
|
||||
truncation_length = 2;
|
||||
read_only = " ";
|
||||
};
|
||||
|
||||
character = {
|
||||
success_symbol = "[](green)";
|
||||
error_symbol = "[](red)";
|
||||
disabled = false;
|
||||
};
|
||||
|
||||
cmd_duration = {
|
||||
min_time = 1;
|
||||
format = "[\\[$duration\\]]($style) ";
|
||||
style = "#C0C0C0";
|
||||
show_milliseconds = true;
|
||||
};
|
||||
|
||||
shell = {
|
||||
disabled = false;
|
||||
bash_indicator = "bash";
|
||||
fish_indicator = "fish";
|
||||
zsh_indicator = "zsh";
|
||||
powershell_indicator = "pwsh";
|
||||
format = "[$indicator]($style)";
|
||||
style = "white";
|
||||
};
|
||||
|
||||
os = {
|
||||
format = "[$symbol]($style)";
|
||||
disabled = false;
|
||||
symbols = {
|
||||
Arch = "[](bold blue)";
|
||||
Windows = "[](bold blue)";
|
||||
NixOS = "[](bold blue)";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
50
modules/features/home/theme.nix
Normal file
50
modules/features/home/theme.nix
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
{ pkgs, lib, ... }:
|
||||
let
|
||||
catppuccin-gtk = pkgs.catppuccin-gtk.override {
|
||||
variant = "mocha";
|
||||
accents = [ "sapphire" ];
|
||||
size = "compact";
|
||||
};
|
||||
in
|
||||
{
|
||||
home.activation.copyGtkTheme = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||
mkdir -p "$HOME/.themes/"
|
||||
|
||||
if [ ! -d "$HOME/.themes/catppuccin-mocha-sapphire-compact" ]; then
|
||||
cp -r "${catppuccin-gtk}/share/themes/catppuccin-mocha-sapphire-compact" "$HOME/.themes/"
|
||||
fi
|
||||
|
||||
if [ ! -d "$HOME/.themes/catppuccin-mocha-sapphire-compact-hdpi" ]; then
|
||||
cp -r "${catppuccin-gtk}/share/themes/catppuccin-mocha-sapphire-compact-hdpi" "$HOME/.themes/"
|
||||
fi
|
||||
|
||||
if [ ! -d "$HOME/.themes/catppuccin-mocha-sapphire-compact-xhdpi" ]; then
|
||||
cp -r "${catppuccin-gtk}/share/themes/catppuccin-mocha-sapphire-compact-xhdpi" "$HOME/.themes/"
|
||||
fi
|
||||
'';
|
||||
|
||||
# QT
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme.name = "qtct";
|
||||
style = {
|
||||
package = with pkgs; [
|
||||
catppuccin-qt5ct
|
||||
catppuccin-kde
|
||||
kdePackages.breeze
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# GTK
|
||||
gtk.theme.name = "catppuccin-mocha-sapphire-compact";
|
||||
|
||||
# Catppuccin
|
||||
catppuccin = {
|
||||
accent = "blue";
|
||||
flavor = "mocha";
|
||||
|
||||
fcitx5.enable = true;
|
||||
obs.enable = true;
|
||||
};
|
||||
}
|
||||
81
modules/features/home/tmux.nix
Normal file
81
modules/features/home/tmux.nix
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
{ lib, osconfig, pkgs, ... }:
|
||||
let
|
||||
TOP_PANEL = ''
|
||||
set -g pane-border-status top
|
||||
set -g pane-border-lines single
|
||||
set -g pane-border-indicators colour
|
||||
|
||||
set -g pane-border-format "#{E:@asa-module-icon} #{pane_index} #{E:@asa-module-text} #{pane_current_path} #[default]"
|
||||
'';
|
||||
|
||||
OPTIONS = ''
|
||||
set-option -g destroy-unattached on
|
||||
set -g allow-passthrough on
|
||||
'';
|
||||
|
||||
BINDS = ''
|
||||
unbind r
|
||||
bind r source-file ~/.config/tmux/tmux.conf;
|
||||
'';
|
||||
|
||||
BOTTOM_PANEL = ''
|
||||
set -g status-justify "centre"
|
||||
|
||||
set -g window-status-format "#{E:@asa-module-icon} #I #{E:@asa-module-text} #W "
|
||||
set -g window-status-current-format "#{E:@asa-module-icon} #I #{E:@asa-module-text} #W "
|
||||
|
||||
set -gg status-left "#{E:@asa-module-text} %A %d/%m/%Y #[default] "
|
||||
set -ag status-left "#{E:@asa-module-text} %I:%M %p #[default] "
|
||||
set -g status-left-length 100
|
||||
|
||||
set -g status-right "#{E:@asa-module-icon} #{E:@asa-module-text} #S #[default] "
|
||||
set -ag status-right "#{E:@asa-module-icon} CPU #{E:@asa-module-text} #{cpu_percentage} #[default] "
|
||||
set -ag status-right "#{E:@asa-module-icon} RAM #{E:@asa-module-text} #{ram_percentage} "
|
||||
set -g status-right-length 100
|
||||
|
||||
setw -g automatic-rename off
|
||||
'';
|
||||
|
||||
CATPPUCCIN = ''
|
||||
set -g @catppuccin_flavor 'mocha'
|
||||
set -ogq @asa-module-icon "#[bg=#{E:@thm_sapphire},fg=#{E:@thm_surface_0}]"
|
||||
set -ogq @asa-module-text "#[bg=#{E:@thm_surface_0},fg=#{E:@thm_fg}]"
|
||||
'';
|
||||
|
||||
YANK = ''
|
||||
set -g @yank_selection 'primary'
|
||||
set -g @yank_selection_mouse 'primary'
|
||||
'';
|
||||
|
||||
EXTRA_CONFIG = ''
|
||||
bind-key -T copy-mode-vi v send-keys -X begin-selection
|
||||
bind-key -T copy-mode-vi V send-keys -X select-line
|
||||
bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
|
||||
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
|
||||
'';
|
||||
in
|
||||
{
|
||||
programs.tmux = lib.mkIf osconfig.device.programs.tmux.enable {
|
||||
enable = true;
|
||||
keyMode = "vi";
|
||||
disableConfirmationPrompt = true;
|
||||
prefix = "c-a";
|
||||
|
||||
extraConfig = TOP_PANEL + OPTIONS + BINDS + EXTRA_CONFIG;
|
||||
|
||||
plugins = with pkgs.tmuxPlugins; [
|
||||
{
|
||||
plugin = yank;
|
||||
extraConfig = YANK;
|
||||
}
|
||||
{
|
||||
plugin = catppuccin;
|
||||
extraConfig = CATPPUCCIN;
|
||||
}
|
||||
{
|
||||
plugin = cpu;
|
||||
extraConfig = BOTTOM_PANEL;
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
5
modules/features/home/vscode.nix
Normal file
5
modules/features/home/vscode.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{ ... }: {
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
14
modules/features/home/xdg.nix
Normal file
14
modules/features/home/xdg.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{ pkgs, lib, osconfig, ... }: {
|
||||
xdg.portal = lib.mkIf osconfig.device.wm.hyprland.enable {
|
||||
enable = true;
|
||||
xdgOpenUsePortal = true;
|
||||
config = {
|
||||
common.default = ["gtk"];
|
||||
hyprland.default = ["gtk" "hyprland"];
|
||||
};
|
||||
extraPortals = [
|
||||
pkgs.xdg-desktop-portal-gtk
|
||||
pkgs.xdg-desktop-portal-hyprland
|
||||
];
|
||||
};
|
||||
}
|
||||
24
modules/features/system/boot.nix
Normal file
24
modules/features/system/boot.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{ inputs, pkgs, libs, ... }: let
|
||||
background = libs.root "/assets/grub/background.png";
|
||||
baseTheme = inputs.honkai-railway-grub-theme.packages.${pkgs.stdenv.hostPlatform.system}.cyrene-grub-theme;
|
||||
in {
|
||||
boot = {
|
||||
loader = {
|
||||
efi.canTouchEfiVariables = true;
|
||||
|
||||
grub = rec {
|
||||
enable = true;
|
||||
device = "nodev";
|
||||
efiSupport = true;
|
||||
useOSProber = true;
|
||||
splashImage = background;
|
||||
theme = pkgs.runCommand "my-grub-theme" { } ''
|
||||
mkdir -p $out
|
||||
cp -r ${baseTheme}/* $out/
|
||||
chmod -R u+w $out
|
||||
cp ${background} $out/background.png
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
5
modules/features/system/flatpak.nix
Normal file
5
modules/features/system/flatpak.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{ lib, config, ... }: {
|
||||
services.flatpak = lib.mkIf config.device.flatpak.enable {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
5
modules/features/system/gdm.nix
Normal file
5
modules/features/system/gdm.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{ lib, config, ... }: {
|
||||
services = lib.mkIf config.device.dm.gdm.enable {
|
||||
displayManager.gdm.enable = true;
|
||||
};
|
||||
}
|
||||
5
modules/features/system/gnome.nix
Normal file
5
modules/features/system/gnome.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{ lib, config, ... }: {
|
||||
services = lib.mkIf config.device.de.gnome.enable {
|
||||
desktopManager.gnome.enable = true;
|
||||
};
|
||||
}
|
||||
5
modules/features/system/hyprland.nix
Normal file
5
modules/features/system/hyprland.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{ lib, config, ... }: {
|
||||
programs.hyprland = lib.mkIf config.device.wm.hyprland.enable {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
10
modules/features/system/input-method.nix
Normal file
10
modules/features/system/input-method.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{ pkgs, ... }: {
|
||||
i18n.inputMethod = {
|
||||
enable = true;
|
||||
type = "fcitx5";
|
||||
fcitx5.addons = with pkgs; [
|
||||
# fcitx5-bamboo
|
||||
kdePackages.fcitx5-unikey
|
||||
];
|
||||
};
|
||||
}
|
||||
6
modules/features/system/kde-plasma.nix
Normal file
6
modules/features/system/kde-plasma.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{ lib, config, ... }: {
|
||||
services = lib.mkIf config.device.de.kdePlasma.enable {
|
||||
desktopManager.plasma6.enable = true;
|
||||
xserver.enable = true;
|
||||
};
|
||||
}
|
||||
4
modules/features/system/niri.nix
Normal file
4
modules/features/system/niri.nix
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{ lib, config, ... }: {
|
||||
programs.niri.enable = lib.mkIf config.device.wm.niri.enable true;
|
||||
services.xserver.enable = lib.mkIf config.device.wm.niri.enable true;
|
||||
}
|
||||
14
modules/features/system/nix-dl.nix
Normal file
14
modules/features/system/nix-dl.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{ pkgs, ... }: {
|
||||
programs.nix-ld = {
|
||||
enable = true;
|
||||
libraries = with pkgs; [
|
||||
stdenv.cc.cc
|
||||
zlib
|
||||
brotli
|
||||
unixODBC
|
||||
zstd
|
||||
glib
|
||||
stdenv.cc.cc.lib
|
||||
];
|
||||
};
|
||||
}
|
||||
67
modules/features/system/packages.nix
Normal file
67
modules/features/system/packages.nix
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
environment.systemPackages =
|
||||
with pkgs;
|
||||
[
|
||||
git
|
||||
vim
|
||||
wget
|
||||
tree
|
||||
btop
|
||||
ffmpeg-full
|
||||
nodejs
|
||||
bun
|
||||
brightnessctl
|
||||
|
||||
quickshell
|
||||
bluetuith
|
||||
lxqt.pavucontrol-qt
|
||||
nwg-look
|
||||
|
||||
(pkgs.catppuccin-kde.override {
|
||||
flavour = [ "mocha" ];
|
||||
accents = [ "sapphire" ];
|
||||
})
|
||||
|
||||
(pkgs.catppuccin-gtk.override {
|
||||
variant = "mocha";
|
||||
accents = [ "sapphire" ];
|
||||
size = "compact";
|
||||
})
|
||||
]
|
||||
++ (
|
||||
with pkgs;
|
||||
with kdePackages;
|
||||
[
|
||||
dolphin
|
||||
kate
|
||||
qt5compat
|
||||
qtdeclarative
|
||||
libsForQt5.qt5.qtgraphicaleffects
|
||||
qtimageformats
|
||||
qtsvg
|
||||
qtmultimedia
|
||||
kde-gtk-config
|
||||
qtdeclarative
|
||||
kirigami
|
||||
ksvg
|
||||
qtbase
|
||||
plasma5support
|
||||
qttools
|
||||
plasma-sdk
|
||||
]
|
||||
)
|
||||
++ (lib.optionals config.device.wm.hyprland.enable (
|
||||
with pkgs;
|
||||
[
|
||||
xdg-desktop-portal
|
||||
xdg-desktop-portal-wlr
|
||||
xdg-desktop-portal-hyprland
|
||||
]
|
||||
));
|
||||
}
|
||||
24
modules/features/system/sddm.nix
Normal file
24
modules/features/system/sddm.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{ pkgs, lib, config, ... }: let
|
||||
custom-sddm-astronaut = pkgs.sddm-astronaut.override {
|
||||
embeddedTheme = config.device.dm.sddm.theme;
|
||||
};
|
||||
in {
|
||||
services.displayManager.sddm = lib.mkIf config.device.dm.sddm.enable {
|
||||
enable = true;
|
||||
wayland.enable = true;
|
||||
extraPackages = with pkgs; [
|
||||
custom-sddm-astronaut
|
||||
];
|
||||
theme = "sddm-astronaut-theme";
|
||||
settings = {
|
||||
Theme = {
|
||||
Current = "sddm-astronaut-theme";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
custom-sddm-astronaut
|
||||
kdePackages.qtmultimedia
|
||||
];
|
||||
}
|
||||
5
modules/features/system/steam.nix
Normal file
5
modules/features/system/steam.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{ lib, config, ... }: {
|
||||
programs.steam = lib.mkIf config.device.programs.steam.enable {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
86
modules/fonts.nix
Normal file
86
modules/fonts.nix
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
{ pkgs, ... }:
|
||||
let
|
||||
fetch-fonts = {
|
||||
segoe-ui = {
|
||||
light = pkgs.fetchurl {
|
||||
url = "https://c.s-microsoft.com/static/fonts/segoe-ui/west-european/light/latest.ttf";
|
||||
sha256 = "1bqbvpxqflh4an5ciawrkl0bxy58vqhxiynspcvpx1zyryxcjlhm";
|
||||
};
|
||||
|
||||
semilight = pkgs.fetchurl {
|
||||
url = "https://c.s-microsoft.com/static/fonts/segoe-ui/west-european/semilight/latest.ttf";
|
||||
sha256 = "1y6rfxdwwfq1bgk7fj4bvhck1di6whw5h0yby8gj7x6y1cv4ka1p";
|
||||
};
|
||||
|
||||
normal = pkgs.fetchurl {
|
||||
url = "https://c.s-microsoft.com/static/fonts/segoe-ui/west-european/normal/latest.ttf";
|
||||
sha256 = "0ac4hgmlxl6cgak7g39rvfk25gs3fm5wlnmc7mbpv38i7mkppiaf";
|
||||
};
|
||||
|
||||
bold = pkgs.fetchurl {
|
||||
url = "https://c.s-microsoft.com/static/fonts/segoe-ui/west-european/bold/latest.ttf";
|
||||
sha256 = "147mk64y2hihy6s29dlgimcrfi7ihi68qjcrfdzqk6cvk8kr3f0q";
|
||||
};
|
||||
|
||||
semibold = pkgs.fetchurl {
|
||||
url = "https://c.s-microsoft.com/static/fonts/segoe-ui/west-european/semibold/latest.ttf";
|
||||
sha256 = "0whxgk9q4j9pd3k462m0dyr39q7vk2lxla5whcckyfrks983c4nj";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
custom = {
|
||||
tahoma = pkgs.stdenv.mkDerivation {
|
||||
pname = "tahoma";
|
||||
version = "1.0";
|
||||
dontUnpack = true;
|
||||
|
||||
src = pkgs.fetchurl {
|
||||
url = "https://www.asakiyuki.com/static/fonts/Tahoma.ttf";
|
||||
sha256 = "129l1cprplci2xmxi0gnsjrvprr48xqp8kr5s9lrwcnaxvb4z4ni";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/share/fonts/truetype
|
||||
cp $src $out/share/fonts/truetype/
|
||||
'';
|
||||
};
|
||||
|
||||
segoe-ui = pkgs.stdenv.mkDerivation {
|
||||
pname = "segoe-ui";
|
||||
version = "1.0";
|
||||
dontUnpack = true;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/share/fonts/truetype
|
||||
|
||||
cp ${fetch-fonts.segoe-ui.light} $out/share/fonts/truetype
|
||||
cp ${fetch-fonts.segoe-ui.semilight} $out/share/fonts/truetype
|
||||
cp ${fetch-fonts.segoe-ui.normal} $out/share/fonts/truetype
|
||||
cp ${fetch-fonts.segoe-ui.bold} $out/share/fonts/truetype
|
||||
cp ${fetch-fonts.segoe-ui.semibold} $out/share/fonts/truetype
|
||||
'';
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
fonts.enableDefaultPackages = true;
|
||||
fonts.packages = with pkgs; [
|
||||
custom.tahoma
|
||||
custom.segoe-ui
|
||||
|
||||
# Nerd fonts
|
||||
nerd-fonts.sauce-code-pro
|
||||
|
||||
# Unicode fonts
|
||||
noto-fonts
|
||||
noto-fonts-cjk-sans
|
||||
noto-fonts-color-emoji
|
||||
liberation_ttf
|
||||
fira-code
|
||||
fira-code-symbols
|
||||
mplus-outline-fonts.githubRelease
|
||||
dina-font
|
||||
proggyfonts
|
||||
];
|
||||
}
|
||||
3
modules/hardware/bluetooth.nix
Normal file
3
modules/hardware/bluetooth.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{ config, ... }: {
|
||||
hardware.bluetooth.enable = config.device.bluetooth.enable;
|
||||
}
|
||||
6
modules/hardware/default.nix
Normal file
6
modules/hardware/default.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./bluetooth.nix
|
||||
];
|
||||
}
|
||||
7
modules/home-manager.nix
Normal file
7
modules/home-manager.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{ ... }: {
|
||||
home-manager = {
|
||||
useUserPackages = true;
|
||||
useGlobalPkgs = true;
|
||||
backupFileExtension = "bak";
|
||||
};
|
||||
}
|
||||
13
modules/programs/hyprland/default.nix
Normal file
13
modules/programs/hyprland/default.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{ lib, osconfig, ... }:
|
||||
{
|
||||
imports = [
|
||||
./settings/default.nix
|
||||
];
|
||||
|
||||
wayland.windowManager.hyprland = lib.mkIf osconfig.device.wm.hyprland.enable {
|
||||
enable = true;
|
||||
xwayland.enable = true;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
15
modules/programs/hyprland/settings/default.nix
Normal file
15
modules/programs/hyprland/settings/default.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{ osconfig, ... }:
|
||||
{
|
||||
imports = [
|
||||
./key-bind.nix
|
||||
./theme.nix
|
||||
./exec.nix
|
||||
./window-rules.nix
|
||||
./input.nix
|
||||
];
|
||||
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
monitor = osconfig.device.wm.hyprland.monitors;
|
||||
};
|
||||
}
|
||||
|
||||
8
modules/programs/hyprland/settings/exec.nix
Normal file
8
modules/programs/hyprland/settings/exec.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{ ... }:
|
||||
{
|
||||
wayland.windowManager.hyprland.settings.exec-once = [
|
||||
"quickshell"
|
||||
"fcitx5"
|
||||
];
|
||||
}
|
||||
|
||||
5
modules/programs/hyprland/settings/input.nix
Normal file
5
modules/programs/hyprland/settings/input.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{ ... }: {
|
||||
wayland.windowManager.hyprland.settings.input = {
|
||||
touchpad.natural_scroll = true;
|
||||
};
|
||||
}
|
||||
47
modules/programs/hyprland/settings/key-bind.nix
Normal file
47
modules/programs/hyprland/settings/key-bind.nix
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
{ osconfig, ... }:
|
||||
{
|
||||
wayland.windowManager.hyprland.settings.bind = [
|
||||
"CTRL ALT, T, exec, ${osconfig.device.programs.terminal}"
|
||||
|
||||
"ALT, F4, killactive"
|
||||
"SUPER SHIFT, L, exit,"
|
||||
"SUPER SHIFT, TAB, togglefloating,"
|
||||
"SUPER SHIFT, S, exec, hyprshot -m region -o '~/Pictures/Screenshot/' -z"
|
||||
"SUPER, J, togglesplit,"
|
||||
"SUPER, E, exec, dolphin"
|
||||
|
||||
"SUPER, left, movefocus, l"
|
||||
"SUPER, right, movefocus, r"
|
||||
"SUPER, up, movefocus, u"
|
||||
"SUPER, down, movefocus, d"
|
||||
|
||||
"SUPER CTRL, left, movewindow, l"
|
||||
"SUPER CTRL, right, movewindow, r"
|
||||
"SUPER CTRL, up, movewindow, u"
|
||||
"SUPER CTRL, down, movewindow, d"
|
||||
|
||||
"SUPER, tab, workspace, e+1"
|
||||
"SUPER, mouse_down, workspace, e-1"
|
||||
"SUPER, mouse_up, workspace, e+1"
|
||||
|
||||
"ALT, space, global, asakiyuki:launcher"
|
||||
|
||||
",XF86MonBrightnessDown, exec, brightnessctl s 5%-"
|
||||
",XF86MonBrightnessUp, exec, brightnessctl s +5%"
|
||||
]
|
||||
++ builtins.concatLists (
|
||||
builtins.genList (i: [
|
||||
"SUPER, ${toString (i + 1)}, workspace,${toString (i + 1)}"
|
||||
"SUPER SHIFT, ${toString (i + 1)}, movetoworkspace,${toString (i + 1)}"
|
||||
]) 9
|
||||
)
|
||||
++ [
|
||||
"SUPER, 0, workspace, 10"
|
||||
"SUPER SHIFT, 0, movetoworkspace, 10"
|
||||
];
|
||||
|
||||
wayland.windowManager.hyprland.settings.bindm = [
|
||||
"SUPER, mouse:272, movewindow"
|
||||
"SUPER, mouse:273, resizewindow"
|
||||
];
|
||||
}
|
||||
58
modules/programs/hyprland/settings/theme.nix
Normal file
58
modules/programs/hyprland/settings/theme.nix
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
{ ... }: {
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
general = {
|
||||
gaps_in = 5;
|
||||
gaps_out = 10;
|
||||
border_size = 1;
|
||||
"col.active_border" = "rgb(cdd6f4)";
|
||||
"col.inactive_border" = "rgb(7f849c)";
|
||||
allow_tearing = true;
|
||||
resize_on_border = true;
|
||||
};
|
||||
|
||||
decoration = {
|
||||
rounding = 5;
|
||||
rounding_power = 5;
|
||||
active_opacity = 1;
|
||||
inactive_opacity = 1;
|
||||
|
||||
blur = {
|
||||
enabled = true;
|
||||
size = 2;
|
||||
passes = 5;
|
||||
vibrancy = 3;
|
||||
};
|
||||
};
|
||||
|
||||
animations = {
|
||||
enabled = "yes";
|
||||
|
||||
bezier = [
|
||||
"overshot, 0.05, 0.9, 0.1, 1.1"
|
||||
"md3_decel, 0.05, 0.7, 0.1, 1"
|
||||
];
|
||||
|
||||
animation = [
|
||||
"windows, 1, 3, overshot, popin 60%"
|
||||
"border, 1, 10, default"
|
||||
"fade, 1, 2, default"
|
||||
"workspaces, 1, 3.5, overshot, slidefade 15%"
|
||||
"specialWorkspace, 1, 3, md3_decel, slidevert"
|
||||
];
|
||||
};
|
||||
|
||||
dwindle = {
|
||||
pseudotile = true;
|
||||
preserve_split = true;
|
||||
};
|
||||
|
||||
master = {
|
||||
new_status = "master";
|
||||
};
|
||||
|
||||
misc = {
|
||||
force_default_wallpaper = 1;
|
||||
disable_hyprland_logo = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
15
modules/programs/hyprland/settings/window-rules.nix
Normal file
15
modules/programs/hyprland/settings/window-rules.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{ ... }:
|
||||
{
|
||||
wayland.windowManager.hyprland.settings.windowrule = [
|
||||
"opacity 0.0 override, class:^(xwaylandvideobridge)$"
|
||||
"noanim, class:^(xwaylandvideobridge)$"
|
||||
"noinitialfocus, class:^(xwaylandvideobridge)$"
|
||||
"maxsize 1 1, class:^(xwaylandvideobridge)$"
|
||||
"noblur, class:^(xwaylandvideobridge)$"
|
||||
"nofocus, class:^(xwaylandvideobridge)$"
|
||||
];
|
||||
wayland.windowManager.hyprland.settings.windowrulev2 = [
|
||||
"tile, class:^(Chromium)$"
|
||||
];
|
||||
}
|
||||
|
||||
44
modules/programs/nixcord/default.nix
Normal file
44
modules/programs/nixcord/default.nix
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
{ lib, osconfig, ... }:
|
||||
{
|
||||
programs.nixcord = lib.mkIf osconfig.device.programs.nixcord.enable {
|
||||
enable = true;
|
||||
discord = {
|
||||
enable = true;
|
||||
vencord.enable = true;
|
||||
};
|
||||
|
||||
config = {
|
||||
enableReactDevtools = true;
|
||||
themeLinks = [ "https://catppuccin.github.io/discord/dist/catppuccin-mocha-blue.theme.css" ];
|
||||
|
||||
plugins = {
|
||||
BlurNSFW.enable = true;
|
||||
volumeBooster.enable = true;
|
||||
ClearURLs.enable = true;
|
||||
copyEmojiMarkdown.enable = true;
|
||||
youtubeAdblock.enable = true;
|
||||
experiments.enable = true;
|
||||
fixCodeblockGap.enable = true;
|
||||
fixImagesQuality.enable = true;
|
||||
fixSpotifyEmbeds.enable = true;
|
||||
fixYoutubeEmbeds.enable = true;
|
||||
gameActivityToggle.enable = true;
|
||||
imageZoom.enable = true;
|
||||
memberCount.enable = true;
|
||||
mentionAvatars.enable = true;
|
||||
noDevtoolsWarning.enable = true;
|
||||
noF1.enable = true;
|
||||
openInApp.enable = true;
|
||||
voiceDownload.enable = true;
|
||||
validUser.enable = true;
|
||||
translate.enable = true;
|
||||
whoReacted.enable = true;
|
||||
|
||||
fakeNitro = {
|
||||
enable = true;
|
||||
enableEmojiBypass = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
14
modules/programs/nixvim/_nixvim.nix
Normal file
14
modules/programs/nixvim/_nixvim.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{ pkgs, config, ... }:
|
||||
{
|
||||
programs.nixvim.imports = [
|
||||
./default.nix
|
||||
./extra-packages.nix
|
||||
|
||||
./keymaps/_keymaps.nix
|
||||
|
||||
./plugins/_plugins.nix
|
||||
./plugins/_extraPlugins.nix
|
||||
|
||||
./lua/_lua.nix
|
||||
];
|
||||
}
|
||||
20
modules/programs/nixvim/default.nix
Normal file
20
modules/programs/nixvim/default.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{ ... }:
|
||||
{
|
||||
enable = true;
|
||||
vimdiffAlias = true;
|
||||
colorschemes.catppuccin.enable = true;
|
||||
|
||||
opts = {
|
||||
number = true;
|
||||
relativenumber = true;
|
||||
|
||||
tabstop = 2;
|
||||
shiftwidth = 2;
|
||||
softtabstop = 2;
|
||||
smartindent = true;
|
||||
expandtab = true;
|
||||
|
||||
clipboard = "unnamedplus";
|
||||
};
|
||||
}
|
||||
|
||||
6
modules/programs/nixvim/extra-packages.nix
Normal file
6
modules/programs/nixvim/extra-packages.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
extraPackages = with pkgs; [
|
||||
nodePackages.prettier
|
||||
];
|
||||
}
|
||||
26
modules/programs/nixvim/keymaps/_default.nix
Normal file
26
modules/programs/nixvim/keymaps/_default.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
[
|
||||
{
|
||||
mode = "i";
|
||||
key = "<A-h>";
|
||||
action = "<Left>";
|
||||
options.silent = true;
|
||||
}
|
||||
{
|
||||
mode = "i";
|
||||
key = "<A-j>";
|
||||
action = "<Down>";
|
||||
options.silent = true;
|
||||
}
|
||||
{
|
||||
mode = "i";
|
||||
key = "<A-k>";
|
||||
action = "<Up>";
|
||||
options.silent = true;
|
||||
}
|
||||
{
|
||||
mode = "i";
|
||||
key = "<A-l>";
|
||||
action = "<Right>";
|
||||
options.silent = true;
|
||||
}
|
||||
]
|
||||
11
modules/programs/nixvim/keymaps/_keymaps.nix
Normal file
11
modules/programs/nixvim/keymaps/_keymaps.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{ ... }:
|
||||
{
|
||||
globals.mapleader = " ";
|
||||
keymaps =
|
||||
[ ]
|
||||
++ (import ./_default.nix)
|
||||
++ (import ./barbar.nix)
|
||||
++ (import ./toggleterm.nix)
|
||||
++ (import ./nvim-tree-toggle.nix);
|
||||
}
|
||||
|
||||
39
modules/programs/nixvim/keymaps/barbar.nix
Normal file
39
modules/programs/nixvim/keymaps/barbar.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
[
|
||||
{
|
||||
mode = "n";
|
||||
key = "<A-,>";
|
||||
action = "<cmd>BufferPrevious<CR>";
|
||||
options.silent = true;
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<A-.>";
|
||||
action = "<cmd>BufferNext<CR>";
|
||||
options.silent = true;
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<A-<>";
|
||||
action = "<cmd>BufferMovePrevious<CR>";
|
||||
options.silent = true;
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<A->>";
|
||||
action = "<cmd>BufferMoveNext<CR>";
|
||||
options.silent = true;
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<A-c>";
|
||||
action = "<Cmd>BufferClose<CR>";
|
||||
options.silent = true;
|
||||
}
|
||||
]
|
||||
++ (builtins.genList (i: {
|
||||
mode = "n";
|
||||
key = "<A-${toString (i + 1)}>";
|
||||
action = "<cmd>BufferGoto ${toString (i + 1)}<CR>";
|
||||
options.silent = true;
|
||||
}) 9)
|
||||
|
||||
8
modules/programs/nixvim/keymaps/nvim-tree-toggle.nix
Normal file
8
modules/programs/nixvim/keymaps/nvim-tree-toggle.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
[
|
||||
{
|
||||
mode = "n";
|
||||
key = "<C-b>";
|
||||
action = "<cmd>NvimTreeToggle<CR>";
|
||||
options.silent = true;
|
||||
}
|
||||
]
|
||||
63
modules/programs/nixvim/keymaps/toggleterm.nix
Normal file
63
modules/programs/nixvim/keymaps/toggleterm.nix
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
[
|
||||
{
|
||||
mode = "t";
|
||||
key = "<esc>";
|
||||
action = "<C-\\><C-n>";
|
||||
}
|
||||
{
|
||||
mode = "t";
|
||||
key = "jk";
|
||||
action = "<C-\\><C-n>";
|
||||
}
|
||||
{
|
||||
mode = "t";
|
||||
key = "<C-w>";
|
||||
action = "<C-\\><C-n><C-w>";
|
||||
}
|
||||
|
||||
{
|
||||
mode = "t";
|
||||
key = "<C-l>";
|
||||
action = "<Cmd>wincmd l<CR>";
|
||||
}
|
||||
{
|
||||
mode = "t";
|
||||
key = "<C-k>";
|
||||
action = "<Cmd>wincmd k<CR>";
|
||||
}
|
||||
{
|
||||
mode = "t";
|
||||
key = "<C-j>";
|
||||
action = "<Cmd>wincmd j<CR>";
|
||||
}
|
||||
{
|
||||
mode = "t";
|
||||
key = "<C-h>";
|
||||
action = "<Cmd>wincmd h<CR>";
|
||||
}
|
||||
]
|
||||
++ builtins.concatLists (
|
||||
builtins.genList (i: [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>th${toString (i + 1)}";
|
||||
action = ":${toString (i + 1)}ToggleTerm direction=horizontal<CR>";
|
||||
options.silent = true;
|
||||
options.noremap = true;
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>tv${toString (i + 1)}";
|
||||
action = ":${toString (i + 1)}ToggleTerm direction=vertical<CR>";
|
||||
options.silent = true;
|
||||
options.noremap = true;
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>tf${toString (i + 1)}";
|
||||
action = ":${toString (i + 1)}ToggleTerm direction=float<CR>";
|
||||
options.silent = true;
|
||||
options.noremap = true;
|
||||
}
|
||||
]) 9
|
||||
)
|
||||
4
modules/programs/nixvim/lua/_lua.nix
Normal file
4
modules/programs/nixvim/lua/_lua.nix
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{ ... }:
|
||||
{
|
||||
|
||||
}
|
||||
15
modules/programs/nixvim/plugins/_extraPlugins.nix
Normal file
15
modules/programs/nixvim/plugins/_extraPlugins.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{ pkgs, ... }:
|
||||
let
|
||||
EXTRA_PLUGINS = [
|
||||
./extras/neocord.nix
|
||||
./extras/mini-icons.nix
|
||||
];
|
||||
|
||||
LUA = [
|
||||
./lua/neocord.lua
|
||||
];
|
||||
in
|
||||
{
|
||||
extraPlugins = map (path: import path { plugins = pkgs.vimPlugins; }) EXTRA_PLUGINS;
|
||||
extraConfigLua = builtins.concatStringsSep "\n" (map builtins.readFile LUA);
|
||||
}
|
||||
33
modules/programs/nixvim/plugins/_plugins.nix
Normal file
33
modules/programs/nixvim/plugins/_plugins.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{ ... }@inputs:
|
||||
{
|
||||
plugins = {
|
||||
nvim-tree = import ./nvimtree.nix inputs;
|
||||
lsp = import ./lsp.nix inputs;
|
||||
lspkind = import ./lspkind.nix inputs;
|
||||
conform-nvim = import ./conform-nvim.nix inputs;
|
||||
which-key = import ./which-key.nix inputs;
|
||||
lint = import ./lint.nix inputs;
|
||||
|
||||
cmp = import ./cmp.nix inputs;
|
||||
cmp-nvim-lsp.enable = true;
|
||||
cmp-buffer.enable = true;
|
||||
cmp-path.enable = true;
|
||||
cmp_luasnip.enable = true;
|
||||
|
||||
web-devicons.enable = true;
|
||||
lz-n.enable = true;
|
||||
treesitter.enable = true;
|
||||
lualine.enable = true;
|
||||
neoscroll.enable = true;
|
||||
image.enable = true;
|
||||
nvim-autopairs.enable = true;
|
||||
bufferline.enable = true;
|
||||
luasnip.enable = true;
|
||||
friendly-snippets.enable = true;
|
||||
indent-blankline.enable = true;
|
||||
barbar.enable = true;
|
||||
toggleterm.enable = true;
|
||||
auto-save.enable = true;
|
||||
visual-multi.enable = true;
|
||||
};
|
||||
}
|
||||
25
modules/programs/nixvim/plugins/cmp.nix
Normal file
25
modules/programs/nixvim/plugins/cmp.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ ... }: {
|
||||
enable = true;
|
||||
autoEnableSources = true;
|
||||
|
||||
settings = {
|
||||
sources = [
|
||||
{ name = "nvim_lsp"; }
|
||||
{ name = "path"; }
|
||||
{ name = "luasnip"; }
|
||||
{ name = "buffer"; }
|
||||
];
|
||||
|
||||
mapping = {
|
||||
"<C-Space>" = "cmp.mapping.complete()";
|
||||
"<C-d>" = "cmp.mapping.scroll_docs(-4)";
|
||||
"<C-f>" = "cmp.mapping.scroll_docs(4)";
|
||||
"<C-e>" = "cmp.mapping.abort()";
|
||||
"<CR>" = "cmp.mapping.confirm({ select = true })";
|
||||
"<Tab>" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})";
|
||||
"<S-Tab>" = "cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})";
|
||||
};
|
||||
|
||||
formatting.fields = [ "kind" "abbr" "menu" ];
|
||||
};
|
||||
}
|
||||
20
modules/programs/nixvim/plugins/conform-nvim.nix
Normal file
20
modules/programs/nixvim/plugins/conform-nvim.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{ ... }:
|
||||
{
|
||||
enable = true;
|
||||
settings = {
|
||||
formatters_by_ft = {
|
||||
javascript = [ "prettier" ];
|
||||
typescript = [ "prettier" ];
|
||||
json = [ "prettier" ];
|
||||
css = [ "prettier" ];
|
||||
html = [ "prettier" ];
|
||||
nix = [ "nixfmt" ];
|
||||
php = [ "php_cs_fixer" ];
|
||||
};
|
||||
|
||||
format_on_save = {
|
||||
timeout_ms = 500;
|
||||
lsp_fallback = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
4
modules/programs/nixvim/plugins/extras/mini-icons.nix
Normal file
4
modules/programs/nixvim/plugins/extras/mini-icons.nix
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{ plugins, ... }:
|
||||
{
|
||||
plugin = plugins.mini-icons;
|
||||
}
|
||||
4
modules/programs/nixvim/plugins/extras/neocord.nix
Normal file
4
modules/programs/nixvim/plugins/extras/neocord.nix
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{ plugins, ... }:
|
||||
{
|
||||
plugin = plugins.neocord;
|
||||
}
|
||||
6
modules/programs/nixvim/plugins/lint.nix
Normal file
6
modules/programs/nixvim/plugins/lint.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{ ... }:
|
||||
{
|
||||
enable = true;
|
||||
lintersByFt = {
|
||||
};
|
||||
}
|
||||
12
modules/programs/nixvim/plugins/lsp.nix
Normal file
12
modules/programs/nixvim/plugins/lsp.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{ ... }:
|
||||
{
|
||||
enable = true;
|
||||
servers = {
|
||||
phpactor.enable = true;
|
||||
nil_ls.enable = true;
|
||||
pyright.enable = true;
|
||||
ts_ls.enable = true;
|
||||
html.enable = true;
|
||||
cssls.enable = true;
|
||||
};
|
||||
}
|
||||
4
modules/programs/nixvim/plugins/lspkind.nix
Normal file
4
modules/programs/nixvim/plugins/lspkind.nix
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{ ... }: {
|
||||
enable = true;
|
||||
cmp.enable = true;
|
||||
}
|
||||
24
modules/programs/nixvim/plugins/lua/neocord.lua
Normal file
24
modules/programs/nixvim/plugins/lua/neocord.lua
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
require("neocord").setup({
|
||||
-- General options
|
||||
logo= "auto", -- "auto" or url
|
||||
logo_tooltip= nil,-- nil or string
|
||||
main_image= "language", -- "language" or "logo"
|
||||
client_id = "1157438221865717891",-- Use your own Discord application client id (not recommended)
|
||||
log_level = nil,-- Log messages at or above this level (one of the following: "debug", "info", "warn", "error")
|
||||
debounce_timeout= 10, -- Number of seconds to debounce events (or calls to `:lua package.loaded.presence:update(<filename>, true)`)
|
||||
blacklist = {}, -- A list of strings or Lua patterns that disable Rich Presence if the current file name, path, or workspace matches
|
||||
file_assets = {}, -- Custom file asset definitions keyed by file names and extensions (see default config at `lua/presence/file_assets.lua` for reference)
|
||||
show_time = true, -- Show the timer
|
||||
global_timer= false,-- if set true, timer won't update when any event are triggered
|
||||
buttons = nil,-- A list of buttons (objects with label and url attributes) or a function returning such list.
|
||||
|
||||
-- Rich Presence text options
|
||||
editing_text= "Editing %s", -- Format string rendered when an editable file is loaded in the buffer (either string or function(filename: string): string)
|
||||
file_explorer_text= "Browsing %s",-- Format string rendered when browsing a file explorer (either string or function(file_explorer_name: string): string)
|
||||
git_commit_text = "Committing changes", -- Format string rendered when committing changes in git (either string or function(filename: string): string)
|
||||
plugin_manager_text = "Managing plugins", -- Format string rendered when managing plugins (either string or function(plugin_manager_name: string): string)
|
||||
reading_text= "Reading %s", -- Format string rendered when a read-only or unmodifiable file is loaded in the buffer (either string or function(filename: string): string)
|
||||
workspace_text= "Working on %s",-- Format string rendered when in a git repository (either string or function(project_name: string|nil, filename: string): string)
|
||||
line_number_text= "Line %s out of %s",-- Format string rendered when `enable_line_number` is set to true (either string or function(line_number: number, line_count: number): string)
|
||||
terminal_text = "Using Terminal", -- Format string rendered when in terminal mode.
|
||||
})
|
||||
5
modules/programs/nixvim/plugins/nvimtree.nix
Normal file
5
modules/programs/nixvim/plugins/nvimtree.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{ ... }: {
|
||||
enable = true;
|
||||
openOnSetupFile = true;
|
||||
settings.auto_reload_on_write = true;
|
||||
}
|
||||
7
modules/programs/nixvim/plugins/which-key.nix
Normal file
7
modules/programs/nixvim/plugins/which-key.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{ ... }:
|
||||
{
|
||||
enable = true;
|
||||
settings = {
|
||||
preset = "modern";
|
||||
};
|
||||
}
|
||||
6
modules/services/default.nix
Normal file
6
modules/services/default.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{ ... }: {
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
}
|
||||
10
options/common/default.nix
Normal file
10
options/common/default.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{ lib, ... }: {
|
||||
options.device = {
|
||||
flatpak.enable = lib.mkEnableOption "flatpak";
|
||||
flake-name = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "desktop";
|
||||
description = "Flake name for quick rebuild";
|
||||
};
|
||||
};
|
||||
}
|
||||
17
options/desktop/default.nix
Normal file
17
options/desktop/default.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{ lib, ... }: {
|
||||
imports = [
|
||||
../common/default.nix
|
||||
|
||||
./environment.nix
|
||||
./programs.nix
|
||||
./hardware.nix
|
||||
];
|
||||
|
||||
options.device = {
|
||||
cursors = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "aemeath";
|
||||
description = "Cursor theme to use for the desktop";
|
||||
};
|
||||
};
|
||||
}
|
||||
33
options/desktop/environment.nix
Normal file
33
options/desktop/environment.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{ lib, ... }: {
|
||||
options.device = {
|
||||
dm = {
|
||||
sddm = {
|
||||
enable = lib.mkEnableOption "sddm";
|
||||
theme = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "hyprland_kath";
|
||||
description = "astronaut theme name";
|
||||
};
|
||||
};
|
||||
|
||||
gdm.enable = lib.mkEnableOption "gdm";
|
||||
};
|
||||
|
||||
de = {
|
||||
kdePlasma.enable = lib.mkEnableOption "kde plasma";
|
||||
gnome.enable = lib.mkEnableOption "gnome";
|
||||
};
|
||||
|
||||
wm = {
|
||||
niri.enable = lib.mkEnableOption "niri";
|
||||
hyprland = {
|
||||
enable = lib.mkEnableOption "hyprland";
|
||||
monitors = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
default = [ "eDP-1, 1920x1200@60, 0x0, 1" ];
|
||||
description = "Monitors settings";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
5
options/desktop/hardware.nix
Normal file
5
options/desktop/hardware.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{ lib, ... }: {
|
||||
options.device = {
|
||||
bluetooth.enable = lib.mkEnableOption "bluetooth";
|
||||
};
|
||||
}
|
||||
18
options/desktop/programs.nix
Normal file
18
options/desktop/programs.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{ lib, ... }: {
|
||||
options.device.programs = {
|
||||
terminal = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "ghostty";
|
||||
description = "Terminal";
|
||||
};
|
||||
|
||||
nixcord.enable = lib.mkEnableOption "nixcord";
|
||||
tmux.enable = lib.mkEnableOption "tmux";
|
||||
starship.enable = lib.mkEnableOption "starship";
|
||||
fastfetch.enable = lib.mkEnableOption "fastfetch";
|
||||
steam.enable = lib.mkEnableOption "steam";
|
||||
|
||||
obs-studio.enable = lib.mkEnableOption "Obs Studio";
|
||||
cider-2.enable = lib.mkEnableOption "Cider 2";
|
||||
};
|
||||
}
|
||||
3
overlays/nixpkgs.nix
Normal file
3
overlays/nixpkgs.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{ inputs, ... }: {
|
||||
nixpkgs.overlays = [ inputs.niri.overlays.niri ];
|
||||
}
|
||||
27
packages/bun.nix
Executable file
27
packages/bun.nix
Executable file
|
|
@ -0,0 +1,27 @@
|
|||
{ pkgs, ... }:
|
||||
pkgs.stdenv.mkDerivation rec {
|
||||
pname = "bun";
|
||||
version = "1.3.10";
|
||||
|
||||
src = pkgs.fetchzip {
|
||||
url = "https://github.com/oven-sh/bun/releases/download/bun-v${version}/bun-linux-x64-baseline.zip";
|
||||
hash = "sha256-ZWTs4ApH0BsATxrE1DSuqCETIrNZZxdG8xtN0NinNBw=";
|
||||
};
|
||||
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp bun $out/bin/
|
||||
chmod +x $out/bin/bun
|
||||
'';
|
||||
|
||||
meta = with pkgs.lib; {
|
||||
description = "Incredibly fast JavaScript runtime, bundler, transpiler and package manager – all in one";
|
||||
homepage = "https://bun.sh";
|
||||
license = with licenses; [
|
||||
mit
|
||||
lgpl21Only
|
||||
];
|
||||
};
|
||||
}
|
||||
48
packages/cage-xtmapper-0.1.5.nix
Normal file
48
packages/cage-xtmapper-0.1.5.nix
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
{ pkgs, ... }:
|
||||
let
|
||||
RELEASE_VERSION = "20260208";
|
||||
PACKAGE_VERSION = "0.1.5";
|
||||
in
|
||||
pkgs.stdenv.mkDerivation rec {
|
||||
pname = "cage-xtmapper";
|
||||
version = PACKAGE_VERSION;
|
||||
|
||||
src = pkgs.fetchurl {
|
||||
url = "https://github.com/Xtr126/cage-xtmapper/releases/download/v${RELEASE_VERSION}/cage-xtmapper-v${PACKAGE_VERSION}.tar";
|
||||
hash = "sha256-ZmdltOQInGbCBpf/e8D2sB9Rjt4wqd8wwuSFvryHfFA=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkgs.autoPatchelfHook ];
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
wayland
|
||||
libxkbcommon
|
||||
pixman
|
||||
libdrm
|
||||
libGL
|
||||
mesa
|
||||
vulkan-loader
|
||||
udev
|
||||
seatd
|
||||
libxcb-render-util
|
||||
];
|
||||
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
tar xvf $src
|
||||
cp usr/local/bin/cage_xtmapper $out/bin/
|
||||
cp usr/local/bin/cage_xtmapper.sh $out/bin/
|
||||
chmod +x $out/bin/cage_xtmapper
|
||||
chmod +x $out/bin/cage_xtmapper.sh
|
||||
'';
|
||||
|
||||
meta = with pkgs.lib; {
|
||||
description = "cage-xtmapper input mapping tool";
|
||||
homepage = "https://github.com/Xtr126/cage-xtmapper";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
|
||||
48
packages/cage-xtmapper-0.2.0.nix
Normal file
48
packages/cage-xtmapper-0.2.0.nix
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
{ pkgs, ... }:
|
||||
let
|
||||
RELEASE_VERSION = "20260208";
|
||||
PACKAGE_VERSION = "0.2.0";
|
||||
in
|
||||
pkgs.stdenv.mkDerivation rec {
|
||||
pname = "cage-xtmapper";
|
||||
version = PACKAGE_VERSION;
|
||||
|
||||
src = pkgs.fetchurl {
|
||||
url = "https://github.com/Xtr126/cage-xtmapper/releases/download/v${RELEASE_VERSION}/cage-xtmapper-v${PACKAGE_VERSION}.tar";
|
||||
hash = "sha256-F1C3KnTzTO1vEouixqO1xnsGmufRyAk+BiRlypNq4kQ=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkgs.autoPatchelfHook ];
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
wayland
|
||||
libxkbcommon
|
||||
pixman
|
||||
libdrm
|
||||
libGL
|
||||
mesa
|
||||
vulkan-loader
|
||||
udev
|
||||
seatd
|
||||
libxcb-render-util
|
||||
];
|
||||
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
tar xvf $src
|
||||
cp usr/local/bin/cage_xtmapper $out/bin/
|
||||
cp usr/local/bin/cage_xtmapper.sh $out/bin/
|
||||
chmod +x $out/bin/cage_xtmapper
|
||||
chmod +x $out/bin/cage_xtmapper.sh
|
||||
'';
|
||||
|
||||
meta = with pkgs.lib; {
|
||||
description = "cage-xtmapper input mapping tool";
|
||||
homepage = "https://github.com/Xtr126/cage-xtmapper";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
|
||||
16
packages/catppuccin-obs.nix
Normal file
16
packages/catppuccin-obs.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{ lib, pkgs, ... }:
|
||||
pkgs.stdenv.mkDerivation {
|
||||
pname = "catppuccin-obs";
|
||||
version = "main";
|
||||
|
||||
src = pkgs.fetchzip {
|
||||
url = "https://static.asakiyuki.com/nixos/catppuccin-obs.zip";
|
||||
sha256 = "sha256-Uk4a0HKaeyQilgBiPsuAWQubk1yZdyirNcfhYJEL+lQ=";
|
||||
};
|
||||
|
||||
buildCommand = ''
|
||||
mkdir -p $out
|
||||
cp -r $src/themes/* $out/
|
||||
'';
|
||||
}
|
||||
|
||||
31
packages/custom-cursors.nix
Normal file
31
packages/custom-cursors.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
cursors ? "aemeath",
|
||||
size ? 48,
|
||||
}:
|
||||
let
|
||||
_b = name: url: hash: { inherit name url hash; };
|
||||
_q = name: hash: { ${name} = _b name "https://static.asakiyuki.com/cursors/linux/${name}.tar.gz" hash; };
|
||||
|
||||
cursors-data = (
|
||||
_q "castorice" "sha256-nqAC+Itr+TXLGG8zYDBoBve+MeRckds5BM23DrsCTMM="
|
||||
// _q "aemeath" "sha256-0eEsUks5MwW4g5Xau24SgchX+LD9Ra3azAH0KL9JzQw="
|
||||
// _q "elysia" "sha256-mjDHklWrX5Pp/vejRQiMk0VA6afY04HXGyGD0PcopdI="
|
||||
// _q "cartethyia" "sha256-jYIDoX+rfUjw6LXrqE4y8j5IL0vByrrRkgRuz08Zy6U="
|
||||
).${cursors};
|
||||
in
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
gtk.enable = true;
|
||||
x11.enable = true;
|
||||
name = cursors-data.name;
|
||||
size = size;
|
||||
package = pkgs.runCommand "moveUp" { } ''
|
||||
mkdir -p $out/share/icons
|
||||
ln -s ${
|
||||
pkgs.fetchzip {
|
||||
url = cursors-data.url;
|
||||
hash = cursors-data.hash;
|
||||
}
|
||||
} $out/share/icons/${cursors-data.name}
|
||||
'';
|
||||
}
|
||||
7
packages/default.nix
Normal file
7
packages/default.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{ ... }@inputs:
|
||||
{
|
||||
bun = import ./bun.nix;
|
||||
cage-xtmapper = { version ? "0.2.0" }: import ./cage-xtmapper-${version}.nix;
|
||||
catppuccin-obs = import ./catppuccin-obs.nix;
|
||||
cursors = { name ? "aemeath", size ? 48 }: (import ./custom-cursors.nix { cursors = name; size = size; });
|
||||
}
|
||||
Reference in a new issue