Compare commits
108 Commits
cddf52d5d3
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
3c8c43f90b
|
|||
|
3de3a14d0b
|
|||
|
98434b79cf
|
|||
|
c8b5900985
|
|||
|
ae74e79b8e
|
|||
|
3fd67e08bc
|
|||
|
e2527a20d1
|
|||
|
03fbc1e1b7
|
|||
|
5b93b31de3
|
|||
|
9332b07729
|
|||
|
211dafc241
|
|||
|
cb5771e2a3
|
|||
|
3fc3f5fa3a
|
|||
|
2ffedb7835
|
|||
|
5b2fbe0db4
|
|||
|
7ea803d7cd
|
|||
|
16cfa90286
|
|||
|
89dfed99cb
|
|||
|
36be1d4912
|
|||
|
9d687a19d1
|
|||
|
9a74a3572d
|
|||
|
1eace564e5
|
|||
|
88f9d0bc57
|
|||
|
e52ee5b09f
|
|||
|
fd9a6db867
|
|||
|
acf0041fbc
|
|||
|
435423f6e1
|
|||
|
61b6256a14
|
|||
|
cdfdeffc07
|
|||
|
6156fda36d
|
|||
|
9f8a14849e
|
|||
|
9eea524875
|
|||
|
f84b6b1f6d
|
|||
|
46cf31e49a
|
|||
|
91ccf1078f
|
|||
|
e890c350c6
|
|||
|
9d395d0dae
|
|||
|
cc3d356513
|
|||
|
617ecbaf20
|
|||
|
bc24313d57
|
|||
|
c54814b63e
|
|||
|
e1794a8dd3
|
|||
|
092e73822d
|
|||
|
a185fa4d85
|
|||
|
514d3a45d9
|
|||
|
9c3698839c
|
|||
|
1d18bad6fa
|
|||
|
aeecd99aca
|
|||
|
f45ab786f9
|
|||
|
80f25abdd5
|
|||
|
718d20da06
|
|||
|
ce4e5e3d50
|
|||
|
3835443178
|
|||
|
47b17c70ad
|
|||
|
bd810a6a2a
|
|||
|
6cf26a1e18
|
|||
|
b556847dcf
|
|||
|
3f06268365
|
|||
|
b02a17a7d9
|
|||
|
5ebffd5e41
|
|||
|
0c9e6b31aa
|
|||
|
885dca9738
|
|||
|
08a3195d43
|
|||
|
d934e358c0
|
|||
|
7356fbe8f6
|
|||
|
cae32c1b4f
|
|||
|
a0ea0dd7f1
|
|||
|
a42b17d363
|
|||
|
f970e20730
|
|||
|
4c34c5c364
|
|||
|
c4ceb67dfc
|
|||
|
9706b7954c
|
|||
|
396db61e5e
|
|||
|
063cfe0ac0
|
|||
|
82e9a0e807
|
|||
|
3304573292
|
|||
|
26753a5b98
|
|||
|
51280986ed
|
|||
| 6a6be514df | |||
|
0b7bf06f58
|
|||
|
c11584e31e
|
|||
|
6fc5cee147
|
|||
|
adc82860eb
|
|||
|
bd9bf6ccc7
|
|||
|
75bb7846f9
|
|||
|
7747587e69
|
|||
|
7c37e7122f
|
|||
|
02aef91f3a
|
|||
|
ba0aac7807
|
|||
| b27399db29 | |||
| a98c3f84ce | |||
|
7069a9e1f0
|
|||
|
86a972fd61
|
|||
|
d793b0e635
|
|||
|
1f034a5ebc
|
|||
|
b96b2986f0
|
|||
|
4570dfb4b4
|
|||
|
88efa96ac7
|
|||
|
48ce8bdf9d
|
|||
|
724633d928
|
|||
|
7eedb9098a
|
|||
|
6432eb6171
|
|||
|
4b7d0a0980
|
|||
|
de77adcfcb
|
|||
|
16f84aaa04
|
|||
|
24f013c765
|
|||
|
a84a509cf8
|
|||
|
df54654750
|
+1
-1
@@ -5,7 +5,7 @@ creation_rules:
|
|||||||
key_groups:
|
key_groups:
|
||||||
- age:
|
- age:
|
||||||
- *primary
|
- *primary
|
||||||
- path_regex: nixos/hosts/(Rias|Senko|Eclipse)/secrets/.+$
|
- path_regex: host/(Rias|Senko|Eclipse)/secrets/.+$
|
||||||
key_groups:
|
key_groups:
|
||||||
- age:
|
- age:
|
||||||
- *primary
|
- *primary
|
||||||
|
|||||||
@@ -1,12 +1,47 @@
|
|||||||
# ❄️ My NixOS Config
|
# ❄️ My NixOS Config
|
||||||
|
|
||||||
```bash
|
This configuration is based on [&'s config](https://github.com/Andrey0189/nixos-config)
|
||||||
git clone https://github.com/Andrey0189/nixos-config
|
|
||||||
mv nixos-config $HOME/nix # Config is supposed to be in the ~/nix directory
|
## Users
|
||||||
cd $HOME/nix
|
- [Sweetbread](./user/sweetbread)
|
||||||
sudo nixos-rebuild switch --flake .
|
- [Chest](./user/chest)
|
||||||
home-manager switch --flake .
|
|
||||||
|
## 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)
|
||||||
|
|
||||||

|

|
||||||
|
|||||||
Generated
+376
-367
File diff suppressed because it is too large
Load Diff
@@ -3,30 +3,37 @@
|
|||||||
|
|
||||||
nixConfig = {
|
nixConfig = {
|
||||||
extra-substituters = [
|
extra-substituters = [
|
||||||
|
"https://nix.lair.moe/main"
|
||||||
"https://nix-community.cachix.org"
|
"https://nix-community.cachix.org"
|
||||||
"https://cache.garnix.io"
|
|
||||||
"https://hyprland.cachix.org"
|
"https://hyprland.cachix.org"
|
||||||
"https://ezkea.cachix.org"
|
"https://ezkea.cachix.org"
|
||||||
|
"https://yazi.cachix.org"
|
||||||
];
|
];
|
||||||
extra-trusted-public-keys = [
|
extra-trusted-public-keys = [
|
||||||
|
"main:kpwMe+9BsGJ/IUb7i3iadaV38y5/Yuqoct0mf7wI9ds="
|
||||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||||
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
|
|
||||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||||
"ezkea.cachix.org-1:ioBmUbJTZIKsHmWWXPe1FSFbeVe+afhfgqgTSNd34eI="
|
"ezkea.cachix.org-1:ioBmUbJTZIKsHmWWXPe1FSFbeVe+afhfgqgTSNd34eI="
|
||||||
|
"yazi.cachix.org-1:Dcdz63NZKfvUCbDGngQDAZq6kOroIrFoyO064uvLh8k="
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
aagl.url = "github:ezKEa/aagl-gtk-on-nix";
|
aagl.url = "github:ezKEa/aagl-gtk-on-nix";
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/30b27177a006d425120fb850a64ceb792636501a";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.11";
|
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-26.05";
|
||||||
nixpkgs-fixed.url = "github:nixos/nixpkgs/b27ba4eb322d9d2bf2dc9ada9fd59442f50c8d7c";
|
nixpkgs-pinned.url = "github:nixos/nixpkgs/ec942ba042dad5ef097e2ef3a3effc034241f011";
|
||||||
sops-nix.url = "github:Mic92/sops-nix";
|
sops-nix.url = "github:Mic92/sops-nix";
|
||||||
stylix.url = "github:danth/stylix";
|
stylix.url = "github:danth/stylix";
|
||||||
ags.url = "github:Aylur/ags";
|
ags.url = "github:Aylur/ags/3ed9737bdbc8fc7a7c7ceef2165c9109f336bff6";
|
||||||
ayugram-desktop.url = "github:/ayugram-port/ayugram-desktop/release?submodules=1";
|
|
||||||
|
|
||||||
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 = {
|
hyprland-plugins = {
|
||||||
url = "github:hyprwm/hyprland-plugins";
|
url = "github:hyprwm/hyprland-plugins";
|
||||||
inputs.hyprland.follows = "hyprland";
|
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";
|
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 {
|
in {
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
Rias = nixpkgs.lib.nixosSystem {
|
Rias = mkHost "Rias";
|
||||||
specialArgs = {
|
Senko = mkHost "Senko";
|
||||||
pkgs-stable = import nixpkgs-stable {
|
Eclipse = mkHost "Eclipse";
|
||||||
inherit system;
|
Impreza = mkHost "Impreza";
|
||||||
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
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
{ config, pkgs, pkgs-stable, pkgs-fixed, lib, inputs, ...}: let
|
{ config, pkgs, pkgs-stable, pkgs-pinned, lib, inputs, ... }: {
|
||||||
laptop = false;
|
|
||||||
in {
|
|
||||||
imports = [
|
imports = [
|
||||||
./secrets/secrets.nix
|
./secrets/secrets.nix
|
||||||
./modules/aagl.nix
|
./modules/aagl.nix
|
||||||
@@ -18,14 +16,16 @@ in {
|
|||||||
inherit config;
|
inherit config;
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
inherit pkgs-stable;
|
inherit pkgs-stable;
|
||||||
inherit pkgs-fixed;
|
inherit pkgs-pinned;
|
||||||
inherit lib;
|
inherit lib;
|
||||||
inherit inputs;
|
inherit inputs;
|
||||||
inherit laptop;
|
|
||||||
name = "chest";
|
name = "chest";
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs.config.allowBroken = true;
|
nixpkgs.config.allowBroken = true;
|
||||||
programs.gamemode.enable = true;
|
programs.gamemode.enable = true;
|
||||||
|
services.printing.enable = true;
|
||||||
|
virtualisation.virtualbox.host.enable = true;
|
||||||
|
users.extraGroups.vboxusers.members = [ "chest" ];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,21 +13,27 @@
|
|||||||
boot.kernelModules = [ "kvm-intel" ];
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" = {
|
||||||
{ device = "/dev/disk/by-uuid/34e32809-6876-4361-95d8-70a479ea8e19";
|
device = "/dev/disk/by-label/NixOS";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" = {
|
||||||
{ device = "/dev/disk/by-uuid/2B65-0D2E";
|
device = "/dev/disk/by-partlabel/EFI\\x20system\\x20partition";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
options = [ "fmask=0022" "dmask=0022" ];
|
options = [ "fmask=0022" "dmask=0022" "nofail" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/mnt/D" = {
|
fileSystems."/mnt/D" = {
|
||||||
device = "/dev/disk/by-uuid/E030A4DF30A4BDC2";
|
device = "/dev/disk/by-uuid/E030A4DF30A4BDC2";
|
||||||
fsType = "ntfs";
|
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 = [ ];
|
swapDevices = [ ];
|
||||||
@@ -41,4 +47,6 @@
|
|||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
boot.loader.grub.useOSProber = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
imports = [ inputs.aagl.nixosModules.default ];
|
imports = [ inputs.aagl.nixosModules.default ];
|
||||||
nix.settings = inputs.aagl.nixConfig; # Set up Cachix
|
nix.settings = inputs.aagl.nixConfig; # Set up Cachix
|
||||||
programs.honkers-railway-launcher.enable = true;
|
programs.honkers-railway-launcher.enable = true;
|
||||||
|
programs.sleepy-launcher.enable = true;
|
||||||
programs.anime-game-launcher.enable = true;
|
programs.anime-game-launcher.enable = true;
|
||||||
networking.hosts."0.0.0.0" = [
|
networking.hosts."0.0.0.0" = [
|
||||||
"overseauspider.yuanshen.com"
|
"overseauspider.yuanshen.com"
|
||||||
|
|||||||
@@ -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
@@ -1,6 +1,4 @@
|
|||||||
{ config, pkgs, pkgs-stable, pkgs-fixed, lib, inputs, ...}: let
|
{ config, pkgs, pkgs-stable, pkgs-pinned, lib, inputs, ... }: {
|
||||||
laptop = true;
|
|
||||||
in {
|
|
||||||
imports = [
|
imports = [
|
||||||
./secrets/secrets.nix
|
./secrets/secrets.nix
|
||||||
./modules/grub.nix
|
./modules/grub.nix
|
||||||
@@ -16,16 +14,16 @@ in {
|
|||||||
inherit config;
|
inherit config;
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
inherit pkgs-stable;
|
inherit pkgs-stable;
|
||||||
inherit pkgs-fixed;
|
inherit pkgs-pinned;
|
||||||
inherit lib;
|
inherit lib;
|
||||||
inherit inputs;
|
inherit inputs;
|
||||||
inherit laptop;
|
|
||||||
name = "chest";
|
name = "chest";
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
|
nix.settings.cores = 3;
|
||||||
nixpkgs.config.allowBroken = true;
|
nixpkgs.config.allowBroken = true;
|
||||||
programs.gamemode.enable = true;
|
programs.gamemode.enable = true;
|
||||||
hardware.bluetooth.enable = true;
|
hardware.bluetooth.enable = true;
|
||||||
host.laptop = laptop;
|
host.laptop = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,22 +13,22 @@
|
|||||||
boot.kernelModules = [ "kvm-intel" ];
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" = {
|
||||||
{ device = "/dev/disk/by-uuid/31247de4-e9c0-4690-8bce-8380377b6872";
|
device = "/dev/disk/by-label/NixOS";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" = {
|
||||||
{ device = "/dev/disk/by-uuid/328A-299C";
|
device = "/dev/disk/by-label/EFI";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
options = [ "fmask=0022" "dmask=0022" ];
|
options = [ "fmask=0022" "dmask=0022" "nofail" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/mnt/Windows" =
|
fileSystems."/mnt/Windows" = {
|
||||||
{ device = "/dev/disk/by-uuid/84E48B00E48AF428";
|
device = "/dev/disk/by-label/Windows";
|
||||||
fsType = "ntfs";
|
fsType = "ntfs";
|
||||||
options = [ "umask=0022" "gid=100" "uid=1000" "nofail" ];
|
options = [ "umask=0022" "gid=100" "uid=1000" "nofail" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [ ];
|
swapDevices = [ ];
|
||||||
|
|
||||||
@@ -41,4 +41,6 @@
|
|||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
|
||||||
|
boot.loader.grub.useOSProber = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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}"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
My desktop
|
||||||
|
|
||||||
|
- **CPU:** Intel i5-10600KF
|
||||||
|
- **GPU:** NVidia GeForce RTX 3060 Ti
|
||||||
|
- **RAM:** 32GB
|
||||||
|
- **SSD:** 512GB
|
||||||
|
- **HDD:** 1TB
|
||||||
@@ -1,11 +1,8 @@
|
|||||||
{ config, pkgs, pkgs-stable, pkgs-fixed, lib, inputs, ...}: let
|
{ config, pkgs, pkgs-stable, pkgs-pinned, lib, inputs, ... }: {
|
||||||
laptop = false;
|
|
||||||
in {
|
|
||||||
imports = [
|
imports = [
|
||||||
./secrets/secrets.nix
|
./secrets/secrets.nix
|
||||||
./modules/grub.nix
|
./modules/grub.nix
|
||||||
./modules/syncthing.nix
|
./modules/syncthing.nix
|
||||||
../../modules/host/adb.nix
|
|
||||||
../modules/gpu/nvidia.nix
|
../modules/gpu/nvidia.nix
|
||||||
|
|
||||||
(import ../modules/common.nix {
|
(import ../modules/common.nix {
|
||||||
@@ -18,14 +15,18 @@ in {
|
|||||||
inherit config;
|
inherit config;
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
inherit pkgs-stable;
|
inherit pkgs-stable;
|
||||||
inherit pkgs-fixed;
|
inherit pkgs-pinned;
|
||||||
inherit lib;
|
inherit lib;
|
||||||
inherit inputs;
|
inherit inputs;
|
||||||
inherit laptop;
|
|
||||||
name = "sweetbread";
|
name = "sweetbread";
|
||||||
fullname = "Sweet Bread";
|
fullname = "Sweet Bread";
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.gamemode.enable = true;
|
programs.gamemode.enable = true;
|
||||||
|
services.printing.enable = true;
|
||||||
|
hardware.opentabletdriver.enable = true;
|
||||||
|
|
||||||
|
environment.systemPackages = [ pkgs.android-tools ];
|
||||||
|
users.users.sweetbread.extraGroups = [ "kvm" ];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
fileSystems."/mnt/D" = {
|
fileSystems."/mnt/D" = {
|
||||||
device = "/dev/disk/by-label/Data";
|
device = "/dev/disk/by-label/Data";
|
||||||
fsType = "ntfs";
|
fsType = "ntfs3";
|
||||||
options = ["umask=0022" "gid=100" "uid=1000" "nofail" ];
|
options = ["umask=0022" "gid=100" "uid=1000" "nofail" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -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}''
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
devices = {
|
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"; };
|
Koneko = { id = "PJFWQRY-ZFUBGDR-NV7KVBL-UBDQ4HT-KPTYP34-MUDFPJU-4EZUHTT-ZLYRMAB"; };
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -26,6 +26,11 @@
|
|||||||
devices = [ "Akeno" "Koneko" ];
|
devices = [ "Akeno" "Koneko" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
"JoiPlay" = {
|
||||||
|
path = "/mnt/D/SyncThing/JoiPlay";
|
||||||
|
devices = [ "Akeno" ];
|
||||||
|
};
|
||||||
|
|
||||||
"Music" = {
|
"Music" = {
|
||||||
path = "/home/sweetbread/Music";
|
path = "/home/sweetbread/Music";
|
||||||
devices = [ "Akeno" "Koneko" ];
|
devices = [ "Akeno" "Koneko" ];
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
|||||||
|
My laptop `HP Pavilion 15-cb012ur`
|
||||||
@@ -1,6 +1,4 @@
|
|||||||
{ config, pkgs, pkgs-stable, pkgs-fixed, lib, inputs, ...}: let
|
{ config, pkgs, pkgs-stable, pkgs-pinned, lib, inputs, ... }: {
|
||||||
laptop = true;
|
|
||||||
in {
|
|
||||||
imports = [
|
imports = [
|
||||||
./secrets/secrets.nix
|
./secrets/secrets.nix
|
||||||
./modules/grub.nix
|
./modules/grub.nix
|
||||||
@@ -16,17 +14,17 @@ in {
|
|||||||
inherit config;
|
inherit config;
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
inherit pkgs-stable;
|
inherit pkgs-stable;
|
||||||
inherit pkgs-fixed;
|
inherit pkgs-pinned;
|
||||||
inherit lib;
|
inherit lib;
|
||||||
inherit inputs;
|
inherit inputs;
|
||||||
inherit laptop;
|
|
||||||
name = "sweetbread";
|
name = "sweetbread";
|
||||||
fullname = "Sweet Bread";
|
fullname = "Sweet Bread";
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
hardware.bluetooth.enable = true;
|
hardware.bluetooth.enable = true;
|
||||||
host.laptop = laptop;
|
host.laptop = true;
|
||||||
|
host.nvidia.prime.enable = true;
|
||||||
|
|
||||||
environment.systemPackages = [ pkgs.dbgate ];
|
environment.systemPackages = [ pkgs.dbgate ];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" = {
|
fileSystems."/boot" = {
|
||||||
device = "/dev/disk/by-uuid/D706-818C";
|
device = "/dev/disk/by-partlabel/EFI";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
options = [ "fmask=0022" "dmask=0022" "nofail" ];
|
options = [ "fmask=0022" "dmask=0022" "nofail" ];
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
wayland.windowManager.hyprland = {
|
||||||
|
settings = {
|
||||||
|
monitor = [
|
||||||
|
"eDP-1, 1920x1080@60, 0x0, 1"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
secrets = {
|
secrets = {
|
||||||
vpn_bolt = {
|
vpn_bolt = {
|
||||||
format = "binary";
|
format = "binary";
|
||||||
sopsFile = ./vpn_bolt.db;
|
sopsFile = ../../Rias/secrets/vpn_bolt.db;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
../../Rias/secrets/vpn_bolt.db
|
|
||||||
+23
-2
@@ -7,14 +7,35 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
options = {
|
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 = {
|
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;
|
networking.hostName = hostname;
|
||||||
time.timeZone = lib.mkDefault "Europe/Moscow";
|
time.timeZone = lib.mkDefault "Europe/Moscow";
|
||||||
i18n.defaultLocale = lib.mkDefault "ru_RU.UTF-8";
|
i18n.defaultLocale = lib.mkDefault "ru_RU.UTF-8";
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
|
||||||
system.stateVersion = "23.05";
|
system.stateVersion = "23.05";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -1,22 +1,22 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs-stable, ... }:
|
||||||
{
|
{
|
||||||
hardware.graphics = {
|
hardware.graphics = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraPackages = with pkgs; [
|
extraPackages = with pkgs-stable; [
|
||||||
intel-media-driver
|
intel-media-driver
|
||||||
intel-compute-runtime
|
intel-compute-runtime
|
||||||
libvdpau-va-gl
|
libvdpau-va-gl
|
||||||
];
|
];
|
||||||
extraPackages32 = with pkgs.pkgsi686Linux; [
|
extraPackages32 = with pkgs-stable.pkgsi686Linux; [
|
||||||
intel-media-driver
|
intel-media-driver
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
nixpkgs.config.packageOverrides = pkgs: {
|
nixpkgs.config.packageOverrides = pkgs-stable: {
|
||||||
vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
|
vaapiIntel = pkgs-stable.vaapiIntel.override { enableHybridCodec = true; };
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs-stable; [
|
||||||
intel-gpu-tools
|
intel-gpu-tools
|
||||||
libva-utils
|
libva-utils
|
||||||
clinfo
|
clinfo
|
||||||
|
|||||||
@@ -1,11 +1,27 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
{ config, pkgs-stable, lib, ... }: let
|
||||||
services.xserver.videoDrivers = [ "nvidia" ];
|
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 = {
|
hardware = {
|
||||||
graphics = {
|
graphics = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enable32Bit = true;
|
enable32Bit = true;
|
||||||
extraPackages = with pkgs; [nvidia-vaapi-driver intel-media-driver];
|
extraPackages = with pkgs-stable; [
|
||||||
extraPackages32 = with pkgs.pkgsi686Linux; [nvidia-vaapi-driver intel-media-driver];
|
# nvidia-vaapi-driver
|
||||||
|
intel-media-driver
|
||||||
|
libvdpau-va-gl
|
||||||
|
];
|
||||||
|
extraPackages32 = with pkgs-stable.pkgsi686Linux; [ nvidia-vaapi-driver intel-media-driver ];
|
||||||
};
|
};
|
||||||
|
|
||||||
nvidia = {
|
nvidia = {
|
||||||
@@ -16,12 +32,30 @@
|
|||||||
};
|
};
|
||||||
open = false;
|
open = false;
|
||||||
nvidiaSettings = true;
|
nvidiaSettings = true;
|
||||||
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||||
|
|
||||||
prime = lib.optionalAttrs config.host.laptop {
|
prime = lib.optionalAttrs isPrimeOffload {
|
||||||
intelBusId = "PCI:0:2:0";
|
offload = {
|
||||||
nvidiaBusId = "PCI:1:0:0";
|
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";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
ncdu
|
ncdu
|
||||||
tldr
|
tldr
|
||||||
helix
|
helix
|
||||||
pinentry
|
pinentry-gnome3
|
||||||
];
|
];
|
||||||
|
|
||||||
fonts = {
|
fonts = {
|
||||||
|
|||||||
+32
-3
@@ -1,4 +1,4 @@
|
|||||||
{
|
{ pkgs, ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
./host/bluetooth.nix
|
./host/bluetooth.nix
|
||||||
./host/bootloader.nix
|
./host/bootloader.nix
|
||||||
@@ -8,16 +8,45 @@
|
|||||||
./host/gamemode.nix
|
./host/gamemode.nix
|
||||||
./host/gpg.nix
|
./host/gpg.nix
|
||||||
./host/laptop.nix
|
./host/laptop.nix
|
||||||
|
./host/network.nix
|
||||||
./host/printing.nix
|
./host/printing.nix
|
||||||
./host/shutdown-on-lan.nix
|
./host/shutdown-on-lan.nix
|
||||||
./host/sound.nix
|
./host/sound.nix
|
||||||
./host/virtmanager.nix
|
./host/virtmanager.nix
|
||||||
./host/vpn.nix
|
./host/vpn.nix
|
||||||
./host/network.nix
|
|
||||||
./host/yggdrasil.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 = {
|
services = {
|
||||||
udisks2.enable = true;
|
udisks2.enable = true;
|
||||||
fstrim.enable = true;
|
fstrim.enable = true;
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
programs.adb.enable = true;
|
|
||||||
users.users.sweetbread.extraGroups = ["adbusers"]; # FIXME: check users
|
|
||||||
}
|
|
||||||
@@ -11,7 +11,6 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
efiSupport = true;
|
efiSupport = true;
|
||||||
device = "nodev";
|
device = "nodev";
|
||||||
useOSProber = true;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
consoleLogLevel = 0;
|
consoleLogLevel = 0;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{ pkgs, ... }: {
|
{
|
||||||
console = {
|
console = {
|
||||||
font = "${pkgs.kbd}/share/consolefonts/LatArCyrHeb-19.psfu.gz";
|
font = "LatArCyrHeb-19";
|
||||||
colors = [
|
colors = [
|
||||||
"16161E"
|
"16161E"
|
||||||
"1A1B26"
|
"1A1B26"
|
||||||
|
|||||||
+10
-3
@@ -1,8 +1,15 @@
|
|||||||
{
|
{ lib, ... }: {
|
||||||
environment.variables = {
|
environment.variables = {
|
||||||
EDITOR = "hx";
|
EDITOR = "hx";
|
||||||
RANGER_LOAD_DEFAULT_RC = "FALSE";
|
RANGER_LOAD_DEFAULT_RC = "FALSE";
|
||||||
QT_QPA_PLATFORMTHEME = "qt5ct";
|
# GTK/Electron apps do not consistently use the portal picker unless this
|
||||||
GSETTINGS_BACKEND = "keyfile";
|
# 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";
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,12 +6,12 @@ lib.mkIf config.programs.gamemode.enable {
|
|||||||
gamescopeSession.enable = true;
|
gamescopeSession.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs-stable; [
|
environment.systemPackages = with pkgs; [
|
||||||
mangohud
|
mangohud
|
||||||
protonup
|
protonup-ng
|
||||||
pkgs.bottles
|
pkgs-stable.bottles
|
||||||
heroic
|
pkgs-stable.heroic
|
||||||
pkgs.prismlauncher
|
prismlauncher
|
||||||
];
|
];
|
||||||
|
|
||||||
environment.sessionVariables = {
|
environment.sessionVariables = {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{ pkgs, ...}: {
|
{
|
||||||
programs.gnupg.agent = {
|
programs.gnupg.agent = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableSSHSupport = true;
|
enableSSHSupport = true;
|
||||||
|
|||||||
@@ -2,14 +2,14 @@
|
|||||||
networking = {
|
networking = {
|
||||||
enableIPv6 = true;
|
enableIPv6 = true;
|
||||||
useDHCP = false;
|
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";
|
dhcpcd.extraConfig = "nohook resolv.conf";
|
||||||
|
|
||||||
networkmanager = {
|
networkmanager = {
|
||||||
enable = true;
|
enable = true;
|
||||||
dns = "none";
|
dns = "none";
|
||||||
insertNameservers = [ "193.222.99.172" "1.1.1.1" ];
|
insertNameservers = [ "64.188.64.176" "1.1.1.1" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,25 @@
|
|||||||
{ config, lib, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
lib.mkIf config.services.printing.enable {
|
lib.mkIf config.services.printing.enable {
|
||||||
services.avahi = {
|
services = {
|
||||||
enable = true;
|
printing.drivers = with pkgs; [
|
||||||
nssmdns4 = true;
|
brlaser
|
||||||
openFirewall = true;
|
];
|
||||||
|
|
||||||
|
avahi = {
|
||||||
|
enable = true;
|
||||||
|
nssmdns4 = true;
|
||||||
|
openFirewall = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
hardware.sane = {
|
||||||
|
enable = true;
|
||||||
|
extraBackends = with pkgs; [ sane-airscan ];
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
sane-frontends
|
||||||
|
simple-scan
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
{ pkgs, lib, ... }:
|
{ pkgs, lib, ... }:
|
||||||
let
|
let
|
||||||
sol = pkgs.writers.writePython3 "shutdown-on-lan.py" {
|
sol = pkgs.writers.writePython3 "shutdown-on-lan.py" {
|
||||||
libraries = [ pkgs.python312Packages.psutil ];
|
libraries = [ pkgs.python313Packages.psutil ];
|
||||||
flakeIgnore = [ "E501" "E302" "E305" ];
|
flakeIgnore = [ "E302" "E305" "E501" "E701" ];
|
||||||
} /*py*/ ''
|
} /*py*/ ''
|
||||||
# https://habr.com/ru/articles/816765/
|
# https://habr.com/ru/articles/816765/
|
||||||
|
|
||||||
@@ -21,20 +21,26 @@
|
|||||||
ip_addr = mac_addr = None
|
ip_addr = mac_addr = None
|
||||||
|
|
||||||
while not ip_addr or not mac_addr or ip_addr == '127.0.0.1':
|
while not ip_addr or not mac_addr or ip_addr == '127.0.0.1':
|
||||||
net = psutil.net_if_addrs()
|
nets = psutil.net_if_addrs()
|
||||||
for item in net[list(net.keys())[-1]]:
|
for net in list(nets.keys())[::-1]:
|
||||||
addr = item.address
|
if net in ('lo', 'tun0'): continue
|
||||||
# В IPv4-адресах разделители - точки
|
logger.debug(str(net))
|
||||||
if '.' in addr:
|
for item in nets[net]:
|
||||||
ip_addr = addr
|
# logger.debug(str(item))
|
||||||
# В MAC-адресах разделители либо тире, либо одинарное двоеточие.
|
addr = item.address
|
||||||
# Двойное двоеточие - это разделители для адресов IPv6
|
logger.debug(addr)
|
||||||
elif ('-' in addr or ':' in addr) and '::' not in addr:
|
# В IPv4-адресах разделители - точки
|
||||||
# Приводим MAC-адрес к одному формату. Формат может меняться в зависимости от ОС
|
if '.' in addr:
|
||||||
mac_addr = addr.replace(':', '-').upper()
|
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':
|
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)
|
sleep(10)
|
||||||
|
logger.debug(mac_addr)
|
||||||
return ip_addr, mac_addr
|
return ip_addr, mac_addr
|
||||||
|
|
||||||
def assemble_wol_packet(mac_address: str) -> str:
|
def assemble_wol_packet(mac_address: str) -> str:
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
services = {
|
services = {
|
||||||
pulseaudio.enable = false;
|
pulseaudio.enable = false;
|
||||||
|
|
||||||
pipewire = {
|
pipewire = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{ pkgs, ... }: {
|
{
|
||||||
virtualisation.libvirtd.enable = true;
|
virtualisation.libvirtd.enable = true;
|
||||||
programs.virt-manager.enable = true;
|
programs.virt-manager.enable = true;
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-25
@@ -1,28 +1,8 @@
|
|||||||
{pkgs, config, ...}: {
|
{
|
||||||
systemd.services.v2raya = {
|
programs.clash-verge = {
|
||||||
enable = true;
|
enable = true;
|
||||||
description = "v2rayA gui client";
|
serviceMode = true;
|
||||||
after = [ "network.target" ];
|
tunMode = true;
|
||||||
serviceConfig = {
|
autoStart = true;
|
||||||
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;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
persistentKeys = true;
|
persistentKeys = true;
|
||||||
settings = {
|
settings = {
|
||||||
Peers = [
|
Peers = [
|
||||||
"tcp://codrs.ru:5001"
|
"tls://ip4.01.ekb.ru.dioni.su:9003"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
+16
-12
@@ -1,20 +1,24 @@
|
|||||||
{ config, lib, ... }: {
|
{ config, lib, ... }: {
|
||||||
imports = [
|
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/btop.nix
|
||||||
./user/wofi.nix
|
|
||||||
./user/mako.nix
|
|
||||||
./user/ghostty.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/art.nix
|
||||||
./user/packages/desktop.nix
|
./user/packages/desktop.nix
|
||||||
./user/packages/coding.nix
|
|
||||||
./user/packages/utils.nix
|
./user/packages/utils.nix
|
||||||
] ;
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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; });
|
|
||||||
}
|
|
||||||
@@ -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 = {
|
programs.ghostty = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableZshIntegration = true;
|
enableZshIntegration = true;
|
||||||
|
package = ghosttyWithGL;
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
confirm-close-surface = false;
|
confirm-close-surface = false;
|
||||||
copy-on-select = false;
|
copy-on-select = false;
|
||||||
title-report = true;
|
title-report = true;
|
||||||
|
|
||||||
|
custom-shader = "${shaders}/cursor_warp.glsl";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -6,7 +6,10 @@
|
|||||||
settings = {
|
settings = {
|
||||||
# theme = "catppuccin-mocha";
|
# theme = "catppuccin-mocha";
|
||||||
editor = {
|
editor = {
|
||||||
|
rulers = [ 81 ];
|
||||||
insert-final-newline = false;
|
insert-final-newline = false;
|
||||||
|
indent-guides.render = true;
|
||||||
|
|
||||||
whitespace.render = {
|
whitespace.render = {
|
||||||
space = "all";
|
space = "all";
|
||||||
tab = "all";
|
tab = "all";
|
||||||
@@ -15,7 +18,11 @@
|
|||||||
newline = "none";
|
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; [
|
home.packages = with pkgs; [
|
||||||
ghostty
|
ghostty
|
||||||
pamixer
|
pamixer
|
||||||
wofi
|
|
||||||
clipse
|
clipse
|
||||||
grimblast
|
|
||||||
wl-clipboard
|
wl-clipboard
|
||||||
cliphist
|
wl-clip-persist
|
||||||
|
xclip
|
||||||
|
awww
|
||||||
];
|
];
|
||||||
|
|
||||||
wayland.windowManager.hyprland =
|
wayland.windowManager.hyprland = let
|
||||||
let
|
|
||||||
colors = config.lib.stylix.colors;
|
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 {
|
in {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
configType = "hyprlang";
|
||||||
xwayland.enable = true;
|
xwayland.enable = true;
|
||||||
|
|
||||||
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
|
package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
|
||||||
plugins = with inputs.hyprland-plugins.packages.${pkgs.system}; [
|
plugins = with inputs.hyprland-plugins.packages.${pkgs.stdenv.hostPlatform.system}; [
|
||||||
# hyprbars # Version mismatch
|
# hyprbars # Version mismatch
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -86,17 +39,17 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
env = [
|
env = [
|
||||||
"LIBVA_DRIVER_NAME,nvidia"
|
|
||||||
"__GLX_VENDOR_LIBRARY_NAME,nvidia"
|
|
||||||
"GBM_BACKEND,nvidia"
|
|
||||||
|
|
||||||
"XDG_SESSION_TYPE,wayland"
|
"XDG_SESSION_TYPE,wayland"
|
||||||
"QT_QPA_PLATFORM,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_CURRENT_DESKTOP,Hyprland"
|
||||||
"XDG_SESSION_DESKTOP,Hyprland"
|
"XDG_SESSION_DESKTOP,Hyprland"
|
||||||
|
|
||||||
"WLR_NO_HARDWARE_CURSORS,1"
|
|
||||||
"XCURSOR_SIZE, ${toString config.stylix.cursor.size}"
|
"XCURSOR_SIZE, ${toString config.stylix.cursor.size}"
|
||||||
"XCURSOR_THEME, ${config.stylix.cursor.name}"
|
"XCURSOR_THEME, ${config.stylix.cursor.name}"
|
||||||
|
|
||||||
@@ -110,10 +63,21 @@
|
|||||||
enable_stdout_logs = true;
|
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 = {
|
input = {
|
||||||
kb_layout = "us,ru";
|
kb_layout = "us,ru";
|
||||||
kb_variant = "lang";
|
|
||||||
kb_options = "grp:caps_toggle";
|
kb_options = "grp:caps_toggle";
|
||||||
|
numlock_by_default = true;
|
||||||
|
|
||||||
follow_mouse = 1;
|
follow_mouse = 1;
|
||||||
|
|
||||||
@@ -124,23 +88,42 @@
|
|||||||
sensitivity = 0;
|
sensitivity = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
windowrule = [
|
gestures = {
|
||||||
"float, class:^(imv)$"
|
workspace_swipe_invert = true;
|
||||||
"float, class:^(feh)$"
|
workspace_swipe_distance = 200;
|
||||||
"float, class:^(mpv)$"
|
workspace_swipe_forever = true;
|
||||||
"float, title:^(Список друзей)"
|
};
|
||||||
"move onscreen cursor -50% -50%, class:^(xdragon)$"
|
|
||||||
"float, title:(nmtui)"
|
gesture = [
|
||||||
"float, title:(pulsemixer)"
|
"3, horizontal, workspace"
|
||||||
"float, title:(clipse)"
|
|
||||||
"size 622 652, title:(clipse)"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
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"
|
"systemctl --user start plasma-polkit-agent"
|
||||||
"${lib.getExe' pkgs.swww "swww-daemon"}"
|
"${lib.getExe' pkgs.dbus "dbus-update-activation-environment"} --systemd --all"
|
||||||
"${lib.getExe wallpaper_changer}"
|
"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"
|
||||||
"${clipsync}"
|
"awww-daemon"
|
||||||
|
"wl-clip-persist --clipboard both"
|
||||||
"clipse -listen"
|
"clipse -listen"
|
||||||
"${lib.getExe' pkgs.udiskie "udiskie"}"
|
"${lib.getExe' pkgs.udiskie "udiskie"}"
|
||||||
];
|
];
|
||||||
@@ -153,9 +136,9 @@
|
|||||||
"$mainMod, M, exit,"
|
"$mainMod, M, exit,"
|
||||||
"$mainMod, E, exec, ghostty -e sh -c yazi"
|
"$mainMod, E, exec, ghostty -e sh -c yazi"
|
||||||
"$mainMod, F, togglefloating,"
|
"$mainMod, F, togglefloating,"
|
||||||
"$mainMod, D, exec, wofi --show drun"
|
|
||||||
"$mainMod, P, pseudo, # dwindle"
|
"$mainMod, P, pseudo, # dwindle"
|
||||||
"$mainMod, J, togglesplit, # dwindle"
|
"$mainMod, J, layoutmsg, togglesplit"
|
||||||
|
"$mainMod, K, layoutmsg, swapsplit"
|
||||||
|
|
||||||
# Move focus with mainMod + arrow keys
|
# Move focus with mainMod + arrow keys
|
||||||
"$mainMod, left, movefocus, l"
|
"$mainMod, left, movefocus, l"
|
||||||
@@ -210,20 +193,32 @@
|
|||||||
"$mainMod, F2, exec, ${lib.getExe pkgs.brightnessctl} -d *::kbd_backlight set 33%-"
|
"$mainMod, F2, exec, ${lib.getExe pkgs.brightnessctl} -d *::kbd_backlight set 33%-"
|
||||||
|
|
||||||
# Volume and Media Control
|
# Volume and Media Control
|
||||||
", XF86AudioRaiseVolume, exec, pamixer -i 5 "
|
|
||||||
", XF86AudioLowerVolume, exec, pamixer -d 5 "
|
|
||||||
", XF86AudioMute, exec, pamixer -t"
|
", XF86AudioMute, exec, pamixer -t"
|
||||||
", XF86AudioMicMute, exec, pamixer --default-source -m"
|
", 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
|
# Brightness control
|
||||||
", XF86MonBrightnessDown, exec, ${lib.getExe pkgs.brightnessctl} set 5%- "
|
", XF86MonBrightnessDown, exec, ${lib.getExe pkgs.brightnessctl} set 5%- "
|
||||||
", XF86MonBrightnessUp, exec, ${lib.getExe pkgs.brightnessctl} set +5% "
|
", XF86MonBrightnessUp, exec, ${lib.getExe pkgs.brightnessctl} set +5% "
|
||||||
|
];
|
||||||
|
|
||||||
# Waybar
|
binde = [
|
||||||
"$mainMod, B, exec, pkill -SIGUSR1 waybar"
|
", XF86AudioRaiseVolume, exec, pamixer -i 5 "
|
||||||
#"$mainMod, W, exec, pkill -SIGUSR2 waybar"
|
", 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
|
# 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" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
@@ -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
@@ -1,21 +1,13 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, lib, ... }: let
|
||||||
let
|
colors = config.lib.stylix.colors.withHashtag;
|
||||||
colors = config.lib.stylix.colors;
|
accent = colors.${config.stylix.accent};
|
||||||
in {
|
in {
|
||||||
home.packages = [ pkgs.mako ];
|
services.mako = {
|
||||||
xdg.configFile."mako/config".text = ''
|
enable = true;
|
||||||
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
|
|
||||||
|
|
||||||
[urgency=high]
|
settings = {
|
||||||
border-color=#${colors.base09}
|
border-color = lib.mkForce accent;
|
||||||
|
default-timeout = 5000;
|
||||||
[urgency=low]
|
};
|
||||||
border-color=#${colors.base04}
|
};
|
||||||
'';
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
{ config, pkgs, ... }: let
|
{ config, pkgs, ... }: let
|
||||||
icon = pkgs.fetchurl {
|
icon = pkgs.fetchurl {
|
||||||
url = "https://preview.redd.it/a2nga4jvjy291.png?width=640&crop=smart&auto=webp&s=7d1458b41101c960bc13c28a6b92c5a6ddc20210";
|
url = "https://cloud.lair.moe/pub/nixos-chan.webp?raw";
|
||||||
name = "nixos-chan.png";
|
name = "nixos-chan.webp";
|
||||||
sha256 = "sha256-9pleL+PiiylT8/aWw0iGve1iY3h0XohSQ7MVILzabHY=";
|
sha256 = "sha256-0majB9ljjMdZwvOijEgWdFKxWLje5tHgXHBJUWZfHfY=";
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
home.packages = [ pkgs.neofetch ];
|
home.packages = [ pkgs.fastfetch ];
|
||||||
xdg.configFile."neofetch/config.conf".text = ''
|
xdg.configFile."neofetch/config.conf".text = ''
|
||||||
print_info() {
|
print_info() {
|
||||||
info title
|
info title
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
{ pkgs-fixed, lib, host, ... }:
|
{ pkgs-pinned, lib, osConfig, ... }:
|
||||||
|
|
||||||
lib.mkIf (!host.laptop) {
|
lib.mkIf (!osConfig.host.laptop) {
|
||||||
home.packages = with pkgs-fixed; [
|
home.packages = with pkgs-pinned; [
|
||||||
(blender.override { cudaSupport = true; })
|
(blender.override { cudaSupport = true; })
|
||||||
aseprite
|
aseprite
|
||||||
|
krita
|
||||||
|
gimp
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
{ pkgs-fixed, ... }: {
|
|
||||||
home.packages = with pkgs-fixed; [
|
|
||||||
vscode
|
|
||||||
jetbrains.pycharm-community
|
|
||||||
jetbrains.idea-community
|
|
||||||
android-studio
|
|
||||||
];
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{ pkgs, ... }: {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
burpsuite
|
||||||
|
binwalk
|
||||||
|
exiftool
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -1,13 +1,14 @@
|
|||||||
{ pkgs, inputs, pkgs-fixed, ... }: {
|
{ pkgs, pkgs-stable, ... }: {
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
google-chrome
|
ayugram-desktop
|
||||||
inputs.ayugram-desktop.packages.${pkgs.system}.ayugram-desktop
|
|
||||||
# pkgs-stable.vesktop
|
|
||||||
vesktop
|
vesktop
|
||||||
obs-studio
|
obs-studio
|
||||||
mpv
|
mpv
|
||||||
|
imhex
|
||||||
obsidian
|
obsidian
|
||||||
pkgs-fixed.thunderbird
|
pkgs-stable.qbittorrent
|
||||||
|
thunderbird
|
||||||
libreoffice
|
libreoffice
|
||||||
|
pear-desktop
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{ stdenv, lib, config, colors, ... }:
|
{ stdenv, colors, accent ? colors.base0B, ... }:
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "AGS theme";
|
name = "AGS theme";
|
||||||
|
|
||||||
@@ -9,9 +9,9 @@
|
|||||||
echo \$bg: \#${colors.base00}\; > colors.scss
|
echo \$bg: \#${colors.base00}\; > colors.scss
|
||||||
echo \$surface0: \#${colors.base02}\; >> colors.scss
|
echo \$surface0: \#${colors.base02}\; >> colors.scss
|
||||||
echo \$fg: \#${colors.base05}\; >> 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 = ''
|
installPhase = ''
|
||||||
|
|||||||
@@ -33,7 +33,10 @@ window.Bar {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.Workspaces {
|
.Workspaces {
|
||||||
|
padding: 0;
|
||||||
|
|
||||||
button {
|
button {
|
||||||
|
margin: 0;
|
||||||
&:hover label {
|
&:hover label {
|
||||||
background: $surface0;
|
background: $surface0;
|
||||||
color: $accent;
|
color: $accent;
|
||||||
@@ -48,7 +51,7 @@ window.Bar {
|
|||||||
label {
|
label {
|
||||||
transition: 200ms;
|
transition: 200ms;
|
||||||
padding: 0 6px;
|
padding: 0 6px;
|
||||||
margin: 2px;
|
margin: 0px;
|
||||||
border-radius: $radius;
|
border-radius: $radius;
|
||||||
border: 1pt solid transparent;
|
border: 1pt solid transparent;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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;
|
||||||
|
})
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
{ pkgs, inputs, ... }: {
|
{ pkgs, ... }: {
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
scrot
|
scrot
|
||||||
ffmpeg
|
ffmpeg
|
||||||
@@ -20,5 +20,30 @@
|
|||||||
dig
|
dig
|
||||||
mtr
|
mtr
|
||||||
imagemagick
|
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
@@ -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 = {
|
qt = {
|
||||||
enable = true;
|
enable = true;
|
||||||
platformTheme.name = "qtct";
|
platformTheme.name = "qtct";
|
||||||
|
|||||||
@@ -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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
programs.ssh = {
|
||||||
|
enable = true;
|
||||||
|
enableDefaultConfig = false;
|
||||||
|
settings = {
|
||||||
|
"*" = {
|
||||||
|
serverAliveInterval = 30;
|
||||||
|
serverAliveCountMax = 5;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -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.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
services = {
|
||||||
|
walker = {
|
||||||
|
enable = true;
|
||||||
|
systemd.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
elephant.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
wayland.windowManager.hyprland.settings.bind = [
|
||||||
|
"$mainMod, D, exec, walker"
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -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"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -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
@@ -1,66 +1,319 @@
|
|||||||
{ pkgs, lib, ... }: let
|
{ pkgs, lib, inputs, ... }: let
|
||||||
yazi-plugins = pkgs.fetchFromGitHub {
|
hostSystem = pkgs.stdenv.hostPlatform.system;
|
||||||
owner = "yazi-rs";
|
|
||||||
repo = "plugins";
|
yaziPkg = inputs.yazi.packages.${hostSystem}.default.override {
|
||||||
rev = "273019910c1111a388dd20e057606016f4bd0d17";
|
_7zz = pkgs._7zz-rar;
|
||||||
hash = "sha256-80mR86UWgD11XuzpVNn56fmGRkvj0af2cFaZkU8M31I=";
|
};
|
||||||
};
|
|
||||||
starship = pkgs.fetchFromGitHub {
|
yaziOpen = pkgs.writeShellScriptBin "yazi-open" ''
|
||||||
owner = "Rolv-Apneseth";
|
set -efu
|
||||||
repo = "starship.yazi";
|
|
||||||
rev = "6c639b474aabb17f5fecce18a4c97bf90b016512";
|
target="''${1:-$HOME}"
|
||||||
sha256 = "sha256-bhLUziCDnF4QDCyysRn7Az35RAy8ibZIVUzoPgyEO1A=";
|
|
||||||
};
|
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 {
|
in {
|
||||||
programs.yazi = {
|
home.packages = with pkgs; [
|
||||||
enable = true;
|
( ouch.override { enableUnfree = true; } )
|
||||||
enableZshIntegration = true;
|
yaziOpen
|
||||||
shellWrapperName = "y";
|
];
|
||||||
|
|
||||||
settings = {
|
home.sessionVariables = {
|
||||||
manager = {
|
GTK_USE_PORTAL = "1";
|
||||||
show_hidden = true;
|
};
|
||||||
};
|
|
||||||
preview = {
|
|
||||||
max_width = 1000;
|
|
||||||
max_height = 1000;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
plugins = {
|
xdg.configFile."xdg-desktop-portal-termfilechooser/config".text = ''
|
||||||
chmod = "${yazi-plugins}/chmod.yazi";
|
[filechooser]
|
||||||
full-border = "${yazi-plugins}/full-border.yazi";
|
cmd=${lib.getExe yaziFileChooser}
|
||||||
max-preview = "${yazi-plugins}/max-preview.yazi";
|
default_dir=$HOME
|
||||||
starship = starship;
|
open_mode=suggested
|
||||||
};
|
save_mode=last
|
||||||
|
'';
|
||||||
|
|
||||||
initLua = ''
|
xdg.desktopEntries.yazi = {
|
||||||
require("full-border"):setup()
|
name = "Yazi";
|
||||||
require("starship"):setup()
|
genericName = "File Manager";
|
||||||
'';
|
exec = "${lib.getExe yaziOpen} %U";
|
||||||
|
terminal = false;
|
||||||
|
mimeType = [ "inode/directory" ];
|
||||||
|
categories = [ "System" "FileTools" "FileManager" ];
|
||||||
|
startupNotify = false;
|
||||||
|
};
|
||||||
|
|
||||||
keymap = {
|
xdg.mimeApps = {
|
||||||
manager.prepend_keymap = [
|
enable = true;
|
||||||
{
|
defaultApplications = {
|
||||||
on = "T";
|
"inode/directory" = "yazi.desktop";
|
||||||
run = "plugin --sync max-preview";
|
"application/x-gnome-saved-search" = "yazi.desktop";
|
||||||
desc = "Maximize or restore the preview pane";
|
};
|
||||||
}
|
};
|
||||||
{
|
|
||||||
on = ["c" "m"];
|
xdg.dataFile."dbus-1/services/org.freedesktop.FileManager1.service".text = ''
|
||||||
run = "plugin chmod";
|
[D-BUS Service]
|
||||||
desc = "Chmod on selected files";
|
Name=org.freedesktop.FileManager1
|
||||||
}
|
Exec=${lib.getExe fileManager1}
|
||||||
{
|
'';
|
||||||
on = [ "<C-n>" ];
|
|
||||||
run = ''shell '${lib.getExe pkgs.xdragon} -x -i -T "$@"' --confirm'';
|
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"
|
||||||
on = [ "g" "<S-d>" ];
|
"match:title Yazi File Picker, size 1200 800"
|
||||||
run = ''cd /mnt/D'';
|
];
|
||||||
desc = "Goto D drive";
|
|
||||||
}
|
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
@@ -1,5 +1,6 @@
|
|||||||
{ config, pkgs, ... }: {
|
{ config, osConfig, pkgs, lib, ... }: {
|
||||||
home.packages = [ pkgs.nh ];
|
home.packages = [ pkgs.nh ];
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
zoxide.enable = true;
|
zoxide.enable = true;
|
||||||
fzf.enable = true;
|
fzf.enable = true;
|
||||||
@@ -36,7 +37,10 @@
|
|||||||
read_only = " RO";
|
read_only = " RO";
|
||||||
};
|
};
|
||||||
nix_shell.format = "[nix-shell]($style) ";
|
nix_shell.format = "[nix-shell]($style) ";
|
||||||
os.disabled = false;
|
os = {
|
||||||
|
disabled = false;
|
||||||
|
style = "white";
|
||||||
|
};
|
||||||
python = {
|
python = {
|
||||||
symbol = "py ";
|
symbol = "py ";
|
||||||
python_binary = ["python3" "python"];
|
python_binary = ["python3" "python"];
|
||||||
@@ -51,31 +55,23 @@
|
|||||||
autosuggestion.enable = true;
|
autosuggestion.enable = true;
|
||||||
syntaxHighlighting.enable = true;
|
syntaxHighlighting.enable = true;
|
||||||
|
|
||||||
shellAliases =
|
shellAliases = let
|
||||||
let
|
flakeDir = "~/nix";
|
||||||
flakeDir = "~/nix";
|
in {
|
||||||
in {
|
|
||||||
rb = "nh os switch ${flakeDir}";
|
rb = "nh os switch ${flakeDir}";
|
||||||
|
trb = "nh os test ${flakeDir}";
|
||||||
upd = "nix flake update --flake ${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}";
|
cat = "${pkgs.lib.getExe pkgs.bat}";
|
||||||
cd = "z";
|
cd = "z";
|
||||||
lg = "lazygit";
|
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 "$(zoxide init zsh)"
|
||||||
eval "$(nh completions --shell zsh)"
|
|
||||||
source "$(fzf-share)/key-bindings.zsh"
|
source "$(fzf-share)/key-bindings.zsh"
|
||||||
source "$(fzf-share)/completion.zsh"
|
source "$(fzf-share)/completion.zsh"
|
||||||
'';
|
'';
|
||||||
@@ -84,8 +80,12 @@
|
|||||||
TERM=xterm-256color
|
TERM=xterm-256color
|
||||||
'';
|
'';
|
||||||
|
|
||||||
history.size = 10000;
|
history = {
|
||||||
history.path = "${config.xdg.dataHome}/zsh/history";
|
size = 10000;
|
||||||
|
path = "${config.xdg.dataHome}/zsh/history";
|
||||||
|
expireDuplicatesFirst = true;
|
||||||
|
ignoreDups = true;
|
||||||
|
};
|
||||||
|
|
||||||
oh-my-zsh.enable = true;
|
oh-my-zsh.enable = true;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
My gf
|
||||||
|
|
||||||
|
- **Theme:** eris
|
||||||
|
- **Cursor:** [Miku](https://ko-fi.com/s/dcea0e990f)
|
||||||
+17
-6
@@ -1,11 +1,22 @@
|
|||||||
{ pkgs, pkgs-fixed, host, ... }: {
|
{ pkgs, pkgs-pinned, host, ... }: {
|
||||||
disabledModules = [ ../../modules/user/packages/coding.nix ];
|
imports = [
|
||||||
|
../../modules/user/packages/cs_utils.nix
|
||||||
|
];
|
||||||
|
disabledModules = [
|
||||||
|
../../modules/user/packages/art.nix
|
||||||
|
];
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
nautilus
|
nautilus
|
||||||
burpsuite
|
|
||||||
binwalk
|
|
||||||
exiftool
|
|
||||||
python3
|
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";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
{
|
{
|
||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
userName = "chest";
|
settings.user = {
|
||||||
userEmail = "e.a.sunduk@gmail.com";
|
name = "chest";
|
||||||
|
email = "e.a.sunduk@gmail.com";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,26 +1,14 @@
|
|||||||
{ pkgs, lib, config, inputs, ... }: {
|
{ 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
|
wayland.windowManager.hyprland = let
|
||||||
colors = config.lib.stylix.colors;
|
colors = config.lib.stylix.colors;
|
||||||
|
accent = colors.${config.stylix.accent};
|
||||||
in {
|
in {
|
||||||
settings = {
|
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 = {
|
general = {
|
||||||
gaps_in = 5;
|
gaps_in = 5;
|
||||||
gaps_out = 5;
|
gaps_out = 5;
|
||||||
border_size = 2;
|
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)";
|
"col.inactive_border" = "rgba(${colors.base05}aa)";
|
||||||
|
|
||||||
layout = "dwindle";
|
layout = "dwindle";
|
||||||
@@ -60,26 +48,15 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
dwindle = {
|
dwindle = {
|
||||||
pseudotile = true;
|
|
||||||
smart_split = true;
|
smart_split = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
master.new_status = "master";
|
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 = {
|
misc = {
|
||||||
animate_manual_resizes = true;
|
animate_manual_resizes = true;
|
||||||
animate_mouse_windowdragging = true;
|
animate_mouse_windowdragging = true;
|
||||||
enable_swallow = true;
|
enable_swallow = true;
|
||||||
render_ahead_of_time = false;
|
|
||||||
disable_hyprland_logo = false;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
bind = [
|
bind = [
|
||||||
|
|||||||
@@ -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 = {
|
stylix = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
overlays.enable = false;
|
||||||
|
|
||||||
targets = {
|
targets = {
|
||||||
hyprland.enable = false;
|
hyprland.enable = false;
|
||||||
waybar.enable = false;
|
waybar.enable = false;
|
||||||
@@ -8,6 +89,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
base16Scheme = "${pkgs.base16-schemes}/share/themes/eris.yaml";
|
base16Scheme = "${pkgs.base16-schemes}/share/themes/eris.yaml";
|
||||||
|
accent = "base0E";
|
||||||
polarity = "dark";
|
polarity = "dark";
|
||||||
|
|
||||||
image = pkgs.fetchurl {
|
image = pkgs.fetchurl {
|
||||||
@@ -15,20 +97,16 @@
|
|||||||
sha256 = "0ypqnq7bsr2giq7nq1c3xrw2m0gkii9j5zhfp512r93wc96zvm50";
|
sha256 = "0ypqnq7bsr2giq7nq1c3xrw2m0gkii9j5zhfp512r93wc96zvm50";
|
||||||
};
|
};
|
||||||
|
|
||||||
iconTheme = {
|
icons = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.pop-icon-theme;
|
package = pkgs.pop-icon-theme;
|
||||||
dark = "Pop-Dark";
|
dark = "Pop-Dark";
|
||||||
};
|
};
|
||||||
|
|
||||||
cursor = if host.name == "Impreza" then {
|
cursor = {
|
||||||
name = "catppuccin-mocha-pink-cursors";
|
name = "Miku";
|
||||||
size = 16;
|
size = 16;
|
||||||
package = pkgs.catppuccin-cursors.mochaPink;
|
package = miku-cursor;
|
||||||
} else {
|
|
||||||
name = "catppuccin-mocha-peach-cursors";
|
|
||||||
size = 16;
|
|
||||||
package = pkgs.catppuccin-cursors.mochaPeach;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
fonts = {
|
fonts = {
|
||||||
@@ -53,4 +131,17 @@
|
|||||||
terminal = .5;
|
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;
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
@@ -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 = [
|
imports = [
|
||||||
inputs.home-manager.nixosModules.home-manager {
|
inputs.home-manager.nixosModules.home-manager {
|
||||||
home-manager = {
|
home-manager = {
|
||||||
useGlobalPkgs = true;
|
useGlobalPkgs = true;
|
||||||
useUserPackages = true;
|
useUserPackages = true;
|
||||||
backupFileExtension = "rebuild";
|
backupFileExtension = "rebuild";
|
||||||
|
overwriteBackup = true;
|
||||||
|
|
||||||
users.${name} = {
|
users.${name} = {
|
||||||
imports = [
|
imports = [
|
||||||
inputs.sops-nix.homeManagerModules.sops
|
inputs.sops-nix.homeManagerModules.sops
|
||||||
inputs.stylix.homeManagerModules.stylix
|
inputs.stylix.homeModules.stylix
|
||||||
../modules/user.nix
|
../modules/user.nix
|
||||||
./${name}/modules/git.nix
|
./${name}/modules/git.nix
|
||||||
./${name}/modules/hyprland.nix
|
|
||||||
./${name}/modules/style.nix
|
./${name}/modules/style.nix
|
||||||
|
./${name}/modules/waybar.nix
|
||||||
./${name}/home.nix
|
./${name}/home.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -23,14 +32,12 @@
|
|||||||
stateVersion = "23.11";
|
stateVersion = "23.11";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
extraSpecialArgs = {
|
extraSpecialArgs = {
|
||||||
inherit inputs;
|
inherit inputs;
|
||||||
inherit pkgs-stable;
|
inherit pkgs-stable;
|
||||||
inherit pkgs-fixed;
|
inherit pkgs-pinned;
|
||||||
host = {
|
username = name;
|
||||||
laptop = laptop;
|
|
||||||
name = config.networking.hostName;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -49,8 +56,8 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
services.greetd = let
|
services.greetd = let
|
||||||
tuigreet = lib.getExe pkgs.greetd.tuigreet;
|
tuigreet = lib.getExe pkgs.tuigreet;
|
||||||
session = lib.getExe inputs.hyprland.packages.${pkgs.system}.default;
|
session = lib.getExe' inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.default "start-hyprland";
|
||||||
in {
|
in {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
My config
|
||||||
|
|
||||||
|
- **Theme:** [Catppuccin](https://catppuccin.com) Mocha
|
||||||
|
- **Cursor:** [\[Date A Live\] Kurumi Tokisaki](https://ko-fi.com/s/66a6c36df1)
|
||||||
@@ -1,3 +1,19 @@
|
|||||||
{
|
{ pkgs, ... }: {
|
||||||
|
imports = [
|
||||||
|
../../modules/user/packages/tex.nix
|
||||||
|
];
|
||||||
programs.hyprlock.enable = true;
|
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";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
{
|
{
|
||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
userName = "Sweetbread";
|
settings.user = {
|
||||||
userEmail = "risdeveau@codrs.ru";
|
name = "Sweetbread";
|
||||||
|
email = "risdeveau@lair.moe";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,32 +1,136 @@
|
|||||||
{ pkgs, lib, config, inputs, ... }: {
|
{ pkgs, lib, config, osConfig, inputs, ... }: {
|
||||||
imports = [(
|
|
||||||
import ../../../modules/user/patterns/hyprland.nix {
|
|
||||||
inherit lib;
|
|
||||||
inherit pkgs;
|
|
||||||
inherit config;
|
|
||||||
inherit inputs;
|
|
||||||
collection = "sweetbread/1764377";
|
|
||||||
swww_flags = "--transition-type center";
|
|
||||||
}
|
|
||||||
)];
|
|
||||||
|
|
||||||
wayland.windowManager.hyprland = let
|
wayland.windowManager.hyprland = let
|
||||||
colors = config.lib.stylix.colors;
|
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 {
|
in {
|
||||||
settings = {
|
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 = {
|
general = {
|
||||||
gaps_in = 5;
|
gaps_in = 2;
|
||||||
gaps_out = 20;
|
gaps_out = 10;
|
||||||
border_size = 3;
|
border_size = 3;
|
||||||
"col.active_border" = lib.mkForce "rgba(${colors.base0C}ee) rgba(${colors.base0B}ee) 45deg";
|
"col.active_border" = lib.mkForce "rgba(${colors.base0C}aa) rgba(${accent}aa) 45deg";
|
||||||
"col.inactive_border" = lib.mkForce "rgba(${colors.base05}aa)";
|
|
||||||
|
|
||||||
layout = "dwindle";
|
layout = "dwindle";
|
||||||
};
|
};
|
||||||
@@ -41,11 +145,7 @@
|
|||||||
new_optimizations = true;
|
new_optimizations = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
shadow = {
|
shadow.enabled = false;
|
||||||
enabled = true;
|
|
||||||
range = 4;
|
|
||||||
render_power = 3;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
animations = {
|
animations = {
|
||||||
@@ -64,32 +164,31 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
dwindle = {
|
dwindle = {
|
||||||
pseudotile = true;
|
|
||||||
smart_split = true;
|
smart_split = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
master.new_status = "master";
|
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 = {
|
misc = {
|
||||||
animate_manual_resizes = true;
|
animate_manual_resizes = true;
|
||||||
animate_mouse_windowdragging = true;
|
animate_mouse_windowdragging = true;
|
||||||
enable_swallow = true;
|
enable_swallow = true;
|
||||||
render_ahead_of_time = false;
|
|
||||||
disable_hyprland_logo = false;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
exec-once = [
|
||||||
|
"${lib.getExe wallpaper_changer}"
|
||||||
|
];
|
||||||
|
|
||||||
|
workspace = [
|
||||||
|
"2, layout:scrolling"
|
||||||
|
];
|
||||||
|
|
||||||
bind = [
|
bind = [
|
||||||
" , Print, exec, grimblast --notify --freeze copy output"
|
" , Print, exec, ${lib.getExe pkgs.hyprshot} -z -o ~/Screenshots -m active -m output"
|
||||||
"CTRL, Print, exec, grimblast --notify --freeze copy area"
|
"CTRL, Print, exec, ${lib.getExe pkgs.hyprshot} -z -o ~/Screenshots -m region"
|
||||||
"ALT , Print, exec, grimblast --notify --freeze copy active"
|
"ALT , Print, exec, ${lib.getExe pkgs.hyprshot} -z -o ~/Screenshots -m active -m window"
|
||||||
|
|
||||||
|
"$mainMod, W, exec, ${lib.getExe wallpaper_changer}"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -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 = {
|
stylix = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
overlays.enable = false;
|
||||||
|
|
||||||
targets = {
|
targets = {
|
||||||
hyprland.enable = true;
|
hyprpaper.enable = lib.mkForce false;
|
||||||
waybar.enable = false;
|
waybar.enable = false;
|
||||||
kitty.variant256Colors = true;
|
kitty.variant256Colors = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml";
|
base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml";
|
||||||
|
accent = "base0B";
|
||||||
polarity = "dark";
|
polarity = "dark";
|
||||||
|
|
||||||
image = pkgs.fetchurl {
|
image = pkgs.fetchurl {
|
||||||
@@ -15,16 +113,16 @@
|
|||||||
sha256 = "sha256-u4d21a0Kh5OHEzQMSQ7+ey/Va2ftS1DefrOQFahaeC4=";
|
sha256 = "sha256-u4d21a0Kh5OHEzQMSQ7+ey/Va2ftS1DefrOQFahaeC4=";
|
||||||
};
|
};
|
||||||
|
|
||||||
iconTheme = {
|
icons = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.pop-icon-theme;
|
package = pkgs.pop-icon-theme;
|
||||||
dark = "Pop-Dark";
|
dark = "Pop-Dark";
|
||||||
};
|
};
|
||||||
|
|
||||||
cursor = {
|
cursor = {
|
||||||
name = "catppuccin-mocha-green-cursors";
|
name = "Kurumi";
|
||||||
size = 24;
|
size = 32;
|
||||||
package = pkgs.catppuccin-cursors.mochaGreen;
|
package = kurumi-cursor;
|
||||||
};
|
};
|
||||||
|
|
||||||
fonts = {
|
fonts = {
|
||||||
@@ -38,6 +136,11 @@
|
|||||||
package = (pkgs.google-fonts.override { fonts = [ "Gabriela" ]; });
|
package = (pkgs.google-fonts.override { fonts = [ "Gabriela" ]; });
|
||||||
};
|
};
|
||||||
|
|
||||||
|
sansSerif = {
|
||||||
|
name = "Pixeloid Sans";
|
||||||
|
package = pixeloid;
|
||||||
|
};
|
||||||
|
|
||||||
emoji = {
|
emoji = {
|
||||||
package = pkgs.noto-fonts-monochrome-emoji;
|
package = pkgs.noto-fonts-monochrome-emoji;
|
||||||
name = "Noto Emoji";
|
name = "Noto Emoji";
|
||||||
@@ -54,4 +157,19 @@
|
|||||||
terminal = .9;
|
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;
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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"
|
||||||
|
];
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user