Compare commits

...

108 Commits

Author SHA1 Message Date
Sweetbread 3c8c43f90b wallpaper-changer: add progress bar 2026-06-08 03:47:46 +03:00
Sweetbread 3de3a14d0b mako: remove shit code 2026-06-08 03:25:29 +03:00
Sweetbread 98434b79cf stylix: add accent color
I spent an hour just to add one f*ing option
2026-06-08 03:25:28 +03:00
Sweetbread c8b5900985 Update 2026-06-06 02:52:41 +03:00
Sweetbread ae74e79b8e fixup! wip: quickshell: control-panel 2026-06-06 01:43:13 +03:00
Sweetbread 3fd67e08bc pkgs: move smth to stable 2026-06-06 01:42:57 +03:00
Sweetbread e2527a20d1 ui: fuzzel to walker 2026-06-05 20:14:31 +03:00
Sweetbread 03fbc1e1b7 fixup! font: change to pixel fonts 2026-06-05 02:16:23 +03:00
Sweetbread 5b93b31de3 pkgs: add pear-desktop 2026-06-04 21:57:07 +03:00
Sweetbread 9332b07729 font: change to pixel fonts 2026-06-04 21:57:07 +03:00
Sweetbread 211dafc241 pkgs: wob 2026-06-04 21:57:07 +03:00
Sweetbread cb5771e2a3 wip: quickshell: control-panel 2026-06-04 21:57:06 +03:00
Sweetbread 3fc3f5fa3a fixup! Replace AGS with waybar 2026-06-03 01:42:24 +03:00
Sweetbread 2ffedb7835 yazi: filechooser 2026-06-01 18:42:50 +03:00
Sweetbread 5b2fbe0db4 yazi: open from other apps 2026-06-01 18:42:49 +03:00
Sweetbread 7ea803d7cd Update 2026-06-01 18:42:49 +03:00
Sweetbread 16cfa90286 vpn: change client 2026-05-31 14:53:41 +03:00
Sweetbread 89dfed99cb ghostty: add cursor shader 2026-05-31 14:53:41 +03:00
Sweetbread 36be1d4912 Rias: change mount type 2026-05-31 14:53:40 +03:00
Sweetbread 9d687a19d1 Update 2026-05-31 14:53:40 +03:00
Sweetbread 9a74a3572d ygg: change node 2026-05-31 14:51:53 +03:00
Sweetbread 1eace564e5 Impreza: add wallpaper 2026-05-31 14:51:53 +03:00
Sweetbread 88f9d0bc57 nvidia: fix backlight 2026-05-31 14:51:53 +03:00
Chest e52ee5b09f waybar for mee<3 2026-05-31 14:51:53 +03:00
Chest fd9a6db867 vpn for gpt 2026-05-31 14:51:53 +03:00
Sweetbread acf0041fbc vpn: change engine 2026-05-31 14:51:52 +03:00
Sweetbread 435423f6e1 Update system 2026-05-31 14:51:52 +03:00
Sweetbread 61b6256a14 wip: cava 2026-05-31 14:51:52 +03:00
Sweetbread cdfdeffc07 starship: fix os icon 2026-05-31 14:51:52 +03:00
Sweetbread 6156fda36d hyprland: add zoom 2026-05-31 14:51:52 +03:00
Sweetbread 9f8a14849e tty: fix Cyrillic 2026-05-31 14:51:52 +03:00
Sweetbread 9eea524875 ssh: keepalive 2026-05-31 14:51:52 +03:00
Sweetbread f84b6b1f6d Replace AGS with waybar 2026-05-31 14:51:52 +03:00
Sweetbread 46cf31e49a Update system 2026-05-31 14:51:51 +03:00
Sweetbread 91ccf1078f Style hyprland 2026-05-31 14:51:51 +03:00
Sweetbread e890c350c6 Make VPN list via flake
Wow, I didn't know I can do this...
2026-05-31 14:51:51 +03:00
Sweetbread 9d395d0dae Update system 2026-05-31 14:51:51 +03:00
Chest cc3d356513 vpn 2026-03-17 19:22:08 +03:00
Chest 617ecbaf20 meow 2026-03-17 19:22:08 +03:00
Sweetbread bc24313d57 Fix FileChooser in Hyprland 2026-03-17 19:22:07 +03:00
Sweetbread c54814b63e Update VPN 2026-03-17 19:22:07 +03:00
Sweetbread e1794a8dd3 Repath mounts 2026-03-17 19:22:07 +03:00
Sweetbread 092e73822d Update system 2026-03-17 19:22:07 +03:00
Sweetbread a185fa4d85 Change domain 2026-03-17 19:22:07 +03:00
Sweetbread 514d3a45d9 yazi: add some stuff 2026-03-17 19:22:01 +03:00
Sweetbread 9c3698839c Replace wofi with fuzzel 2025-12-13 03:13:26 +03:00
Sweetbread 1d18bad6fa Sort imports 2025-12-13 03:12:12 +03:00
Sweetbread aeecd99aca Change README 2025-12-06 23:26:10 +03:00
Sweetbread f45ab786f9 helix: change cursor shape and add a ruler 2025-12-06 22:48:56 +03:00
Sweetbread 80f25abdd5 ags: add another accent for chest 2025-12-03 15:37:14 +03:00
Sweetbread 718d20da06 system: update channels 2025-12-03 15:37:14 +03:00
Sweetbread ce4e5e3d50 ref: remove host.laptop from user modules 2025-12-03 15:36:33 +03:00
Sweetbread 3835443178 sops: fix link 2025-12-03 15:36:33 +03:00
Sweetbread 47b17c70ad flake: add custom cache 2025-12-03 15:36:33 +03:00
Sweetbread bd810a6a2a hypr: change border color 2025-12-03 15:36:33 +03:00
Chest 6cf26a1e18 pkgs: add ZZZ 2025-12-03 15:36:33 +03:00
Chest b556847dcf Eclipse: add VirtualBox 2025-12-03 15:36:33 +03:00
Sweetbread 3f06268365 zsh: add more aliases 2025-12-03 15:36:32 +03:00
Sweetbread b02a17a7d9 boot: left os prober only for Impreza 2025-12-03 15:36:32 +03:00
Sweetbread 5ebffd5e41 flake: remove devshell 2025-12-03 15:36:32 +03:00
Sweetbread 0c9e6b31aa flake: remove host definition dublication 2025-12-03 15:36:22 +03:00
Sweetbread 885dca9738 zsh: config history 2025-12-01 19:14:15 +03:00
Sweetbread 08a3195d43 zsh: optimise aliases 2025-12-01 19:14:15 +03:00
Sweetbread d934e358c0 hyprland: separate settings for user and host 2025-12-01 19:14:15 +03:00
Sweetbread 7356fbe8f6 Update system 2025-12-01 19:14:06 +03:00
Sweetbread cae32c1b4f pkgs: return office to everyone 2025-11-15 20:09:47 +03:00
Sweetbread a0ea0dd7f1 pdf 2025-11-15 20:09:47 +03:00
Sweetbread a42b17d363 fixup! Add Miku cursor 2025-11-02 19:35:06 +03:00
Sweetbread f970e20730 system: update 2025-10-31 13:40:32 +03:00
Sweetbread 4c34c5c364 pkgs: add torrent client 2025-10-24 13:15:25 +03:00
Sweetbread c4ceb67dfc Add Miku cursor 2025-10-10 00:51:20 +03:00
Sweetbread 9706b7954c Add Kurumi cursor 2025-10-10 00:50:52 +03:00
Sweetbread 396db61e5e nvidia: set envvar 2025-09-29 17:50:36 +03:00
Sweetbread 063cfe0ac0 style: set dark mode 2025-09-29 17:49:38 +03:00
Sweetbread 82e9a0e807 pkgs: add opentabletdriver 2025-09-26 00:12:45 +03:00
Sweetbread 3304573292 system: update 2025-09-26 00:12:45 +03:00
Sweetbread 26753a5b98 hypr: add focus 2025-09-24 18:29:37 +03:00
Sweetbread 51280986ed tex: add packages 2025-09-19 00:57:03 +03:00
Sweetbread 6a6be514df pkgs: add vivaldi 2025-09-07 20:00:31 +03:00
Sweetbread 0b7bf06f58 fix: set imv as a image viewer 2025-09-04 19:00:49 +03:00
Sweetbread c11584e31e yazi: set up plugins 2025-09-01 20:39:31 +03:00
Sweetbread 6fc5cee147 system: update 2025-09-01 15:48:20 +03:00
Sweetbread adc82860eb feat: scanning 2025-09-01 15:47:40 +03:00
Sweetbread bd9bf6ccc7 wip: fix: clipboard 2025-09-01 15:47:40 +03:00
Sweetbread 75bb7846f9 pkgs: replace grimblast with hyprshot 2025-08-24 20:01:35 +03:00
Sweetbread 7747587e69 pkgs: fastfetch instead of neofetch 2025-08-24 20:01:35 +03:00
Sweetbread 7c37e7122f system: update 2025-08-24 20:01:35 +03:00
Sweetbread 02aef91f3a system: change mount path to partlabel 2025-07-22 22:17:18 +03:00
Chest ba0aac7807 New install 2025-07-22 22:17:04 +03:00
Chest b27399db29 flake: update aagl 2025-07-02 15:15:52 +03:00
Chest a98c3f84ce feat: F disk 2025-07-02 15:15:52 +03:00
Sweetbread 7069a9e1f0 yazi: do not preload .crdownload 2025-06-26 19:50:54 +03:00
Sweetbread 86a972fd61 hyprland: add media app binds 2025-06-25 17:25:12 +03:00
Sweetbread d793b0e635 hyprland: add media binds 2025-06-24 23:30:29 +03:00
Sweetbread 1f034a5ebc pkgs: add texstudio 2025-06-09 16:28:02 +03:00
Sweetbread b96b2986f0 system: update 2025-06-08 02:53:46 +03:00
Sweetbread 4570dfb4b4 chore: something... 2025-06-08 01:18:25 +03:00
Sweetbread 88efa96ac7 pkgs: remove libreoffice for chest 2025-05-21 17:02:09 +03:00
Sweetbread 48ce8bdf9d system: update 2025-05-05 17:21:43 +03:00
Sweetbread 724633d928 system: change channels 2025-05-05 16:46:17 +03:00
Sweetbread 7eedb9098a pkgs(chest): turn off some packages 2025-05-03 23:27:53 +03:00
Sweetbread 6432eb6171 style: decrease gaps 2025-04-22 11:49:15 +03:00
Sweetbread 4b7d0a0980 system: update nixpkgs-fixed 2025-04-22 00:33:22 +03:00
Sweetbread de77adcfcb style: ags 2025-04-22 00:33:22 +03:00
Sweetbread 16f84aaa04 system: update 2025-04-22 00:33:22 +03:00
Sweetbread 24f013c765 refactor: move utils to a separate file 2025-04-18 02:52:44 +03:00
Sweetbread a84a509cf8 pkgs: add krita and gimp 2025-04-18 02:46:26 +03:00
Sweetbread df54654750 fix: wallpapers 2025-04-18 02:46:26 +03:00
80 changed files with 2788 additions and 987 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ creation_rules:
key_groups:
- age:
- *primary
- path_regex: nixos/hosts/(Rias|Senko|Eclipse)/secrets/.+$
- path_regex: host/(Rias|Senko|Eclipse)/secrets/.+$
key_groups:
- age:
- *primary
+42 -7
View File
@@ -1,12 +1,47 @@
# ❄️ My NixOS Config
```bash
git clone https://github.com/Andrey0189/nixos-config
mv nixos-config $HOME/nix # Config is supposed to be in the ~/nix directory
cd $HOME/nix
sudo nixos-rebuild switch --flake .
home-manager switch --flake .
This configuration is based on [&'s config](https://github.com/Andrey0189/nixos-config)
## Users
- [Sweetbread](./user/sweetbread)
- [Chest](./user/chest)
## Hosts
- [Rias](./host/Rias)
- [Senko](./host/Senko)
- [Eclipse](./host/Eclipse)
- [Impreza](./host/Impreza)
## How does this work?
The [flake](./flake.nix) file is the starting point. While installing/rebuilding
the correct `host` is chosen, which includes `./host/${host}/configuration.nix`.
It includes 2 (actually, more, but hey!) files:
- [`./host/modules/common.nix`](./host/modules/common.nix): Common setting
for all hosts (I don't say)
- [`./user/common.nix`](./user/common.nix): Common settings for all users (you
got the idea) and setup of [home-manager](https://github.com/nix-community/home-manager)
It allows me to remove duplications and add multiple users to one host
Example with Rias:
```
Enjoy!
./host/Rias/configuration.nix
./host/Rias/modules/*
./host/modules/gpu/nvidia.nix
./host/modules/common.nix
./host/Rias/hardware-configuration.nix
./modules/host.nix
./modules/host/*
./host/modules/packages.nix
./user/common.nix
./user/sweetbread/home.nix
./user/sweetbread/modules/*
./modules/user.nix
./modules/user/*
```
## Programs
Most of programs are defined in [user modules](./modules/user)
![Screenshot](./screenshot.png)
Generated
+376 -367
View File
File diff suppressed because it is too large Load Diff
+29 -80
View File
@@ -3,30 +3,37 @@
nixConfig = {
extra-substituters = [
"https://nix.lair.moe/main"
"https://nix-community.cachix.org"
"https://cache.garnix.io"
"https://hyprland.cachix.org"
"https://ezkea.cachix.org"
"https://yazi.cachix.org"
];
extra-trusted-public-keys = [
"main:kpwMe+9BsGJ/IUb7i3iadaV38y5/Yuqoct0mf7wI9ds="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
"ezkea.cachix.org-1:ioBmUbJTZIKsHmWWXPe1FSFbeVe+afhfgqgTSNd34eI="
"yazi.cachix.org-1:Dcdz63NZKfvUCbDGngQDAZq6kOroIrFoyO064uvLh8k="
];
};
inputs = {
aagl.url = "github:ezKEa/aagl-gtk-on-nix";
nixpkgs.url = "github:nixos/nixpkgs/30b27177a006d425120fb850a64ceb792636501a";
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.11";
nixpkgs-fixed.url = "github:nixos/nixpkgs/b27ba4eb322d9d2bf2dc9ada9fd59442f50c8d7c";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-26.05";
nixpkgs-pinned.url = "github:nixos/nixpkgs/ec942ba042dad5ef097e2ef3a3effc034241f011";
sops-nix.url = "github:Mic92/sops-nix";
stylix.url = "github:danth/stylix";
ags.url = "github:Aylur/ags";
ayugram-desktop.url = "github:/ayugram-port/ayugram-desktop/release?submodules=1";
ags.url = "github:Aylur/ags/3ed9737bdbc8fc7a7c7ceef2165c9109f336bff6";
hyprland.url = "github:hyprwm/Hyprland";
yazi.url = "github:sxyazi/yazi";
yazi-plugins = {
url = "github:yazi-rs/plugins";
flake = false;
};
hyprland.url = "github:hyprwm/Hyprland/v0.54.2-b";
hyprland-plugins = {
url = "github:hyprwm/hyprland-plugins";
inputs.hyprland.follows = "hyprland";
@@ -38,81 +45,23 @@
};
};
outputs = { self, nixpkgs, nixpkgs-stable, nixpkgs-fixed, home-manager, ... }@inputs: let
outputs = { self, nixpkgs, nixpkgs-stable, nixpkgs-pinned, home-manager, ... }@inputs: let
system = "x86_64-linux";
config = { allowUnfree = true; };
mkHost = hostname: nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs;
pkgs-stable = import nixpkgs-stable { inherit system config; };
pkgs-pinned = import nixpkgs-pinned { inherit system config; };
};
modules = [ ./host/${hostname}/configuration.nix ];
};
in {
nixosConfigurations = {
Rias = nixpkgs.lib.nixosSystem {
specialArgs = {
pkgs-stable = import nixpkgs-stable {
inherit system;
config.allowUnfree = true;
};
pkgs-fixed = import nixpkgs-fixed {
inherit system;
config.allowUnfree = true;
};
inherit inputs system;
};
modules = [ ./host/Rias/configuration.nix ];
};
Senko = nixpkgs.lib.nixosSystem {
specialArgs = {
pkgs-stable = import nixpkgs-stable {
inherit system;
config.allowUnfree = true;
};
pkgs-fixed = import nixpkgs-fixed {
inherit system;
config.allowUnfree = true;
};
inherit inputs system;
};
modules = [ ./host/Senko/configuration.nix ];
};
Eclipse = nixpkgs.lib.nixosSystem {
specialArgs = {
pkgs-stable = import nixpkgs-stable {
inherit system;
config.allowUnfree = true;
};
pkgs-fixed = import nixpkgs-fixed {
inherit system;
config.allowUnfree = true;
};
inherit inputs system;
};
modules = [ ./host/Eclipse/configuration.nix ];
};
Impreza = nixpkgs.lib.nixosSystem {
specialArgs = {
pkgs-stable = import nixpkgs-stable {
inherit system;
config.allowUnfree = true;
};
pkgs-fixed = import nixpkgs-fixed {
inherit system;
config.allowUnfree = true;
};
inherit inputs system;
};
modules = [ ./host/Impreza/configuration.nix ];
};
};
devShells."${system}".default = let
pkgs = import nixpkgs { inherit system; };
in pkgs.mkShell {
shellHook = "zsh";
packages = with pkgs; [
cargo
rustc
rust-analyzer
lldb
];
Rias = mkHost "Rias";
Senko = mkHost "Senko";
Eclipse = mkHost "Eclipse";
Impreza = mkHost "Impreza";
};
};
}
+5 -5
View File
@@ -1,6 +1,4 @@
{ config, pkgs, pkgs-stable, pkgs-fixed, lib, inputs, ...}: let
laptop = false;
in {
{ config, pkgs, pkgs-stable, pkgs-pinned, lib, inputs, ... }: {
imports = [
./secrets/secrets.nix
./modules/aagl.nix
@@ -18,14 +16,16 @@ in {
inherit config;
inherit pkgs;
inherit pkgs-stable;
inherit pkgs-fixed;
inherit pkgs-pinned;
inherit lib;
inherit inputs;
inherit laptop;
name = "chest";
})
];
nixpkgs.config.allowBroken = true;
programs.gamemode.enable = true;
services.printing.enable = true;
virtualisation.virtualbox.host.enable = true;
users.extraGroups.vboxusers.members = [ "chest" ];
}
+19 -11
View File
@@ -13,21 +13,27 @@
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/34e32809-6876-4361-95d8-70a479ea8e19";
fsType = "ext4";
};
fileSystems."/" = {
device = "/dev/disk/by-label/NixOS";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/2B65-0D2E";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
fileSystems."/boot" = {
device = "/dev/disk/by-partlabel/EFI\\x20system\\x20partition";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" "nofail" ];
};
fileSystems."/mnt/D" = {
fileSystems."/mnt/D" = {
device = "/dev/disk/by-uuid/E030A4DF30A4BDC2";
fsType = "ntfs";
options = ["umask=0022" "gid=100" "uid=1002"];
options = ["umask=0022" "gid=100" "uid=1000" "nofail" ];
};
fileSystems."/mnt/F" = {
device = "/dev/disk/by-uuid/1C6278FC2848E1EF";
fsType = "ntfs";
options = ["umask=0022" "gid=100" "uid=1000" "nofail" ];
};
swapDevices = [ ];
@@ -41,4 +47,6 @@
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
boot.loader.grub.useOSProber = true;
}
+1
View File
@@ -2,6 +2,7 @@
imports = [ inputs.aagl.nixosModules.default ];
nix.settings = inputs.aagl.nixConfig; # Set up Cachix
programs.honkers-railway-launcher.enable = true;
programs.sleepy-launcher.enable = true;
programs.anime-game-launcher.enable = true;
networking.hosts."0.0.0.0" = [
"overseauspider.yuanshen.com"
+27
View File
@@ -0,0 +1,27 @@
{ pkgs, lib, ... }: {
wayland.windowManager.hyprland = let
wallpaper = pkgs.fetchurl {
name = "miku_wallpaper.jpg";
url = "https://c.lair.moe/pub/miku_wallpaper.jpeg?raw";
hash = "sha256-inK4X5KzQk5FHwDw2DYy43nm7XtXlC6I0S1PkYUv+3w=";
};
in {
settings = {
monitor = [
"DP-3 , 1920x1080@165, 0x0 , 1"
"HDMI-A-1, preferred , -1080x0, 1, transform, 1"
];
workspace = [
"1, monitor:DP-3, default:true"
"10, monitor:HDMI-A-1, default:true"
];
exec-once = [
"hyprctl dispatch workspace 1"
"${lib.getExe pkgs.swww} img -o HDMI-A-1 ${wallpaper}"
"${lib.getExe pkgs.linux-wallpaperengine} ~/.local/share/wpe/wallpaper --assets-dir ~/.local/share/wpe/assets --screen-root DP-3 --noautomute"
];
};
};
}
File diff suppressed because one or more lines are too long
+4 -6
View File
@@ -1,6 +1,4 @@
{ config, pkgs, pkgs-stable, pkgs-fixed, lib, inputs, ...}: let
laptop = true;
in {
{ config, pkgs, pkgs-stable, pkgs-pinned, lib, inputs, ... }: {
imports = [
./secrets/secrets.nix
./modules/grub.nix
@@ -16,16 +14,16 @@ in {
inherit config;
inherit pkgs;
inherit pkgs-stable;
inherit pkgs-fixed;
inherit pkgs-pinned;
inherit lib;
inherit inputs;
inherit laptop;
name = "chest";
})
];
nix.settings.cores = 3;
nixpkgs.config.allowBroken = true;
programs.gamemode.enable = true;
hardware.bluetooth.enable = true;
host.laptop = laptop;
host.laptop = true;
}
+16 -14
View File
@@ -13,22 +13,22 @@
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/31247de4-e9c0-4690-8bce-8380377b6872";
fsType = "ext4";
};
fileSystems."/" = {
device = "/dev/disk/by-label/NixOS";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/328A-299C";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
fileSystems."/boot" = {
device = "/dev/disk/by-label/EFI";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" "nofail" ];
};
fileSystems."/mnt/Windows" =
{ device = "/dev/disk/by-uuid/84E48B00E48AF428";
fsType = "ntfs";
options = [ "umask=0022" "gid=100" "uid=1000" "nofail" ];
};
fileSystems."/mnt/Windows" = {
device = "/dev/disk/by-label/Windows";
fsType = "ntfs";
options = [ "umask=0022" "gid=100" "uid=1000" "nofail" ];
};
swapDevices = [ ];
@@ -41,4 +41,6 @@
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
boot.loader.grub.useOSProber = true;
}
+15
View File
@@ -0,0 +1,15 @@
{ pkgs, lib, ... }: {
wayland.windowManager.hyprland = let
wallpaper = pkgs.fetchurl {
name = "miku_wallpaper.jpg";
url = "https://c.lair.moe/pub/miku_wallpaper.jpeg?raw";
hash = "sha256-inK4X5KzQk5FHwDw2DYy43nm7XtXlC6I0S1PkYUv+3w=";
};
in {
settings = {
exec-once = [
"${lib.getExe pkgs.swww} img -o eDP-1 ${wallpaper}"
];
};
};
}
+7
View File
@@ -0,0 +1,7 @@
My desktop
- **CPU:** Intel i5-10600KF
- **GPU:** NVidia GeForce RTX 3060 Ti
- **RAM:** 32GB
- **SSD:** 512GB
- **HDD:** 1TB
+7 -6
View File
@@ -1,11 +1,8 @@
{ config, pkgs, pkgs-stable, pkgs-fixed, lib, inputs, ...}: let
laptop = false;
in {
{ config, pkgs, pkgs-stable, pkgs-pinned, lib, inputs, ... }: {
imports = [
./secrets/secrets.nix
./modules/grub.nix
./modules/syncthing.nix
../../modules/host/adb.nix
../modules/gpu/nvidia.nix
(import ../modules/common.nix {
@@ -18,14 +15,18 @@ in {
inherit config;
inherit pkgs;
inherit pkgs-stable;
inherit pkgs-fixed;
inherit pkgs-pinned;
inherit lib;
inherit inputs;
inherit laptop;
name = "sweetbread";
fullname = "Sweet Bread";
})
];
programs.gamemode.enable = true;
services.printing.enable = true;
hardware.opentabletdriver.enable = true;
environment.systemPackages = [ pkgs.android-tools ];
users.users.sweetbread.extraGroups = [ "kvm" ];
}
+1 -1
View File
@@ -24,7 +24,7 @@
fileSystems."/mnt/D" = {
device = "/dev/disk/by-label/Data";
fsType = "ntfs";
fsType = "ntfs3";
options = ["umask=0022" "gid=100" "uid=1000" "nofail" ];
};
+44
View File
@@ -0,0 +1,44 @@
{ pkgs, lib, ...}: {
wayland.windowManager.hyprland = let
monitor-switcher = pkgs.writers.writeBashBin "monitor_switcher" /*bash*/ ''
MODE=$1
case $MODE in
"tv")
hyprctl keyword monitor "DP-3, 1920x1080@60, 3840x0, 1"
hyprctl keyword monitor "HDMI-A-1, 3840x2160@60, 0x0, 1"
notify-send "TV mode"
;;
"mirror")
hyprctl keyword monitor "HDMI-A-1, 3840x2160@60, 0x0, 1"
hyprctl keyword monitor "DP-3, preferred, auto, 1, mirror, HDMI-A-1"
notify-send "TV-only mode"
;;
"display"|*)
hyprctl keyword monitor "HDMI-A-1, disable"
hyprctl keyword monitor "DP-3, 3440x1440@165, 0x0, 1"
notify-send "Display mode"
;;
esac
'';
in {
settings = {
monitor = [
"DP-3, 3440x1440@165, auto-right, 1"
# "HDMI-A-1, 3840x2160@60, auto-left, 2"
"HDMI-A-1, disabled"
];
bind = [
'', XF86Calculator, exec, ghostty --title=pulsemixer -e pulsemixer''
''$mainMod, F1, exec, ${lib.getExe monitor-switcher} tv''
''$mainMod, F2, exec, ${lib.getExe monitor-switcher} mirror''
''$mainMod, F3, exec, ${lib.getExe monitor-switcher}''
];
};
};
}
+6 -1
View File
@@ -11,7 +11,7 @@
settings = {
devices = {
Akeno = { id = "YVFVE2M-GSCKJBJ-AMC5JM3-AOMCVNP-RLFAWEZ-35VP4HP-DGP5QD2-6QWEZQW"; };
Akeno = { id = "QDW3WJX-J7ETS4R-32CUAIY-EGNM2RD-ZEHOUW2-CHOEOUG-USZOWTR-HHQS2QX"; };
Koneko = { id = "PJFWQRY-ZFUBGDR-NV7KVBL-UBDQ4HT-KPTYP34-MUDFPJU-4EZUHTT-ZLYRMAB"; };
};
@@ -26,6 +26,11 @@
devices = [ "Akeno" "Koneko" ];
};
"JoiPlay" = {
path = "/mnt/D/SyncThing/JoiPlay";
devices = [ "Akeno" ];
};
"Music" = {
path = "/home/sweetbread/Music";
devices = [ "Akeno" "Koneko" ];
File diff suppressed because one or more lines are too long
+1
View File
@@ -0,0 +1 @@
My laptop `HP Pavilion 15-cb012ur`
+4 -6
View File
@@ -1,6 +1,4 @@
{ config, pkgs, pkgs-stable, pkgs-fixed, lib, inputs, ...}: let
laptop = true;
in {
{ config, pkgs, pkgs-stable, pkgs-pinned, lib, inputs, ... }: {
imports = [
./secrets/secrets.nix
./modules/grub.nix
@@ -16,17 +14,17 @@ in {
inherit config;
inherit pkgs;
inherit pkgs-stable;
inherit pkgs-fixed;
inherit pkgs-pinned;
inherit lib;
inherit inputs;
inherit laptop;
name = "sweetbread";
fullname = "Sweet Bread";
})
];
hardware.bluetooth.enable = true;
host.laptop = laptop;
host.laptop = true;
host.nvidia.prime.enable = true;
environment.systemPackages = [ pkgs.dbgate ];
}
+1 -1
View File
@@ -17,7 +17,7 @@
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/D706-818C";
device = "/dev/disk/by-partlabel/EFI";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" "nofail" ];
};
+9
View File
@@ -0,0 +1,9 @@
{
wayland.windowManager.hyprland = {
settings = {
monitor = [
"eDP-1, 1920x1080@60, 0x0, 1"
];
};
};
}
+1 -1
View File
@@ -4,7 +4,7 @@
secrets = {
vpn_bolt = {
format = "binary";
sopsFile = ./vpn_bolt.db;
sopsFile = ../../Rias/secrets/vpn_bolt.db;
};
};
};
-1
View File
@@ -1 +0,0 @@
../../Rias/secrets/vpn_bolt.db
+24 -3
View File
@@ -7,14 +7,35 @@
];
options = {
host.laptop = lib.mkEnableOption "laptop mode";
host = {
laptop = lib.mkEnableOption "laptop mode";
nvidia.prime = {
enable = lib.mkEnableOption "NVIDIA PRIME offload for hybrid graphics";
intelBusId = lib.mkOption {
type = lib.types.str;
default = "PCI:0:2:0";
description = "Intel/iGPU Bus ID used by NVIDIA PRIME.";
};
nvidiaBusId = lib.mkOption {
type = lib.types.str;
default = "PCI:1:0:0";
description = "NVIDIA dGPU Bus ID used by NVIDIA PRIME.";
};
};
};
};
config = {
nix.settings = {
keep-going = true;
extra-substituters = [ "https://nix.lair.moe/main" ];
extra-trusted-public-keys = [ "main:kpwMe+9BsGJ/IUb7i3iadaV38y5/Yuqoct0mf7wI9ds=" ];
experimental-features = [ "nix-command" "flakes" ];
};
networking.hostName = hostname;
time.timeZone = lib.mkDefault "Europe/Moscow";
i18n.defaultLocale = lib.mkDefault "ru_RU.UTF-8";
nix.settings.experimental-features = [ "nix-command" "flakes" ];
system.stateVersion = "23.05";
};
}
}
+6 -6
View File
@@ -1,22 +1,22 @@
{ config, pkgs, ... }:
{ config, pkgs-stable, ... }:
{
hardware.graphics = {
enable = true;
extraPackages = with pkgs; [
extraPackages = with pkgs-stable; [
intel-media-driver
intel-compute-runtime
libvdpau-va-gl
];
extraPackages32 = with pkgs.pkgsi686Linux; [
extraPackages32 = with pkgs-stable.pkgsi686Linux; [
intel-media-driver
];
};
nixpkgs.config.packageOverrides = pkgs: {
vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
nixpkgs.config.packageOverrides = pkgs-stable: {
vaapiIntel = pkgs-stable.vaapiIntel.override { enableHybridCodec = true; };
};
environment.systemPackages = with pkgs; [
environment.systemPackages = with pkgs-stable; [
intel-gpu-tools
libva-utils
clinfo
+42 -8
View File
@@ -1,11 +1,27 @@
{ config, pkgs, lib, ... }: {
services.xserver.videoDrivers = [ "nvidia" ];
{ config, pkgs-stable, lib, ... }: let
primeCfg = config.host.nvidia.prime;
isPrimeOffload = primeCfg.enable;
in {
boot = {
kernelParams = [ "nvidia-drm.modeset=1" ];
initrd.kernelModules = lib.optionals isPrimeOffload [ "i915" ];
};
services.xserver.videoDrivers =
if isPrimeOffload
then [ "modesetting" "nvidia" ]
else [ "nvidia" ];
hardware = {
graphics = {
enable = true;
enable32Bit = true;
extraPackages = with pkgs; [nvidia-vaapi-driver intel-media-driver];
extraPackages32 = with pkgs.pkgsi686Linux; [nvidia-vaapi-driver intel-media-driver];
extraPackages = with pkgs-stable; [
# nvidia-vaapi-driver
intel-media-driver
libvdpau-va-gl
];
extraPackages32 = with pkgs-stable.pkgsi686Linux; [ nvidia-vaapi-driver intel-media-driver ];
};
nvidia = {
@@ -16,12 +32,30 @@
};
open = false;
nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.beta;
package = config.boot.kernelPackages.nvidiaPackages.stable;
prime = lib.optionalAttrs config.host.laptop {
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:1:0:0";
prime = lib.optionalAttrs isPrimeOffload {
offload = {
enable = true;
enableOffloadCmd = true;
};
intelBusId = primeCfg.intelBusId;
nvidiaBusId = primeCfg.nvidiaBusId;
};
};
};
environment.sessionVariables = {
__GL_VRR_ALLOWED = 1;
ELECTRON_OZONE_PLATFORM_HINT = "auto";
NIXOS_OZONE_WL = 1;
} // lib.optionalAttrs isPrimeOffload {
LIBVA_DRIVER_NAME = "iHD";
} // lib.optionalAttrs (!isPrimeOffload) {
WLR_NO_HARDWARE_CURSORS = 1;
WLR_DRM_NO_ATOMIC = 1;
GBM_BACKEND = "nvidia-drm";
LIBVA_DRIVER_NAME = "nvidia";
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
};
}
+1 -1
View File
@@ -15,7 +15,7 @@
ncdu
tldr
helix
pinentry
pinentry-gnome3
];
fonts = {
+32 -3
View File
@@ -1,4 +1,4 @@
{
{ pkgs, ... }: {
imports = [
./host/bluetooth.nix
./host/bootloader.nix
@@ -8,16 +8,45 @@
./host/gamemode.nix
./host/gpg.nix
./host/laptop.nix
./host/network.nix
./host/printing.nix
./host/shutdown-on-lan.nix
./host/sound.nix
./host/virtmanager.nix
./host/vpn.nix
./host/network.nix
./host/yggdrasil.nix
];
programs.hyprland.enable = true;
programs = {
dconf.enable = true;
hyprland.enable = true;
};
xdg.portal = {
enable = true;
xdgOpenUsePortal = true;
extraPortals = with pkgs; [
xdg-desktop-portal-hyprland
xdg-desktop-portal-gtk
xdg-desktop-portal-termfilechooser
];
config = {
common = {
default = [ "hyprland" "gtk" ];
"org.freedesktop.impl.portal.FileChooser" = [ "termfilechooser" "gtk" ];
"org.freedesktop.impl.portal.Settings" = [ "gtk" ];
};
hyprland = {
default = [ "hyprland" "gtk" ];
"org.freedesktop.impl.portal.FileChooser" = [ "termfilechooser" "gtk" ];
"org.freedesktop.impl.portal.Settings" = [ "gtk" ];
};
};
};
services = {
udisks2.enable = true;
fstrim.enable = true;
-4
View File
@@ -1,4 +0,0 @@
{
programs.adb.enable = true;
users.users.sweetbread.extraGroups = ["adbusers"]; # FIXME: check users
}
-1
View File
@@ -11,7 +11,6 @@
enable = true;
efiSupport = true;
device = "nodev";
useOSProber = true;
};
};
consoleLogLevel = 0;
+2 -2
View File
@@ -1,6 +1,6 @@
{ pkgs, ... }: {
{
console = {
font = "${pkgs.kbd}/share/consolefonts/LatArCyrHeb-19.psfu.gz";
font = "LatArCyrHeb-19";
colors = [
"16161E"
"1A1B26"
+10 -3
View File
@@ -1,8 +1,15 @@
{
{ lib, ... }: {
environment.variables = {
EDITOR = "hx";
RANGER_LOAD_DEFAULT_RC = "FALSE";
QT_QPA_PLATFORMTHEME = "qt5ct";
GSETTINGS_BACKEND = "keyfile";
# GTK/Electron apps do not consistently use the portal picker unless this
# variable is present in the graphical session environment.
GTK_USE_PORTAL = "1";
# Qt/Telegram-like apps otherwise keep using their own picker. This makes
# them ask xdg-desktop-portal for file/folder selection.
QT_QPA_PLATFORMTHEME = lib.mkForce "xdgdesktopportal";
TDESKTOP_USE_GTK_FILE_DIALOG = "1";
};
}
+5 -5
View File
@@ -6,12 +6,12 @@ lib.mkIf config.programs.gamemode.enable {
gamescopeSession.enable = true;
};
environment.systemPackages = with pkgs-stable; [
environment.systemPackages = with pkgs; [
mangohud
protonup
pkgs.bottles
heroic
pkgs.prismlauncher
protonup-ng
pkgs-stable.bottles
pkgs-stable.heroic
prismlauncher
];
environment.sessionVariables = {
+1 -1
View File
@@ -1,4 +1,4 @@
{ pkgs, ...}: {
{
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
+2 -2
View File
@@ -2,14 +2,14 @@
networking = {
enableIPv6 = true;
useDHCP = false;
nameservers = [ "193.222.99.172" "1.1.1.1" ];
nameservers = [ "64.188.64.176" "1.1.1.1" ];
dhcpcd.extraConfig = "nohook resolv.conf";
networkmanager = {
enable = true;
dns = "none";
insertNameservers = [ "193.222.99.172" "1.1.1.1" ];
insertNameservers = [ "64.188.64.176" "1.1.1.1" ];
};
};
}
+21 -5
View File
@@ -1,9 +1,25 @@
{ config, lib, ... }:
{ config, lib, pkgs, ... }:
lib.mkIf config.services.printing.enable {
services.avahi = {
enable = true;
nssmdns4 = true;
openFirewall = true;
services = {
printing.drivers = with pkgs; [
brlaser
];
avahi = {
enable = true;
nssmdns4 = true;
openFirewall = true;
};
};
hardware.sane = {
enable = true;
extraBackends = with pkgs; [ sane-airscan ];
};
environment.systemPackages = with pkgs; [
sane-frontends
simple-scan
];
}
+20 -14
View File
@@ -1,8 +1,8 @@
{ pkgs, lib, ... }:
let
sol = pkgs.writers.writePython3 "shutdown-on-lan.py" {
libraries = [ pkgs.python312Packages.psutil ];
flakeIgnore = [ "E501" "E302" "E305" ];
libraries = [ pkgs.python313Packages.psutil ];
flakeIgnore = [ "E302" "E305" "E501" "E701" ];
} /*py*/ ''
# https://habr.com/ru/articles/816765/
@@ -21,20 +21,26 @@
ip_addr = mac_addr = None
while not ip_addr or not mac_addr or ip_addr == '127.0.0.1':
net = psutil.net_if_addrs()
for item in net[list(net.keys())[-1]]:
addr = item.address
# В IPv4-адресах разделители - точки
if '.' in addr:
ip_addr = addr
# В MAC-адресах разделители либо тире, либо одинарное двоеточие.
# Двойное двоеточие - это разделители для адресов IPv6
elif ('-' in addr or ':' in addr) and '::' not in addr:
# Приводим MAC-адрес к одному формату. Формат может меняться в зависимости от ОС
mac_addr = addr.replace(':', '-').upper()
nets = psutil.net_if_addrs()
for net in list(nets.keys())[::-1]:
if net in ('lo', 'tun0'): continue
logger.debug(str(net))
for item in nets[net]:
# logger.debug(str(item))
addr = item.address
logger.debug(addr)
# В IPv4-адресах разделители - точки
if '.' in addr:
ip_addr = addr
# В MAC-адресах разделители либо тире, либо одинарное двоеточие.
# Двойное двоеточие - это разделители для адресов IPv6
elif ('-' in addr or ':' in addr) and '::' not in addr:
# Приводим MAC-адрес к одному формату. Формат может меняться в зависимости от ОС
mac_addr = addr.replace(':', '-').upper()
if not ip_addr or not mac_addr or ip_addr == '127.0.0.1':
logger.debug('Не удалось получить IP или MAC-адрес сетевого интерфейса')
logger.error('Не удалось получить IP или MAC-адрес сетевого интерфейса')
sleep(10)
logger.debug(mac_addr)
return ip_addr, mac_addr
def assemble_wol_packet(mac_address: str) -> str:
+1
View File
@@ -3,6 +3,7 @@
services = {
pulseaudio.enable = false;
pipewire = {
enable = true;
+1 -1
View File
@@ -1,4 +1,4 @@
{ pkgs, ... }: {
{
virtualisation.libvirtd.enable = true;
programs.virt-manager.enable = true;
}
+5 -25
View File
@@ -1,28 +1,8 @@
{pkgs, config, ...}: {
systemd.services.v2raya = {
{
programs.clash-verge = {
enable = true;
description = "v2rayA gui client";
after = [ "network.target" ];
serviceConfig = {
Restart = "always";
ExecStart = "${pkgs.v2raya}/bin/v2rayA";
};
path = with pkgs; [ iptables bash iproute2 ];
wantedBy = [ "multi-user.target" ];
environment = {
V2RAYA_LOG_FILE = "/var/log/v2raya/v2raya.log";
V2RAY_LOCATION_ASSET = "/etc/v2raya";
XRAY_LOCATION_ASSET = "/etc/v2raya";
};
};
environment.etc = {
"v2raya/ru_geoip.dat".source = pkgs.fetchurl {
name = "geoip.dat";
url = "https://github.com/runetfreedom/russia-blocked-geoip/releases/download/202503301521/geoip.dat";
hash = "sha256-IhMK8IzAYo1RtTFCPKaJ515JtZHv08UXDssg3fPgh+I=";
};
"v2raya/bolt.db".source = config.sops.secrets.vpn_bolt.path;
serviceMode = true;
tunMode = true;
autoStart = true;
};
}
+1 -1
View File
@@ -4,7 +4,7 @@
persistentKeys = true;
settings = {
Peers = [
"tcp://codrs.ru:5001"
"tls://ip4.01.ekb.ru.dioni.su:9003"
];
};
};
+16 -12
View File
@@ -1,20 +1,24 @@
{ config, lib, ... }: {
imports = [
./user/qt.nix
./user/sops.nix
./user/neofetch.nix
./user/yazi.nix
./user/ags.nix
./user/zsh.nix
./user/helix.nix
./user/hyprlock.nix
./user/btop.nix
./user/wofi.nix
./user/mako.nix
./user/ghostty.nix
./user/helix.nix
./user/hyprland.nix
./user/hyprlock.nix
./user/mako.nix
./user/neofetch.nix
./user/qt.nix
./user/quickshell.nix
./user/stylix.nix
./user/sops.nix
./user/ssh.nix
./user/walker.nix
./user/wob.nix
./user/yazi.nix
./user/zsh.nix
./user/packages/art.nix
./user/packages/desktop.nix
./user/packages/coding.nix
./user/packages/utils.nix
] ;
];
}
-26
View File
@@ -1,26 +0,0 @@
{ config, inputs, pkgs, ... }: {
imports = [ inputs.ags.homeManagerModules.default ];
programs.ags = {
enable = true;
configDir = null;
extraPackages = with inputs.ags.packages.${pkgs.system}; [
battery
mpris
hyprland
network
tray
wireplumber
];
};
home.packages = with pkgs; [
pulsemixer
];
wayland.windowManager.hyprland.settings.exec-once = [ "ags run" ];
xdg.configFile."ags".source = (pkgs.callPackage ./packages/drvs/ags.nix { colors = config.lib.stylix.colors; });
}
+13 -1
View File
@@ -1,11 +1,23 @@
{
{ config, pkgs, ... }: let
ghosttyWithGL = (config.lib.nixGL.wrap pkgs.ghostty);
shaders = pkgs.fetchFromGitHub {
owner = "sahaj-b";
repo = "ghostty-cursor-shaders";
rev = "06d4e90fb5410e9c4d0b3131584060adddf89406";
hash = "sha256-G/UIr1bKnxn1AcHl/4FL/jou6b7M2VeREslYVELxdmw=";
};
in {
programs.ghostty = {
enable = true;
enableZshIntegration = true;
package = ghosttyWithGL;
settings = {
confirm-close-surface = false;
copy-on-select = false;
title-report = true;
custom-shader = "${shaders}/cursor_warp.glsl";
};
};
}
+8 -1
View File
@@ -6,7 +6,10 @@
settings = {
# theme = "catppuccin-mocha";
editor = {
rulers = [ 81 ];
insert-final-newline = false;
indent-guides.render = true;
whitespace.render = {
space = "all";
tab = "all";
@@ -15,7 +18,11 @@
newline = "none";
};
indent-guides.render = true;
cursor-shape = {
normal = "block";
insert = "bar";
select = "underline";
};
};
};
};
@@ -1,79 +1,32 @@
{ pkgs, lib, config, collection, swww_flags, inputs }: {
{ pkgs, lib, config, osConfig, inputs, username, ... }: let
optImport = path: lib.optional (builtins.pathExists path) path;
hostname = osConfig.networking.hostName;
in {
imports = [
./hyprland/zoom.nix
] ++
optImport ../../host/${hostname}/modules/hyprland.nix ++
optImport ../../user/${username}/modules/hyprland.nix;
home.packages = with pkgs; [
ghostty
pamixer
wofi
clipse
grimblast
wl-clipboard
cliphist
wl-clip-persist
xclip
awww
];
wayland.windowManager.hyprland =
let
wayland.windowManager.hyprland = let
colors = config.lib.stylix.colors;
wallpaper_changer = pkgs.writers.writePython3Bin "wallpaper_changer" {
libraries = [ pkgs.python3Packages.requests ];
flakeIgnore = [ "E501" "E111" "E701" "E241" "E731" ];
} /*py*/ ''
import requests as requests
from random import choice
from os import system, mkdir, listdir
from os.path import exists
notify = lambda s: system(f"notify-desktop Wallpaper '{s}'")
folder = "${config.home.homeDirectory}/Wallpapers"
url = "https://wallhaven.cc/api/v1/collections/${collection}"
with open("${config.sops.secrets."tokens/apis/wallhaven".path}") as f:
token = f.read()
notify("Updating wallpaper!")
try:
json = requests.get(url, params={'apikey': token}).json()
wallpaper = choice(json['data'])
link = wallpaper['path']
format = wallpaper['file_type']
id = wallpaper['id']
if format == "image/jpeg": ext = "jpg"
else: ext = "png"
filename = f"{id}.{ext}"
if not exists(f"{folder}/{filename}"):
if not exists(folder):
mkdir(f"{folder}")
notify("Downloading...")
with open(f"{folder}/{filename}", 'wb') as f:
r = requests.get(link)
f.write(r.content)
except requests.exceptions.ConnectionError:
notify("Offline mode")
filename = choice(listdir(folder))
finally:
system(f"${lib.getExe pkgs.swww} img {folder}/{filename} ${swww_flags}")
'';
clipsync = pkgs.writers.writeBash "clipsync" ''
while ${lib.getExe pkgs.clipnotify}; do
${lib.getExe pkgs.xclip} -q -sel clip -t image/png -o > /dev/null && \
${lib.getExe pkgs.xclip} -sel clip -t image/png -o | wl-copy
${lib.getExe pkgs.xclip} -q -sel clip -o > /dev/null && \
${lib.getExe pkgs.xclip} -sel clip -o | wl-copy
done
'';
in {
enable = true;
configType = "hyprlang";
xwayland.enable = true;
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
plugins = with inputs.hyprland-plugins.packages.${pkgs.system}; [
package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
plugins = with inputs.hyprland-plugins.packages.${pkgs.stdenv.hostPlatform.system}; [
# hyprbars # Version mismatch
];
@@ -86,17 +39,17 @@
};
env = [
"LIBVA_DRIVER_NAME,nvidia"
"__GLX_VENDOR_LIBRARY_NAME,nvidia"
"GBM_BACKEND,nvidia"
"XDG_SESSION_TYPE,wayland"
"QT_QPA_PLATFORM,wayland"
"QT_QPA_PLATFORMTHEME,xdgdesktopportal"
"GTK_USE_PORTAL,1"
"TDESKTOP_USE_GTK_FILE_DIALOG,1"
"NIXOS_OZONE_WL,1"
"ELECTRON_OZONE_PLATFORM_HINT,auto"
"XDG_CURRENT_DESKTOP,Hyprland"
"XDG_SESSION_DESKTOP,Hyprland"
"WLR_NO_HARDWARE_CURSORS,1"
"XCURSOR_SIZE, ${toString config.stylix.cursor.size}"
"XCURSOR_THEME, ${config.stylix.cursor.name}"
@@ -110,10 +63,21 @@
enable_stdout_logs = true;
};
general = {
"col.inactive_border" = lib.mkForce "rgba(00000000)";
};
decoration.inactive_opacity = lib.mkDefault .95;
decoration.border_part_of_window = false;
misc = {
focus_on_activate = true;
};
input = {
kb_layout = "us,ru";
kb_variant = "lang";
kb_options = "grp:caps_toggle";
numlock_by_default = true;
follow_mouse = 1;
@@ -124,23 +88,42 @@
sensitivity = 0;
};
windowrule = [
"float, class:^(imv)$"
"float, class:^(feh)$"
"float, class:^(mpv)$"
"float, title:^(Список друзей)"
"move onscreen cursor -50% -50%, class:^(xdragon)$"
"float, title:(nmtui)"
"float, title:(pulsemixer)"
"float, title:(clipse)"
"size 622 652, title:(clipse)"
gestures = {
workspace_swipe_invert = true;
workspace_swipe_distance = 200;
workspace_swipe_forever = true;
};
gesture = [
"3, horizontal, workspace"
];
exec-once = [
workspace = [
"w[t1], gapsout:0"
];
windowrule = [
"match:class imv, float 1"
"match:class feh, float 1"
"match:class mpv, float 1"
"match:title Список друзей, float 1"
"match:title nmtui, float 1"
"match:title pulsemixer, float 1"
"match:title clipse, float 1"
"match:title clipse, size 622 652"
"match:focus 1, rounding 0"
"match:float 0, match:workspace w[t1], border_size 0"
];
exec-once = lib.mkBefore [
"systemctl --user start plasma-polkit-agent"
"${lib.getExe' pkgs.swww "swww-daemon"}"
"${lib.getExe wallpaper_changer}"
"${clipsync}"
"${lib.getExe' pkgs.dbus "dbus-update-activation-environment"} --systemd --all"
"systemctl --user import-environment XDG_CURRENT_DESKTOP XDG_SESSION_DESKTOP XDG_SESSION_TYPE WAYLAND_DISPLAY DISPLAY GTK_USE_PORTAL QT_QPA_PLATFORMTHEME TDESKTOP_USE_GTK_FILE_DIALOG NIXOS_OZONE_WL ELECTRON_OZONE_PLATFORM_HINT"
"awww-daemon"
"wl-clip-persist --clipboard both"
"clipse -listen"
"${lib.getExe' pkgs.udiskie "udiskie"}"
];
@@ -153,9 +136,9 @@
"$mainMod, M, exit,"
"$mainMod, E, exec, ghostty -e sh -c yazi"
"$mainMod, F, togglefloating,"
"$mainMod, D, exec, wofi --show drun"
"$mainMod, P, pseudo, # dwindle"
"$mainMod, J, togglesplit, # dwindle"
"$mainMod, J, layoutmsg, togglesplit"
"$mainMod, K, layoutmsg, swapsplit"
# Move focus with mainMod + arrow keys
"$mainMod, left, movefocus, l"
@@ -210,20 +193,32 @@
"$mainMod, F2, exec, ${lib.getExe pkgs.brightnessctl} -d *::kbd_backlight set 33%-"
# Volume and Media Control
", XF86AudioRaiseVolume, exec, pamixer -i 5 "
", XF86AudioLowerVolume, exec, pamixer -d 5 "
", XF86AudioMute, exec, pamixer -t"
", XF86AudioMicMute, exec, pamixer --default-source -m"
", XF86AudioPlay, exec, ${lib.getExe pkgs.playerctl} play-pause"
", XF86Explorer, exec, ghostty -e sh -c yazi"
", XF86Mail, exec, thunderbird"
", XF86WWW, exec, google-chrome-stable" # TODO: Replace hard-code to some variable
# Brightness control
", XF86MonBrightnessDown, exec, ${lib.getExe pkgs.brightnessctl} set 5%- "
", XF86MonBrightnessUp, exec, ${lib.getExe pkgs.brightnessctl} set +5% "
];
# Waybar
"$mainMod, B, exec, pkill -SIGUSR1 waybar"
#"$mainMod, W, exec, pkill -SIGUSR2 waybar"
binde = [
", XF86AudioRaiseVolume, exec, pamixer -i 5 "
", XF86AudioLowerVolume, exec, pamixer -d 5 "
];
"$mainMod, W, exec, ${lib.getExe wallpaper_changer}"
bindc = [
", XF86AudioPrev, exec, ${lib.getExe pkgs.playerctl} position 5-"
", XF86AudioNext, exec, ${lib.getExe pkgs.playerctl} position 5+"
];
bindo = [
", XF86AudioPrev, exec, ${lib.getExe pkgs.playerctl} previous"
", XF86AudioNext, exec, ${lib.getExe pkgs.playerctl} next"
];
# Move/resize windows with mainMod + LMB/RMB and dragging
@@ -233,4 +228,27 @@
];
};
};
xdg.portal = {
enable = true;
extraPortals = [
pkgs.xdg-desktop-portal-gtk
pkgs.xdg-desktop-portal-termfilechooser
];
config = {
common = {
default = [ "hyprland" "gtk" ];
"org.freedesktop.impl.portal.FileChooser" = [ "termfilechooser" "gtk" ];
"org.freedesktop.impl.portal.Settings" = [ "gtk" ];
};
hyprland = {
default = [ "hyprland" "gtk" ];
"org.freedesktop.impl.portal.FileChooser" = [ "termfilechooser" "gtk" ];
"org.freedesktop.impl.portal.Settings" = [ "gtk" ];
};
};
};
}
+21
View File
@@ -0,0 +1,21 @@
{
wayland.windowManager.hyprland.settings = {
bind = [
# "$mainMod, mouse_down, exec, hyprctl -q keyword cursor:zoom_factor $(hyprctl getoption cursor:zoom_factor -j | jq '.float * 1.1')"
# "$mainMod, mouse_up , exec, hyprctl -q keyword cursor:zoom_factor $(hyprctl getoption cursor:zoom_factor -j | jq '(.float * 0.9) | if . < 1 then 1 else . end')"
"$mainMod SHIFT, mouse_up , exec, hyprctl -q keyword cursor:zoom_factor 1"
"$mainMod SHIFT, mouse_down , exec, hyprctl -q keyword cursor:zoom_factor 1"
"$mainMod SHIFT, minus , exec, hyprctl -q keyword cursor:zoom_factor 1"
"$mainMod SHIFT, KP_SUBTRACT, exec, hyprctl -q keyword cursor:zoom_factor 1"
"$mainMod SHIFT, 0 , exec, hyprctl -q keyword cursor:zoom_factor 1"
];
binde = [
"$mainMod, equal , exec, hyprctl -q keyword cursor:zoom_factor $(hyprctl getoption cursor:zoom_factor -j | jq '.float * 1.1')"
"$mainMod, minus , exec, hyprctl -q keyword cursor:zoom_factor $(hyprctl getoption cursor:zoom_factor -j | jq '(.float * 0.9) | if . < 1 then 1 else . end')"
"$mainMod, KP_ADD , exec, hyprctl -q keyword cursor:zoom_factor $(hyprctl getoption cursor:zoom_factor -j | jq '.float * 1.1')"
"$mainMod, KP_SUBTRACT, exec, hyprctl -q keyword cursor:zoom_factor $(hyprctl getoption cursor:zoom_factor -j | jq '(.float * 0.9) | if . < 1 then 1 else . end')"
];
};
}
+12 -20
View File
@@ -1,21 +1,13 @@
{ config, pkgs, ... }:
let
colors = config.lib.stylix.colors;
in {
home.packages = [ pkgs.mako ];
xdg.configFile."mako/config".text = ''
background-color=#${colors.base00}
text-color=#${colors.base05}
border-color=#${colors.base0B}
border-radius=10
margin=16
progress-color=over #${colors.base0A}
default-timeout=5000
{ config, lib, ... }: let
colors = config.lib.stylix.colors.withHashtag;
accent = colors.${config.stylix.accent};
in {
services.mako = {
enable = true;
[urgency=high]
border-color=#${colors.base09}
[urgency=low]
border-color=#${colors.base04}
'';
}
settings = {
border-color = lib.mkForce accent;
default-timeout = 5000;
};
};
}
+4 -4
View File
@@ -1,11 +1,11 @@
{ config, pkgs, ... }: let
icon = pkgs.fetchurl {
url = "https://preview.redd.it/a2nga4jvjy291.png?width=640&crop=smart&auto=webp&s=7d1458b41101c960bc13c28a6b92c5a6ddc20210";
name = "nixos-chan.png";
sha256 = "sha256-9pleL+PiiylT8/aWw0iGve1iY3h0XohSQ7MVILzabHY=";
url = "https://cloud.lair.moe/pub/nixos-chan.webp?raw";
name = "nixos-chan.webp";
sha256 = "sha256-0majB9ljjMdZwvOijEgWdFKxWLje5tHgXHBJUWZfHfY=";
};
in {
home.packages = [ pkgs.neofetch ];
home.packages = [ pkgs.fastfetch ];
xdg.configFile."neofetch/config.conf".text = ''
print_info() {
info title
+5 -3
View File
@@ -1,8 +1,10 @@
{ pkgs-fixed, lib, host, ... }:
{ pkgs-pinned, lib, osConfig, ... }:
lib.mkIf (!host.laptop) {
home.packages = with pkgs-fixed; [
lib.mkIf (!osConfig.host.laptop) {
home.packages = with pkgs-pinned; [
(blender.override { cudaSupport = true; })
aseprite
krita
gimp
];
}
-8
View File
@@ -1,8 +0,0 @@
{ pkgs-fixed, ... }: {
home.packages = with pkgs-fixed; [
vscode
jetbrains.pycharm-community
jetbrains.idea-community
android-studio
];
}
+7
View File
@@ -0,0 +1,7 @@
{ pkgs, ... }: {
home.packages = with pkgs; [
burpsuite
binwalk
exiftool
];
}
+6 -5
View File
@@ -1,13 +1,14 @@
{ pkgs, inputs, pkgs-fixed, ... }: {
{ pkgs, pkgs-stable, ... }: {
home.packages = with pkgs; [
google-chrome
inputs.ayugram-desktop.packages.${pkgs.system}.ayugram-desktop
# pkgs-stable.vesktop
ayugram-desktop
vesktop
obs-studio
mpv
imhex
obsidian
pkgs-fixed.thunderbird
pkgs-stable.qbittorrent
thunderbird
libreoffice
pear-desktop
];
}
+3 -3
View File
@@ -1,4 +1,4 @@
{ stdenv, lib, config, colors, ... }:
{ stdenv, colors, accent ? colors.base0B, ... }:
stdenv.mkDerivation {
name = "AGS theme";
@@ -9,9 +9,9 @@
echo \$bg: \#${colors.base00}\; > colors.scss
echo \$surface0: \#${colors.base02}\; >> colors.scss
echo \$fg: \#${colors.base05}\; >> colors.scss
echo \$accent: \#${colors.base0B}\; >> colors.scss
echo \$accent: \#${accent}\; >> colors.scss
echo \#${colors.base0B} > accent.css
echo \#${accent} > accent.css
'';
installPhase = ''
+4 -1
View File
@@ -33,7 +33,10 @@ window.Bar {
}
.Workspaces {
padding: 0;
button {
margin: 0;
&:hover label {
background: $surface0;
color: $accent;
@@ -48,7 +51,7 @@ window.Bar {
label {
transition: 200ms;
padding: 0 6px;
margin: 2px;
margin: 0px;
border-radius: $radius;
border: 1pt solid transparent;
}
+32
View File
@@ -0,0 +1,32 @@
{ pkgs, ... }: {
home.packages = with pkgs; [
texstudio
(texlive.combine {
inherit (texlive)
babel-russian
cm-super
cyrillic
hyphen-russian
hyphenat
titlesec
caption
float
xcolor
listings
pagecolor
moresize
raleway
fontawesome5
luatexbase
fontspec
ragged2e
enumitem
extsizes
multirow
varwidth
paracol
anyfontsize
scheme-basic;
})
];
}
+26 -1
View File
@@ -1,4 +1,4 @@
{ pkgs, inputs, ... }: {
{ pkgs, ... }: {
home.packages = with pkgs; [
scrot
ffmpeg
@@ -20,5 +20,30 @@
dig
mtr
imagemagick
wl-clipboard
];
xdg.mimeApps = {
enable = true;
defaultApplications = {
"image/bmp" = "imv.desktop";
"image/gif" = "imv.desktop";
"image/jpeg" = "imv.desktop";
"image/jpg" = "imv.desktop";
"image/pjpeg" = "imv.desktop";
"image/png" = "imv.desktop";
"image/tiff" = "imv.desktop";
"image/x-bmp" = "imv.desktop";
"image/x-pcx" = "imv.desktop";
"image/x-png" = "imv.desktop";
"image/x-portable-anymap" = "imv.desktop";
"image/x-portable-bitmap" = "imv.desktop";
"image/x-portable-graymap" = "imv.desktop";
"image/x-portable-pixmap" = "imv.desktop";
"image/x-tga" = "imv.desktop";
"image/x-xbitmap" = "imv.desktop";
"image/heif" = "imv.desktop";
"image/avif" = "imv.desktop";
};
};
}
+11 -1
View File
@@ -1,4 +1,14 @@
{
{ lib, ... }: {
# Keep qtct/Kvantum for styling, but tell qtct to delegate standard file
# dialogs to xdg-desktop-portal. This is what makes AyuGram/Telegram-like Qt
# apps use the Yazi picker instead of Qt's built-in dialog.
stylix.targets.qt.standardDialogs = "xdgdesktopportal";
home.sessionVariables = {
QT_QPA_PLATFORMTHEME = lib.mkForce "xdgdesktopportal";
TDESKTOP_USE_GTK_FILE_DIALOG = "1";
};
qt = {
enable = true;
platformTheme.name = "qtct";
+182
View File
@@ -0,0 +1,182 @@
{ pkgs, config, ... }: let
c = config.lib.stylix.colors.withHashtag;
font = config.stylix.fonts.sansSerif.name;
in {
programs.quickshell = {
enable = true;
activeConfig = "control-center";
configs = {
control-center = pkgs.writeTextDir "shell.qml" ''
import Quickshell
import Quickshell.Wayland
import Quickshell.Hyprland
import QtQuick
import QtQuick.Layouts
PanelWindow {
id: root
anchors {
top: true
right: true
}
implicitWidth: 360
implicitHeight: wrapper.implicitHeight
color: "transparent"
margins {
top: -12
right: 0
}
exclusionMode: ExclusionMode.Normal
exclusiveZone: 0
WlrLayershell.namespace: "qs-control-center"
WlrLayershell.layer: WlrLayer.Overlay
WlrLayershell.keyboardFocus: WlrKeyboardFocus.OnDemand
Item {
id: wrapper
anchors.fill: parent
readonly property int outerMargin: 12
readonly property int innerMargin: 18
readonly property int buttonHeight: 48
readonly property int spacingSize: 14
implicitWidth: 360
implicitHeight: panel.implicitHeight + outerMargin * 2
Rectangle {
id: panel
x: wrapper.outerMargin
y: wrapper.outerMargin
width: parent.width - wrapper.outerMargin * 2
height: implicitHeight
implicitHeight: content.implicitHeight + wrapper.innerMargin * 2
radius: 20
color: "${c.base00}"
border.color: "${c.base03}"
border.width: 1
ColumnLayout {
id: content
x: wrapper.innerMargin
y: wrapper.innerMargin
width: parent.width - wrapper.innerMargin * 2
spacing: wrapper.spacingSize
Text {
text: "Control Center"
color: "${c.base05}"
font.family: "${font}"
font.pixelSize: 22
font.bold: true
}
Rectangle {
Layout.fillWidth: true
height: wrapper.buttonHeight
radius: 12
color: audioMouse.containsMouse ? "${c.base02}" : "${c.base01}"
border.color: "${c.base03}"
border.width: 1
Text {
anchors.centerIn: parent
text: "Audio settings"
color: "${c.base05}"
font.family: "${font}"
font.pixelSize: 15
}
MouseArea {
id: audioMouse
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: Hyprland.dispatch("exec pavucontrol")
}
}
Rectangle {
Layout.fillWidth: true
height: wrapper.buttonHeight
radius: 12
color: networkMouse.containsMouse ? "${c.base02}" : "${c.base01}"
border.color: "${c.base03}"
border.width: 1
Text {
anchors.centerIn: parent
text: "Network settings"
color: "${c.base05}"
font.family: "${font}"
font.pixelSize: 15
}
MouseArea {
id: networkMouse
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: Hyprland.dispatch("exec nm-connection-editor")
}
}
Rectangle {
Layout.fillWidth: true
height: wrapper.buttonHeight
radius: 12
color: bluetoothMouse.containsMouse ? "${c.base02}" : "${c.base01}"
border.color: "${c.base03}"
border.width: 1
Text {
anchors.centerIn: parent
text: "Bluetooth"
color: "${c.base05}"
font.family: "${font}"
font.pixelSize: 15
}
MouseArea {
id: bluetoothMouse
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: Hyprland.dispatch("exec blueman-manager")
}
}
Rectangle {
Layout.fillWidth: true
height: 1
color: "${c.base03}"
}
Text {
text: "Quickshell + Hyprland"
color: "${c.base04}"
font.family: "${font}"
font.pixelSize: 13
}
}
}
}
}
'';
};
};
}
+12
View File
@@ -0,0 +1,12 @@
{
programs.ssh = {
enable = true;
enableDefaultConfig = false;
settings = {
"*" = {
serverAliveInterval = 30;
serverAliveCountMax = 5;
};
};
};
}
+40
View File
@@ -0,0 +1,40 @@
{ config, lib, ... }: let
inherit (lib) mkOption types;
base16Names = [
"base00"
"base01"
"base02"
"base03"
"base04"
"base05"
"base06"
"base07"
"base08"
"base09"
"base0A"
"base0B"
"base0C"
"base0D"
"base0E"
"base0F"
];
in {
options.stylix.accent = mkOption {
type = types.enum base16Names;
default = "base0B";
description = ''
Base16 colour used as the user accent.
Use it as:
config.lib.stylix.colors.${config.stylix.accent}
config.lib.stylix.colors.withHashtag.${config.stylix.accent}
This module deliberately does not extend config.lib.stylix.colors: Stylix
exports that value as a generated base16 attrset/functor, and replacing or
partially extending it can break Stylix targets which expect metadata such
as `scheme` to be present.
'';
};
}
+14
View File
@@ -0,0 +1,14 @@
{
services = {
walker = {
enable = true;
systemd.enable = true;
};
elephant.enable = true;
};
wayland.windowManager.hyprland.settings.bind = [
"$mainMod, D, exec, walker"
];
}
+68
View File
@@ -0,0 +1,68 @@
{ config, pkgs, lib, ... }: let
c = config.lib.stylix.colors;
wobSocket = ''"''${XDG_RUNTIME_DIR:-/run/user/$(id -u)}/wob.sock"'';
volumeStep = pkgs.writeShellScriptBin "volume-step" /*bash*/ ''
volume="$(${lib.getExe' pkgs.wireplumber "wpctl"} get-volume @DEFAULT_AUDIO_SINK@)"
percent="$(printf '%s\n' "$volume" | ${pkgs.gawk}/bin/awk '{print int($2 * 100)}')"
if printf '%s\n' "$volume" | ${pkgs.gnugrep}/bin/grep -q MUTED; then
printf '%s muted\n' "$percent" > ${wobSocket}
else
printf '%s volume\n' "$percent" > ${wobSocket}
fi
'';
brightnessStep = pkgs.writeShellScriptBin "brightness-step" /*bash*/ ''
percent="$(${lib.getExe pkgs.brightnessctl} -m | ${lib.getExe' pkgs.coreutils "cut"} -d, -f4 | ${lib.getExe' pkgs.coreutils "tr"} -d '%')"
printf '%s brightness\n' "$percent" > ${wobSocket}
'';
in {
systemd.user = {
services.wob.Install.WantedBy = lib.mkForce [ ];
sockets.wob.Install.WantedBy = lib.mkForce [ "sockets.target" ];
};
services.wob = {
enable = true;
systemd = true;
settings = {
"" = {
timeout = 2000;
max = 100;
width = 280;
height = 32;
border_offset = 0;
border_size = 2;
bar_padding = 4;
anchor = "top center";
margin = "0 0 0 0";
overflow_mode = "nowrap";
orientation = "horizontal";
};
"style.volume" = { bar_color = c.base0D; };
"style.brightness" = { bar_color = c.base0A; };
"style.muted" = { bar_color = c.base04; };
};
};
wayland.windowManager.hyprland.settings = {
bindel = [
", XF86AudioRaiseVolume, exec, ${lib.getExe volumeStep} up"
", XF86AudioLowerVolume, exec, ${lib.getExe volumeStep} down"
", XF86MonBrightnessUp, exec, ${lib.getExe brightnessStep} up"
", XF86MonBrightnessDown, exec, ${lib.getExe brightnessStep} down"
];
bind = [
", XF86AudioMute, exec, ${lib.getExe volumeStep} mute"
];
};
}
-7
View File
@@ -1,7 +0,0 @@
{ pkgs, ... }: {
xdg.configFile."wofi/style.css".source = pkgs.fetchurl {
name = "style.css";
url = "https://github.com/joao-vitor-sr/wofi-themes-collection/raw/main/themes/nord.css";
sha256 = "sha256-rMDtE7Q0hmqd9LD+Ur/QR6cMan9ev6e9IyzpwY367c0=";
};
}
+313 -60
View File
@@ -1,66 +1,319 @@
{ pkgs, lib, ... }: let
yazi-plugins = pkgs.fetchFromGitHub {
owner = "yazi-rs";
repo = "plugins";
rev = "273019910c1111a388dd20e057606016f4bd0d17";
hash = "sha256-80mR86UWgD11XuzpVNn56fmGRkvj0af2cFaZkU8M31I=";
};
starship = pkgs.fetchFromGitHub {
owner = "Rolv-Apneseth";
repo = "starship.yazi";
rev = "6c639b474aabb17f5fecce18a4c97bf90b016512";
sha256 = "sha256-bhLUziCDnF4QDCyysRn7Az35RAy8ibZIVUzoPgyEO1A=";
};
{ pkgs, lib, inputs, ... }: let
hostSystem = pkgs.stdenv.hostPlatform.system;
yaziPkg = inputs.yazi.packages.${hostSystem}.default.override {
_7zz = pkgs._7zz-rar;
};
yaziOpen = pkgs.writeShellScriptBin "yazi-open" ''
set -efu
target="''${1:-$HOME}"
case "$target" in
file://*)
target="$(${lib.getExe pkgs.python3} -c 'import sys, urllib.parse; print(urllib.parse.unquote(urllib.parse.urlparse(sys.argv[1]).path))' "$target")"
;;
esac
if [ -f "$target" ]; then
target="$(dirname "$target")"
fi
if [ ! -e "$target" ]; then
target="$HOME"
fi
exec ${lib.getExe pkgs.ghostty} --title="Yazi" -e ${lib.getExe yaziPkg} "$target"
'';
yaziFileChooser = pkgs.writeShellScriptBin "yazi-file-chooser" ''
set -efu
directory="''${2:-0}"
save="''${3:-0}"
path="''${4:-}"
out="''${5:?missing termfilechooser output path}"
state_dir="''${XDG_STATE_HOME:-$HOME/.local/state}/xdg-desktop-portal-termfilechooser"
last_selected_path="$state_dir/last-selected"
${lib.getExe' pkgs.coreutils "mkdir"} -p "$state_dir"
if [ -s "$last_selected_path" ]; then
IFS= read -r last_selected < "$last_selected_path" || true
if [ -d "$last_selected" ]; then
if [ "$save" = "1" ] && [ -n "$path" ]; then
path="$last_selected/''${path##*/}"
else
path="$last_selected"
fi
fi
fi
if [ -z "$path" ]; then
path="$HOME"
fi
created_placeholder=0
if [ "$save" = "1" ] && [ ! -e "$path" ]; then
placeholder_dir="''${path%/*}"
if [ "$placeholder_dir" != "$path" ]; then
${lib.getExe' pkgs.coreutils "mkdir"} -p "$placeholder_dir"
fi
{
printf '%s\n' 'This file was created by xdg-desktop-portal-termfilechooser.'
printf '%s\n' 'Move/rename it in Yazi, then open/select it to choose the save path.'
} > "$path"
created_placeholder=1
fi
${lib.getExe pkgs.ghostty} --title="Yazi File Picker" -e ${lib.getExe yaziPkg} --chooser-file="$out" --cwd-file="$last_selected_path" "$path"
if [ "$directory" = "1" ] && [ ! -s "$out" ] && [ -s "$last_selected_path" ]; then
IFS= read -r cwd < "$last_selected_path" || true
if [ -n "''${cwd:-}" ] && [ -d "$cwd" ]; then
printf '%s\n' "$cwd" > "$out"
fi
fi
if [ "$created_placeholder" = "1" ] && [ ! -s "$out" ]; then
${lib.getExe' pkgs.coreutils "rm"} -f "$path"
fi
'';
fileManager1 = pkgs.writeShellScriptBin "yazi-filemanager1" ''
exec ${pkgs.python3.withPackages (ps: [ ps.dbus-next ])}/bin/python ${pkgs.writeText "yazi-filemanager1.py" ''
import asyncio
import os
import subprocess
import urllib.parse
from dbus_next.aio import MessageBus
from dbus_next.constants import BusType
from dbus_next.service import ServiceInterface, method
YAZI_OPEN = ${builtins.toJSON (lib.getExe yaziOpen)}
def uri_to_path(uri: str) -> str | None:
parsed = urllib.parse.urlparse(uri)
if parsed.scheme != "file":
return None
return urllib.parse.unquote(parsed.path)
def open_paths(uris: list[str], reveal_items: bool = False) -> None:
for uri in uris:
path = uri_to_path(uri)
if not path:
continue
if reveal_items and os.path.isfile(path):
path = os.path.dirname(path)
subprocess.Popen(
[YAZI_OPEN, path],
start_new_session=True,
stdout=subprocess.DEVNULL,
stderr=subprocess.DEVNULL,
)
class FileManager1(ServiceInterface):
def __init__(self) -> None:
super().__init__("org.freedesktop.FileManager1")
@method()
def ShowFolders(self, uris: "as", startup_id: "s") -> "":
open_paths(uris)
@method()
def ShowItems(self, uris: "as", startup_id: "s") -> "":
open_paths(uris, reveal_items=True)
@method()
def ShowItemProperties(self, uris: "as", startup_id: "s") -> "":
open_paths(uris, reveal_items=True)
async def main() -> None:
bus = await MessageBus(bus_type=BusType.SESSION).connect()
bus.export("/org/freedesktop/FileManager1", FileManager1())
await bus.request_name("org.freedesktop.FileManager1")
await asyncio.Event().wait()
asyncio.run(main())
''}
'';
in {
programs.yazi = {
enable = true;
enableZshIntegration = true;
shellWrapperName = "y";
home.packages = with pkgs; [
( ouch.override { enableUnfree = true; } )
yaziOpen
];
settings = {
manager = {
show_hidden = true;
};
preview = {
max_width = 1000;
max_height = 1000;
};
};
home.sessionVariables = {
GTK_USE_PORTAL = "1";
};
plugins = {
chmod = "${yazi-plugins}/chmod.yazi";
full-border = "${yazi-plugins}/full-border.yazi";
max-preview = "${yazi-plugins}/max-preview.yazi";
starship = starship;
};
xdg.configFile."xdg-desktop-portal-termfilechooser/config".text = ''
[filechooser]
cmd=${lib.getExe yaziFileChooser}
default_dir=$HOME
open_mode=suggested
save_mode=last
'';
initLua = ''
require("full-border"):setup()
require("starship"):setup()
'';
xdg.desktopEntries.yazi = {
name = "Yazi";
genericName = "File Manager";
exec = "${lib.getExe yaziOpen} %U";
terminal = false;
mimeType = [ "inode/directory" ];
categories = [ "System" "FileTools" "FileManager" ];
startupNotify = false;
};
keymap = {
manager.prepend_keymap = [
{
on = "T";
run = "plugin --sync max-preview";
desc = "Maximize or restore the preview pane";
}
{
on = ["c" "m"];
run = "plugin chmod";
desc = "Chmod on selected files";
}
{
on = [ "<C-n>" ];
run = ''shell '${lib.getExe pkgs.xdragon} -x -i -T "$@"' --confirm'';
}
{
on = [ "g" "<S-d>" ];
run = ''cd /mnt/D'';
desc = "Goto D drive";
}
];
};
};
xdg.mimeApps = {
enable = true;
defaultApplications = {
"inode/directory" = "yazi.desktop";
"application/x-gnome-saved-search" = "yazi.desktop";
};
};
xdg.dataFile."dbus-1/services/org.freedesktop.FileManager1.service".text = ''
[D-BUS Service]
Name=org.freedesktop.FileManager1
Exec=${lib.getExe fileManager1}
'';
wayland.windowManager.hyprland.settings.windowrule = [
"match:class dragon-drop, move cursor_x-window_w/2 cursor_y-window_h/2"
"match:title Yazi File Picker, float 1"
"match:title Yazi File Picker, size 1200 800"
];
programs.yazi = {
package = yaziPkg;
enable = true;
enableZshIntegration = true;
shellWrapperName = "y";
settings = {
mgr = {
show_hidden = true;
};
preview = {
max_width = 1000;
max_height = 1000;
};
plugin = {
preloaders = [
{ url = "*.crdownload"; run = "noop"; }
];
prepend_previewers = [
{ mime = "application/xz"; run = "ouch"; }
{ mime = "application/zip"; run = "ouch"; }
{ mime = "application/rar"; run = "ouch"; }
{ mime = "application/gzip"; run = "ouch"; }
{ mime = "application/7z-compressed"; run = "ouch"; }
];
prepend_fetchers = [
{ group = "git"; url = "*"; run = "git"; }
];
};
};
plugins = let
yaziPlugin = name: pkgs.stdenvNoCC.mkDerivation {
pname = "${name}.yazi";
version = "unstable";
src = inputs.yazi-plugins;
installPhase = ''
runHook preInstall
mkdir -p $out
cp -r ${name}.yazi/* $out/
rm -f $out/LICENSE
cp LICENSE $out/LICENSE
runHook postInstall
'';
};
in with pkgs.yaziPlugins; {
inherit
chmod
ouch
mount
toggle-pane
;
full-border = {
package = yaziPlugin "full-border";
setup = true;
};
starship = {
package = starship;
setup = true;
};
git = {
package = git;
setup = true;
};
};
initLua = ''
Status:children_add(function()
local h = cx.active.current.hovered
if not h or ya.target_family() ~= "unix" then
return ""
end
return ui.Line {
ui.Span(ya.user_name(h.cha.uid) or tostring(h.cha.uid)):fg("magenta"),
":",
ui.Span(ya.group_name(h.cha.gid) or tostring(h.cha.gid)):fg("magenta"),
" ",
}
end, 500, Status.RIGHT)
'';
keymap = {
mgr.prepend_keymap = [
{
on = "T";
run = "plugin toggle-pane max-preview";
desc = "Maximize or restore the preview pane";
}
{
on = "Y";
run = ''shell -- for path in %s; do echo "file://$path"; done | wl-copy -t text/uri-list'';
desc = "Copy files into system clipboard";
}
{
on = ["c" "m"];
run = "plugin chmod";
desc = "Chmod on selected files";
}
{
on = ["M"];
run = "plugin mount";
desc = "Open mount menu";
}
{
on = [ "<C-n>" ];
run = "shell '${lib.getExe pkgs.dragon-drop} -x -A -i -T %s'";
}
{
on = [ "g" "<S-d>" ];
run = ''cd /mnt/D'';
desc = "Goto D drive";
}
];
};
};
}
+20 -20
View File
@@ -1,5 +1,6 @@
{ config, pkgs, ... }: {
{ config, osConfig, pkgs, lib, ... }: {
home.packages = [ pkgs.nh ];
programs = {
zoxide.enable = true;
fzf.enable = true;
@@ -36,7 +37,10 @@
read_only = " RO";
};
nix_shell.format = "[nix-shell]($style) ";
os.disabled = false;
os = {
disabled = false;
style = "white";
};
python = {
symbol = "py ";
python_binary = ["python3" "python"];
@@ -51,31 +55,23 @@
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
shellAliases =
let
flakeDir = "~/nix";
in {
shellAliases = let
flakeDir = "~/nix";
in {
rb = "nh os switch ${flakeDir}";
trb = "nh os test ${flakeDir}";
upd = "nix flake update --flake ${flakeDir}";
upg = "sudo nixos-rebuild switch --upgrade --flake ${flakeDir}";
hms = "nh home switch ${flakeDir}";
rhms = ''${pkgs.bash} $(home-manager generations | fzf | awk -F '-> ' '{print $2 "/activate"}')''; #https://github.com/nix-community/home-manager/issues/1114#issuecomment-2067785129
conf = "$EDITOR ${flakeDir}/nixos/hosts/$(hostname)/configuration.nix";
pkgs = "$EDITOR ${flakeDir}/nixos/packages.nix";
ll = "ls -l";
se = "sudoedit";
ff = "fastfetch";
cat = "${pkgs.lib.getExe pkgs.bat}";
cd = "z";
lg = "lazygit";
s = "nix-shell . --run zsh";
} // lib.optionalAttrs osConfig.boot.loader.grub.useOSProber {
win = "sudo grub-reboot 2; sudo reboot";
};
initExtra = ''
initContent = /*bash*/ ''
eval "$(zoxide init zsh)"
eval "$(nh completions --shell zsh)"
source "$(fzf-share)/key-bindings.zsh"
source "$(fzf-share)/completion.zsh"
'';
@@ -84,8 +80,12 @@
TERM=xterm-256color
'';
history.size = 10000;
history.path = "${config.xdg.dataHome}/zsh/history";
history = {
size = 10000;
path = "${config.xdg.dataHome}/zsh/history";
expireDuplicatesFirst = true;
ignoreDups = true;
};
oh-my-zsh.enable = true;
};
+4
View File
@@ -0,0 +1,4 @@
My gf
- **Theme:** eris
- **Cursor:** [Miku](https://ko-fi.com/s/dcea0e990f)
+17 -6
View File
@@ -1,11 +1,22 @@
{ pkgs, pkgs-fixed, host, ... }: {
disabledModules = [ ../../modules/user/packages/coding.nix ];
{ pkgs, pkgs-pinned, host, ... }: {
imports = [
../../modules/user/packages/cs_utils.nix
];
disabledModules = [
../../modules/user/packages/art.nix
];
home.packages = with pkgs; [
nautilus
burpsuite
binwalk
exiftool
python3
pkgs-fixed.jetbrains.pycharm-community
pkgs-pinned.jetbrains.pycharm-community
aseprite
krita
google-chrome
];
xdg.mimeApps = {
enable = true;
defaultApplications."application/pdf" = "google-chrome.desktop";
};
}
+4 -2
View File
@@ -1,7 +1,9 @@
{
programs.git = {
enable = true;
userName = "chest";
userEmail = "e.a.sunduk@gmail.com";
settings.user = {
name = "chest";
email = "e.a.sunduk@gmail.com";
};
};
}
+2 -25
View File
@@ -1,26 +1,14 @@
{ pkgs, lib, config, inputs, ... }: {
imports = [(
import ../../../modules/user/patterns/hyprland.nix {
inherit lib;
inherit pkgs;
inherit config;
inherit inputs;
collection = "cheeeest/1767552";
swww_flags = "";
}
)];
wayland.windowManager.hyprland = let
colors = config.lib.stylix.colors;
accent = colors.${config.stylix.accent};
in {
settings = {
monitor = ",preferred,auto,1";
exec-once =["${lib.getExe pkgs.linux-wallpaperengine} ~/.local/share/wpe/wallpaper --assets-dir ~/.local/share/wpe/assets --screen-root DP-1 --noautomute"];
general = {
gaps_in = 5;
gaps_out = 5;
border_size = 2;
"col.active_border" = "rgba(${colors.base0C}ee) rgba(${colors.base0B}ee) 45deg";
"col.active_border" = "rgba(${accent}ee) rgba(${colors.base0C}ee) 45deg";
"col.inactive_border" = "rgba(${colors.base05}aa)";
layout = "dwindle";
@@ -60,26 +48,15 @@
};
dwindle = {
pseudotile = true;
smart_split = true;
};
master.new_status = "master";
gestures = {
workspace_swipe = true;
workspace_swipe_fingers = 3;
workspace_swipe_invert = true;
workspace_swipe_distance = 200;
workspace_swipe_forever = true;
};
misc = {
animate_manual_resizes = true;
animate_mouse_windowdragging = true;
enable_swallow = true;
render_ahead_of_time = false;
disable_hyprland_logo = false;
};
bind = [
+100 -9
View File
@@ -1,6 +1,87 @@
{ pkgs, config, lib, host, ... }: {
{ pkgs, config, lib, ... }: let
miku-cursor = pkgs.stdenv.mkDerivation {
name = "Miku cursor";
# Hatsune Miku Cursor
# Author: NOiiRE ❖
# https://ko-fi.com/s/dcea0e990f
src = pkgs.fetchzip {
name = "MikuCursor.zip";
url = "https://ko-fi.com/api/file-upload/cf0bb0a7-feb8-4090-8e2e-68fd33b7b040/download?transactionId=684d8995-2014-4f9f-bb77-39e4dae3bad7";
curlOpts = "-A HTTPie/3.2.4";
extension = "zip";
hash = "sha256-aWnq1SckuRBVmX1T+htbideBbYUGvAqDyRB1v3cbpyA=";
};
nativeBuildInputs = [ pkgs.win2xcur ];
patchPhase = ''
pwd
echo $src
mkdir Miku/cursors -p
win2xcur $src/*.ani -o Miku/cursors
cd Miku/
echo "[Icon theme]" > index.theme
echo "Name=Miku Cursor" >> index.theme
cd cursors/
mv 'Miku normal' default
ln -s default left_ptr
ln -s default arrow
mv 'Miku link' pointer
ln -s pointer hand2
mv 'Miku busy' wait
ln -s wait progress
mv 'Miku help' help
ln -s help question_arrow
mv 'Miku text' text
ln -s text xterm
mv 'Miku hand' pencil
mv 'Miku precision' cross
ln -s cross crosshair
ln -s cross tcross
mv 'Miku unavailable' not-allowed
# mv 'Miku location' ?
# mv 'Miku person' ?
mv 'Miku vert' ns-resize
ln -s ns-resize n-resize
ln -s ns-resize s-resize
ln -s ns-resize v_double_arrow
ln -s ns-resize sb_v_double_arrow
mv 'Miku horz' ew-resize
ln -s ew-resize e-resize
ln -s ew-resize w-resize
ln -s ew-resize h_double_arrow
ln -s ew-resize sb_h_double_arrow
ln -s ew-resize left_side
ln -s ew-resize right_side
mv 'Miku dgn1' nw-resize
ln -s nw-resize top_left_corner
ln -s nw-resize bottom_right_corner
mv 'Miku dgn2' ne-resize
ln -s ne-resize top_right_corner
ln -s ne-resize bottom_left_corner
mv 'Miku move' move
ln -s move nesw-resize
ln -s move grab
ln -s move grabbing
ln -s move fleur
# mv 'Miku alt' ?
cd ../..
'';
installPhase = ''
mkdir $out/share/icons -p
cp Miku $out/share/icons -r
'';
};
in {
stylix = {
enable = true;
overlays.enable = false;
targets = {
hyprland.enable = false;
waybar.enable = false;
@@ -8,6 +89,7 @@
};
base16Scheme = "${pkgs.base16-schemes}/share/themes/eris.yaml";
accent = "base0E";
polarity = "dark";
image = pkgs.fetchurl {
@@ -15,20 +97,16 @@
sha256 = "0ypqnq7bsr2giq7nq1c3xrw2m0gkii9j5zhfp512r93wc96zvm50";
};
iconTheme = {
icons = {
enable = true;
package = pkgs.pop-icon-theme;
dark = "Pop-Dark";
};
cursor = if host.name == "Impreza" then {
name = "catppuccin-mocha-pink-cursors";
cursor = {
name = "Miku";
size = 16;
package = pkgs.catppuccin-cursors.mochaPink;
} else {
name = "catppuccin-mocha-peach-cursors";
size = 16;
package = pkgs.catppuccin-cursors.mochaPeach;
package = miku-cursor;
};
fonts = {
@@ -53,4 +131,17 @@
terminal = .5;
};
};
dconf.settings = {
"org/gnome/desktop/interface".color-scheme = "prefer-dark";
};
gtk = {
gtk4.extraConfig = {
gtk-application-prefer-dark-theme = true;
};
gtk3.extraConfig = {
gtk-application-prefer-dark-theme = true;
};
};
}
+321
View File
@@ -0,0 +1,321 @@
{ osConfig, config, pkgs, lib, ... }: {
home.packages = with pkgs; [
font-awesome
nerd-fonts.symbols-only
playerctl
cava
pulsemixer
];
programs.waybar = {
enable = true;
systemd.enable = true;
settings.mainBar = {
modules-center = [
"group/left"
"group/center"
"group/right"
];
"group/left" = {
orientation = "inherit";
modules = [
"hyprland/workspaces"
"custom/sep-left"
"hyprland/language"
"keyboard-state"
];
};
"group/center" = {
orientation = "inherit";
modules = [
"cava"
"mpris"
];
};
"group/right" = {
orientation = "inherit";
modules = [
"tray"
"custom/sep-left"
"group/system"
"custom/sep-left"
"pulseaudio"
"custom/sep-left"
"battery"
"clock"
];
};
cava = {
bars = 9;
bar_delimiter = 0;
stereo = false;
input_delay = 0;
format-icons = [" " "" "" "" "" "" "" "" ""];
};
clock = {
tooltip = false;
interval = 5;
format = "{:L%d %b - %H:%M %a}";
};
pulseaudio = {
format = "{icon} {volume}%";
format-icons = {
headphone = "";
hands-free = "";
headset = "";
phone = "";
phone-muted = "";
portable = "";
car = "";
default = ["" ""];
};
on-click = "ghostty --title=pulsemixer -e pulsemixer";
};
mpris = {
format = "{dynamic}";
dynamic-len = if osConfig.host.laptop then 16 else 32;
dynamic-order = [ "title" "artist" "album" ];
};
battery = {
interval = 5;
states = {
warning = 30;
critical = 15;
};
format = "{icon} {capacity}% | ";
format-icons = {
default = ["󰂎" "󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹"];
charging = ["󰢟" "󰢜" "󰂆" "󰂇" "󰂈" "󰢝" "󰂉" "󰢞" "󰂊" "󰂋" "󰂅"];
};
};
"custom/sep-left" = {
format = " | ";
tooltip = false;
};
"keyboard-state" = {
capslock = true;
format = "{icon}";
format-icons = {
locked = "CAPS";
unlocked = "";
};
};
"hyprland/language" = {
format-en = "en";
format-ru = "ru";
};
"group/system" = {
orientation = "inherit";
drawer = {
transition-duration = 500;
transition-left-to-right = false;
};
modules = [
"network"
"custom/mem"
"cpu"
"temperature"
];
};
network = {
format = "{ifname}";
format-wifi = " {essid} ({signalStrength}%)";
format-ethernet = "{ifname}";
format-disconnected = "";
tooltip-format = "{ipaddr}";
max-length = 50;
on-click = "ghostty --title=nmtui -e nmtui";
};
"custom/weather" = {
format = "{}";
tooltip = true;
interval = 1800;
exec = "python3 $HOME/.config/waybar/scripts/wttr.py";
return-type = "json";
};
"custom/mem" = {
format = "{} ";
interval = 3;
exec = "free -h | awk '/Mem:/{printf $3}'";
tooltip = false;
};
cpu = {
interval = 2;
format = "{usage}% ";
min-length = 6;
};
temperature = {
hwmon-path = "/sys/class/hwmon/hwmon5/temp1_input";
critical-threshold = 80;
format = "{temperatureC}°C {icon}";
format-icons = ["" "" "" "" ""];
tooltip = false;
};
};
style = let
colors = config.lib.stylix.colors.withHashtag;
accent = colors.${config.stylix.accent};
scssFile = pkgs.writeText "waybar.scss" /*scss*/ ''
window#waybar {
background: transparent;
color: ${colors.base05};
font-weight: bold;
font-size: .85em;
& > * { padding: 0 0 6px 0; }
}
.modules-center {
background: ${colors.base01}CC;
border-radius: 12px;
padding: 10px;
box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.4);
}
#left,
#right,
#center {
background: ${colors.base02};
padding: 0 2px;
margin: 0 8px;
border-radius: 8px;
}
#left { margin-left: 0; }
#right { margin-right: 0; }
#clock { padding-right: 10px; }
#cava { padding: 0 10px; }
#language { padding: 8px; }
#workspaces button {
color: ${colors.base05};
padding: 0 2px;
border-radius: 999px;
border: 1pt solid transparent;
min-width: 20px;
&:hover { background: ${colors.base03}; }
&.active {
background: ${accent};
color: ${colors.base00};
min-width: 25px;
&:hover {
border-color: ${accent};
background: ${colors.base03};
color: ${accent};
}
}
}
#mpris {
border-radius: 8px;
padding: 4px;
&:hover { background: ${colors.base03}; }
&.playing {
border: 2px solid ${accent};
padding: 2px;
}
}
#tray {
widget {
border: 1pt solid transparent;
&:hover { background: ${colors.base03}; }
& > image { padding: 8px; }
}
& > .passive { border-color: ${colors.base03}; }
& > .needs-attention { border-color: ${colors.base09}; }
}
#pulseaudio {
&:hover { background: ${colors.base03}; }
&.muted {
background: ${colors.base08};
color: ${colors.base01};
&:hover {
color: ${colors.base08};
background: ${colors.base03};
}
}
}
#network {
&:hover { background: ${colors.base02}; }
&.disconnected {
color: ${colors.base00};
background: ${colors.base08};
}
}
#system .drawer-child > * {
margin-right: 4px
}
#keyboard-state label.locked {
color: ${colors.base08};
}
#battery {
&.plugged { color: ${colors.base0D}; }
&.charging { color: ${colors.base0B}; }
&:not(.charging) {
&.warning {
color: ${colors.base00};
background-color: ${colors.base09};
}
&.critical {
background-color: ${colors.base08};
color: ${colors.base00};
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
}
}
&.full {
color: ${colors.base00};
background: ${colors.base0B};
}
}
@keyframes blink {
to {
background-color: ${colors.base00};
color: ${colors.base08};
}
}
'';
cssFile = pkgs.runCommand "waybar.css" {
nativeBuildInputs = [ pkgs.dart-sass ];
} "sass ${scssFile} $out";
in builtins.readFile cssFile;
};
}
+17 -10
View File
@@ -1,19 +1,28 @@
{ config, pkgs, pkgs-stable, pkgs-fixed, lib, inputs, laptop, name, fullname ? name, ... }: {
{ config
, pkgs
, pkgs-stable
, pkgs-pinned
, lib
, inputs
, name
, fullname ? name
}: {
imports = [
inputs.home-manager.nixosModules.home-manager {
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
backupFileExtension = "rebuild";
overwriteBackup = true;
users.${name} = {
imports = [
inputs.sops-nix.homeManagerModules.sops
inputs.stylix.homeManagerModules.stylix
inputs.stylix.homeModules.stylix
../modules/user.nix
./${name}/modules/git.nix
./${name}/modules/hyprland.nix
./${name}/modules/style.nix
./${name}/modules/waybar.nix
./${name}/home.nix
];
@@ -23,14 +32,12 @@
stateVersion = "23.11";
};
};
extraSpecialArgs = {
inherit inputs;
inherit pkgs-stable;
inherit pkgs-fixed;
host = {
laptop = laptop;
name = config.networking.hostName;
};
inherit pkgs-pinned;
username = name;
};
};
}
@@ -49,8 +56,8 @@
};
services.greetd = let
tuigreet = lib.getExe pkgs.greetd.tuigreet;
session = lib.getExe inputs.hyprland.packages.${pkgs.system}.default;
tuigreet = lib.getExe pkgs.tuigreet;
session = lib.getExe' inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.default "start-hyprland";
in {
enable = true;
settings = {
+4
View File
@@ -0,0 +1,4 @@
My config
- **Theme:** [Catppuccin](https://catppuccin.com) Mocha
- **Cursor:** [\[Date A Live\] Kurumi Tokisaki](https://ko-fi.com/s/66a6c36df1)
+17 -1
View File
@@ -1,3 +1,19 @@
{
{ pkgs, ... }: {
imports = [
../../modules/user/packages/tex.nix
];
programs.hyprlock.enable = true;
home.packages = with pkgs; [
android-studio
(vivaldi.override {
proprietaryCodecs = true;
enableWidevine = true;
})
weechat
];
xdg.mimeApps = {
enable = true;
defaultApplications."application/pdf" = "vivaldi-stable.desktop";
};
}
+4 -2
View File
@@ -1,7 +1,9 @@
{
programs.git = {
enable = true;
userName = "Sweetbread";
userEmail = "risdeveau@codrs.ru";
settings.user = {
name = "Sweetbread";
email = "risdeveau@lair.moe";
};
};
}
+141 -42
View File
@@ -1,32 +1,136 @@
{ pkgs, lib, config, inputs, ... }: {
imports = [(
import ../../../modules/user/patterns/hyprland.nix {
inherit lib;
inherit pkgs;
inherit config;
inherit inputs;
collection = "sweetbread/1764377";
swww_flags = "--transition-type center";
}
)];
{ pkgs, lib, config, osConfig, inputs, ... }: {
wayland.windowManager.hyprland = let
colors = config.lib.stylix.colors;
accent = colors.${config.stylix.accent};
wallpaper_changer = pkgs.writers.writePython3Bin "wallpaper_changer" {
libraries = [ pkgs.python3Packages.requests ];
flakeIgnore = [ "E111" "E121" "E241" "E501" "E701" "E731" ];
} /*py*/ ''
import requests as requests
from random import choice
from os import listdir, makedirs, remove, replace, system
from os.path import exists
from subprocess import run
notify_id = None
def notify(text, progress=None, expire_time=5000):
global notify_id
command = [
"${pkgs.libnotify}/bin/notify-send",
"--app-name", "wallpaper_changer",
"--print-id",
"--expire-time", str(expire_time),
]
if notify_id:
command.extend(["--replace-id", str(notify_id)])
if progress is not None:
command.extend(["--hint", f"int:value:{progress}"])
command.extend(["Wallpaper", text])
result = run(command, capture_output=True, text=True, check=False)
output = result.stdout.strip()
if output.isdigit():
notify_id = output
def download_with_progress(link, destination):
temporary = f"{destination}.part"
downloaded = 0
last_progress = -1
response = None
try:
response = requests.get(link, stream=True)
response.raise_for_status()
total = int(response.headers.get("content-length", 0))
with open(temporary, "wb") as file:
for chunk in response.iter_content(chunk_size=256 * 1024):
if not chunk:
continue
file.write(chunk)
downloaded += len(chunk)
if total <= 0:
continue
progress = min(100, downloaded * 100 // total)
if progress == 100 or progress >= last_progress + 2:
notify(f"Downloading... {progress}%", progress, 0)
last_progress = progress
replace(temporary, destination)
except Exception:
if exists(temporary):
remove(temporary)
raise
finally:
if response is not None:
response.close()
folder = "${config.home.homeDirectory}/Wallpapers"
url = "https://wallhaven.cc/api/v1/collections/sweetbread/${
if osConfig.networking.hostName == "Rias" then "1764377"
else "2108577"
}"
with open("${config.sops.secrets."tokens/apis/wallhaven".path}") as f:
token = f.read()
filename = None
notify("Updating wallpaper...", 0)
try:
response = requests.get(url, params={'apikey': token})
response.raise_for_status()
json = response.json()
wallpaper = choice(json['data'])
link = wallpaper['path']
format = wallpaper['file_type']
id = wallpaper['id']
if format == "image/jpeg": ext = "jpg"
else: ext = "png"
filename = f"{id}.{ext}"
destination = f"{folder}/{filename}"
if not exists(destination):
makedirs(folder, exist_ok=True)
notify("Downloading... 0%", 0, 0)
download_with_progress(link, destination)
notify("Downloaded", 100)
else:
notify("Using cached wallpaper", 100)
except requests.exceptions.RequestException:
notify("Offline mode")
try:
filename = choice(listdir(folder))
except (FileNotFoundError, IndexError):
notify("Offline mode and wallpaper cache is empty")
finally:
if filename is not None:
notify("Applying wallpaper", 100)
system(f"awww img {folder}/{filename} --transition-type center")
'';
in {
settings = {
monitor = [
"DP-3, 3440x1440@165.00Hz, auto-right, 1"
# "HDMI-A-1, 3840x2160@60.00Hz, auto-left, 2"
"HDMI-A-1, disabled"
",preferred,auto,1"
];
general = {
gaps_in = 5;
gaps_out = 20;
gaps_in = 2;
gaps_out = 10;
border_size = 3;
"col.active_border" = lib.mkForce "rgba(${colors.base0C}ee) rgba(${colors.base0B}ee) 45deg";
"col.inactive_border" = lib.mkForce "rgba(${colors.base05}aa)";
"col.active_border" = lib.mkForce "rgba(${colors.base0C}aa) rgba(${accent}aa) 45deg";
layout = "dwindle";
};
@@ -41,11 +145,7 @@
new_optimizations = true;
};
shadow = {
enabled = true;
range = 4;
render_power = 3;
};
shadow.enabled = false;
};
animations = {
@@ -64,32 +164,31 @@
};
dwindle = {
pseudotile = true;
smart_split = true;
};
master.new_status = "master";
gestures = {
workspace_swipe = true;
workspace_swipe_fingers = 3;
workspace_swipe_invert = true;
workspace_swipe_distance = 200;
workspace_swipe_forever = true;
};
misc = {
animate_manual_resizes = true;
animate_mouse_windowdragging = true;
enable_swallow = true;
render_ahead_of_time = false;
disable_hyprland_logo = false;
};
exec-once = [
"${lib.getExe wallpaper_changer}"
];
workspace = [
"2, layout:scrolling"
];
bind = [
" , Print, exec, grimblast --notify --freeze copy output"
"CTRL, Print, exec, grimblast --notify --freeze copy area"
"ALT , Print, exec, grimblast --notify --freeze copy active"
" , Print, exec, ${lib.getExe pkgs.hyprshot} -z -o ~/Screenshots -m active -m output"
"CTRL, Print, exec, ${lib.getExe pkgs.hyprshot} -z -o ~/Screenshots -m region"
"ALT , Print, exec, ${lib.getExe pkgs.hyprshot} -z -o ~/Screenshots -m active -m window"
"$mainMod, W, exec, ${lib.getExe wallpaper_changer}"
];
};
};
+124 -6
View File
@@ -1,13 +1,111 @@
{ pkgs, config, lib, ... }: {
{ pkgs, config, lib, ... }: let
kurumi-cursor = pkgs.stdenv.mkDerivation {
name = "Kurumi cursor";
# [Date A Live] Kurumi Tokisaki Cursor
# Author: EbiEbiBeam
# https://ko-fi.com/s/66a6c36df1
src = pkgs.fetchzip {
name = "KurumiCursor.zip";
url = "https://ko-fi.com/api/file-upload/d2a5e046-1d48-49f9-9e41-9c230cc08821/download?transactionId=9dc3593e-b36b-40aa-910c-71ddee802d37";
curlOpts = "-A HTTPie/3.2.4";
extension = "zip";
hash = "sha256-WYk8Hh92IE3CyUCAOp7QMKrYN8Hpt/cs+O17jhh5tJs=";
};
nativeBuildInputs = [ pkgs.win2xcur ];
patchPhase = ''
rm 02-Link.ani
pwd
echo $src
mkdir Kurumi/cursors -p
win2xcur $src/*.ani -o Kurumi/cursors
cd Kurumi/
echo "[Icon theme]" > index.theme
echo "Name=Kurumi Cursor" >> index.theme
cd cursors/
mv '01-Normal' default
ln -s default left_ptr
ln -s default arrow
mv '02-Link' pointer
ln -s pointer hand2
mv '03-Loading' wait
ln -s wait progress
mv '04-Help' help
ln -s help question_arrow
mv '05-Text Select' text
ln -s text xterm
mv '06-Handwriting' pencil
mv '07-Precision' cross
ln -s cross crosshair
ln -s cross tcross
mv '08-Unavailable' not-allowed
# mv '09-Location Select' ?
# mv '10-Person Select' ?
mv '11-Vertical Resize' ns-resize
ln -s ns-resize n-resize
ln -s ns-resize s-resize
ln -s ns-resize v_double_arrow
ln -s ns-resize sb_v_double_arrow
mv '12-Horizontal Resize' ew-resize
ln -s ew-resize e-resize
ln -s ew-resize w-resize
ln -s ew-resize h_double_arrow
ln -s ew-resize sb_h_double_arrow
ln -s ew-resize left_side
ln -s ew-resize right_side
mv '13-Diagonal Resize 1' nw-resize
ln -s nw-resize top_left_corner
ln -s nw-resize bottom_right_corner
mv '14-Diagonal Resize 2' ne-resize
ln -s ne-resize top_right_corner
ln -s ne-resize bottom_left_corner
mv '15-Move' move
ln -s move nesw-resize
ln -s move grab
ln -s move grabbing
ln -s move fleur
# mv '16-Alternate Select' ?
cd ../..
'';
installPhase = ''
mkdir $out/share/icons -p
cp Kurumi $out/share/icons -r
'';
};
pixeloid = pkgs.stdenvNoCC.mkDerivation {
name = "Pixeloid";
dontUnpack = true;
src = pkgs.fetchurl {
url = "https://lair.moe/static/font/Pixeloid/otf/Sans.otf";
hash = "sha256-GTf2BnhH0Pzc3Bbevmd+mA6t8lZFMUxX9wkSqWicuSc=";
};
installPhase = ''
install -Dm644 "$src" "$out/share/fonts/opentype/Sans.otf"
'';
};
in {
stylix = {
enable = true;
overlays.enable = false;
targets = {
hyprland.enable = true;
hyprpaper.enable = lib.mkForce false;
waybar.enable = false;
kitty.variant256Colors = true;
};
base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml";
accent = "base0B";
polarity = "dark";
image = pkgs.fetchurl {
@@ -15,16 +113,16 @@
sha256 = "sha256-u4d21a0Kh5OHEzQMSQ7+ey/Va2ftS1DefrOQFahaeC4=";
};
iconTheme = {
icons = {
enable = true;
package = pkgs.pop-icon-theme;
dark = "Pop-Dark";
};
cursor = {
name = "catppuccin-mocha-green-cursors";
size = 24;
package = pkgs.catppuccin-cursors.mochaGreen;
name = "Kurumi";
size = 32;
package = kurumi-cursor;
};
fonts = {
@@ -38,6 +136,11 @@
package = (pkgs.google-fonts.override { fonts = [ "Gabriela" ]; });
};
sansSerif = {
name = "Pixeloid Sans";
package = pixeloid;
};
emoji = {
package = pkgs.noto-fonts-monochrome-emoji;
name = "Noto Emoji";
@@ -54,4 +157,19 @@
terminal = .9;
};
};
dconf.settings = {
"org/gnome/desktop/interface".color-scheme = "prefer-dark";
};
gtk = {
gtk4 = {
extraConfig = {
gtk-application-prefer-dark-theme = true;
};
};
gtk3.extraConfig = {
gtk-application-prefer-dark-theme = true;
};
};
}
+302
View File
@@ -0,0 +1,302 @@
{ osConfig, config, pkgs, lib, ... }: {
home.packages = with pkgs; [
playerctl
cava
pulsemixer
monocraft
font-awesome
nerd-fonts.symbols-only
];
programs.waybar = {
enable = true;
systemd.enable = true;
settings.mainBar = {
spacing = 8;
modules-left = [
"hyprland/workspaces"
"hyprland/language"
"keyboard-state"
"cava"
];
modules-center = [
"mpris"
];
modules-right = [
"tray"
"group/system"
"pulseaudio"
"battery"
"clock"
];
cava = {
bars = 14;
sleep_timer = 5;
hide_on_silence = true;
bar_delimiter = 0;
input_delay = 0;
format-icons = [" " "" "" "" "" "" "" "" ""];
};
clock = {
tooltip = false;
interval = 5;
format = "{:L%d %b - %H:%M %a}";
};
pulseaudio = {
format = "{icon} {volume}%";
format-icons = {
headphone = "";
hands-free = "";
headset = "";
phone = "";
phone-muted = "";
portable = "";
car = "";
default = ["" ""];
};
on-click = "ghostty --title=pulsemixer -e pulsemixer";
};
mpris = {
format = "{dynamic}";
dynamic-len = if osConfig.host.laptop then 32 else 64;
dynamic-order = [ "title" "artist" "album" ];
};
battery = {
interval = 5;
states = {
warning = 30;
critical = 15;
};
format = "{icon} {capacity}%";
format-icons = {
default = ["󰂎" "󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹"];
charging = ["󰢟" "󰢜" "󰂆" "󰂇" "󰂈" "󰢝" "󰂉" "󰢞" "󰂊" "󰂋" "󰂅"];
};
};
"keyboard-state" = {
capslock = true;
format = "{icon}";
format-icons = {
locked = "CAPS";
unlocked = "";
};
};
"hyprland/language" = {
format-en = "en";
format-ru = "ru";
};
"group/system" = {
orientation = "inherit";
drawer = {
transition-duration = 500;
transition-left-to-right = false;
};
modules = [
"network"
"custom/mem"
"cpu"
"temperature"
];
};
network = {
format = "{ifname}";
format-wifi = " {essid} ({signalStrength}%)";
format-ethernet = "{ifname}";
format-disconnected = "";
tooltip-format = "{ipaddr}";
max-length = 50;
on-click = "ghostty --title=nmtui -e nmtui";
};
"custom/weather" = {
format = "{}";
tooltip = true;
interval = 1800;
exec = "python3 $HOME/.config/waybar/scripts/wttr.py";
return-type = "json";
};
"custom/mem" = {
format = "{} ";
interval = 3;
exec = "free -h | awk '/Mem:/{printf $3}'";
tooltip = false;
};
cpu = {
interval = 2;
format = "{usage}% ";
min-length = 6;
};
temperature = {
hwmon-path = "/sys/class/hwmon/hwmon5/temp1_input";
critical-threshold = 80;
format = "{temperatureC}°C {icon}";
format-icons = ["" "" "" "" ""];
tooltip = false;
};
};
style = let
colors = config.lib.stylix.colors.withHashtag;
accent = colors.${config.stylix.accent};
radius = "6px";
scssFile = pkgs.writeText "waybar.scss" /*scss*/ ''
window#waybar {
background: transparent;
color: ${colors.base05};
border-radius: ${radius};
font-family: "Symbols Nerd Font Mono", "Monocraft", "Font Awesome 7 Free";
font-weight: bold;
font-size: .85em;
& > * { padding: 8px; }
}
#cava,
#language,
#mpris,
#pulseaudio,
#network,
#battery,
#cpu,
#temperature,
#keyboard-state label.locked,
#custom-mem,
#clock {
background: ${colors.base00};
border-radius: ${radius};
padding: 8px;
}
#workspaces,
#tray {
background: ${colors.base00};
border-radius: ${radius};
}
#workspaces button {
color: ${colors.base05};
padding: 4px;
border-radius: ${radius};
border: 1pt solid transparent;
&:hover { background: ${colors.base01}; }
&.active {
background: ${accent};
color: ${colors.base00};
&:hover {
border-color: ${accent};
background: ${colors.base01};
color: ${accent};
}
}
}
#mpris {
&:hover { background: ${colors.base01}; }
&.paused { opacity: .5; }
}
#tray {
widget {
border: 1pt solid transparent;
border-radius: ${radius};
&:hover { background: ${colors.base01}; }
& > image { padding: 8px; }
}
& > .passive { border-color: ${colors.base02}; }
& > .needs-attention { border-color: ${colors.base09}; }
}
#pulseaudio {
&:hover { background: ${colors.base01}; }
&.muted {
background: ${colors.base08};
color: ${colors.base00};
&:hover {
color: ${colors.base08};
background: ${colors.base01};
}
}
}
#network {
&:hover { background: ${colors.base01}; }
&.disconnected {
color: ${colors.base00};
background: ${colors.base08};
}
}
#system .drawer-child > * {
margin-right: 4px
}
#keyboard-state label.locked {
background-color: ${colors.base00};
color: ${colors.base08};
}
#battery {
&.plugged { color: ${colors.base0D}; }
&.charging { color: ${accent}; }
&:not(.charging) {
&.warning {
color: ${colors.base00};
background-color: ${colors.base09};
}
&.critical {
background-color: ${colors.base08};
color: ${colors.base00};
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
}
}
&.full {
color: ${colors.base00};
background: ${accent};
}
}
@keyframes blink {
to {
background-color: ${colors.base00};
color: ${colors.base08};
}
}
'';
cssFile = pkgs.runCommand "waybar.css" {
nativeBuildInputs = [ pkgs.dart-sass ];
} "sass ${scssFile} $out";
in builtins.readFile cssFile;
};
wayland.windowManager.hyprland.settings.layerrule = [
"blur on, match:namespace waybar"
];
}