Compare commits
177 Commits
a4ed75ef0e
...
main
Author | SHA1 | Date | |
---|---|---|---|
c0d1341448
|
|||
bba55dc973
|
|||
d48559e6d8
|
|||
c18c1d0060
|
|||
bec0e9d43a
|
|||
3937656ce1
|
|||
6554808614
|
|||
8a35e18e4e
|
|||
930417968f
|
|||
7d0e089e3f
|
|||
d135a13a5a
|
|||
9c0e7c4cae
|
|||
c65a7997e2
|
|||
61d4307a10
|
|||
81c866645f
|
|||
1065479388
|
|||
5d9782d733
|
|||
67009df2a9
|
|||
547e41d3f9
|
|||
8fe81eb9cd
|
|||
e599e4c5c4
|
|||
b42de80180
|
|||
2093304e4c
|
|||
e30f4a74cd
|
|||
7c72e527e7
|
|||
f854f65029
|
|||
9034502635
|
|||
24b195b766
|
|||
1ae179eb85
|
|||
efaae1a801
|
|||
27f29769e2
|
|||
c586cc93d8
|
|||
5526b559cf
|
|||
47c88ecf63
|
|||
71d94e52a8
|
|||
268e527db6
|
|||
f3bf120805
|
|||
422b0551db
|
|||
ac28a3442f
|
|||
078351becd
|
|||
46be9aa879
|
|||
8f91352720
|
|||
d3ce08e765
|
|||
5859b9d469
|
|||
a1cac8803a
|
|||
4054e42e21
|
|||
89ff07ac7b
|
|||
7641390aba
|
|||
539a1d8713
|
|||
b3ac24719a
|
|||
f8d4b52394
|
|||
4abde43c61
|
|||
686e36b144
|
|||
0bdff5ef5b
|
|||
02a8c645e9
|
|||
8217a70b34
|
|||
34795ac894
|
|||
a876874791
|
|||
6dbd2b86a2
|
|||
a4e5add644
|
|||
cc31b858f7
|
|||
e669331366
|
|||
453fda9a36
|
|||
e2f6ed72ed
|
|||
8a4af44494
|
|||
0c28f1e978
|
|||
1dc168ce63
|
|||
e170e9d2b7
|
|||
002b06bb91
|
|||
f39a105caf
|
|||
432fad779a
|
|||
590238d3e9
|
|||
fff9e50163
|
|||
161a5917f6
|
|||
e828500be7
|
|||
0db2cbfe19
|
|||
590a94af56
|
|||
c6d5a071b4
|
|||
9534e50252
|
|||
989c740184
|
|||
f6f5121d1e
|
|||
391886ef59
|
|||
0aec9e92c1
|
|||
7662e9cd6e
|
|||
5c11830083
|
|||
4397eec2a1
|
|||
3cd27e0e79
|
|||
572314fe46
|
|||
854a3be744
|
|||
a5a2e9ceac
|
|||
c58b5489d8
|
|||
4fb2c8cc12
|
|||
08deff70bc
|
|||
920c75e997
|
|||
2108320d1d
|
|||
463e6f1630
|
|||
16eb328cf5
|
|||
672f28c75c
|
|||
f5a5f4b87c
|
|||
95671a0343
|
|||
b63073cab7
|
|||
a22109abba
|
|||
af05ec7980
|
|||
ddd039c803
|
|||
8ae65a6752
|
|||
d81c644665
|
|||
f0ecc5bdb9
|
|||
7139cfb640
|
|||
5dfa9d62c4
|
|||
aff9f72f2c
|
|||
7bc1d7e36a
|
|||
f213931b6f
|
|||
52dcc3279e
|
|||
56bad06595
|
|||
afd1d00116
|
|||
14eaee2bbc
|
|||
43334d6dbd
|
|||
d70b2f7f8a
|
|||
38579e3cb4
|
|||
6658a54631
|
|||
9d51e09afe
|
|||
30fcac5ff6
|
|||
fce3a4ff0c
|
|||
8ee252f59c
|
|||
807265c4bc
|
|||
d6db686273
|
|||
4e2702dfd1
|
|||
487a413bca
|
|||
34fe54974c
|
|||
0fe66b9671
|
|||
07838aa669
|
|||
1a4f54d7bc
|
|||
1f3d819061
|
|||
38193c62ec
|
|||
7f073e121c
|
|||
75990ccc86
|
|||
561d02b173
|
|||
4cf90e6dfa
|
|||
6c7305c24d
|
|||
260502c6ce
|
|||
ee3a505d38
|
|||
4fdb88bca4
|
|||
338dc7454f
|
|||
1aad949947
|
|||
8701ea20c6
|
|||
4652ce19db
|
|||
9510cc48e2
|
|||
03bcc94645
|
|||
a87f912600
|
|||
b55a50ada8
|
|||
6ae0a38f62
|
|||
5a6daf52ca
|
|||
7e2458b322
|
|||
5fe09a598a
|
|||
83949480c8
|
|||
86ea201653
|
|||
3bf0d20c63
|
|||
9eca8b59d3
|
|||
5393154b91
|
|||
a349e3803d
|
|||
5e8f5bf7f3
|
|||
6279b93b1e
|
|||
019ea4247a
|
|||
8c9ab14a76
|
|||
9bee43fc50
|
|||
38e0f83009
|
|||
37d57cdfb5
|
|||
3b5775f58b
|
|||
3cf1a29d54
|
|||
17b2c4b55d
|
|||
566c25977b
|
|||
a8f0bb0740
|
|||
12a1ba83bf
|
|||
607997ce93
|
|||
a6bdb95d98
|
|||
8e96d4dc5a
|
|||
2083f9b87b
|
20
LICENSE
Normal file
20
LICENSE
Normal file
@ -0,0 +1,20 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
Copyright 2025 unexplrd@linerds.us
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the “Software”), to deal
|
||||
in the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
|
||||
OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
23
README.md
23
README.md
@ -1,6 +1,17 @@
|
||||
<h1>So what is this?</h1>
|
||||
<p>This is a personal config based on <a href="https://github.com/numtide/blueprint">Blueprint</a>, and it's pretty usable. If one wants to use it, they have to change and adapt it for their own use case, for that please visit the original repo, as it contains the necessary documentation.</p>
|
||||
<h2>TODOs:</h2>
|
||||
<ul>
|
||||
<li>i'll put that in when i recall what i wanted to add</li>
|
||||
</ul>
|
||||
# NixOS Configuration
|
||||
## So what is this?
|
||||
|
||||
This is a personal NixOS config based on
|
||||
[Blueprint](https://github.com/numtide/blueprint).
|
||||
This repo is mainly used to sync changes between devices. If you want to
|
||||
use it - it's pretty composable, so modules can be integrated in your
|
||||
configs without much hassle.
|
||||
|
||||
## Credits
|
||||
Configurations I took code/ideas from:
|
||||
- [github:TheMaxMur/NixOS-Configuration](https://github.com/TheMaxMur/NixOS-Configuration)
|
||||
- [github:nix-community/srvos](https://github.com/nix-community/srvos)
|
||||
- [github:cloud-gouv/securix](https://github.com/cloud-gouv/securix)
|
||||
- [GLF OS](https://www.gaminglinux.fr/glf-os/en)
|
||||
|
||||
Thx a lot <3
|
||||
|
24
UNLICENSE
24
UNLICENSE
@ -1,24 +0,0 @@
|
||||
This is free and unencumbered software released into the public domain.
|
||||
|
||||
Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||
distribute this software, either in source code form or as a compiled
|
||||
binary, for any purpose, commercial or non-commercial, and by any
|
||||
means.
|
||||
|
||||
In jurisdictions that recognize copyright laws, the author or authors
|
||||
of this software dedicate any and all copyright interest in the
|
||||
software to the public domain. We make this dedication for the benefit
|
||||
of the public at large and to the detriment of our heirs and
|
||||
successors. We intend this dedication to be an overt act of
|
||||
relinquishment in perpetuity of all present and future rights to this
|
||||
software under copyright law.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
For more information, please refer to <https://unlicense.org/>
|
715
flake.lock
generated
715
flake.lock
generated
File diff suppressed because it is too large
Load Diff
130
flake.nix
130
flake.nix
@ -2,40 +2,104 @@
|
||||
description = "unexplrd's personal configuration";
|
||||
|
||||
inputs = {
|
||||
blueprint.url = "github:numtide/blueprint";
|
||||
catppuccin.url = "github:catppuccin/nix";
|
||||
chaotic.url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
|
||||
disko.url = "github:nix-community/disko/latest";
|
||||
home-manager.url = "github:nix-community/home-manager";
|
||||
hyprland.url = "github:hyprwm/Hyprland";
|
||||
hyprsunset.url = "github:hyprwm/hyprsunset";
|
||||
lanzaboote.url = "github:nix-community/lanzaboote/v0.4.2";
|
||||
# lix.url = "https://git.lix.systems/lix-project/nixos-module/archive/2.92.0-2.tar.gz";
|
||||
mysecrets.url = "git+ssh://gitea@gitea.linerds.us/unexplrd/nix-secrets";
|
||||
# neve.url = "git+https://gitea.linerds.us/unexplrd/Neve";
|
||||
nix-flatpak.url = "github:gmodena/nix-flatpak";
|
||||
nix-index-database.url = "github:nix-community/nix-index-database";
|
||||
# nixos-cosmic.url = "github:lilyinstarlight/nixos-cosmic";
|
||||
# lix = {
|
||||
# url = "https://git.lix.systems/lix-project/nixos-module/archive/2.93.1.tar.gz";
|
||||
# inputs.nixpkgs.follows = "nixpkgs";
|
||||
# };
|
||||
# neve = {
|
||||
# inputs.nixvim.follows = "nixvim";
|
||||
# url = "git+https://gitea.linerds.us/unexplrd/Neve";
|
||||
# };
|
||||
# nixvim.url = "github:nix-community/nixvim";
|
||||
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-unstable";
|
||||
sops-nix.url = "github:mic92/sops-nix";
|
||||
stylix.url = "github:danth/stylix";
|
||||
# TODO: somehow reduce the number of *.inputs.nixpkgs.follows = "nixpkgs" stuff, mb a function?
|
||||
blueprint.inputs.nixpkgs.follows = "nixpkgs";
|
||||
chaotic.inputs.nixpkgs.follows = "nixpkgs";
|
||||
disko.inputs.nixpkgs.follows = "nixpkgs";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
hyprland.inputs.nixpkgs.follows = "nixpkgs";
|
||||
hyprsunset.inputs.hyprland-protocols.follows = "hyprland/hyprland-protocols";
|
||||
hyprsunset.inputs.hyprutils.follows = "hyprland/hyprutils";
|
||||
hyprsunset.inputs.nixpkgs.follows = "nixpkgs";
|
||||
lanzaboote.inputs.nixpkgs.follows = "nixpkgs";
|
||||
# lix.inputs.nixpkgs.follows = "nixpkgs";
|
||||
mysecrets.flake = false;
|
||||
# neve.inputs.nixvim.follows = "nixvim";
|
||||
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
|
||||
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
|
||||
systems.url = "github:nix-systems/default";
|
||||
blueprint = {
|
||||
url = "github:numtide/blueprint";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.systems.follows = "systems";
|
||||
};
|
||||
chaotic = {
|
||||
url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
|
||||
inputs = {
|
||||
home-manager.follows = "home-manager";
|
||||
nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
disko = {
|
||||
url = "github:nix-community/disko/latest";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
ghostty = {
|
||||
url = "github:ghostty-org/ghostty";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.flake-utils.inputs.systems.follows = "systems";
|
||||
};
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
hyprland = {
|
||||
url = "github:hyprwm/Hyprland";
|
||||
inputs = {
|
||||
systems.follows = "systems";
|
||||
nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
hyprsunset = {
|
||||
url = "github:hyprwm/hyprsunset";
|
||||
inputs = {
|
||||
hyprland-protocols.follows = "hyprland/hyprland-protocols";
|
||||
hyprutils.follows = "hyprland/hyprutils";
|
||||
hyprwayland-scanner.follows = "hyprland/hyprwayland-scanner";
|
||||
nixpkgs.follows = "nixpkgs";
|
||||
systems.follows = "hyprland/systems";
|
||||
};
|
||||
};
|
||||
lanzaboote = {
|
||||
url = "github:nix-community/lanzaboote/v0.4.2";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
mysecrets = {
|
||||
url = "git+ssh://gitea@gitea.linerds.us/unexplrd/nix-secrets";
|
||||
flake = false;
|
||||
};
|
||||
nix-flatpak.url = "github:gmodena/nix-flatpak";
|
||||
nix-index-database = {
|
||||
url = "github:nix-community/nix-index-database";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nixos-cosmic = {
|
||||
url = "github:lilyinstarlight/nixos-cosmic";
|
||||
inputs = {
|
||||
nixpkgs-stable.follows = "nixpkgs-stable";
|
||||
nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
nixos-facter-modules.url = "github:numtide/nixos-facter-modules";
|
||||
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.11";
|
||||
nixpkgs = {
|
||||
url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
# workaround for `unexpected Nix daemon error: error: serialised integer 7022364302122705765 is too large for type 'j'`
|
||||
# url = "github:NixOS/nixpkgs/pull/413627/head";
|
||||
};
|
||||
sops-nix = {
|
||||
url = "github:mic92/sops-nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
stylix = {
|
||||
url = "github:danth/stylix";
|
||||
inputs = {
|
||||
# home-manager.follows = "home-manager";
|
||||
nixpkgs.follows = "nixpkgs";
|
||||
systems.follows = "systems";
|
||||
};
|
||||
};
|
||||
walker = {
|
||||
url = "github:abenz1267/walker";
|
||||
inputs = {
|
||||
nixpkgs.follows = "nixpkgs";
|
||||
systems.follows = "systems";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
outputs = inputs: inputs.blueprint {inherit inputs;};
|
||||
|
@ -1,56 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
imports = with inputs; [
|
||||
chaotic.nixosModules.default
|
||||
lanzaboote.nixosModules.lanzaboote
|
||||
];
|
||||
boot = {
|
||||
# kernelPackages = pkgs.linuxPackages_latest;
|
||||
consoleLogLevel = 0;
|
||||
kernelPackages = pkgs.linuxPackages_cachyos;
|
||||
kernelModules = ["kvm-amd"];
|
||||
kernelParams = [
|
||||
# "mitigations=auto"
|
||||
# "spectre_v2=on"
|
||||
# "spectre_v2_user=on"
|
||||
# "spectre_bhi=on"
|
||||
# "spec_store_bypass_disable=on"
|
||||
# "tsx=off"
|
||||
# "kvm.nx_huge_pages=force"
|
||||
# "l1d_flush=on"
|
||||
"amd_iommu=force_isolation"
|
||||
"debugfs=off"
|
||||
"efi=disable_early_pci_dma"
|
||||
"gather_data_sampling=force"
|
||||
# "ia32_emulation=0"
|
||||
"intel_iommu=on"
|
||||
"iommu.passthrough=0"
|
||||
"iommu.strict=1"
|
||||
"iommu=force"
|
||||
# "lockdown=confidentiality"
|
||||
# "module.sig_enforce=1"
|
||||
"page_alloc.shuffle=1"
|
||||
# "reg_file_data_sampling=on"
|
||||
# "spec_rstack_overflow=safe-ret"
|
||||
"vsyscall=none"
|
||||
];
|
||||
initrd = {
|
||||
availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod"];
|
||||
systemd.enable = true; # needed for auto-unlocking with TPM
|
||||
};
|
||||
loader.efi.canTouchEfiVariables = true;
|
||||
loader.systemd-boot = {
|
||||
enable = !config.boot.lanzaboote.enable;
|
||||
consoleMode = "auto";
|
||||
};
|
||||
lanzaboote = {
|
||||
enable = true;
|
||||
pkiBundle = "/var/lib/sbctl";
|
||||
};
|
||||
plymouth.enable = true;
|
||||
};
|
||||
}
|
@ -1,34 +1,42 @@
|
||||
{inputs, ...}: {
|
||||
imports = with inputs; [
|
||||
self.modules.shared.nixos
|
||||
self.nixosModules.desktop
|
||||
self.nixosModules.system
|
||||
./boot.nix
|
||||
./disko.nix
|
||||
./hardware.nix
|
||||
./networking.nix
|
||||
./nix.nix
|
||||
./programs.nix
|
||||
./services.nix
|
||||
./sops.nix
|
||||
./users.nix
|
||||
./minecraft.nix
|
||||
./disko
|
||||
./misc
|
||||
];
|
||||
|
||||
desktop.niri.enable = true;
|
||||
environment.memoryAllocator.provider = "mimalloc";
|
||||
locale.ukrainian.enable = true;
|
||||
module.stylix = {
|
||||
enable = true;
|
||||
theme = "helios";
|
||||
networking = {
|
||||
hostId = "c7f6c4a1";
|
||||
hostName = "dunamis";
|
||||
};
|
||||
opentabletdriver.enable = false;
|
||||
qmk-vial.enable = true;
|
||||
security.basic.enable = true;
|
||||
system.stateVersion = "25.05";
|
||||
|
||||
system.stateVersion = "25.11";
|
||||
time.timeZone = "Europe/Kyiv";
|
||||
virtual.libvirt.enable = true;
|
||||
wireless = {
|
||||
bluetooth.enable = true;
|
||||
bluetooth.enableBlueman = true;
|
||||
|
||||
desktop.niri.enable = true;
|
||||
|
||||
services.displayManager.autoLogin = {
|
||||
enable = true;
|
||||
user = "user";
|
||||
};
|
||||
|
||||
module = {
|
||||
config = {
|
||||
secureBoot = true;
|
||||
tpmDiskUnlock = true;
|
||||
vaapi = "intel-media-driver";
|
||||
};
|
||||
stylix = {
|
||||
enable = true;
|
||||
theme = "sandcastle";
|
||||
};
|
||||
locale = "uk_UA.UTF-8";
|
||||
misc = {
|
||||
opentabletdriver.enable = false;
|
||||
qmk-vial.enable = true;
|
||||
};
|
||||
virt.libvirt.enable = true;
|
||||
};
|
||||
}
|
||||
|
@ -1,81 +0,0 @@
|
||||
{inputs, ...}: {
|
||||
imports = with inputs; [
|
||||
disko.nixosModules.disko
|
||||
];
|
||||
disko.devices.nodev = {
|
||||
"/tmp" = {
|
||||
fsType = "tmpfs";
|
||||
mountOptions = ["rw" "nosuid" "nodev"];
|
||||
};
|
||||
};
|
||||
disko.devices.disk.main = {
|
||||
type = "disk";
|
||||
device = "/dev/disk/by-id/nvme-eui.000000000000000100a075244b5d6185";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
size = "2G";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [
|
||||
"umask=0077"
|
||||
"fmask=0022"
|
||||
"dmask=0022"
|
||||
"noexec"
|
||||
"nosuid"
|
||||
"nodev"
|
||||
];
|
||||
};
|
||||
};
|
||||
luks = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "luks";
|
||||
name = "luks-main";
|
||||
initrdUnlock = true;
|
||||
settings.allowDiscards = true;
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = ["-f"];
|
||||
subvolumes = {
|
||||
"@nixos-root" = {
|
||||
mountpoint = "/";
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
"noexec"
|
||||
];
|
||||
};
|
||||
"@home" = {
|
||||
mountpoint = "/home";
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
"@storage" = {
|
||||
mountpoint = "/storage";
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
"@nix" = {
|
||||
mountpoint = "/nix";
|
||||
mountOptions = [
|
||||
"compress-force=zstd"
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
19
hosts/dunamis/disko/default.nix
Normal file
19
hosts/dunamis/disko/default.nix
Normal file
@ -0,0 +1,19 @@
|
||||
{
|
||||
config,
|
||||
inputs,
|
||||
...
|
||||
}: let
|
||||
inherit (config.networking) hostId;
|
||||
disk = "/dev/disk/by-id/nvme-eui.000000000000000100a075244b5d6185";
|
||||
in {
|
||||
imports = with inputs; [
|
||||
disko.nixosModules.disko
|
||||
];
|
||||
disko.devices.nodev = {
|
||||
"/tmp" = {
|
||||
fsType = "tmpfs";
|
||||
mountOptions = ["rw" "nosuid" "nodev"];
|
||||
};
|
||||
};
|
||||
disko.devices.disk.main = import ./disk-main.nix {inherit disk hostId;};
|
||||
}
|
62
hosts/dunamis/disko/disk-main.nix
Normal file
62
hosts/dunamis/disko/disk-main.nix
Normal file
@ -0,0 +1,62 @@
|
||||
{
|
||||
disk,
|
||||
hostId,
|
||||
}: {
|
||||
type = "disk";
|
||||
device = disk;
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
size = "2G";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [
|
||||
"umask=0077"
|
||||
"fmask=0022"
|
||||
"dmask=0022"
|
||||
"noexec"
|
||||
"nosuid"
|
||||
"nodev"
|
||||
];
|
||||
};
|
||||
};
|
||||
luks = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "luks";
|
||||
name = "luks-" + hostId;
|
||||
initrdUnlock = true;
|
||||
settings.allowDiscards = true;
|
||||
content = let
|
||||
mountOptions = ["autodefrag" "compress-force=zstd" "noatime"];
|
||||
in {
|
||||
type = "btrfs";
|
||||
extraArgs = ["-f"];
|
||||
subvolumes = {
|
||||
"@nixos-root" = {
|
||||
mountpoint = "/";
|
||||
mountOptions = mountOptions ++ ["noexec"];
|
||||
};
|
||||
"@home" = {
|
||||
mountpoint = "/home";
|
||||
inherit mountOptions;
|
||||
};
|
||||
"@storage" = {
|
||||
mountpoint = "/storage";
|
||||
inherit mountOptions;
|
||||
};
|
||||
"@nix" = {
|
||||
mountpoint = "/nix";
|
||||
inherit mountOptions;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
inputs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = with inputs.nixos-hardware.nixosModules; [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
common-cpu-amd-pstate
|
||||
common-gpu-intel
|
||||
common-hidpi
|
||||
common-pc-ssd
|
||||
];
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
hardware.intelgpu.vaapiDriver = "intel-media-driver";
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
}
|
6
hosts/dunamis/misc/default.nix
Normal file
6
hosts/dunamis/misc/default.nix
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
imports = [
|
||||
# ./minecraft.nix
|
||||
# ./nix-ssh-serve.nix
|
||||
];
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
{
|
||||
networking = {
|
||||
hostId = "c7f6c4a1";
|
||||
hostName = "dunamis";
|
||||
networkmanager.enable = true;
|
||||
};
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
# TODO: better file name
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
nix = {
|
||||
package = pkgs.lix;
|
||||
channel.enable = false;
|
||||
settings.experimental-features = ["nix-command" "flakes"];
|
||||
daemonCPUSchedPolicy = "idle";
|
||||
sshServe = {
|
||||
enable = true;
|
||||
write = true;
|
||||
keys = map (f: builtins.readFile f) config.users.users.user.openssh.authorizedKeys.keyFiles;
|
||||
};
|
||||
};
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
{
|
||||
inputs,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (config.sops) secrets;
|
||||
inherit (inputs) mysecrets;
|
||||
in {
|
||||
nix.settings.trusted-users = ["user" "nix-ssh"];
|
||||
users.mutableUsers = false;
|
||||
users.users = {
|
||||
user = {
|
||||
hashedPasswordFile = secrets."user-password-hashed".path;
|
||||
extraGroups = ["wheel" "video" "libvirtd" "dialout"];
|
||||
isNormalUser = true;
|
||||
shell = pkgs.fish;
|
||||
openssh.authorizedKeys.keyFiles = map (f: "${mysecrets}/ssh/user/id_${f}_ed25519.pub") [
|
||||
"dunamis"
|
||||
"eldrid"
|
||||
"sarien"
|
||||
"legion"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
{
|
||||
inputs,
|
||||
osConfig,
|
||||
...
|
||||
}: {
|
||||
imports = with inputs; [
|
||||
nix-index-database.hmModules.nix-index
|
||||
self.homeModules.desktop
|
||||
self.homeModules.programs
|
||||
];
|
||||
inherit (osConfig) desktop;
|
||||
home.stateVersion = osConfig.system.stateVersion;
|
||||
home.sessionPath = ["$HOME/.local/bin"];
|
||||
}
|
@ -1,108 +0,0 @@
|
||||
{inputs, ...}: {
|
||||
imports = with inputs; [
|
||||
nix-flatpak.homeManagerModules.nix-flatpak
|
||||
];
|
||||
services.flatpak = {
|
||||
enable = true;
|
||||
uninstallUnmanaged = true;
|
||||
update.auto = {
|
||||
enable = true;
|
||||
onCalendar = "weekly";
|
||||
};
|
||||
remotes = [
|
||||
{
|
||||
name = "flathub";
|
||||
location = "https://dl.flathub.org/repo/flathub.flatpakrepo";
|
||||
}
|
||||
];
|
||||
packages = [
|
||||
# browsers
|
||||
"app.zen_browser.zen"
|
||||
"io.github.ungoogled_software.ungoogled_chromium"
|
||||
"net.mullvad.MullvadBrowser"
|
||||
"org.torproject.torbrowser-launcher"
|
||||
|
||||
# misc
|
||||
"com.bitwarden.desktop"
|
||||
"com.github.tchx84.Flatseal"
|
||||
"com.logseq.Logseq"
|
||||
"com.obsproject.Studio"
|
||||
"com.usebottles.bottles"
|
||||
"de.capypara.FieldMonitor"
|
||||
"de.haeckerfelix.Fragments"
|
||||
"org.nicotine_plus.Nicotine"
|
||||
|
||||
# chatting
|
||||
"im.riot.Riot"
|
||||
"io.github.kukuruzka165.materialgram"
|
||||
"io.github.spacingbat3.webcord"
|
||||
"org.mozilla.Thunderbird"
|
||||
"org.signal.Signal"
|
||||
# "org.telegram.desktop"
|
||||
|
||||
# media
|
||||
"io.bassi.Amberol"
|
||||
"io.freetubeapp.FreeTube"
|
||||
"org.atheme.audacious"
|
||||
|
||||
# gaming
|
||||
"com.heroicgameslauncher.hgl"
|
||||
"com.valvesoftware.Steam"
|
||||
"net.lutris.Lutris"
|
||||
"org.prismlauncher.PrismLauncher"
|
||||
"org.freedesktop.Platform.VulkanLayer.MangoHud//24.08"
|
||||
"org.freedesktop.Platform.VulkanLayer.gamescope//24.08"
|
||||
];
|
||||
overrides = {
|
||||
"global" = {
|
||||
Context = {
|
||||
sockets = ["wayland" "!x11" "!fallback-x11"];
|
||||
filesystems = [
|
||||
"!home"
|
||||
"!host"
|
||||
"!~/.ssh"
|
||||
"/nix/store:ro"
|
||||
"xdg-config/gtk-3.0:ro"
|
||||
"xdg-config/gtk-4.0:ro"
|
||||
"xdg-run/pipewire-0"
|
||||
"~/.local/share/icons:ro"
|
||||
];
|
||||
};
|
||||
Environment = {
|
||||
ELECTRON_OZONE_PLATFORM_HINT = "wayland";
|
||||
};
|
||||
};
|
||||
"com.valvesoftware.Steam" = {
|
||||
Context = {
|
||||
sockets = ["x11" "wayland"];
|
||||
filesystems = ["/storage/games/steam"];
|
||||
};
|
||||
Environment.STEAM_FORCE_DESKTOPUI_SCALING = "1.3";
|
||||
};
|
||||
"org.signal.Signal" = {
|
||||
Environment.SIGNAL_PASSWORD_STORE = "gnome-libsecret";
|
||||
};
|
||||
"com.obsproject.Studio" = {
|
||||
Context.filesystems = ["~/vids"];
|
||||
};
|
||||
"com.logseq.Logseq" = {
|
||||
Context.filesystems = [
|
||||
"~/docs/logseq"
|
||||
"~/docs/nure/2025/logseq"
|
||||
"~/syncthing/logseq"
|
||||
];
|
||||
};
|
||||
"net.lutris.Lutris".Context = {
|
||||
sockets = ["x11" "wayland"];
|
||||
filesystems = ["/storage/games/lutris" "~/games/lutris"];
|
||||
};
|
||||
"com.heroicgameslauncher.hgl".Context = {
|
||||
sockets = ["x11" "wayland"];
|
||||
filesystems = ["/storage/games/heroic" "~/games/heroic"];
|
||||
};
|
||||
"com.usebottles.Bottles" = {
|
||||
Context.sockets = ["x11" "wayland"];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@ -1,7 +1 @@
|
||||
{
|
||||
imports = [
|
||||
./common.nix
|
||||
./flatpak.nix
|
||||
./programs.nix
|
||||
];
|
||||
}
|
||||
{flake, ...}: {imports = [flake.modules.shared.user];}
|
||||
|
@ -1,88 +0,0 @@
|
||||
{pkgs, ...}: {
|
||||
console.yazi.enable = true;
|
||||
editor.helix.enable = true;
|
||||
shell = {
|
||||
fish.enable = true;
|
||||
oh-my-posh.enable = true;
|
||||
};
|
||||
syncthing.enable = true;
|
||||
terminal.wezterm.enable = true;
|
||||
terminal.ghostty.enable = true;
|
||||
|
||||
services = {
|
||||
pueue.enable = true; # process queue in rust
|
||||
ssh-agent.enable = true;
|
||||
};
|
||||
|
||||
programs = {
|
||||
bat.enable = true; # cat in rust
|
||||
btop = {
|
||||
enable = true;
|
||||
settings.update_ms = 200;
|
||||
};
|
||||
direnv.enable = true;
|
||||
direnv.silent = true;
|
||||
eza.enable = true; # ls in rust
|
||||
fd.enable = true; # find in rust
|
||||
fzf.enable = true; # fuzzy finder in rust
|
||||
git = {
|
||||
enable = true;
|
||||
delta.enable = true; # diff in rust
|
||||
signing.format = "ssh";
|
||||
aliases = {
|
||||
cl = "clone";
|
||||
co = "checkout";
|
||||
pom = "push origin main";
|
||||
};
|
||||
};
|
||||
gitui.enable = true; # git ui in rust
|
||||
jujutsu.enable = true; # vcs in rust
|
||||
keychain = {
|
||||
enable = true;
|
||||
keys = ["id_ed25519"];
|
||||
};
|
||||
nix-index-database.comma.enable = true;
|
||||
nix-index.enable = true;
|
||||
nix-your-shell.enable = true;
|
||||
pay-respects.enable = true; # thefuck in rust
|
||||
ripgrep.enable = true; # grep in rust
|
||||
zoxide.enable = true; # fuzzy cd in rust
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
alejandra # nix formatter in rust
|
||||
devenv # programming deps in rust
|
||||
dua # disk space usage in rust
|
||||
fend # calculator in rust
|
||||
flatpak # flatpak cli
|
||||
jj-fzf # fuzzy finder jujutsu tui
|
||||
just # make in rust
|
||||
mprocs # process runner in rust
|
||||
ouch # archive manager in rust
|
||||
overskride # bluetooth gui in rust
|
||||
pika-backup # borg gui in rust
|
||||
pinentry-qt # pinentry for rbw
|
||||
procs # ps in rust
|
||||
rbw # bitwarden cli in rust
|
||||
sd # sed in rust
|
||||
silicon # create code pics in rust
|
||||
trashy # trash cli in rust
|
||||
# vial # qmk keyboard configuring app
|
||||
virt-manager # libvirt gui
|
||||
waycheck # check wayland protocols
|
||||
];
|
||||
|
||||
xdg.desktopEntries = {
|
||||
uni = {
|
||||
actions."Copy".exec = "fish -c \"~/.local/bin/uni --copy\"";
|
||||
categories = ["Utility" "X-Launch" "Network"];
|
||||
comment = "Select and open or copy URLs from a list.";
|
||||
exec = "fish -c \"~/.local/bin/uni\"";
|
||||
icon = "web-browser";
|
||||
name = "Uni URL Handler";
|
||||
startupNotify = true;
|
||||
terminal = false;
|
||||
type = "Application";
|
||||
};
|
||||
};
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
imports = with inputs; [
|
||||
chaotic.nixosModules.default
|
||||
lanzaboote.nixosModules.lanzaboote
|
||||
];
|
||||
boot = {
|
||||
# kernelPackages = pkgs.linuxPackages_latest;
|
||||
kernelPackages = pkgs.linuxPackages_cachyos;
|
||||
loader.efi.canTouchEfiVariables = true;
|
||||
loader.systemd-boot = {
|
||||
enable = !config.boot.lanzaboote.enable;
|
||||
consoleMode = "auto";
|
||||
};
|
||||
plymouth.enable = true;
|
||||
initrd = {
|
||||
availableKernelModules = ["ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk" "xe" "i915"];
|
||||
kernelModules = [];
|
||||
};
|
||||
kernelModules = ["kvm-intel"];
|
||||
extraModulePackages = [];
|
||||
lanzaboote = {
|
||||
enable = true;
|
||||
pkiBundle = "/var/lib/sbctl";
|
||||
};
|
||||
};
|
||||
console = {
|
||||
earlySetup = true;
|
||||
packages = [pkgs.terminus_font];
|
||||
font = "${pkgs.terminus_font}/share/consolefonts/ter-c18n.psf.gz";
|
||||
};
|
||||
}
|
@ -1,35 +1,27 @@
|
||||
{inputs, ...}: {
|
||||
imports = with inputs; [
|
||||
self.modules.shared.nixos
|
||||
self.nixosModules.desktop
|
||||
self.nixosModules.system
|
||||
./boot.nix
|
||||
./disko.nix
|
||||
./hardware.nix
|
||||
./networking.nix
|
||||
./nix.nix
|
||||
./power-saving.nix
|
||||
../dunamis/programs.nix
|
||||
./services.nix
|
||||
./sops.nix
|
||||
./users.nix
|
||||
./disko
|
||||
./hardware
|
||||
./misc
|
||||
];
|
||||
|
||||
# desktop.niri.enable = true;
|
||||
|
||||
locale.ukrainian.enable = true;
|
||||
|
||||
module.stylix = {
|
||||
enable = true;
|
||||
theme = "nord";
|
||||
networking = {
|
||||
hostId = "14f63637";
|
||||
hostName = "eldrid";
|
||||
};
|
||||
|
||||
opentabletdriver.enable = false;
|
||||
system.stateVersion = "25.11";
|
||||
time.timeZone = "Europe/Kyiv";
|
||||
|
||||
# qmk-vial.enable = true;
|
||||
desktop.niri.enable = true;
|
||||
|
||||
security.basic.enable = true;
|
||||
|
||||
system.stateVersion = "25.05";
|
||||
services.displayManager.autoLogin = {
|
||||
enable = true;
|
||||
user = "user";
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{
|
||||
@ -38,13 +30,21 @@
|
||||
}
|
||||
];
|
||||
|
||||
time.timeZone = "Europe/Kyiv";
|
||||
|
||||
# virtual.libvirt.enable = true;
|
||||
|
||||
# wireless = {
|
||||
# wifi.enable = true;
|
||||
# bluetooth.enable = true;
|
||||
# bluetooth.enableBlueman = true;
|
||||
# };
|
||||
module = {
|
||||
config = {
|
||||
laptop.homeRowMods = true;
|
||||
powerSave = true;
|
||||
secureBoot = true;
|
||||
useIwd = true;
|
||||
vaapi = "intel-media-driver";
|
||||
};
|
||||
stylix = {
|
||||
enable = true;
|
||||
theme = "sandcastle";
|
||||
};
|
||||
locale = "uk_UA.UTF-8";
|
||||
misc = {
|
||||
qmk-vial.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -1,94 +0,0 @@
|
||||
{inputs, ...}: {
|
||||
imports = with inputs; [
|
||||
disko.nixosModules.disko
|
||||
];
|
||||
disko.devices.nodev = {
|
||||
"/tmp" = {
|
||||
fsType = "tmpfs";
|
||||
mountOptions = ["rw" "nosuid" "nodev"];
|
||||
};
|
||||
};
|
||||
disko.devices.disk.main = {
|
||||
type = "disk";
|
||||
device = "/dev/nvme0n1";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
size = "1G";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [
|
||||
"umask=0077"
|
||||
"fmask=0022"
|
||||
"dmask=0022"
|
||||
"noexec"
|
||||
];
|
||||
};
|
||||
};
|
||||
luks = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "luks";
|
||||
name = "lukscrypted";
|
||||
initrdUnlock = true;
|
||||
settings.allowDiscards = true;
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = ["-f"];
|
||||
subvolumes = {
|
||||
"@nixos" = {
|
||||
mountpoint = "/";
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
# "noexec"
|
||||
];
|
||||
};
|
||||
"@home" = {
|
||||
mountpoint = "/home";
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
"@flatpak" = {
|
||||
mountpoint = "/var/lib/flatpak";
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
"@storage" = {
|
||||
mountpoint = "/storage";
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
"@swap" = {
|
||||
mountpoint = "/swap";
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
# "noexec"
|
||||
];
|
||||
};
|
||||
# "@nix" = {
|
||||
# mountpoint = "/nix";
|
||||
# mountOptions = [
|
||||
# "compress=zstd"
|
||||
# "noatime"
|
||||
# ];
|
||||
# };
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
19
hosts/eldrid/disko/default.nix
Normal file
19
hosts/eldrid/disko/default.nix
Normal file
@ -0,0 +1,19 @@
|
||||
{
|
||||
config,
|
||||
inputs,
|
||||
...
|
||||
}: let
|
||||
inherit (config.networking) hostId;
|
||||
disk = "/dev/disk/by-id/nvme-eui.e8238fa6bf530001001b444a44022ad0";
|
||||
in {
|
||||
imports = with inputs; [
|
||||
disko.nixosModules.disko
|
||||
];
|
||||
disko.devices.nodev = {
|
||||
"/tmp" = {
|
||||
fsType = "tmpfs";
|
||||
mountOptions = ["rw" "nosuid" "nodev"];
|
||||
};
|
||||
};
|
||||
disko.devices.disk.main = import ./disk-main.nix {inherit disk hostId;};
|
||||
}
|
88
hosts/eldrid/disko/disk-main.nix
Normal file
88
hosts/eldrid/disko/disk-main.nix
Normal file
@ -0,0 +1,88 @@
|
||||
{
|
||||
disk,
|
||||
hostId,
|
||||
}: {
|
||||
type = "disk";
|
||||
device = disk;
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
size = "1G";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [
|
||||
"umask=0077"
|
||||
"fmask=0022"
|
||||
"dmask=0022"
|
||||
"noexec"
|
||||
"nosuid"
|
||||
"nodev"
|
||||
];
|
||||
};
|
||||
};
|
||||
luks = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "luks";
|
||||
name = "luks-" + hostId;
|
||||
initrdUnlock = true;
|
||||
settings.allowDiscards = true;
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = ["-f"];
|
||||
subvolumes = {
|
||||
"@nixos" = {
|
||||
mountpoint = "/";
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
# "noexec"
|
||||
];
|
||||
};
|
||||
"@home" = {
|
||||
mountpoint = "/home";
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
"@flatpak" = {
|
||||
mountpoint = "/var/lib/flatpak";
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
"@storage" = {
|
||||
mountpoint = "/storage";
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
"@swap" = {
|
||||
mountpoint = "/swap";
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
# "noexec"
|
||||
];
|
||||
};
|
||||
# "@nix" = {
|
||||
# mountpoint = "/nix";
|
||||
# mountOptions = [
|
||||
# "compress=zstd"
|
||||
# "noatime"
|
||||
# ];
|
||||
# };
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
11
hosts/eldrid/hardware/default.nix
Normal file
11
hosts/eldrid/hardware/default.nix
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
imports = [
|
||||
./laptop
|
||||
];
|
||||
services = {
|
||||
logind = {
|
||||
lidSwitch = "ignore";
|
||||
powerKey = "suspend";
|
||||
};
|
||||
};
|
||||
}
|
86
hosts/eldrid/hardware/laptop/cb-audio-fix.nix
Normal file
86
hosts/eldrid/hardware/laptop/cb-audio-fix.nix
Normal file
@ -0,0 +1,86 @@
|
||||
{pkgs, ...}: let
|
||||
cb-ucm-conf = with pkgs;
|
||||
alsa-ucm-conf.overrideAttrs {
|
||||
wttsrc = fetchFromGitHub {
|
||||
owner = "WeirdTreeThing";
|
||||
repo = "alsa-ucm-conf-cros";
|
||||
rev = "a4f0ed6cf59163fb571c33a81a6b40b6f53ed57d";
|
||||
hash = "sha256-H0BsRzHSEJ6XCZB/Rvb3w+uGCzr+kAvAwcHWqYEtp6w=";
|
||||
};
|
||||
unpackPhase = ''
|
||||
runHook preUnpack
|
||||
tar xf "$src"
|
||||
runHook postUnpack
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out/share/alsa
|
||||
cp -r alsa-ucm*/ucm2 $out/share/alsa
|
||||
runHook postInstall
|
||||
'';
|
||||
};
|
||||
in {
|
||||
environment = {
|
||||
systemPackages = [pkgs.sof-firmware];
|
||||
sessionVariables.ALSA_CONFIG_UCM2 = "${cb-ucm-conf}/share/alsa/ucm2";
|
||||
etc = {
|
||||
"wireplumber/main.lua.d/51-increase-headroom.lua".text = ''
|
||||
rule = {
|
||||
matches = {
|
||||
{
|
||||
{ "node.name", "matches", "alsa_output.*" },
|
||||
},
|
||||
},
|
||||
apply_properties = {
|
||||
["api.alsa.headroom"] = 4096,
|
||||
},
|
||||
}
|
||||
|
||||
table.insert(alsa_monitor.rules,rule)
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
system.replaceDependencies.replacements = [
|
||||
{
|
||||
original = pkgs.alsa-ucm-conf;
|
||||
replacement = cb-ucm-conf;
|
||||
}
|
||||
];
|
||||
|
||||
boot.extraModprobeConfig = ''
|
||||
options snd-intel-dspcfg dsp_driver=3
|
||||
'';
|
||||
|
||||
services.pipewire.wireplumber.configPackages = [
|
||||
(pkgs.writeTextDir "share/wireplumber/main.lua.d/51-increase-headroom.lua" ''
|
||||
rule = {
|
||||
matches = {
|
||||
{
|
||||
{ "node.name", "matches", "alsa_output.*" },
|
||||
},
|
||||
},
|
||||
apply_properties = {
|
||||
["api.alsa.headroom"] = 4096,
|
||||
},
|
||||
}
|
||||
|
||||
table.insert(alsa_monitor.rules,rule)
|
||||
'')
|
||||
(pkgs.writeTextDir "share/wireplumber/main.lua.d/51-avs-dmic.lua" ''
|
||||
rule = {
|
||||
matches = {
|
||||
{
|
||||
{ "node.nick", "equals", "Internal Microphone" },
|
||||
},
|
||||
},
|
||||
apply_properties = {
|
||||
["audio.format"] = "S16LE",
|
||||
},
|
||||
}
|
||||
|
||||
table.insert(alsa_monitor.rules, rule)
|
||||
'')
|
||||
];
|
||||
}
|
@ -1,50 +1,4 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
# modulesPath,
|
||||
...
|
||||
}: let
|
||||
cb-ucm-conf = pkgs.alsa-ucm-conf.overrideAttrs {
|
||||
wttsrc = pkgs.fetchFromGitHub {
|
||||
owner = "WeirdTreeThing";
|
||||
repo = "chromebook-ucm-conf";
|
||||
rev = "b6ce2a7";
|
||||
hash = "sha256-QRUKHd3RQmg1tnZU8KCW0AmDtfw/daOJ/H3XU5qWTCc=";
|
||||
};
|
||||
postInstall = ''
|
||||
cp -R $wttsrc/common/* $out/share/alsa/ucm2/common
|
||||
cp -R $wttsrc/codecs/* $out/share/alsa/ucm2/codecs
|
||||
cp -R $wttsrc/platforms/* $out/share/alsa/ucm2/platforms
|
||||
cp -R $wttsrc/sof-rt5682 $out/share/alsa/ucm2/conf.d
|
||||
cp -R $wttsrc/sof-cs42l42 $out/share/alsa/ucm2/conf.d
|
||||
'';
|
||||
};
|
||||
in {
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
extraPackages = with pkgs; [
|
||||
intel-media-driver
|
||||
vaapiIntel
|
||||
vpl-gpu-rt
|
||||
];
|
||||
};
|
||||
|
||||
# intel ax201 wifi card firmware
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
|
||||
services = {
|
||||
logind = {
|
||||
lidSwitch = "ignore";
|
||||
powerKey = "suspend";
|
||||
};
|
||||
};
|
||||
|
||||
# physically broken touchscreen
|
||||
services.udev.extraRules = "ACTION==\"add|change\", KERNELS==\"input[0-9]*\", SUBSYSTEMS==\"input\", ATTRS{id/vendor}==\"27c6\", ATTRS{id/product}==\"0e84\", ENV{LIBINPUT_IGNORE_DEVICE}=\"1\"";
|
||||
|
||||
services.keyd = {
|
||||
enable = true;
|
||||
keyboards.internal = {
|
||||
@ -137,33 +91,4 @@ in {
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
system.replaceDependencies.replacements = [
|
||||
{
|
||||
original = pkgs.alsa-ucm-conf;
|
||||
replacement = cb-ucm-conf;
|
||||
}
|
||||
];
|
||||
|
||||
services.pipewire.wireplumber.configPackages = [
|
||||
(pkgs.writeTextDir "share/wireplumber/main.lua.d/51-increase-headroom.lua" ''
|
||||
rule = {
|
||||
matches = {
|
||||
{
|
||||
{ "node.name", "matches", "alsa_output.*" },
|
||||
},
|
||||
},
|
||||
apply_properties = {
|
||||
["api.alsa.headroom"] = 4096,
|
||||
},
|
||||
}
|
||||
|
||||
table.insert(alsa_monitor.rules,rule)
|
||||
'')
|
||||
];
|
||||
boot = {
|
||||
extraModprobeConfig = ''
|
||||
options snd-intel-dspcfg dsp_driver=3
|
||||
'';
|
||||
};
|
||||
}
|
7
hosts/eldrid/hardware/laptop/default.nix
Normal file
7
hosts/eldrid/hardware/laptop/default.nix
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
imports = [
|
||||
./cb-audio-fix.nix
|
||||
./cb-keyboard.nix
|
||||
./touchscreen-fix.nix
|
||||
];
|
||||
}
|
3
hosts/eldrid/hardware/laptop/touchscreen-fix.nix
Normal file
3
hosts/eldrid/hardware/laptop/touchscreen-fix.nix
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
services.udev.extraRules = "ACTION==\"add|change\", KERNELS==\"input[0-9]*\", SUBSYSTEMS==\"input\", ATTRS{id/vendor}==\"27c6\", ATTRS{id/product}==\"0e84\", ENV{LIBINPUT_IGNORE_DEVICE}=\"1\"";
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
{
|
||||
networking.firewall.allowedTCPPorts = [25565];
|
||||
networking.firewall.allowedUDPPorts = [25565];
|
||||
virtualisation.oci-containers = {
|
||||
backend = "podman";
|
||||
containers.minecraft = {
|
||||
image = "docker.io/itzg/minecraft-server:java17-alpine";
|
||||
volumes = ["/storage/minecraft:/data"];
|
||||
ports = ["25565:25565"];
|
||||
environment = {
|
||||
DIFFICULTY = "easy";
|
||||
EULA = "true";
|
||||
GUI = "false";
|
||||
INIT_MEMORY = "6G";
|
||||
MAX_MEMORY = "6G";
|
||||
ONLINE_MODE = "false";
|
||||
TYPE = "forge";
|
||||
VERSION = "1.20.1";
|
||||
VIEW_DISTANCE = "8";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
6
hosts/eldrid/misc/default.nix
Normal file
6
hosts/eldrid/misc/default.nix
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
imports = [
|
||||
# ./distributed-build.nix
|
||||
./undervolt.nix
|
||||
];
|
||||
}
|
7
hosts/eldrid/misc/undervolt.nix
Normal file
7
hosts/eldrid/misc/undervolt.nix
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
services.undervolt = {
|
||||
enable = true;
|
||||
# coreOffset = -150;
|
||||
turbo = 1;
|
||||
};
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
{
|
||||
networking = {
|
||||
networkmanager.enable = true;
|
||||
hostName = "eldrid";
|
||||
hosts = {
|
||||
"192.168.1.42" = ["dunamis"];
|
||||
};
|
||||
};
|
||||
}
|
@ -1,34 +0,0 @@
|
||||
# TODO: better file name
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
hostName =
|
||||
if (config.networking.hostName == "vylxae")
|
||||
then "sarien"
|
||||
else config.networking.hostName;
|
||||
inherit (config.sops) secrets;
|
||||
inherit (inputs) mysecrets;
|
||||
in {
|
||||
nix = {
|
||||
package = pkgs.lix;
|
||||
channel.enable = false;
|
||||
daemonCPUSchedPolicy = "idle";
|
||||
settings = {
|
||||
experimental-features = ["nix-command" "flakes"];
|
||||
builders-use-substitutes = true;
|
||||
};
|
||||
distributedBuilds = true;
|
||||
buildMachines = [
|
||||
{
|
||||
hostName = "dunamis";
|
||||
sshUser = "nix-ssh";
|
||||
system = "x86_64-linux";
|
||||
sshKey = secrets."ssh-${hostName}-user".path;
|
||||
supportedFeatures = ["nixos-test" "big-parallel" "kvm" "benchmark"];
|
||||
publicHostKey = builtins.readFile "${mysecrets}/ssh/ssh_host_ed25519_dunamis.base64";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
{
|
||||
powerManagement.enable = true;
|
||||
powerManagement.powertop.enable = true;
|
||||
services.power-profiles-daemon.enable = true;
|
||||
services.thermald.enable = true;
|
||||
services.upower.enable = true;
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
{pkgs, ...}: {
|
||||
programs.neovim = {
|
||||
enable = false;
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
};
|
||||
programs.nh = {
|
||||
enable = true;
|
||||
clean.enable = true;
|
||||
clean.extraArgs = "--keep-since 7d --keep 3";
|
||||
flake = "/home/user/.config/nixos";
|
||||
};
|
||||
programs.fish.enable = true;
|
||||
environment.systemPackages = with pkgs; [
|
||||
helix
|
||||
# nushell
|
||||
];
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
{
|
||||
services = {
|
||||
# flatpak.enable = true;
|
||||
fstrim.enable = true;
|
||||
openssh.enable = true;
|
||||
power-profiles-daemon.enable = true;
|
||||
syncthing.openDefaultPorts = true;
|
||||
dnscrypt-proxy2 = {
|
||||
enable = true;
|
||||
settings = {
|
||||
require_dnssec = true;
|
||||
server_names = ["mullvad-doh"];
|
||||
bootstrap_resolvers = ["9.9.9.11:53" "9.9.9.9:53"];
|
||||
};
|
||||
};
|
||||
scx = {
|
||||
enable = true;
|
||||
scheduler = "scx_flash";
|
||||
};
|
||||
};
|
||||
}
|
@ -1,64 +0,0 @@
|
||||
{
|
||||
config,
|
||||
inputs,
|
||||
...
|
||||
}: let
|
||||
inherit (inputs) mysecrets;
|
||||
hostName =
|
||||
if (config.networking.hostName == "vylxae")
|
||||
then "sarien"
|
||||
else config.networking.hostName;
|
||||
sopsFile = mysecrets + "/hosts/${hostName}.yaml";
|
||||
dotSsh = name: "/home/user/.ssh/" + name;
|
||||
sshKey = {
|
||||
mode = "0400";
|
||||
owner = "user";
|
||||
};
|
||||
in {
|
||||
imports = with inputs; [
|
||||
sops-nix.nixosModules.sops
|
||||
];
|
||||
|
||||
sops = {
|
||||
age = {
|
||||
sshKeyPaths = ["/etc/ssh/ssh_host_ed25519_key"];
|
||||
keyFile = "/var/lib/sops-nix/key.txt";
|
||||
generateKey = true;
|
||||
};
|
||||
defaultSopsFile = mysecrets + "/common.yaml";
|
||||
secrets = {
|
||||
"user-password-hashed".neededForUsers = true;
|
||||
"ssh-config" = {
|
||||
path = dotSsh "config";
|
||||
mode = "0400";
|
||||
owner = "user";
|
||||
};
|
||||
"ssh-${hostName}-user" = {
|
||||
inherit sopsFile;
|
||||
inherit (sshKey) mode owner;
|
||||
path = dotSsh "id_ed25519";
|
||||
};
|
||||
"ssh-${hostName}-user.pub" = {
|
||||
inherit sopsFile;
|
||||
inherit (sshKey) mode owner;
|
||||
path = dotSsh "id_ed25519.pub";
|
||||
};
|
||||
"ssh-unexplrd" = {
|
||||
inherit (sshKey) mode owner;
|
||||
path = dotSsh "id_unexplrd_ed25519";
|
||||
};
|
||||
"ssh-unexplrd.pub" = {
|
||||
inherit (sshKey) mode owner;
|
||||
path = dotSsh "id_unexplrd_ed25519.pub";
|
||||
};
|
||||
"ssh-uni" = {
|
||||
inherit (sshKey) mode owner;
|
||||
path = dotSsh "id_uni_ed25519";
|
||||
};
|
||||
"ssh-uni.pub" = {
|
||||
inherit (sshKey) mode owner;
|
||||
path = dotSsh "id_uni_ed25519.pub";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@ -1,100 +0,0 @@
|
||||
{inputs, ...}: {
|
||||
imports = with inputs; [
|
||||
nix-flatpak.homeManagerModules.nix-flatpak
|
||||
];
|
||||
services.flatpak = {
|
||||
enable = true;
|
||||
uninstallUnmanaged = true;
|
||||
remotes = [
|
||||
{
|
||||
name = "flathub";
|
||||
location = "https://dl.flathub.org/repo/flathub.flatpakrepo";
|
||||
}
|
||||
{
|
||||
name = "hero-persson";
|
||||
location = "https://hero-persson.github.io/unmojang-flatpak/index.flatpakrepo";
|
||||
}
|
||||
];
|
||||
packages = [
|
||||
# misc
|
||||
"app.zen_browser.zen"
|
||||
"net.mullvad.MullvadBrowser"
|
||||
"com.obsproject.Studio"
|
||||
"com.bitwarden.desktop"
|
||||
"com.github.tchx84.Flatseal"
|
||||
"de.haeckerfelix.Fragments"
|
||||
"org.qbittorrent.qBittorrent"
|
||||
|
||||
# "com.transmissionbt.Transmission"
|
||||
"com.usebottles.bottles"
|
||||
"com.logseq.Logseq"
|
||||
|
||||
# chatting
|
||||
"org.signal.Signal"
|
||||
"im.riot.Riot"
|
||||
"org.telegram.desktop"
|
||||
"io.github.kukuruzka165.materialgram"
|
||||
"io.github.spacingbat3.webcord"
|
||||
"org.mozilla.Thunderbird"
|
||||
|
||||
# media
|
||||
"io.bassi.Amberol"
|
||||
"io.freetubeapp.FreeTube"
|
||||
#"io.github.celluloid_player.Celluloid"
|
||||
# "io.mpv.Mpv"
|
||||
|
||||
# gaming
|
||||
#"com.github._0negal.Viper"
|
||||
"net.lutris.Lutris"
|
||||
"com.heroicgameslauncher.hgl"
|
||||
{
|
||||
appId = "org.unmojang.FjordLauncher";
|
||||
origin = "hero-persson";
|
||||
}
|
||||
"org.freedesktop.Platform.VulkanLayer.MangoHud//24.08"
|
||||
"org.freedesktop.Platform.VulkanLayer.gamescope//24.08"
|
||||
];
|
||||
overrides = {
|
||||
"global" = {
|
||||
# Force Wayland by default
|
||||
Context = {
|
||||
sockets = ["wayland" "!x11" "!fallback-x11"];
|
||||
filesystems = [
|
||||
"!host"
|
||||
"!home"
|
||||
"!~/.ssh"
|
||||
"xdg-run/pipewire-0"
|
||||
"xdg-config/gtk-3.0:ro"
|
||||
"xdg-config/gtk-4.0:ro"
|
||||
"~/.local/share/icons:ro"
|
||||
"/nix/store:ro"
|
||||
];
|
||||
};
|
||||
Environment = {
|
||||
ELECTRON_OZONE_PLATFORM_HINT = "wayland";
|
||||
};
|
||||
};
|
||||
"com.valvesoftware.Steam" = {
|
||||
Context = {
|
||||
sockets = ["x11" "wayland"];
|
||||
filesystems = ["/storage/games/steam"];
|
||||
};
|
||||
Environment.STEAM_FORCE_DESKTOPUI_SCALING = "1.3";
|
||||
};
|
||||
"org.signal.Signal" = {
|
||||
Environment.SIGNAL_PASSWORD_STORE = "gnome-libsecret";
|
||||
};
|
||||
"net.lutris.Lutris".Context = {
|
||||
sockets = ["x11" "wayland"];
|
||||
filesystems = ["/storage/games/lutris" "~/games/lutris"];
|
||||
};
|
||||
"com.heroicgameslauncher.hgl".Context = {
|
||||
sockets = ["x11" "wayland"];
|
||||
filesystems = ["/storage/games/heroic" "~/games/heroic"];
|
||||
};
|
||||
"com.usebottles.Bottles" = {
|
||||
Context.sockets = ["x11" "wayland"];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@ -1,8 +1 @@
|
||||
{lib, ...}: {
|
||||
imports = [
|
||||
../../../dunamis/users/user/common.nix
|
||||
../../../dunamis/users/user/programs.nix
|
||||
# ../../../dunamis/users/user/flatpak.nix
|
||||
];
|
||||
syncthing.enable = lib.mkDefault false;
|
||||
}
|
||||
{flake, ...}: {imports = [flake.modules.shared.user];}
|
||||
|
@ -1,56 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
imports = with inputs; [
|
||||
chaotic.nixosModules.default
|
||||
lanzaboote.nixosModules.lanzaboote
|
||||
];
|
||||
boot = {
|
||||
# kernelPackages = pkgs.linuxPackages_latest;
|
||||
consoleLogLevel = 0;
|
||||
kernelPackages = pkgs.linuxPackages_cachyos;
|
||||
kernelModules = ["kvm-amd"];
|
||||
kernelParams = [
|
||||
# "mitigations=auto"
|
||||
# "spectre_v2=on"
|
||||
# "spectre_v2_user=on"
|
||||
# "spectre_bhi=on"
|
||||
# "spec_store_bypass_disable=on"
|
||||
# "tsx=off"
|
||||
# "kvm.nx_huge_pages=force"
|
||||
# "l1d_flush=on"
|
||||
"amd_iommu=force_isolation"
|
||||
"debugfs=off"
|
||||
"efi=disable_early_pci_dma"
|
||||
"gather_data_sampling=force"
|
||||
# "ia32_emulation=0"
|
||||
"intel_iommu=on"
|
||||
"iommu.passthrough=0"
|
||||
"iommu.strict=1"
|
||||
"iommu=force"
|
||||
# "lockdown=confidentiality"
|
||||
# "module.sig_enforce=1"
|
||||
"page_alloc.shuffle=1"
|
||||
# "reg_file_data_sampling=on"
|
||||
# "spec_rstack_overflow=safe-ret"
|
||||
"vsyscall=none"
|
||||
];
|
||||
initrd = {
|
||||
availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod"];
|
||||
systemd.enable = true; # needed for auto-unlocking with TPM
|
||||
};
|
||||
loader.efi.canTouchEfiVariables = true;
|
||||
loader.systemd-boot = {
|
||||
enable = !config.boot.lanzaboote.enable;
|
||||
consoleMode = "auto";
|
||||
};
|
||||
lanzaboote = {
|
||||
enable = true;
|
||||
pkiBundle = "/etc/secureboot";
|
||||
};
|
||||
plymouth.enable = true;
|
||||
};
|
||||
}
|
@ -1,40 +1,41 @@
|
||||
{inputs, ...}: {
|
||||
imports = with inputs; [
|
||||
self.modules.shared.nixos
|
||||
self.nixosModules.desktop
|
||||
self.nixosModules.system
|
||||
../dunamis/programs.nix
|
||||
./boot.nix
|
||||
./disko.nix
|
||||
./hardware.nix
|
||||
./networking.nix
|
||||
./nix.nix
|
||||
./power-saving.nix
|
||||
./services.nix
|
||||
./sops.nix
|
||||
./users.nix
|
||||
./disko
|
||||
./hardware
|
||||
./misc
|
||||
];
|
||||
|
||||
desktop.niri.enable = true;
|
||||
environment.memoryAllocator.provider = "mimalloc";
|
||||
locale.ukrainian.enable = true;
|
||||
module.stylix = {
|
||||
enable = true;
|
||||
theme = "helios";
|
||||
networking = {
|
||||
hostId = "45b00123";
|
||||
hostName = "legion";
|
||||
};
|
||||
opentabletdriver.enable = false;
|
||||
qmk-vial.enable = true;
|
||||
security.basic.enable = true;
|
||||
system.stateVersion = "25.05";
|
||||
|
||||
system.stateVersion = "25.11";
|
||||
time.timeZone = "Europe/Kyiv";
|
||||
virtual.libvirt.enable = true;
|
||||
wireless = {
|
||||
bluetooth.enable = true;
|
||||
bluetooth.enableBlueman = true;
|
||||
|
||||
desktop.niri.enable = true;
|
||||
|
||||
services.displayManager.autoLogin = {
|
||||
enable = true;
|
||||
user = "user";
|
||||
};
|
||||
|
||||
module = {
|
||||
config = {
|
||||
laptop.homeRowMods = true;
|
||||
powerSave = true;
|
||||
secureBoot = true;
|
||||
tpmDiskUnlock = true;
|
||||
vaapi = "nvidia";
|
||||
};
|
||||
stylix = {
|
||||
enable = true;
|
||||
theme = "sandcastle";
|
||||
};
|
||||
locale = "uk_UA.UTF-8";
|
||||
virt.libvirt.enable = true;
|
||||
};
|
||||
swapDevices = [
|
||||
{
|
||||
device = "/swap/swapfile";
|
||||
size = 8 * 1024;
|
||||
}
|
||||
];
|
||||
}
|
||||
|
@ -1,112 +0,0 @@
|
||||
{inputs, ...}: {
|
||||
imports = with inputs; [
|
||||
disko.nixosModules.disko
|
||||
];
|
||||
disko.devices.nodev = {
|
||||
"/tmp" = {
|
||||
fsType = "tmpfs";
|
||||
mountOptions = ["rw" "nosuid" "nodev"];
|
||||
};
|
||||
};
|
||||
disko.devices.disk.main = {
|
||||
type = "disk";
|
||||
device = "/dev/disk/by-id/nvme-INTEL_SSDPEKKF256G8L_BTHH81460QC2256B";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
size = "2G";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [
|
||||
"umask=0077"
|
||||
"fmask=0022"
|
||||
"dmask=0022"
|
||||
"noexec"
|
||||
"nosuid"
|
||||
"nodev"
|
||||
];
|
||||
};
|
||||
};
|
||||
luks = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "luks";
|
||||
name = "luks-main";
|
||||
initrdUnlock = true;
|
||||
settings.allowDiscards = true;
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = ["-f"];
|
||||
subvolumes = {
|
||||
"@root-nixos" = {
|
||||
mountpoint = "/";
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
# "noexec"
|
||||
];
|
||||
};
|
||||
"@home" = {
|
||||
mountpoint = "/home";
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
"@swap" = {
|
||||
mountpoint = "/swap";
|
||||
mountOptions = [
|
||||
# "compress=zstd"
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
# "@nix" = {
|
||||
# mountpoint = "/nix";
|
||||
# mountOptions = [
|
||||
# "compress-force=zstd"
|
||||
# "noatime"
|
||||
# ];
|
||||
# };
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
disko.devices.disk.second = {
|
||||
type = "disk";
|
||||
device = "/dev/disk/by-id/nvme-WDC_PC_SN730_SDBPNTY-1T00-1101_21114D802446";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
luks = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "luks";
|
||||
name = "luks-second";
|
||||
initrdUnlock = true;
|
||||
settings.allowDiscards = true;
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = ["-f"];
|
||||
subvolumes = {
|
||||
"@storage" = {
|
||||
mountpoint = "/storage";
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
21
hosts/legion/disko/default.nix
Normal file
21
hosts/legion/disko/default.nix
Normal file
@ -0,0 +1,21 @@
|
||||
{
|
||||
config,
|
||||
inputs,
|
||||
...
|
||||
}: let
|
||||
inherit (config.networking) hostId;
|
||||
disk-main = "/dev/disk/by-id/nvme-INTEL_SSDPEKKF256G8L_BTHH81460QC2256B";
|
||||
disk-second = "/dev/disk/by-id/nvme-WDC_PC_SN730_SDBPNTY-1T00-1101_21114D802446";
|
||||
in {
|
||||
imports = with inputs; [
|
||||
disko.nixosModules.disko
|
||||
];
|
||||
disko.devices.nodev = {
|
||||
"/tmp" = {
|
||||
fsType = "tmpfs";
|
||||
mountOptions = ["rw" "nosuid" "nodev"];
|
||||
};
|
||||
};
|
||||
disko.devices.disk.main = import ./disk-main.nix {inherit disk-main hostId;};
|
||||
disko.devices.disk.second = import ./disk-second.nix {inherit disk-second hostId;};
|
||||
}
|
75
hosts/legion/disko/disk-main.nix
Normal file
75
hosts/legion/disko/disk-main.nix
Normal file
@ -0,0 +1,75 @@
|
||||
{
|
||||
disk-main,
|
||||
hostId,
|
||||
}: {
|
||||
type = "disk";
|
||||
device = disk-main;
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
size = "2G";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [
|
||||
"umask=0077"
|
||||
"fmask=0022"
|
||||
"dmask=0022"
|
||||
"noexec"
|
||||
"nosuid"
|
||||
"nodev"
|
||||
];
|
||||
};
|
||||
};
|
||||
luks = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "luks";
|
||||
name = "luks-" + hostId;
|
||||
initrdUnlock = true;
|
||||
settings.allowDiscards = true;
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = ["-f"];
|
||||
subvolumes = {
|
||||
"@root-nixos" = {
|
||||
mountpoint = "/";
|
||||
mountOptions = [
|
||||
"autodefrag"
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
# "noexec"
|
||||
];
|
||||
};
|
||||
"@home" = {
|
||||
mountpoint = "/home";
|
||||
mountOptions = [
|
||||
"autodefrag"
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
"@swap" = {
|
||||
mountpoint = "/swap";
|
||||
mountOptions = [
|
||||
# "compress=zstd"
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
# "@nix" = {
|
||||
# mountpoint = "/nix";
|
||||
# mountOptions = [
|
||||
# "compress-force=zstd"
|
||||
# "noatime"
|
||||
# ];
|
||||
# };
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
35
hosts/legion/disko/disk-second.nix
Normal file
35
hosts/legion/disko/disk-second.nix
Normal file
@ -0,0 +1,35 @@
|
||||
{
|
||||
disk-second,
|
||||
hostId,
|
||||
}: {
|
||||
type = "disk";
|
||||
device = disk-second;
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
luks = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "luks";
|
||||
name = "luks-${hostId}-second";
|
||||
initrdUnlock = true;
|
||||
settings.allowDiscards = true;
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = ["-f"];
|
||||
subvolumes = {
|
||||
"@storage" = {
|
||||
mountpoint = "/storage";
|
||||
mountOptions = [
|
||||
"autodefrag"
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@ -1,41 +0,0 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{
|
||||
inputs,
|
||||
lib,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = with inputs.nixos-hardware.nixosModules; [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
lenovo-legion-15ach6h
|
||||
];
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
|
||||
hardware = {
|
||||
enableRedistributableFirmware = true;
|
||||
nvidia-container-toolkit.enable = true;
|
||||
nvidia = {
|
||||
dynamicBoost.enable = true;
|
||||
powerManagement.finegrained = false;
|
||||
};
|
||||
};
|
||||
|
||||
services.keyd = {
|
||||
enable = true;
|
||||
keyboards.laptop = {
|
||||
ids = ["048d:c101"];
|
||||
settings.main = {
|
||||
a = "lettermod(alt, a, 200, 150)";
|
||||
s = "lettermod(meta, s, 200, 150)";
|
||||
d = "lettermod(control, d, 200, 150)";
|
||||
f = "lettermod(shift, f, 200, 150)";
|
||||
j = "lettermod(shift, j, 200, 150)";
|
||||
k = "lettermod(control, k, 200, 150)";
|
||||
l = "lettermod(meta, l, 200, 150)";
|
||||
";" = "lettermod(alt, ;, 200, 150)";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
11
hosts/legion/hardware/default.nix
Normal file
11
hosts/legion/hardware/default.nix
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
imports = [
|
||||
./nvidia.nix
|
||||
];
|
||||
services = {
|
||||
logind = {
|
||||
lidSwitch = "ignore";
|
||||
powerKey = "suspend";
|
||||
};
|
||||
};
|
||||
}
|
36
hosts/legion/hardware/nvidia.nix
Normal file
36
hosts/legion/hardware/nvidia.nix
Normal file
@ -0,0 +1,36 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
nixpkgs.config.allowUnfreePredicate = pkg:
|
||||
builtins.elem (lib.getName pkg) [
|
||||
"nvidia-x11"
|
||||
];
|
||||
services.xserver.videoDrivers = ["nvidia"];
|
||||
hardware = {
|
||||
nvidia-container-toolkit.enable = true;
|
||||
nvidia = {
|
||||
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||
open = true;
|
||||
modesetting.enable = true;
|
||||
nvidiaSettings = false;
|
||||
dynamicBoost.enable = true;
|
||||
powerManagement = {
|
||||
enable = false;
|
||||
# finegrained = true;
|
||||
};
|
||||
prime = {
|
||||
# sync.enable = true;
|
||||
# reverseSync.enable = true;
|
||||
# allowExternalGpu = true;
|
||||
offload = {
|
||||
enable = true;
|
||||
enableOffloadCmd = true;
|
||||
};
|
||||
amdgpuBusId = "PCI:6:0:0";
|
||||
nvidiaBusId = "PCI:1:0:0";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
5
hosts/legion/misc/default.nix
Normal file
5
hosts/legion/misc/default.nix
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
imports = [
|
||||
# ./distributed-build.nix
|
||||
];
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
{
|
||||
networking = {
|
||||
hostName = "legion";
|
||||
networkmanager.enable = true;
|
||||
};
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
# TODO: better file name
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
nix = {
|
||||
package = pkgs.lix;
|
||||
channel.enable = false;
|
||||
settings.experimental-features = ["nix-command" "flakes"];
|
||||
daemonCPUSchedPolicy = "idle";
|
||||
};
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
{
|
||||
powerManagement.enable = true;
|
||||
powerManagement.powertop.enable = true;
|
||||
services.power-profiles-daemon.enable = true;
|
||||
services.thermald.enable = true;
|
||||
services.upower.enable = true;
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
programs = {
|
||||
fish.enable = true;
|
||||
mosh.enable = true;
|
||||
nh = {
|
||||
enable = true;
|
||||
flake = "/home/user/.config/nixos";
|
||||
};
|
||||
};
|
||||
environment.systemPackages = with pkgs; [
|
||||
(lib.hiPrio uutils-coreutils-noprefix)
|
||||
helix
|
||||
nushell
|
||||
];
|
||||
}
|
@ -1,34 +0,0 @@
|
||||
{
|
||||
services = {
|
||||
# hardware.openrgb.enable = true;
|
||||
flatpak.enable = true;
|
||||
fwupd.enable = true;
|
||||
openssh.enable = true;
|
||||
syncthing.openDefaultPorts = true;
|
||||
dnscrypt-proxy2 = {
|
||||
enable = true;
|
||||
settings = {
|
||||
require_dnssec = true;
|
||||
server_names = ["mullvad-doh"];
|
||||
bootstrap_resolvers = ["9.9.9.11:53" "9.9.9.9:53"];
|
||||
};
|
||||
};
|
||||
opensnitch = {
|
||||
enable = false;
|
||||
settings = {
|
||||
DefaultAaction = "deny";
|
||||
Firewall = "iptables";
|
||||
InterceptUnknown = true;
|
||||
ProcMonitorMethod = "ebpf";
|
||||
};
|
||||
};
|
||||
scx = {
|
||||
enable = false;
|
||||
scheduler = "scx_flash";
|
||||
};
|
||||
logind = {
|
||||
lidSwitch = "ignore";
|
||||
powerKey = "suspend";
|
||||
};
|
||||
};
|
||||
}
|
@ -1,64 +0,0 @@
|
||||
{
|
||||
config,
|
||||
inputs,
|
||||
...
|
||||
}: let
|
||||
inherit (inputs) mysecrets;
|
||||
hostName =
|
||||
if (config.networking.hostName == "vylxae")
|
||||
then "sarien"
|
||||
else config.networking.hostName;
|
||||
sopsFile = mysecrets + "/hosts/${hostName}.yaml";
|
||||
dotSsh = name: "/home/user/.ssh/" + name;
|
||||
sshKey = {
|
||||
mode = "0400";
|
||||
owner = "user";
|
||||
};
|
||||
in {
|
||||
imports = with inputs; [
|
||||
sops-nix.nixosModules.sops
|
||||
];
|
||||
|
||||
sops = {
|
||||
age = {
|
||||
sshKeyPaths = ["/etc/ssh/ssh_host_ed25519_key"];
|
||||
keyFile = "/var/lib/sops-nix/key.txt";
|
||||
generateKey = true;
|
||||
};
|
||||
defaultSopsFile = mysecrets + "/common.yaml";
|
||||
secrets = {
|
||||
"user-password-hashed".neededForUsers = true;
|
||||
"ssh-config" = {
|
||||
path = dotSsh "config";
|
||||
mode = "0400";
|
||||
owner = "user";
|
||||
};
|
||||
"ssh-${hostName}-user" = {
|
||||
inherit sopsFile;
|
||||
inherit (sshKey) mode owner;
|
||||
path = dotSsh "id_ed25519";
|
||||
};
|
||||
"ssh-${hostName}-user.pub" = {
|
||||
inherit sopsFile;
|
||||
inherit (sshKey) mode owner;
|
||||
path = dotSsh "id_ed25519.pub";
|
||||
};
|
||||
"ssh-unexplrd" = {
|
||||
inherit (sshKey) mode owner;
|
||||
path = dotSsh "id_unexplrd_ed25519";
|
||||
};
|
||||
"ssh-unexplrd.pub" = {
|
||||
inherit (sshKey) mode owner;
|
||||
path = dotSsh "id_unexplrd_ed25519.pub";
|
||||
};
|
||||
"ssh-uni" = {
|
||||
inherit (sshKey) mode owner;
|
||||
path = dotSsh "id_uni_ed25519";
|
||||
};
|
||||
"ssh-uni.pub" = {
|
||||
inherit (sshKey) mode owner;
|
||||
path = dotSsh "id_uni_ed25519.pub";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
{
|
||||
inputs,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (config.sops) secrets;
|
||||
inherit (inputs) mysecrets;
|
||||
in {
|
||||
nix.settings.trusted-users = ["user" "nix-ssh"];
|
||||
users.mutableUsers = false;
|
||||
users.users = {
|
||||
user = {
|
||||
hashedPasswordFile = secrets."user-password-hashed".path;
|
||||
extraGroups = ["wheel" "video" "libvirtd" "dialout"];
|
||||
isNormalUser = true;
|
||||
shell = pkgs.fish;
|
||||
openssh.authorizedKeys.keyFiles = map (f: "${mysecrets}/ssh/user/id_${f}_ed25519.pub") [
|
||||
"dunamis"
|
||||
"eldrid"
|
||||
"sarien"
|
||||
"legion"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
@ -1,7 +1 @@
|
||||
{
|
||||
imports = [
|
||||
../../../dunamis/users/user/common.nix
|
||||
../../../dunamis/users/user/flatpak.nix
|
||||
../../../dunamis/users/user/programs.nix
|
||||
];
|
||||
}
|
||||
{flake, ...}: {imports = [flake.modules.shared.user];}
|
||||
|
47
hosts/morphius/configuration.nix
Normal file
47
hosts/morphius/configuration.nix
Normal file
@ -0,0 +1,47 @@
|
||||
{inputs, ...}: {
|
||||
imports = with inputs; [
|
||||
self.nixosModules.desktop
|
||||
self.nixosModules.system
|
||||
self.modules.shared.nixos
|
||||
./disko
|
||||
./hardware
|
||||
./misc
|
||||
];
|
||||
|
||||
networking = {
|
||||
hostId = "bd1b5837";
|
||||
hostName = "morphius";
|
||||
};
|
||||
|
||||
system.stateVersion = "25.11";
|
||||
time.timeZone = "Europe/Kyiv";
|
||||
|
||||
desktop.gnome.enable = true;
|
||||
|
||||
services.displayManager.autoLogin = {
|
||||
enable = true;
|
||||
user = "user";
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{
|
||||
device = "/swap/swapfile";
|
||||
size = 8 * 1024;
|
||||
}
|
||||
];
|
||||
|
||||
module = {
|
||||
config = {
|
||||
secureBoot = true;
|
||||
tpmDiskUnlock = true;
|
||||
powerSave = true;
|
||||
useIwd = true;
|
||||
vaapi = "intel-media-driver";
|
||||
};
|
||||
stylix = {
|
||||
enable = true;
|
||||
theme = "sandcastle";
|
||||
};
|
||||
locale = "uk_UA.UTF-8";
|
||||
};
|
||||
}
|
19
hosts/morphius/disko/default.nix
Normal file
19
hosts/morphius/disko/default.nix
Normal file
@ -0,0 +1,19 @@
|
||||
{
|
||||
config,
|
||||
inputs,
|
||||
...
|
||||
}: let
|
||||
inherit (config.networking) hostId;
|
||||
disk = "/dev/nvme0n1";
|
||||
in {
|
||||
imports = with inputs; [
|
||||
disko.nixosModules.disko
|
||||
];
|
||||
disko.devices.nodev = {
|
||||
"/tmp" = {
|
||||
fsType = "tmpfs";
|
||||
mountOptions = ["rw" "nosuid" "nodev"];
|
||||
};
|
||||
};
|
||||
disko.devices.disk.main = import ./disk-main.nix {inherit disk hostId;};
|
||||
}
|
80
hosts/morphius/disko/disk-main.nix
Normal file
80
hosts/morphius/disko/disk-main.nix
Normal file
@ -0,0 +1,80 @@
|
||||
{
|
||||
disk,
|
||||
hostId,
|
||||
...
|
||||
}: {
|
||||
type = "disk";
|
||||
device = disk;
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
size = "1G";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [
|
||||
"umask=0077"
|
||||
"fmask=0022"
|
||||
"dmask=0022"
|
||||
"noexec"
|
||||
"nosuid"
|
||||
"nodev"
|
||||
];
|
||||
};
|
||||
};
|
||||
luks = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "luks";
|
||||
name = "luks-" + hostId;
|
||||
initrdUnlock = true;
|
||||
settings.allowDiscards = true;
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = ["-f"];
|
||||
subvolumes = {
|
||||
"@nixos-root" = {
|
||||
mountpoint = "/";
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
"noexec"
|
||||
];
|
||||
};
|
||||
"@home" = {
|
||||
mountpoint = "/home";
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
"@storage" = {
|
||||
mountpoint = "/storage";
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
"@nix" = {
|
||||
mountpoint = "/nix";
|
||||
mountOptions = [
|
||||
"compress-force=zstd"
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
"@swap" = {
|
||||
mountpoint = "/swap";
|
||||
mountOptions = [
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
12
hosts/morphius/hardware/default.nix
Normal file
12
hosts/morphius/hardware/default.nix
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
imports = [
|
||||
# ./laptop
|
||||
];
|
||||
hardware.sensor.iio.enable = true;
|
||||
services = {
|
||||
logind = {
|
||||
lidSwitch = "ignore";
|
||||
powerKey = "suspend";
|
||||
};
|
||||
};
|
||||
}
|
5
hosts/morphius/misc/default.nix
Normal file
5
hosts/morphius/misc/default.nix
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
imports = [
|
||||
# ./distributed-build.nix
|
||||
];
|
||||
}
|
1
hosts/morphius/users/user/home-configuration.nix
Normal file
1
hosts/morphius/users/user/home-configuration.nix
Normal file
@ -0,0 +1 @@
|
||||
{flake, ...}: {imports = [flake.modules.shared.user];}
|
@ -1,13 +0,0 @@
|
||||
{inputs, ...}: {
|
||||
imports = with inputs; [
|
||||
nix-index-database.hmModules.nix-index
|
||||
self.homeModules.programs
|
||||
./programs.nix
|
||||
];
|
||||
home = {
|
||||
stateVersion = "25.05";
|
||||
sessionPath = [
|
||||
"$HOME/.local/bin"
|
||||
];
|
||||
};
|
||||
}
|
@ -1,60 +0,0 @@
|
||||
{pkgs, ...}: {
|
||||
shell = {
|
||||
fish.enable = true;
|
||||
#nushell.enable = true;
|
||||
oh-my-posh.enable = true;
|
||||
};
|
||||
|
||||
console.yazi.enable = true;
|
||||
|
||||
services.ssh-agent.enable = true;
|
||||
|
||||
programs = {
|
||||
bat.enable = true;
|
||||
btop = {
|
||||
enable = true;
|
||||
settings.update_ms = 200;
|
||||
};
|
||||
eza.enable = true;
|
||||
fd.enable = true;
|
||||
fzf = {
|
||||
enable = true;
|
||||
defaultOptions = ["--color=16"];
|
||||
};
|
||||
pay-respects.enable = true;
|
||||
nix-index.enable = true;
|
||||
nix-index-database.comma.enable = true;
|
||||
gitui.enable = true;
|
||||
git = {
|
||||
enable = true;
|
||||
delta.enable = true;
|
||||
signing.format = "ssh";
|
||||
aliases = {
|
||||
cl = "clone";
|
||||
co = "checkout";
|
||||
pom = "push origin main";
|
||||
};
|
||||
};
|
||||
jujutsu.enable = true;
|
||||
ripgrep.enable = true;
|
||||
};
|
||||
|
||||
editor = {
|
||||
helix.enable = true;
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
alejandra # nix formatter in rust
|
||||
trashy # trash cli in rust
|
||||
devenv # programming deps in rust
|
||||
procs # ps in rust
|
||||
ouch # archive manager in runt
|
||||
dust # du in rust
|
||||
fend # calc in rust
|
||||
moar # better pager (in go)
|
||||
just # make in rust
|
||||
rbw # bitwarden cli in rust
|
||||
jj-fzf # fuzzy finder jujutsu tui
|
||||
];
|
||||
systemd.user.settings.Manager.DefaultEnvironment.PAGER = "moar";
|
||||
}
|
@ -1,41 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
imports = with inputs; [
|
||||
chaotic.nixosModules.default
|
||||
];
|
||||
boot = {
|
||||
# kernelPackages = pkgs.linuxPackages_latest;
|
||||
kernelPackages = pkgs.linuxPackages_cachyos;
|
||||
kernelModules = ["kvm-intel"];
|
||||
kernelParams = [
|
||||
"debugfs=off"
|
||||
"efi=disable_early_pci_dma"
|
||||
# "gather_data_sampling=force"
|
||||
"intel_iommu=on"
|
||||
"iommu.passthrough=0"
|
||||
"iommu.strict=1"
|
||||
"iommu=force"
|
||||
# "lockdown=confidentiality"
|
||||
# "module.sig_enforce=1"
|
||||
"page_alloc.shuffle=1"
|
||||
# "reg_file_data_sampling=on"
|
||||
# "spec_rstack_overflow=safe-ret"
|
||||
"vsyscall=none"
|
||||
];
|
||||
loader.efi.canTouchEfiVariables = true;
|
||||
loader.systemd-boot = {
|
||||
enable = true;
|
||||
consoleMode = "auto";
|
||||
};
|
||||
plymouth.enable = true;
|
||||
};
|
||||
console = {
|
||||
earlySetup = true;
|
||||
packages = [pkgs.terminus_font];
|
||||
font = "${pkgs.terminus_font}/share/consolefonts/ter-c18n.psf.gz";
|
||||
};
|
||||
}
|
@ -2,42 +2,53 @@
|
||||
imports = with inputs; [
|
||||
self.nixosModules.desktop
|
||||
self.nixosModules.system
|
||||
./boot.nix
|
||||
./disko.nix
|
||||
./hardware.nix
|
||||
./networking.nix
|
||||
./nix.nix
|
||||
./power-saving.nix
|
||||
../dunamis/programs.nix
|
||||
./services.nix
|
||||
./sops.nix
|
||||
./users.nix
|
||||
self.modules.shared.nixos
|
||||
./disko
|
||||
./hardware
|
||||
./misc
|
||||
];
|
||||
|
||||
networking = {
|
||||
hostId = "31150fae";
|
||||
hostName = "sarien";
|
||||
};
|
||||
|
||||
system.stateVersion = "25.11";
|
||||
time.timeZone = "Europe/Kyiv";
|
||||
|
||||
desktop.niri.enable = true;
|
||||
|
||||
locale.ukrainian.enable = true;
|
||||
|
||||
module.stylix = {
|
||||
services.displayManager.autoLogin = {
|
||||
enable = true;
|
||||
theme = "helios";
|
||||
user = "user";
|
||||
};
|
||||
|
||||
opentabletdriver.enable = false;
|
||||
swapDevices = [
|
||||
{
|
||||
device = "/swap/swapfile";
|
||||
size = 4 * 1024;
|
||||
priority = 100;
|
||||
}
|
||||
{
|
||||
device = "/swap/hibernate";
|
||||
size = 16 * 1024;
|
||||
priority = 1;
|
||||
}
|
||||
];
|
||||
|
||||
qmk-vial.enable = true;
|
||||
|
||||
security.basic.enable = true;
|
||||
|
||||
system.stateVersion = "25.05";
|
||||
|
||||
time.timeZone = "Europe/Kyiv";
|
||||
|
||||
virtual.libvirt.enable = true;
|
||||
|
||||
wireless = {
|
||||
wifi.enable = true;
|
||||
bluetooth.enable = true;
|
||||
bluetooth.enableBlueman = true;
|
||||
module = {
|
||||
config = {
|
||||
laptop.homeRowMods = true;
|
||||
powerSave = true;
|
||||
useIwd = true;
|
||||
vaapi = "intel-media-driver";
|
||||
};
|
||||
stylix = {
|
||||
enable = true;
|
||||
theme = "sandcastle";
|
||||
};
|
||||
locale = "uk_UA.UTF-8";
|
||||
misc.qmk-vial.enable = true;
|
||||
virt.libvirt.enable = true;
|
||||
};
|
||||
}
|
||||
|
@ -1,79 +0,0 @@
|
||||
{inputs, ...}: {
|
||||
imports = with inputs; [
|
||||
disko.nixosModules.disko
|
||||
];
|
||||
disko.devices.nodev = {
|
||||
"/tmp" = {
|
||||
fsType = "tmpfs";
|
||||
mountOptions = ["rw" "nosuid" "nodev"];
|
||||
};
|
||||
};
|
||||
disko.devices.disk.main = {
|
||||
type = "disk";
|
||||
device = "/dev/disk/by-id/nvme-eui.0025385911b36714";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
size = "2G";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [
|
||||
"umask=0077"
|
||||
"fmask=0022"
|
||||
"dmask=0022"
|
||||
"noexec"
|
||||
];
|
||||
};
|
||||
};
|
||||
luks = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "luks";
|
||||
name = "luks-main";
|
||||
initrdUnlock = true;
|
||||
settings.allowDiscards = true;
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = ["-f"];
|
||||
subvolumes = {
|
||||
"@nixos-root" = {
|
||||
mountpoint = "/";
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
"noexec"
|
||||
];
|
||||
};
|
||||
"@home" = {
|
||||
mountpoint = "/home";
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
"@nix" = {
|
||||
mountpoint = "/nix";
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
"@storage" = {
|
||||
mountpoint = "/storage";
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
20
hosts/sarien/disko/default.nix
Normal file
20
hosts/sarien/disko/default.nix
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
config,
|
||||
inputs,
|
||||
...
|
||||
}: let
|
||||
inherit (config.networking) hostId;
|
||||
disk = "/dev/disk/by-id/nvme-eui.0025385911b36714";
|
||||
in {
|
||||
imports = with inputs; [
|
||||
disko.nixosModules.disko
|
||||
];
|
||||
disko.devices.nodev = {
|
||||
"/tmp" = {
|
||||
fsType = "tmpfs";
|
||||
mountOptions = ["rw" "nosuid" "nodev"];
|
||||
};
|
||||
};
|
||||
# same partitioning setup
|
||||
disko.devices.disk.main = import ../../dunamis/disko/disk-main.nix {inherit disk hostId;};
|
||||
}
|
@ -1,55 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
inputs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = with inputs.nixos-hardware.nixosModules; [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
common-cpu-intel
|
||||
common-gpu-intel-kaby-lake
|
||||
common-hidpi
|
||||
common-pc-laptop-ssd
|
||||
];
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
|
||||
services = {
|
||||
logind = {
|
||||
lidSwitch = "ignore";
|
||||
powerKey = "suspend";
|
||||
};
|
||||
|
||||
udev.extraHwdb = ''
|
||||
evdev:input:b0011v0001p0001eAB83*
|
||||
KEYBOARD_KEY_d5=sysrq
|
||||
KEYBOARD_KEY_d4=leftmeta
|
||||
KEYBOARD_KEY_95=brightnessdown
|
||||
KEYBOARD_KEY_91=brightnessup
|
||||
'';
|
||||
|
||||
keyd = {
|
||||
enable = true;
|
||||
keyboards = {
|
||||
default = {
|
||||
ids = ["0001:0001"];
|
||||
settings = {
|
||||
main = {
|
||||
camera = "brightnessdown";
|
||||
prog1 = "brightnessup";
|
||||
# home row mods
|
||||
a = "lettermod(alt, a, 200, 150)";
|
||||
s = "lettermod(meta, s, 200, 150)";
|
||||
d = "lettermod(control, d, 200, 150)";
|
||||
f = "lettermod(shift, f, 200, 150)";
|
||||
j = "lettermod(shift, j, 200, 150)";
|
||||
k = "lettermod(control, k, 200, 150)";
|
||||
l = "lettermod(meta, l, 200, 150)";
|
||||
";" = "lettermod(alt, ;, 200, 150)";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
11
hosts/sarien/hardware/default.nix
Normal file
11
hosts/sarien/hardware/default.nix
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
imports = [
|
||||
./laptop
|
||||
];
|
||||
services = {
|
||||
logind = {
|
||||
lidSwitch = "ignore";
|
||||
powerKey = "suspend";
|
||||
};
|
||||
};
|
||||
}
|
5
hosts/sarien/hardware/laptop/default.nix
Normal file
5
hosts/sarien/hardware/laptop/default.nix
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
imports = [
|
||||
./keyboard-fix.nix
|
||||
];
|
||||
}
|
21
hosts/sarien/hardware/laptop/keyboard-fix.nix
Normal file
21
hosts/sarien/hardware/laptop/keyboard-fix.nix
Normal file
@ -0,0 +1,21 @@
|
||||
{
|
||||
services = {
|
||||
udev.extraHwdb = ''
|
||||
evdev:input:b0011v0001p0001eAB83*
|
||||
KEYBOARD_KEY_d5=sysrq
|
||||
KEYBOARD_KEY_d4=leftmeta
|
||||
KEYBOARD_KEY_95=brightnessdown
|
||||
KEYBOARD_KEY_91=brightnessup
|
||||
'';
|
||||
keyd = {
|
||||
enable = true;
|
||||
keyboards.default = {
|
||||
ids = ["0001:0001"];
|
||||
settings.main = {
|
||||
camera = "brightnessdown";
|
||||
prog1 = "brightnessup";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
5
hosts/sarien/misc/default.nix
Normal file
5
hosts/sarien/misc/default.nix
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
imports = [
|
||||
# ./distributed-build.nix
|
||||
];
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
{
|
||||
networking = {
|
||||
networkmanager.enable = true;
|
||||
hostId = "31150fae";
|
||||
hostName = "vylxae";
|
||||
hosts = {
|
||||
"192.168.1.42" = ["dunamis"];
|
||||
};
|
||||
};
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
# TODO: better file name
|
||||
{
|
||||
config,
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
hostName =
|
||||
if (config.networking.hostName == "vylxae")
|
||||
then "sarien"
|
||||
else config.networking.hostName;
|
||||
inherit (config.sops) secrets;
|
||||
inherit (inputs) mysecrets;
|
||||
in {
|
||||
nix = {
|
||||
package = pkgs.lix;
|
||||
channel.enable = false;
|
||||
daemonCPUSchedPolicy = "idle";
|
||||
settings = {
|
||||
experimental-features = ["nix-command" "flakes"];
|
||||
builders-use-substitutes = true;
|
||||
};
|
||||
distributedBuilds = true;
|
||||
buildMachines = [
|
||||
{
|
||||
hostName = "dunamis";
|
||||
sshUser = "nix-ssh";
|
||||
system = "x86_64-linux";
|
||||
sshKey = secrets."ssh-${hostName}-user".path;
|
||||
supportedFeatures = ["nixos-test" "big-parallel" "kvm" "benchmark"];
|
||||
publicHostKey = builtins.readFile "${mysecrets}/ssh/ssh_host_ed25519_dunamis.base64";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
{
|
||||
powerManagement.enable = true;
|
||||
powerManagement.powertop.enable = true;
|
||||
services.power-profiles-daemon.enable = true;
|
||||
services.thermald.enable = true;
|
||||
services.upower.enable = true;
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
{pkgs, ...}: {
|
||||
programs.nh = {
|
||||
enable = true;
|
||||
clean.enable = true;
|
||||
clean.extraArgs = "--keep-since 7d --keep 3";
|
||||
flake = "/home/user/.config/nixos";
|
||||
};
|
||||
programs.fish.enable = true;
|
||||
environment.systemPackages = with pkgs; [
|
||||
helix
|
||||
nushell
|
||||
];
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
{
|
||||
services = {
|
||||
flatpak.enable = true;
|
||||
fstrim.enable = true;
|
||||
openssh.enable = true;
|
||||
power-profiles-daemon.enable = true;
|
||||
syncthing.openDefaultPorts = true;
|
||||
dnscrypt-proxy2 = {
|
||||
enable = true;
|
||||
settings = {
|
||||
require_dnssec = true;
|
||||
server_names = ["mullvad-doh"];
|
||||
bootstrap_resolvers = ["9.9.9.11:53" "9.9.9.9:53"];
|
||||
};
|
||||
};
|
||||
scx = {
|
||||
enable = true;
|
||||
scheduler = "scx_flash";
|
||||
};
|
||||
};
|
||||
}
|
@ -1,64 +0,0 @@
|
||||
{
|
||||
config,
|
||||
inputs,
|
||||
...
|
||||
}: let
|
||||
inherit (inputs) mysecrets;
|
||||
hostName =
|
||||
if (config.networking.hostName == "vylxae")
|
||||
then "sarien"
|
||||
else config.networking.hostName;
|
||||
sopsFile = mysecrets + "/hosts/${hostName}.yaml";
|
||||
dotSsh = name: "/home/user/.ssh/" + name;
|
||||
sshKey = {
|
||||
mode = "0400";
|
||||
owner = "user";
|
||||
};
|
||||
in {
|
||||
imports = with inputs; [
|
||||
sops-nix.nixosModules.sops
|
||||
];
|
||||
|
||||
sops = {
|
||||
age = {
|
||||
sshKeyPaths = ["/etc/ssh/ssh_host_ed25519_key"];
|
||||
keyFile = "/var/lib/sops-nix/key.txt";
|
||||
generateKey = true;
|
||||
};
|
||||
defaultSopsFile = mysecrets + "/common.yaml";
|
||||
secrets = {
|
||||
"user-password-hashed".neededForUsers = true;
|
||||
"ssh-config" = {
|
||||
path = dotSsh "config";
|
||||
mode = "0400";
|
||||
owner = "user";
|
||||
};
|
||||
"ssh-${hostName}-user" = {
|
||||
inherit sopsFile;
|
||||
inherit (sshKey) mode owner;
|
||||
path = dotSsh "id_ed25519";
|
||||
};
|
||||
"ssh-${hostName}-user.pub" = {
|
||||
inherit sopsFile;
|
||||
inherit (sshKey) mode owner;
|
||||
path = dotSsh "id_ed25519.pub";
|
||||
};
|
||||
"ssh-unexplrd" = {
|
||||
inherit (sshKey) mode owner;
|
||||
path = dotSsh "id_unexplrd_ed25519";
|
||||
};
|
||||
"ssh-unexplrd.pub" = {
|
||||
inherit (sshKey) mode owner;
|
||||
path = dotSsh "id_unexplrd_ed25519.pub";
|
||||
};
|
||||
"ssh-uni" = {
|
||||
inherit (sshKey) mode owner;
|
||||
path = dotSsh "id_uni_ed25519";
|
||||
};
|
||||
"ssh-uni.pub" = {
|
||||
inherit (sshKey) mode owner;
|
||||
path = dotSsh "id_uni_ed25519.pub";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
{
|
||||
inputs,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (config.sops) secrets;
|
||||
inherit (inputs) mysecrets;
|
||||
in {
|
||||
nix.settings.trusted-users = ["user"];
|
||||
users.mutableUsers = false;
|
||||
users.users = {
|
||||
user = {
|
||||
hashedPasswordFile = secrets."user-password-hashed".path;
|
||||
isNormalUser = true;
|
||||
extraGroups = ["wheel" "video" "libvirtd" "dialout"];
|
||||
shell = pkgs.fish;
|
||||
openssh.authorizedKeys.keyFiles = map (f: "${mysecrets}/ssh/user/id_${f}_ed25519.pub") [
|
||||
"dunamis"
|
||||
"eldrid"
|
||||
"sarien"
|
||||
"legion"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
@ -1,7 +1 @@
|
||||
{
|
||||
imports = [
|
||||
../../../dunamis/users/user/common.nix
|
||||
../../../dunamis/users/user/programs.nix
|
||||
../../../dunamis/users/user/flatpak.nix
|
||||
];
|
||||
}
|
||||
{flake, ...}: {imports = [flake.modules.shared.user];}
|
||||
|
@ -1,5 +1,4 @@
|
||||
{
|
||||
imports = [
|
||||
./xdg-userdirs.nix
|
||||
];
|
||||
}
|
||||
|
@ -1,17 +0,0 @@
|
||||
{config, ...}: let
|
||||
inherit (config.home) homeDirectory;
|
||||
home = f: "${homeDirectory}/${f}";
|
||||
in {
|
||||
xdg.userDirs = {
|
||||
enable = true;
|
||||
createDirectories = true;
|
||||
templates = home "temps";
|
||||
publicShare = home "pub";
|
||||
desktop = home "desktop";
|
||||
download = home "downloads";
|
||||
documents = home "docs";
|
||||
pictures = home "pics";
|
||||
videos = home "vids";
|
||||
music = home "music";
|
||||
};
|
||||
}
|
@ -1,10 +1,12 @@
|
||||
{
|
||||
osConfig,
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
inherit (osConfig.module.stylix) theme;
|
||||
cfg = config.desktop.cosmic;
|
||||
in {
|
||||
options = {
|
||||
@ -12,8 +14,81 @@ in {
|
||||
mkEnableOption "enable cosmic desktop";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
stylix.targets = {
|
||||
qt.enable = false;
|
||||
gtk.enable = false;
|
||||
};
|
||||
home.packages = with pkgs; [
|
||||
wl-clipboard-rs
|
||||
helvum
|
||||
loupe
|
||||
papers
|
||||
junction
|
||||
celluloid
|
||||
mission-center
|
||||
dconf
|
||||
libnotify
|
||||
playerctl
|
||||
wdisplays
|
||||
pwvucontrol
|
||||
wl-clipboard
|
||||
];
|
||||
gtk = {
|
||||
enable = true;
|
||||
iconTheme = {
|
||||
name =
|
||||
if config.stylix.polarity == "dark"
|
||||
then "Papirus-Dark"
|
||||
else "Papirus-Light";
|
||||
package =
|
||||
if (removeSuffix "-light" theme) == "nord"
|
||||
then pkgs.papirus-nord
|
||||
else pkgs.papirus-icon-theme;
|
||||
};
|
||||
};
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme.name = "gtk3";
|
||||
};
|
||||
services = {
|
||||
gnome-keyring = {
|
||||
enable = true;
|
||||
components = ["secrets"];
|
||||
};
|
||||
};
|
||||
dconf.settings = {
|
||||
"org/gnome/desktop/wm/preferences" = {
|
||||
button-layout = "icon:minimize,maximize,close";
|
||||
};
|
||||
"org/gnome/desktop/interface" = {
|
||||
icon-theme = config.gtk.iconTheme.name;
|
||||
};
|
||||
};
|
||||
xdg = {
|
||||
mime.enable = true;
|
||||
mimeApps = {
|
||||
enable = true;
|
||||
defaultApplications = let
|
||||
file_manager = ["org.gnome.Nautilus.desktop"];
|
||||
image_viewer = ["org.gnome.Loupe.desktop"];
|
||||
pdf_reader = ["org.gnome.Papers.desktop"];
|
||||
video_player = ["io.github.celluloid_player.Celluloid.desktop"];
|
||||
web_browser = ["re.sonny.Junction.desktop"];
|
||||
in {
|
||||
"application/pdf" = pdf_reader;
|
||||
"image/jpeg" = image_viewer;
|
||||
"image/png" = image_viewer;
|
||||
"inode/directory" = file_manager;
|
||||
"text/html" = web_browser;
|
||||
"video/mp4" = video_player;
|
||||
"video/mpeg" = video_player;
|
||||
"video/x-matroska" = video_player;
|
||||
"video/x-mpeg" = video_player;
|
||||
"x-scheme-handler/about" = web_browser;
|
||||
"x-scheme-handler/http" = web_browser;
|
||||
"x-scheme-handler/https" = web_browser;
|
||||
"x-scheme-handler/unknown" = web_browser;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
imports = [
|
||||
./common
|
||||
# ./common
|
||||
./cosmic
|
||||
./gnome
|
||||
./hyprland
|
||||
./niri
|
||||
|
@ -1,4 +1,5 @@
|
||||
{
|
||||
osConfig,
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
@ -13,33 +14,63 @@ in {
|
||||
mkEnableOption "enable gnome desktop";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
gnomeExtensions.alphabetical-app-grid
|
||||
gnomeExtensions.removable-drive-menu
|
||||
gnomeExtensions.caffeine
|
||||
gnomeExtensions.space-bar
|
||||
gnomeExtensions.switcher
|
||||
gnomeExtensions.tactile
|
||||
gnomeExtensions.pano
|
||||
gnomeExtensions.window-is-ready-remover
|
||||
junction
|
||||
celluloid
|
||||
mission-center
|
||||
dconf
|
||||
pwvucontrol
|
||||
wl-clipboard
|
||||
];
|
||||
home.packages =
|
||||
(with pkgs.gnomeExtensions; [
|
||||
# extensions
|
||||
alphabetical-app-grid
|
||||
app-icons-taskbar
|
||||
caffeine
|
||||
pano
|
||||
removable-drive-menu
|
||||
space-bar
|
||||
switcher
|
||||
tactile
|
||||
window-is-ready-remover
|
||||
])
|
||||
++ (with pkgs; [
|
||||
# regular packages
|
||||
junction
|
||||
celluloid
|
||||
mission-center
|
||||
dconf
|
||||
pwvucontrol
|
||||
wl-clipboard
|
||||
]);
|
||||
programs.gnome-shell.extensions = [
|
||||
{package = pkgs.gnomeExtensions.alphabetical-app-grid;}
|
||||
|
||||
{package = pkgs.gnomeExtensions.removable-drive-menu;}
|
||||
{package = pkgs.gnomeExtensions.app-icons-taskbar;}
|
||||
{package = pkgs.gnomeExtensions.caffeine;}
|
||||
{package = pkgs.gnomeExtensions.pano;}
|
||||
{package = pkgs.gnomeExtensions.removable-drive-menu;}
|
||||
{package = pkgs.gnomeExtensions.space-bar;}
|
||||
{package = pkgs.gnomeExtensions.switcher;}
|
||||
{package = pkgs.gnomeExtensions.tactile;}
|
||||
{package = pkgs.gnomeExtensions.pano;}
|
||||
{package = pkgs.gnomeExtensions.window-is-ready-remover;}
|
||||
];
|
||||
gtk = {
|
||||
enable = true;
|
||||
iconTheme = let
|
||||
name =
|
||||
if (lib.strings.hasPrefix "gruvbox" osConfig.module.stylix.theme)
|
||||
then "Gruvbox-Plus-Dark"
|
||||
else if config.stylix.polarity == "dark"
|
||||
then "Papirus-Dark"
|
||||
else "Papirus-Light";
|
||||
package =
|
||||
if (lib.strings.hasPrefix "gruvbox" osConfig.module.stylix.theme)
|
||||
then pkgs.gruvbox-plus-icons
|
||||
else if (lib.strings.hasPrefix "rose-pine" osConfig.module.stylix.theme)
|
||||
then pkgs.papirus-icon-theme.override {color = "indigo";}
|
||||
else if (lib.strings.hasPrefix "nord" osConfig.module.stylix.theme)
|
||||
then pkgs.papirus-icon-theme.override {color = "nordic";}
|
||||
else pkgs.papirus-icon-theme;
|
||||
in {inherit name package;};
|
||||
};
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme.name = lib.mkForce "adwaita";
|
||||
};
|
||||
|
||||
dconf.settings = with lib.hm.gvariant; {
|
||||
"org/gnome/desktop/a11y/applications" = {
|
||||
screen-reader-enabled = false;
|
||||
@ -54,12 +85,12 @@ in {
|
||||
|
||||
"org/gnome/desktop/input-sources" = {
|
||||
mru-sources = [(mkTuple ["xkb" "us"])];
|
||||
sources = [(mkTuple ["xkb" "us"]) (mkTuple ["xkb" "ua"]) (mkTuple ["xkb" "us+colemak_dh"])];
|
||||
# sources = [(mkTuple ["xkb" "us"]) (mkTuple ["xkb" "ua"]) (mkTuple ["xkb" "us+colemak_dh"])];
|
||||
xkb-options = ["terminate:ctrl_alt_bksp"];
|
||||
};
|
||||
|
||||
"org/gnome/desktop/interface" = {
|
||||
accent-color = "slate";
|
||||
# accent-color = "slate";
|
||||
clock-show-seconds = true;
|
||||
color-scheme = "prefer-dark";
|
||||
enable-animations = true;
|
||||
@ -100,8 +131,8 @@ in {
|
||||
move-to-workspace-last = ["<Shift><Control><Super>End"];
|
||||
move-to-workspace-left = ["<Control><Super>Left"];
|
||||
move-to-workspace-right = ["<Control><Super>Right"];
|
||||
switch-input-source = ["<Super>Escape"];
|
||||
switch-input-source-backward = ["<Shift><Super>Escape"];
|
||||
switch-input-source = ["<Super>Space"];
|
||||
switch-input-source-backward = ["<Shift><Super>Space"];
|
||||
switch-to-workspace-1 = ["<Super>1"];
|
||||
switch-to-workspace-2 = ["<Super>2"];
|
||||
switch-to-workspace-3 = ["<Super>3"];
|
||||
@ -135,7 +166,18 @@ in {
|
||||
};
|
||||
|
||||
"org/gnome/shell" = {
|
||||
enabled-extensions = ["drive-menu@gnome-shell-extensions.gcampax.github.com" "caffeine@patapon.info" "AlphabeticalAppGrid@stuarthayhurst" "appindicatorsupport@rgcjonas.gmail.com" "user-theme@gnome-shell-extensions.gcampax.github.com" "tactile@lundal.io" "switcher@landau.fi" "pano@elhan.io" "space-bar@luchrioh"];
|
||||
enabled-extensions = [
|
||||
"AlphabeticalAppGrid@stuarthayhurst"
|
||||
"appindicatorsupport@rgcjonas.gmail.com"
|
||||
"aztaskbar@aztaskbar.gitlab.com"
|
||||
"caffeine@patapon.info"
|
||||
"drive-menu@gnome-shell-extensions.gcampax.github.com"
|
||||
"pano@elhan.io"
|
||||
"space-bar@luchrioh"
|
||||
"switcher@landau.fi"
|
||||
"tactile@lundal.io"
|
||||
"user-theme@gnome-shell-extensions.gcampax.github.com"
|
||||
];
|
||||
};
|
||||
|
||||
"org/gnome/shell/app-switcher" = {
|
||||
@ -167,6 +209,21 @@ in {
|
||||
workspace-indicator = true;
|
||||
};
|
||||
|
||||
"org/gnome/shell/extensions/aztaskbar" = with lib.hm.gvariant; {
|
||||
favorites = true;
|
||||
icon-size = 25;
|
||||
icon-style = "REGULAR";
|
||||
# intellihide = true;
|
||||
main-panel-height = mkTuple [true 40];
|
||||
position-offset = 4;
|
||||
prefs-visible-page = "";
|
||||
show-apps-button = mkTuple [true 0];
|
||||
show-panel-activities-button = true;
|
||||
show-weather-by-clock = "LEFT";
|
||||
taskbar-spacing = 2;
|
||||
# update-notifier-project-version = 30;
|
||||
};
|
||||
|
||||
"org/gnome/shell/extensions/tactile" = {
|
||||
background-color = "#${colors.base00}";
|
||||
border-color = "#${colors.base0D}";
|
||||
|
File diff suppressed because it is too large
Load Diff
458
modules/home/desktop/hyprland/hyprland.nix
Normal file
458
modules/home/desktop/hyprland/hyprland.nix
Normal file
@ -0,0 +1,458 @@
|
||||
{
|
||||
config,
|
||||
osConfig,
|
||||
perSystem,
|
||||
launcher,
|
||||
lockscreen,
|
||||
# pkgs,
|
||||
# lib,
|
||||
...
|
||||
}: let
|
||||
inherit (config.lib.stylix) colors;
|
||||
# inherit (lib) mkIf;
|
||||
hostname = osConfig.networking.hostName;
|
||||
cursorSize = config.stylix.cursor.size;
|
||||
fontName = config.stylix.fonts.sansSerif.name;
|
||||
keyboard =
|
||||
if hostname == "eldrid"
|
||||
then "chromeos"
|
||||
else "platform";
|
||||
xdgPictures =
|
||||
config.xdg.userDirs.pictures;
|
||||
# ifLaptop = mkIf (hostname != "dunamis");
|
||||
in {
|
||||
enable = true;
|
||||
systemd = {
|
||||
enable = true;
|
||||
variables = [
|
||||
"--all"
|
||||
];
|
||||
};
|
||||
package = perSystem.hyprland.hyprland;
|
||||
portalPackage = perSystem.hyprland.xdg-desktop-portal-hyprland;
|
||||
# plugins = with pkgs.hyprlandPlugins; [
|
||||
# hyprspace
|
||||
# hy3
|
||||
# hyprscroller
|
||||
# ];
|
||||
settings = {
|
||||
input = {
|
||||
kb_layout = "us,ua";
|
||||
resolve_binds_by_sym =
|
||||
if hostname == "dunamis"
|
||||
then 0
|
||||
else 1;
|
||||
repeat_rate = 50;
|
||||
repeat_delay = 300;
|
||||
# mouse
|
||||
accel_profile = "flat";
|
||||
sensitivity = 0;
|
||||
};
|
||||
device = [
|
||||
{
|
||||
name = "ite-tech.-inc.-ite-device(8910)-keyboard";
|
||||
kb_variant = "colemak_dh,";
|
||||
}
|
||||
{
|
||||
name = "at-translated-set-2-keyboard";
|
||||
kb_variant = "colemak_dh,";
|
||||
}
|
||||
{
|
||||
name = "keyd-virtual-keyboard";
|
||||
kb_variant = "colemak_dh,";
|
||||
}
|
||||
];
|
||||
xwayland.force_zero_scaling = true;
|
||||
monitor = [
|
||||
", preferred, auto, 1"
|
||||
"desc:AOC 27V2G5 0x0000026C, addreserved, 0, 300, 0, 0"
|
||||
"desc:Samsung Electric Company S24R65x H4TMA03291, preferred, 0x0, 1, bitdepth, 10, vrr, 1"
|
||||
"desc:Philips Consumer Electronics Company 27M2N5500 UK02418033254, 2560x1440@180.00Hz, 0x0, 1.3333333, bitdepth, 10, vrr, 1"
|
||||
"desc:BOE 0x08E8, preferred, 1920x0, 1.2, bitdepth, 10"
|
||||
"desc:LG Display 0x068B, preferred, 1920x0, 1.2, bitdepth, 10"
|
||||
"desc:Chimei Innolux Corporation 0x1406, preferred, 1920x0, 1.2"
|
||||
"desc:KDC 0x0000, preferred, 1920x0, 1.25"
|
||||
];
|
||||
env = [
|
||||
"ELECTRON_OZONE_PLATFORM_HINT,auto"
|
||||
"QT_QPA_PLATFORM,wayland"
|
||||
"QT_QPA_PLATFORMTHEME,gtk3"
|
||||
"XCURSORSIZE,${toString cursorSize}"
|
||||
"GSK_RENDERER,ngl"
|
||||
];
|
||||
decoration = {
|
||||
shadow.enabled = false;
|
||||
# drop_shadow = false;
|
||||
blur = {
|
||||
size = 8;
|
||||
passes = 3;
|
||||
};
|
||||
# shadow_offset = "0 5";
|
||||
# "col.shadow" = "rgba(00000099)";
|
||||
rounding = 12;
|
||||
};
|
||||
misc = {
|
||||
font_family = fontName;
|
||||
disable_splash_rendering = true;
|
||||
disable_hyprland_logo = true;
|
||||
# vfr = true;
|
||||
};
|
||||
bezier = [
|
||||
"easeOutQuad, 0.25, 0.46, 0.45, 0.94"
|
||||
"easeOutExpo, 0.19, 1, 0.22, 1"
|
||||
];
|
||||
animation = [
|
||||
"workspaces, 1, 3, easeOutExpo, slidefade 20%"
|
||||
"windows, 1, 3, easeOutExpo, popin 80%"
|
||||
"layers, 1, 2, easeOutExpo, fade"
|
||||
];
|
||||
plugin = [
|
||||
{
|
||||
overview = {
|
||||
gapsIn = 12;
|
||||
gapsOut = 24;
|
||||
exitOnClick = true;
|
||||
centerAligned = true;
|
||||
showNewWorkspace = false;
|
||||
showEmptyWorkspace = false;
|
||||
affectStrut = false;
|
||||
};
|
||||
hyprexpo = {
|
||||
columns = 3;
|
||||
gap_size = 8;
|
||||
#bg_col = "rgb(111111)";
|
||||
workspace_method = "first 1"; # [center/first] [workspace] e.g. first 1 or center m+1
|
||||
enable_gesture = true; # laptop touchpad
|
||||
gesture_fingers = 3; # 3 or 4
|
||||
gesture_distance = 400; # how far is the "max"
|
||||
gesture_positive = false; # positive = swipe down. Negative = swipe up.;
|
||||
};
|
||||
}
|
||||
{
|
||||
hy3 = {
|
||||
autotile = true;
|
||||
tab_first_window = false;
|
||||
tabs = {
|
||||
render_text = true;
|
||||
height = 24;
|
||||
padding = 8;
|
||||
rounding = 8;
|
||||
text_height = 14;
|
||||
text_center = true;
|
||||
text_font = fontName;
|
||||
|
||||
"col.active" = "0xff${colors.base00}";
|
||||
"col.inactive" = "0xff${colors.base00}";
|
||||
"col.urgent" = "0xff${colors.base00}";
|
||||
"col.active.text" = "0xff${colors.base0D}";
|
||||
"col.inactive.text" = "0xff${colors.base05}";
|
||||
"col.urgent.text" = "0xff${colors.base09}";
|
||||
"col.active.border" = "0xff${colors.base00}";
|
||||
"col.inactive.border" = "0xff${colors.base00}";
|
||||
"col.urgent.border" = "0xff${colors.base00}";
|
||||
};
|
||||
};
|
||||
}
|
||||
{
|
||||
scroller = {
|
||||
column_widths = "onethird onehalf twothirds one";
|
||||
window_heights = "onethird onehalf twothirds one";
|
||||
gesture_scroll_fingers = 3;
|
||||
gesture_overview_fingers = 3;
|
||||
jump_labels_font = fontName;
|
||||
jump_labels_color = "0xff${colors.base0A}";
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
dwindle = {
|
||||
force_split = 2;
|
||||
default_split_ratio = 1.2;
|
||||
};
|
||||
master = {
|
||||
mfact = 0.6;
|
||||
};
|
||||
|
||||
"$mod" = "SUPER";
|
||||
"$modShift" = "$mod SHIFT";
|
||||
"$modCtrl" = "$mod CTRL";
|
||||
"$modShiftCtrl" = "$mod SHIFT CTRL";
|
||||
|
||||
"$left" = "N";
|
||||
"$down" = "E";
|
||||
"$up" = "I";
|
||||
"$right" = "O";
|
||||
|
||||
"$terminal" = "ghostty";
|
||||
"$launcher" = launcher;
|
||||
"$screenLocker" = lockscreen;
|
||||
"$webBrowser" = "io.github.zen_browser.zen";
|
||||
"$clipboardManager" = "copyq menu";
|
||||
|
||||
general = {
|
||||
"col.active_border" = "0xff${colors.base0D}";
|
||||
"col.inactive_border" = "0xff${colors.base03}";
|
||||
gaps_in = 4;
|
||||
gaps_out = 8;
|
||||
border_size = 3;
|
||||
allow_tearing = true;
|
||||
layout = "dwindle";
|
||||
};
|
||||
group = {
|
||||
"col.border_active" = "0xff${colors.base0D}";
|
||||
"col.border_inactive" = "0xff${colors.base03}";
|
||||
"col.border_locked_active" = "0xff${colors.base0A}";
|
||||
"col.border_locked_inactive" = "0xff${colors.base0F}";
|
||||
groupbar = {
|
||||
height = 16;
|
||||
rounding = 0;
|
||||
indicator_height = 0;
|
||||
gradient_rounding = 4;
|
||||
font_size = 14;
|
||||
gradients = true;
|
||||
font_family = fontName;
|
||||
"text_color" = "0xff${colors.base00}";
|
||||
"col.active" = "0xff${colors.base0D}";
|
||||
"col.inactive" = "0xff${colors.base03}";
|
||||
};
|
||||
};
|
||||
binds.scroll_event_delay = 0;
|
||||
cursor.persistent_warps = true;
|
||||
|
||||
bind = [
|
||||
"$mod, Return, exec, $terminal"
|
||||
"$mod, Space, exec, $launcher"
|
||||
# "$modShift, Space, exec, $launcher"
|
||||
"$modCtrl, Q, killactive"
|
||||
"$modCtrl, M, fullscreen"
|
||||
"$modCtrl, G, togglefloating"
|
||||
"$mod, G, pin"
|
||||
|
||||
"$mod, T, togglegroup"
|
||||
"$mod, period, changegroupactive, f"
|
||||
"$mod, comma, changegroupactive, b"
|
||||
"$modCtrl, period, movewindoworgroup, r"
|
||||
"$modCtrl, comma, movewindoworgroup, l"
|
||||
|
||||
"$mod, Tab, cyclenext,"
|
||||
"$modShift, Tab, cyclenext, prev"
|
||||
"$mod, Tab, bringactivetotop,"
|
||||
|
||||
"$modShift, U, focusurgentorlast"
|
||||
|
||||
"$modCtrl, L, exec, $screenLocker"
|
||||
"$modCtrl, B, exec, $webBrowser"
|
||||
"$modCtrl, V, exec, $clipboardManager"
|
||||
"$modCtrl, K, focuswindow, title:(Meet:.*)"
|
||||
|
||||
# ", Print, exec, ${pkgs.grim}/bin/grim -g \"$(${pkgs.slurp}/bin/slurp -o -r -c '\#\#00000000')\" -t ppm - | ${pkgs.satty}/bin/satty --filename - --fullscreen --output-filename ${xdgPictures}/screenshots/satty-$(date '+%Y%m%d-%H:%M:%S').png"
|
||||
", Print, exec, hyprshot -z -m region -o ${xdgPictures}/screenshots -f screenshot-$(date '+%Y%m%d-%H:%M:%S').png"
|
||||
"CTRL, Print, exec, hyprshot -z -m window -o ${xdgPictures}/screenshots -f screenshot-$(date '+%Y%m%d-%H:%M:%S').png"
|
||||
"SHIFT, Print, exec, hyprshot -z -m output -o ${xdgPictures}/screenshots -f screenshot-$(date '+%Y%m%d-%H:%M:%S').png"
|
||||
## navigation
|
||||
"$mod, $left, movefocus, l"
|
||||
"$mod, $down, movefocus, d"
|
||||
"$mod, $up, movefocus, u"
|
||||
"$mod, $right, movefocus, r"
|
||||
"$modShift, $left, workspace, e-1"
|
||||
"$modShift, $right, workspace, e+1"
|
||||
"$mod, left, movefocus, l"
|
||||
"$mod, up, movefocus, u"
|
||||
"$mod, down, movefocus, d"
|
||||
"$mod, right, movefocus, r"
|
||||
"$modShift, W, focuscurrentorlast"
|
||||
"$mod, mouse_down, workspace, e-1"
|
||||
"$mod, mouse_up, workspace, e+1"
|
||||
"$modShift, left, workspace, e-1"
|
||||
"$modShift, right, workspace, e+1"
|
||||
|
||||
"$modCtrl, $left, movewindow, l"
|
||||
"$modCtrl, $down, movewindow, d"
|
||||
"$modCtrl, $up, movewindow, u"
|
||||
"$modCtrl, $right, movewindow, r"
|
||||
"$modCtrl, left, movewindow, l"
|
||||
"$modCtrl, up, movewindow, u"
|
||||
"$modCtrl, down, movewindow, d"
|
||||
"$modCtrl, right, movewindow, r"
|
||||
# workspaces
|
||||
"$mod, 1, workspace, 1"
|
||||
"$mod, 2, workspace, 2"
|
||||
"$mod, 3, workspace, 3"
|
||||
"$mod, 4, workspace, 4"
|
||||
"$mod, 5, workspace, 5"
|
||||
"$mod, 6, workspace, 6"
|
||||
"$mod, 7, workspace, 7"
|
||||
"$mod, 8, workspace, 8"
|
||||
"$mod, 9, workspace, 9"
|
||||
"$mod, 0, togglespecialworkspace"
|
||||
|
||||
"$modShiftCtrl, 1, movetoworkspace, 1"
|
||||
"$modShiftCtrl, 2, movetoworkspace, 2"
|
||||
"$modShiftCtrl, 3, movetoworkspace, 3"
|
||||
"$modShiftCtrl, 4, movetoworkspace, 4"
|
||||
"$modShiftCtrl, 5, movetoworkspace, 5"
|
||||
"$modShiftCtrl, 6, movetoworkspace, 6"
|
||||
"$modShiftCtrl, 7, movetoworkspace, 7"
|
||||
"$modShiftCtrl, 8, movetoworkspace, 8"
|
||||
"$modShiftCtrl, 9, movetoworkspace, 9"
|
||||
"$modShiftCtrl, 0, movetoworkspace, special"
|
||||
|
||||
"$mod, Q, workspace, 1"
|
||||
"$mod, W, workspace, 2"
|
||||
"$mod, F, workspace, 3"
|
||||
"$mod, P, workspace, 4"
|
||||
"$mod, B, workspace, 5"
|
||||
"$mod, J, workspace, 6"
|
||||
"$mod, L, workspace, 7"
|
||||
"$mod, U, workspace, 8"
|
||||
"$mod, Y, workspace, 9"
|
||||
"$mod, apostrophe, togglespecialworkspace"
|
||||
|
||||
"$modShiftCtrl, Q, movetoworkspace, 1"
|
||||
"$modShiftCtrl, W, movetoworkspace, 2"
|
||||
"$modShiftCtrl, F, movetoworkspace, 3"
|
||||
"$modShiftCtrl, P, movetoworkspace, 4"
|
||||
"$modShiftCtrl, B, movetoworkspace, 5"
|
||||
"$modShiftCtrl, J, movetoworkspace, 6"
|
||||
"$modShiftCtrl, L, movetoworkspace, 7"
|
||||
"$modShiftCtrl, U, movetoworkspace, 8"
|
||||
"$modShiftCtrl, Y, movetoworkspace, 9"
|
||||
"$modShiftCtrl, apostrophe, movetoworkspace, special"
|
||||
|
||||
"$modShiftCtrl, $left, movetoworkspace, e-1"
|
||||
"$modShiftCtrl, $right, movetoworkspace, e+1"
|
||||
"$modShiftCtrl, left, movetoworkspace, e-1"
|
||||
"$modShiftCtrl, right, movetoworkspace, e+1"
|
||||
|
||||
''$mod ALT, mouse_down, exec, hyprctl keyword cursor:zoom_factor "$(hyprctl getoption cursor:zoom_factor | awk 'NR==1 {factor = $2; if (factor < 1) {factor = 1}; print factor * 1.25}')"''
|
||||
''$mod ALT, mouse_up, exec, hyprctl keyword cursor:zoom_factor "$(hyprctl getoption cursor:zoom_factor | awk 'NR==1 {factor = $2; if (factor < 1) {factor = 1}; print factor / 1.25}')"''
|
||||
"$mod ALT, mouse:274, exec, hyprctl keyword cursor:zoom_factor 1" # middle wheel click
|
||||
];
|
||||
# binde = [
|
||||
# "$mod, comma, resizeactive, -10 0"
|
||||
# "$mod, period, resizeactive, 10 0"
|
||||
# "$modShift, comma, resizeactive, 0 -10"
|
||||
# "$modShift, period, resizeactive, 0 10"
|
||||
# ];
|
||||
bindl = [
|
||||
"$mod, Escape, exec, hyprctl switchxkblayout all next"
|
||||
", switch:on:Lid Switch, exec, hyprctl keyword monitor 'eDP-1, disable'"
|
||||
", switch:off:Lid Switch, exec, hyprctl keyword monitor 'eDP-1, preferred, 1920x0, 1.2'"
|
||||
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
|
||||
", XF86AudioPlay, exec, playerctl play-pause"
|
||||
", XF86AudioPrev, exec, playerctl previous"
|
||||
", XF86AudioNext, exec, playerctl next"
|
||||
"$modShiftCtrl ALT, Q, exit"
|
||||
];
|
||||
binde = [
|
||||
", XF86MonBrightnessUp, exec, brightnessctl s 5%+"
|
||||
", XF86MonBrightnessDown, exec, brightnessctl s 5%-"
|
||||
"ALT, XF86MonBrightnessUp, exec, brightnessctl s 5%+ -d ${keyboard}::kbd_backlight"
|
||||
"ALT, XF86MonBrightnessDown, exec, brightnessctl s 5%- -d ${keyboard}::kbd_backlight"
|
||||
", XF86KbdBrightnessUp, exec, brightnessctl s 5%+ -d ${keyboard}::kbd_backlight"
|
||||
", XF86KbdBrightnessDown, exec, brightnessctl s 5%- -d ${keyboard}::kbd_backlight"
|
||||
", XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"
|
||||
", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
|
||||
];
|
||||
bindm = [
|
||||
"$mod, mouse:272, movewindow"
|
||||
"$mod, mouse:273, resizewindow"
|
||||
"$mod ALT, mouse:272, resizewindow"
|
||||
];
|
||||
gestures = {
|
||||
workspace_swipe = true;
|
||||
workspace_swipe_fingers = 3;
|
||||
workspace_swipe_distance = 300;
|
||||
};
|
||||
|
||||
workspace = [
|
||||
"1, defaultName:general"
|
||||
"2, defaultName:web"
|
||||
"3, defaultName:chat"
|
||||
"4, defaultName:code"
|
||||
"5, defaultName:uni"
|
||||
"6, defaultName:games"
|
||||
"7, defaultName:system"
|
||||
"8, defaultName:media"
|
||||
"9, defaultName:tray"
|
||||
# "10, defaultName:"
|
||||
];
|
||||
windowrulev2 = [
|
||||
## tray/misc utilities
|
||||
# file picker
|
||||
"float, class:xdg-desktop-portal-gtk"
|
||||
"size <50% <90%, class:xdg-desktop-portal-gtk"
|
||||
"center 1, class:xdg-desktop-portal-gtk"
|
||||
# xdp-hyprland stream picker
|
||||
"float, initialTitle:MainPicker"
|
||||
# general apps
|
||||
"float, class:(com.saivert.pwvucontrol)"
|
||||
"float, class:(re.sonny.Junction)"
|
||||
"float, class:(com.github.hluk.copyq)"
|
||||
"float, class:(nm-connection-editor)"
|
||||
"float, class:(.blueman-manager-wrapped)"
|
||||
# telegram
|
||||
"maximize, initialTitle:Медіапереглядач"
|
||||
"noborder, title:TelegramDesktop"
|
||||
"keepaspectratio, title:TelegramDesktop"
|
||||
"noblur, title:TelegramDesktop"
|
||||
"float, title:TelegramDesktop"
|
||||
"pin, title:TelegramDesktop"
|
||||
# any chromium-based
|
||||
"noborder, title:Картинка в картинці"
|
||||
"keepaspectratio, title:Картинка в картинці"
|
||||
"noblur, title:Картинка в картинці"
|
||||
"float, title:Картинка в картинці"
|
||||
"pin, title:Картинка в картинці"
|
||||
# and firefox
|
||||
"noborder, title:Picture-in-Picture"
|
||||
"keepaspectratio, title:Picture-in-Picture"
|
||||
"noblur, title:Picture-in-Picture"
|
||||
"float, title:Picture-in-Picture"
|
||||
"pin, title:Picture-in-Picture"
|
||||
# screenshot editor
|
||||
"noanim, class:com.gabm.satty"
|
||||
"float, class:com.gabm.satty"
|
||||
"rounding 0, class:com.gabm.satty"
|
||||
"size 100% 100%, class:com.gabm.satty"
|
||||
"move 0 0, class:com.gabm.satty"
|
||||
"pin, class:com.gabm.satty"
|
||||
## games
|
||||
"float, class:(com.mojang.minecraft.java-edition)"
|
||||
"immediate, class:(com.mojang.minecraft.java-edition)"
|
||||
# cs2
|
||||
"immediate, class:(cs2)"
|
||||
# deadlock
|
||||
# "float, class:(steam_app_1422450)"
|
||||
"fullscreen, class:(steam_app_1422450)"
|
||||
"immediate, class:(steam_app_1422450)"
|
||||
"immediate, initialTitle:(Ghostrunner)"
|
||||
# dead by daylight
|
||||
"immediate, class:deadbydaylight-egs-shipping.exe"
|
||||
## workspace assignments
|
||||
"workspace name:chat, class:org.telegram.desktop"
|
||||
"workspace name:chat, class:org.signal.Signal"
|
||||
"workspace name:chat, class:im.riot.Riot"
|
||||
"workspace name:chat, class:WebCord"
|
||||
|
||||
"workspace name:games, class:com.heroicgameslauncher.hgl"
|
||||
"workspace name:games, class:net.lutris.Lutris"
|
||||
"workspace name:games, class:steam"
|
||||
# "workspace name:game, class:"
|
||||
];
|
||||
};
|
||||
extraConfig = ''
|
||||
bind = $modShift, R, submap, resize
|
||||
submap = resize
|
||||
binde = , right, resizeactive, 10 0
|
||||
binde = , left, resizeactive, -10 0
|
||||
binde = , up, resizeactive, 0 -10
|
||||
binde = , down, resizeactive, 0 10
|
||||
binde = , $right, resizeactive, 10 0
|
||||
binde = , $left, resizeactive, -10 0
|
||||
binde = , $up, resizeactive, 0 -10
|
||||
binde = , $down, resizeactive, 0 10
|
||||
bind = , escape, submap, reset
|
||||
submap = reset
|
||||
'';
|
||||
}
|
23
modules/home/desktop/hyprland/programs/default.nix
Normal file
23
modules/home/desktop/hyprland/programs/default.nix
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
osConfig,
|
||||
config,
|
||||
inputs,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkDefault getExe;
|
||||
inherit (config.lib.stylix) colors;
|
||||
inherit (osConfig.networking) hostName;
|
||||
ifLaptop = mkIf (hostName != "dunamis");
|
||||
in {
|
||||
imports = with inputs; [
|
||||
walker.homeManagerModules.default
|
||||
];
|
||||
options = config.desktop.hyprland.enable {
|
||||
# programs.fuzzel = import ./fuzzel {inherit config mkDefault;};
|
||||
programs.walker = import ./walker {inherit config inputs pkgs;};
|
||||
programs.waybar = import ./waybar {inherit colors config getExe ifLaptop pkgs;};
|
||||
programs.hyprlock = import ./hyprlock {inherit config pkgs;};
|
||||
};
|
||||
}
|
23
modules/home/desktop/hyprland/programs/fuzzel/default.nix
Normal file
23
modules/home/desktop/hyprland/programs/fuzzel/default.nix
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
config,
|
||||
mkDefault,
|
||||
}: {
|
||||
enable = true;
|
||||
settings = {
|
||||
main = {
|
||||
terminal = "$TERMINAL -e";
|
||||
fields = "filename,name,generic,keywords,categories,exec";
|
||||
dpi-aware = false;
|
||||
width = 20;
|
||||
horizontal-pad = 12;
|
||||
vertical-pad = 12;
|
||||
show-actions = true;
|
||||
match-mode = "fuzzy";
|
||||
icon-theme = config.dconf.settings."org/gnome/desktop/interface".icon-theme;
|
||||
};
|
||||
border = mkDefault {
|
||||
width = 3;
|
||||
radius = 12;
|
||||
};
|
||||
};
|
||||
}
|
94
modules/home/desktop/hyprland/programs/hyprlock/default.nix
Normal file
94
modules/home/desktop/hyprland/programs/hyprlock/default.nix
Normal file
@ -0,0 +1,94 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (config.stylix) colors;
|
||||
in {
|
||||
enable = true;
|
||||
settings = {
|
||||
general = {
|
||||
disable_loading_bar = true;
|
||||
#grace = 300;
|
||||
hide_cursor = true;
|
||||
no_fade_in = false;
|
||||
};
|
||||
|
||||
background = [
|
||||
{
|
||||
path = "screenshot";
|
||||
blur_passes = 4;
|
||||
blur_size = 8;
|
||||
}
|
||||
];
|
||||
|
||||
input-field = [
|
||||
{
|
||||
size = "274, 50";
|
||||
rounding = 12;
|
||||
outline_thickness = 3;
|
||||
position = "0, 0";
|
||||
monitor = "";
|
||||
dots_center = true;
|
||||
fade_on_empty = false;
|
||||
font_family = "${config.stylix.fonts.serif.name}";
|
||||
font_color = "rgb(${colors.base05})";
|
||||
inner_color = "rgb(${colors.base00})";
|
||||
outer_color = "rgb(${colors.base0D})";
|
||||
check_color = "rgb(${colors.base0A})";
|
||||
fail_color = "rgb(${colors.base08})";
|
||||
placeholder_text = "locked...";
|
||||
fail_text = "wrong";
|
||||
shadow_passes = 0;
|
||||
}
|
||||
];
|
||||
shape = [
|
||||
{
|
||||
rounding = 12;
|
||||
#border_size = 3;
|
||||
size = "274, 50";
|
||||
color = "rgb(${colors.base00})";
|
||||
border_color = "rgb(${colors.base0D})";
|
||||
position = "0, 60";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
}
|
||||
{
|
||||
rounding = 12;
|
||||
#border_size = 3;
|
||||
size = "274, 50";
|
||||
color = "rgb(${colors.base00})";
|
||||
border_color = "rgb(${colors.base0D})";
|
||||
position = "0, -60";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
}
|
||||
];
|
||||
label = [
|
||||
{
|
||||
monitor = "";
|
||||
text = "$LAYOUT"; #"cmd[update:1000] ${pkgs.uutils-coreutils-noprefix}/bin/echo $(${pkgs.uutils-coreutils-noprefix}/bin/date +%H:%M:%S)";
|
||||
text_align = "center";
|
||||
font_size = 16;
|
||||
font_family = "${config.stylix.fonts.serif.name}";
|
||||
outer_color = "rgb(${colors.base00})";
|
||||
color = "rgb(${colors.base05})";
|
||||
position = "0, 60";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
}
|
||||
{
|
||||
monitor = "";
|
||||
text = "cmd[update:1000] ${pkgs.uutils-coreutils-noprefix}/bin/echo $(${pkgs.uutils-coreutils-noprefix}/bin/date +'%m/%d %a %T')";
|
||||
text_align = "center";
|
||||
font_size = 16;
|
||||
font_family = "${config.stylix.fonts.serif.name}";
|
||||
outer_color = "rgb(${colors.base00})";
|
||||
color = "rgb(${colors.base05})";
|
||||
position = "0, -60";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
307
modules/home/desktop/hyprland/programs/walker/default.nix
Normal file
307
modules/home/desktop/hyprland/programs/walker/default.nix
Normal file
@ -0,0 +1,307 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
enable = true;
|
||||
package = pkgs.walker;
|
||||
runAsService = true;
|
||||
config = {
|
||||
activation_mode.labels = "neiotsra";
|
||||
as_window = false;
|
||||
disabled = [
|
||||
"bookmarks"
|
||||
"clipboard"
|
||||
"custom_commands"
|
||||
"translation"
|
||||
"websearch"
|
||||
];
|
||||
builtins = {
|
||||
applications = {
|
||||
actions.enabled = true;
|
||||
context_aware = true;
|
||||
name = "applications";
|
||||
placeholder = "Applications";
|
||||
prioritize_new = true;
|
||||
refresh = true;
|
||||
show_generic = true;
|
||||
show_icon_when_single = true;
|
||||
show_sub_when_single = true;
|
||||
weight = 10;
|
||||
};
|
||||
calc = {
|
||||
icon = "accessories-calculator";
|
||||
min_chars = 4;
|
||||
name = "calc";
|
||||
placeholder = "Calculator";
|
||||
weight = 5;
|
||||
};
|
||||
clipboard = {
|
||||
image_height = 300;
|
||||
max_entries = 10;
|
||||
name = "clipboard";
|
||||
placeholder = "Clipboard";
|
||||
switcher_only = true;
|
||||
weight = 5;
|
||||
};
|
||||
commands = {
|
||||
icon = "utilities-terminal";
|
||||
name = "commands";
|
||||
placeholder = "Commands";
|
||||
switcher_only = true;
|
||||
weight = 8;
|
||||
};
|
||||
custom_commands = {
|
||||
icon = "utilities-terminal";
|
||||
name = "custom_commands";
|
||||
placeholder = "Custom Commands";
|
||||
weight = 5;
|
||||
};
|
||||
dmenu = {
|
||||
name = "dmenu";
|
||||
placeholder = "Dmenu";
|
||||
switcher_only = true;
|
||||
weight = 5;
|
||||
};
|
||||
emojis = {
|
||||
history = true;
|
||||
name = "emojis";
|
||||
placeholder = "Emojis";
|
||||
switcher_only = true;
|
||||
typeahead = true;
|
||||
weight = 5;
|
||||
};
|
||||
finder = {
|
||||
concurrency = 8;
|
||||
icon = "folder";
|
||||
ignore_gitignore = true;
|
||||
name = "finder";
|
||||
placeholder = "Finder";
|
||||
refresh = true;
|
||||
switcher_only = true;
|
||||
weight = 5;
|
||||
};
|
||||
runner = {
|
||||
generic_entry = false;
|
||||
history = true;
|
||||
icon = "utilities-terminal";
|
||||
name = "runner";
|
||||
placeholder = "Runner";
|
||||
refresh = true;
|
||||
typeahead = true;
|
||||
weight = 5;
|
||||
};
|
||||
ssh = {
|
||||
history = true;
|
||||
icon = "preferences-system-network";
|
||||
name = "ssh";
|
||||
placeholder = "SSH";
|
||||
refresh = true;
|
||||
switcher_only = true;
|
||||
weight = 5;
|
||||
};
|
||||
switcher = {
|
||||
name = "switcher";
|
||||
placeholder = "Switcher";
|
||||
prefix = "/";
|
||||
weight = 5;
|
||||
};
|
||||
websearch = {
|
||||
icon = "applications-internet";
|
||||
name = "websearch";
|
||||
placeholder = "Websearch";
|
||||
weight = 5;
|
||||
};
|
||||
windows = {
|
||||
icon = "view-restore";
|
||||
name = "windows";
|
||||
placeholder = "Windows";
|
||||
weight = 10;
|
||||
};
|
||||
};
|
||||
disable_click_to_close = false;
|
||||
force_keyboard_focus = true;
|
||||
list = {
|
||||
max_entries = 50;
|
||||
show_initial_entries = true;
|
||||
single_click = true;
|
||||
};
|
||||
search = {
|
||||
delay = 0;
|
||||
force_keyboard_focus = true;
|
||||
history = true;
|
||||
placeholder = "Search...";
|
||||
};
|
||||
};
|
||||
theme = {
|
||||
layout = {
|
||||
ui = {
|
||||
anchors = {
|
||||
bottom = false;
|
||||
left = false;
|
||||
right = false;
|
||||
top = false;
|
||||
};
|
||||
window = {
|
||||
h_align = "center";
|
||||
v_align = "center";
|
||||
box = {
|
||||
width = 450;
|
||||
h_align = "center";
|
||||
v_align = "center";
|
||||
# spacing = 12;
|
||||
orientation = "vertical";
|
||||
search = {
|
||||
margins = {
|
||||
start = 8;
|
||||
top = 8;
|
||||
end = 8;
|
||||
bottom = 0;
|
||||
};
|
||||
h_align = "top";
|
||||
};
|
||||
scroll = {
|
||||
overlay_scrolling = true;
|
||||
list = {
|
||||
margins = {
|
||||
bottom = 8;
|
||||
top = 4;
|
||||
start = 8;
|
||||
end = 8;
|
||||
};
|
||||
item = {
|
||||
icon.theme = "${config.gtk.iconTheme.name}";
|
||||
spacing = 4;
|
||||
activation_label = {
|
||||
x_align = 0.5;
|
||||
y_align = 0.5;
|
||||
width = 32;
|
||||
};
|
||||
text = {
|
||||
h_align = "start";
|
||||
h_expand = true;
|
||||
revert = true;
|
||||
wrap = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
style = let
|
||||
inherit (config.lib.stylix) colors;
|
||||
in ''
|
||||
@define-color base00 #${colors.base00};
|
||||
@define-color base01 #${colors.base01};
|
||||
@define-color base02 #${colors.base02};
|
||||
@define-color base03 #${colors.base03};
|
||||
@define-color base04 #${colors.base04};
|
||||
@define-color base05 #${colors.base05};
|
||||
@define-color base06 #${colors.base06};
|
||||
@define-color base07 #${colors.base07};
|
||||
@define-color base08 #${colors.base08};
|
||||
@define-color base09 #${colors.base09};
|
||||
@define-color base0A #${colors.base0A};
|
||||
@define-color base0B #${colors.base0B};
|
||||
@define-color base0C #${colors.base0C};
|
||||
@define-color base0D #${colors.base0D};
|
||||
@define-color base0E #${colors.base0E};
|
||||
@define-color base0F #${colors.base0F};
|
||||
|
||||
#window,
|
||||
#box,
|
||||
#search,
|
||||
#password,
|
||||
#input,
|
||||
#typeahead,
|
||||
#spinner,
|
||||
#list,
|
||||
child,
|
||||
scrollbar,
|
||||
slider,
|
||||
#item,
|
||||
#text,
|
||||
#label,
|
||||
#sub,
|
||||
#activationlabel {
|
||||
all: unset;
|
||||
}
|
||||
|
||||
#window {
|
||||
background: @base00;
|
||||
color: @base05;
|
||||
border-radius: 20px;
|
||||
border: 3px solid @base0D;
|
||||
}
|
||||
|
||||
#box {
|
||||
background: @base00;
|
||||
}
|
||||
|
||||
#search {
|
||||
background: @base01;
|
||||
border-radius: 12px 12px 6px 6px;
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
#password,
|
||||
#input,
|
||||
#typeahead {
|
||||
background: none;
|
||||
box-shadow: none;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
#input > *:first-child,
|
||||
#typeahead > *:first-child {
|
||||
margin-right: 12px;
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
#typeahead {
|
||||
color: @base05;
|
||||
}
|
||||
|
||||
#input placeholder {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
#list {
|
||||
padding: 8px;
|
||||
border-radius: 6px 6px 12px 12px;
|
||||
background: @base01;
|
||||
}
|
||||
|
||||
child {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
child:selected,
|
||||
child:hover {
|
||||
box-shadow: none;
|
||||
border-radius: 8px;
|
||||
background: @base02;
|
||||
}
|
||||
|
||||
#item {
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
#sub {
|
||||
font-size: smaller;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
#activationlabel {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.activation #activationlabel {
|
||||
opacity: 1;
|
||||
color: @base05;
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
331
modules/home/desktop/hyprland/programs/waybar/default.nix
Normal file
331
modules/home/desktop/hyprland/programs/waybar/default.nix
Normal file
@ -0,0 +1,331 @@
|
||||
{
|
||||
colors,
|
||||
config,
|
||||
getExe,
|
||||
ifLaptop,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
enable = true;
|
||||
systemd = {
|
||||
enable = true;
|
||||
target = "graphical-session.target";
|
||||
};
|
||||
settings = {
|
||||
bar-0 = {
|
||||
# layer = "top";
|
||||
position = "bottom";
|
||||
height = 24;
|
||||
spacing = 6;
|
||||
# margin-left = 33 + 3;
|
||||
# margin-right = 33 + 3;
|
||||
margin-left = 8;
|
||||
margin-right = 8;
|
||||
margin-bottom = 8;
|
||||
reload_style_on_change = true;
|
||||
modules-left = [
|
||||
"hyprland/language"
|
||||
"hyprland/workspaces"
|
||||
"wlr/taskbar"
|
||||
];
|
||||
modules-center = ["clock"];
|
||||
modules-right = [
|
||||
(ifLaptop "group/laptop")
|
||||
"wireplumber"
|
||||
"tray"
|
||||
"privacy"
|
||||
(ifLaptop "power-profiles-daemon")
|
||||
"idle_inhibitor"
|
||||
"custom/notification"
|
||||
];
|
||||
"niri/workspaces" = {
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
"1" = "൧";
|
||||
"2" = "൨";
|
||||
"3" = "൩";
|
||||
"4" = "൪";
|
||||
"5" = "൫";
|
||||
"6" = "൬";
|
||||
"7" = "൭";
|
||||
"8" = "൮";
|
||||
"9" = "൯";
|
||||
"10" = "൰";
|
||||
general = "";
|
||||
web = "";
|
||||
chat = "";
|
||||
code = "";
|
||||
uni = "";
|
||||
games = "";
|
||||
system = "";
|
||||
media = "";
|
||||
tray = "";
|
||||
};
|
||||
};
|
||||
"niri/language" = {
|
||||
format = "{}";
|
||||
format-en = "🇺🇸";
|
||||
format-uk = "🇺🇦";
|
||||
};
|
||||
"custom/separator" = {
|
||||
format = "";
|
||||
interval = "once";
|
||||
tooltip = false;
|
||||
};
|
||||
"group/laptop" = {
|
||||
orientation = "inherit";
|
||||
modules = [
|
||||
"battery"
|
||||
"backlight"
|
||||
];
|
||||
};
|
||||
"backlight" = {
|
||||
format = "{icon} {percent}%";
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
};
|
||||
"idle_inhibitor" = {
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
activated = "";
|
||||
deactivated = "";
|
||||
};
|
||||
};
|
||||
"tray" = {
|
||||
icon-size = 20;
|
||||
spacing = 6;
|
||||
};
|
||||
"clock" = {
|
||||
interval = 1;
|
||||
format = "{:%H:%M:%S}";
|
||||
tooltip-format = "{:%d.%m.%Y}";
|
||||
};
|
||||
battery = {
|
||||
states = {
|
||||
good = 95;
|
||||
warning = 30;
|
||||
critical = 15;
|
||||
};
|
||||
format = "{icon} {capacity}%";
|
||||
format-full = " {capacity}%";
|
||||
format-charging = " {capacity}%";
|
||||
format-plugged = " {capacity}%";
|
||||
format-alt = "{icon} {time}";
|
||||
format-icons = ["" "" "" "" "" "" "" "" "" ""];
|
||||
};
|
||||
mpris = {
|
||||
format = "{player_icon} {dynamic}";
|
||||
format-paused = "{status_icon} <i>{dynamic}</i>";
|
||||
playing-len = 30;
|
||||
playing-paused = 30;
|
||||
player-icons = {
|
||||
default = "▶";
|
||||
mpv = "🎵";
|
||||
};
|
||||
status-icons = {paused = "⏸";};
|
||||
};
|
||||
"upower" = {
|
||||
icon-size = 16;
|
||||
format = "{percentage}";
|
||||
hide-if-empty = true;
|
||||
tooltip = true;
|
||||
tooltip-spacing = 20;
|
||||
};
|
||||
"power-profiles-daemon" = {
|
||||
format = "{icon}";
|
||||
tooltip-format = "Power profile: {profile}\nDriver: {driver}";
|
||||
tooltip = true;
|
||||
format-icons = {
|
||||
default = "";
|
||||
performance = "";
|
||||
balanced = "";
|
||||
power-saver = "";
|
||||
};
|
||||
};
|
||||
"wireplumber" = {
|
||||
scroll-step = 3;
|
||||
format = "{icon} {volume}%";
|
||||
format-muted = "";
|
||||
format-icons = ["" "" ""];
|
||||
on-click = getExe pkgs.pwvucontrol;
|
||||
on-click-right = "wpctl set-mute @DEFAULT_SINK@ toggle";
|
||||
};
|
||||
"custom/notification" = {
|
||||
tooltip = false;
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
notification = "";
|
||||
none = "";
|
||||
dnd-notification = "";
|
||||
dnd-none = "";
|
||||
};
|
||||
return-type = "json";
|
||||
exec-if = "which swaync-client";
|
||||
exec = "swaync-client -swb";
|
||||
on-click = "swaync-client -t -sw";
|
||||
on-click-right = "swaync-client -d -sw";
|
||||
escape = true;
|
||||
};
|
||||
"privacy" = {
|
||||
icon-spacing = 2;
|
||||
icon-size = 16;
|
||||
transition-duration = 250;
|
||||
screenshare = {
|
||||
type = "screenshare";
|
||||
tooltip = true;
|
||||
tooltip-icon-size = 24;
|
||||
};
|
||||
audio-in = {
|
||||
type = "audio-in";
|
||||
tooltip = true;
|
||||
tooltip-icon-size = 24;
|
||||
};
|
||||
};
|
||||
"wlr/taskbar" = {
|
||||
format = "{icon}";
|
||||
icon-size = 20;
|
||||
icon-theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}";
|
||||
tooltip-format = "{title}";
|
||||
on-click = "activate";
|
||||
};
|
||||
};
|
||||
};
|
||||
style = ''
|
||||
@define-color base00 #${colors.base00};
|
||||
@define-color base01 #${colors.base01};
|
||||
@define-color base02 #${colors.base02};
|
||||
@define-color base03 #${colors.base03};
|
||||
@define-color base04 #${colors.base04};
|
||||
@define-color base05 #${colors.base05};
|
||||
@define-color base06 #${colors.base06};
|
||||
@define-color base07 #${colors.base07};
|
||||
@define-color base08 #${colors.base08};
|
||||
@define-color base09 #${colors.base09};
|
||||
@define-color base0A #${colors.base0A};
|
||||
@define-color base0B #${colors.base0B};
|
||||
@define-color base0C #${colors.base0C};
|
||||
@define-color base0D #${colors.base0D};
|
||||
@define-color base0E #${colors.base0E};
|
||||
@define-color base0F #${colors.base0F};
|
||||
* {
|
||||
font-family: ${config.stylix.fonts.sansSerif.name}, FontAwesome;
|
||||
font-weight: 500;
|
||||
font-size: 100%;
|
||||
}
|
||||
window#waybar {
|
||||
background-color: transparent;
|
||||
color: @base05;
|
||||
}
|
||||
.modules-center {
|
||||
background-color: transparent;
|
||||
}
|
||||
.mpris.stopped {
|
||||
background-color: transparent;
|
||||
}
|
||||
.modules-left,
|
||||
.modules-center,
|
||||
.modules-right {
|
||||
/* border-bottom-left-radius: 12px;
|
||||
border-bottom-right-radius: 12px;
|
||||
border-top-left-radius: 0px;
|
||||
border-top-right-radius: 0px; */
|
||||
background-color: @base00;
|
||||
border-radius: 24px;
|
||||
border: 3px solid @base0D;
|
||||
color: @base05;
|
||||
padding: 0 0.4em;
|
||||
}
|
||||
tooltip {
|
||||
background: @base01;
|
||||
border: 1px solid @base0E;
|
||||
}
|
||||
tooltip label {
|
||||
color: @base05;
|
||||
}
|
||||
button {
|
||||
box-shadow: inset 0 -3px transparent;
|
||||
border-radius: 16px;
|
||||
}
|
||||
button:hover {
|
||||
background: inherit;
|
||||
box-shadow: inset 0 -3px transparent;
|
||||
}
|
||||
#mode {
|
||||
background-color: rgba(0, 0, 0, 0.2);
|
||||
box-shadow: inset 0 -3px @base05;
|
||||
}
|
||||
#battery,
|
||||
#backlight,
|
||||
/* #workspaces,
|
||||
#taskbar,
|
||||
#privacy, */
|
||||
#taskbar button,
|
||||
#language,
|
||||
#clock,
|
||||
#battery,
|
||||
#backlight,
|
||||
#wireplumber,
|
||||
#workspaces button,
|
||||
#custom-notification,
|
||||
#idle_inhibitor,
|
||||
#power-profiles-daemon,
|
||||
#privacy-item,
|
||||
#custom-separator {
|
||||
padding: 0 0.3em;
|
||||
}
|
||||
#tray button {
|
||||
padding: 0 0.3em;
|
||||
margin: 0 0.2em;
|
||||
}
|
||||
#workspaces button.active {
|
||||
color: @base0D;
|
||||
}
|
||||
#taskbar button:hover {
|
||||
box-shadow: transparent;
|
||||
}
|
||||
#taskbar.empty,
|
||||
window#empty {
|
||||
background-color: transparent;
|
||||
}
|
||||
#battery.critical:not(.charging) {
|
||||
color: @base09;
|
||||
animation-name: blink;
|
||||
animation-duration: 0.5s;
|
||||
animation-timing-function: steps(12);
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
#power-profiles-daemon.performance {
|
||||
color: @base0D;
|
||||
}
|
||||
#power-profiles-daemon.balanced {
|
||||
color: @base0B;
|
||||
}
|
||||
#power-profiles-daemon.power-saver {
|
||||
color: @base0A;
|
||||
}
|
||||
label:focus {
|
||||
background-color: #000000;
|
||||
}
|
||||
#tray > .passive {
|
||||
-gtk-icon-effect: dim;
|
||||
}
|
||||
#tray > .needs-attention {
|
||||
-gtk-icon-effect: highlight;
|
||||
background-color: @base08;
|
||||
}
|
||||
#privacy-item.screenshare {
|
||||
color: @base0C;
|
||||
}
|
||||
#privacy-item.audio-in {
|
||||
color: @base0E;
|
||||
}
|
||||
'';
|
||||
}
|
65
modules/home/desktop/hyprland/services/default.nix
Normal file
65
modules/home/desktop/hyprland/services/default.nix
Normal file
@ -0,0 +1,65 @@
|
||||
{
|
||||
# getExe,
|
||||
perSystem,
|
||||
# pkgs,
|
||||
lockscreen,
|
||||
...
|
||||
}: {
|
||||
swaync = import ./swaync;
|
||||
network-manager-applet.enable = true;
|
||||
blueman-applet.enable = true;
|
||||
playerctld.enable = true;
|
||||
wpaperd.enable = true;
|
||||
hyprpaper.enable = true;
|
||||
copyq = {
|
||||
enable = true;
|
||||
package = perSystem.nixpkgs-stable.copyq;
|
||||
};
|
||||
gnome-keyring = {
|
||||
enable = true;
|
||||
components = ["secrets"];
|
||||
};
|
||||
gammastep = {
|
||||
enable = true;
|
||||
provider = "manual";
|
||||
latitude = 49.6;
|
||||
longitude = 36.1;
|
||||
tray = true;
|
||||
temperature = {
|
||||
day = 6500;
|
||||
night = 3000;
|
||||
};
|
||||
};
|
||||
swayosd = {
|
||||
enable = true;
|
||||
topMargin = 0.8;
|
||||
};
|
||||
udiskie = {
|
||||
enable = true;
|
||||
automount = false;
|
||||
notify = true;
|
||||
tray = "auto";
|
||||
};
|
||||
hypridle = {
|
||||
enable = true;
|
||||
settings = {
|
||||
general = {
|
||||
before_sleep_cmd = "loginctl lock-session";
|
||||
after_sleep_cmd = "hyprctl dispatch dpms on";
|
||||
lock_cmd = "pidof hyprlock || hyprlock";
|
||||
# unlock_cmd = "loginctl unlock-session";
|
||||
};
|
||||
listener = [
|
||||
{
|
||||
timeout = 600;
|
||||
on-timeout = "pidof ${lockscreen} || ${lockscreen}";
|
||||
}
|
||||
{
|
||||
timeout = 601;
|
||||
on-timeout = "hyprctl dispatch dpms off";
|
||||
on-resume = "hyprctl dispatch dpms on";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
177
modules/home/desktop/hyprland/services/swaync/default.nix
Normal file
177
modules/home/desktop/hyprland/services/swaync/default.nix
Normal file
@ -0,0 +1,177 @@
|
||||
{
|
||||
enable = true;
|
||||
settings = {
|
||||
cssPriority = "user";
|
||||
image-visibility = "when-available";
|
||||
keyboard-shortcut = true;
|
||||
relative-timestamps = true;
|
||||
timeout = 5;
|
||||
timeout-low = 5;
|
||||
timeout-critical = 0;
|
||||
script-fail-notify = true;
|
||||
transition-time = 200;
|
||||
|
||||
# Layer settings
|
||||
layer-shell = true;
|
||||
layer = "overlay";
|
||||
control-center-layer = "overlay";
|
||||
|
||||
# Notification settings
|
||||
positionX = "right";
|
||||
positionY = "top";
|
||||
notification-2fa-action = true;
|
||||
notification-inline-replies = false;
|
||||
notification-icon-size = 32;
|
||||
notification-body-image-height = 100;
|
||||
notification-body-image-width = 200;
|
||||
notification-window-width = 400;
|
||||
|
||||
# Control center settings
|
||||
control-center-positionX = "right";
|
||||
control-center-positionY = "top";
|
||||
control-center-width = 500;
|
||||
control-center-exclusive-zone = true;
|
||||
fit-to-screen = true;
|
||||
hide-on-action = true;
|
||||
hide-on-clear = false;
|
||||
|
||||
# Widget settings
|
||||
widgets = [
|
||||
"title"
|
||||
"dnd"
|
||||
"notifications"
|
||||
"mpris"
|
||||
];
|
||||
|
||||
widget-config = {
|
||||
title = {
|
||||
text = "Notifications";
|
||||
clear-all-button = true;
|
||||
button-text = "Clear All";
|
||||
};
|
||||
dnd = {
|
||||
text = "Do Not Disturb";
|
||||
};
|
||||
mpris = {
|
||||
image-size = 96;
|
||||
image-radius = 12;
|
||||
blur = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
style = ''
|
||||
/*** Global ***/
|
||||
progress,
|
||||
progressbar,
|
||||
trough {
|
||||
border-radius: 16px;
|
||||
}
|
||||
|
||||
.app-icon,
|
||||
.image {
|
||||
-gtk-icon-effect: none;
|
||||
}
|
||||
|
||||
.notification-action {
|
||||
border-radius: 12px;
|
||||
margin: 0.5rem;
|
||||
}
|
||||
|
||||
.close-button {
|
||||
margin: 24px;
|
||||
padding: 0.2rem;
|
||||
border-radius: 16px;
|
||||
}
|
||||
|
||||
/*** Notifications ***/
|
||||
.notification-group.collapsed
|
||||
.notification-row:not(:last-child)
|
||||
.notification-action,
|
||||
.notification-group.collapsed
|
||||
.notification-row:not(:last-child)
|
||||
.notification-default-action {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.trough {
|
||||
margin: 4px;
|
||||
border-radius: 7px;
|
||||
}
|
||||
|
||||
.notification,
|
||||
.notification.low,
|
||||
.notification.normal,
|
||||
.notification.critical,
|
||||
.control-center {
|
||||
margin: 16px;
|
||||
border-radius: 7px;
|
||||
}
|
||||
|
||||
.floating-notifications,
|
||||
.notification-content {
|
||||
border-radius: 7px;
|
||||
}
|
||||
|
||||
.control-center-list {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
/*** Widgets ***/
|
||||
/* Title widget */
|
||||
.widget-title {
|
||||
margin: 0.5rem;
|
||||
}
|
||||
|
||||
.widget-title > label {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.widget-title > button {
|
||||
border-radius: 16px;
|
||||
padding: 0.5rem;
|
||||
}
|
||||
|
||||
/* DND Widget */
|
||||
.widget-dnd {
|
||||
margin: 0.5rem;
|
||||
}
|
||||
|
||||
.widget-dnd > label {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.widget-dnd > switch {
|
||||
border-radius: 16px;
|
||||
}
|
||||
|
||||
.widget-dnd > switch slider {
|
||||
border-radius: 16px;
|
||||
padding: 0.25rem;
|
||||
}
|
||||
|
||||
/* Mpris widget */
|
||||
.widget-mpris .widget-mpris-player {
|
||||
border-radius: 16px;
|
||||
margin: 0.5rem;
|
||||
padding: 0.5rem;
|
||||
}
|
||||
|
||||
.widget-mpris .widget-mpris-player .widget-mpris-album-art {
|
||||
border-radius: 16px;
|
||||
}
|
||||
|
||||
.widget-mpris .widget-mpris-player .widget-mpris-title {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.widget-mpris .widget-mpris-player .widget-mpris-subtitle {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.widget-mpris .widget-mpris-player > box > button {
|
||||
border: 1px solid transparent;
|
||||
border-radius: 16px;
|
||||
padding: 0.25rem;
|
||||
}
|
||||
'';
|
||||
}
|
File diff suppressed because it is too large
Load Diff
368
modules/home/desktop/niri/niri.nix
Normal file
368
modules/home/desktop/niri/niri.nix
Normal file
@ -0,0 +1,368 @@
|
||||
{
|
||||
config,
|
||||
osConfig,
|
||||
launcher,
|
||||
lockscreen,
|
||||
...
|
||||
}: let
|
||||
inherit (config.lib.stylix) colors;
|
||||
inherit (config.stylix) cursor;
|
||||
inherit (osConfig.networking) hostName;
|
||||
|
||||
keyboard =
|
||||
if hostName == "eldrid"
|
||||
then "chromeos"
|
||||
else "platform";
|
||||
xdgPics =
|
||||
config.xdg.userDirs.pictures;
|
||||
in {
|
||||
target = "niri/config.kdl";
|
||||
text = let
|
||||
arrows = {
|
||||
left = "Left";
|
||||
down = "Down";
|
||||
up = "Up";
|
||||
right = "Right";
|
||||
};
|
||||
homerow-arrows = {
|
||||
left = "n";
|
||||
down = "e";
|
||||
up = "i";
|
||||
right = "o";
|
||||
};
|
||||
letters = {
|
||||
first = "Q";
|
||||
second = "W";
|
||||
third = "F";
|
||||
fourth = "P";
|
||||
fifth = "B";
|
||||
sixth = "J";
|
||||
seventh = "L";
|
||||
eighth = "U";
|
||||
ninth = "Y";
|
||||
};
|
||||
numbers = {
|
||||
first = "1";
|
||||
second = "2";
|
||||
third = "3";
|
||||
fourth = "4";
|
||||
fifth = "5";
|
||||
sixth = "6";
|
||||
seventh = "7";
|
||||
eighth = "8";
|
||||
ninth = "9";
|
||||
};
|
||||
genArrowNavigation = keys: ''
|
||||
Mod+${keys.left} { focus-column-left; }
|
||||
Mod+${keys.down} { focus-window-or-workspace-down; }
|
||||
Mod+${keys.up} { focus-window-or-workspace-up; }
|
||||
Mod+${keys.right} { focus-column-right; }
|
||||
Mod+Ctrl+${keys.left} { move-column-left; }
|
||||
Mod+Ctrl+${keys.down} { move-window-down-or-to-workspace-down; }
|
||||
Mod+Ctrl+${keys.up} { move-window-up-or-to-workspace-up; }
|
||||
Mod+Ctrl+${keys.right} { move-column-right; }
|
||||
Mod+Shift+${keys.left} { focus-monitor-left; }
|
||||
Mod+Shift+${keys.down} { focus-monitor-down; }
|
||||
Mod+Shift+${keys.up} { focus-monitor-up; }
|
||||
Mod+Shift+${keys.right} { focus-monitor-right; }
|
||||
Mod+Shift+Ctrl+${keys.left} { move-column-to-monitor-left; }
|
||||
Mod+Shift+Ctrl+${keys.down} { move-column-to-monitor-down; }
|
||||
Mod+Shift+Ctrl+${keys.up} { move-column-to-monitor-up; }
|
||||
Mod+Shift+Ctrl+${keys.right} { move-column-to-monitor-right; }
|
||||
'';
|
||||
genWorkspacesNavigation = keys: ''
|
||||
Mod+${keys.first} { focus-workspace 1; }
|
||||
Mod+${keys.second} { focus-workspace 2; }
|
||||
Mod+${keys.third} { focus-workspace 3; }
|
||||
Mod+${keys.fourth} { focus-workspace 4; }
|
||||
Mod+${keys.fifth} { focus-workspace 5; }
|
||||
Mod+${keys.sixth} { focus-workspace 6; }
|
||||
Mod+${keys.seventh} { focus-workspace 7; }
|
||||
Mod+${keys.eighth} { focus-workspace 8; }
|
||||
Mod+${keys.ninth} { focus-workspace 9; }
|
||||
Mod+Ctrl+Shift+${keys.first} { move-column-to-workspace 1; }
|
||||
Mod+Ctrl+Shift+${keys.second} { move-column-to-workspace 2; }
|
||||
Mod+Ctrl+Shift+${keys.third} { move-column-to-workspace 3; }
|
||||
Mod+Ctrl+Shift+${keys.fourth} { move-column-to-workspace 4; }
|
||||
Mod+Ctrl+Shift+${keys.fifth} { move-column-to-workspace 5; }
|
||||
Mod+Ctrl+Shift+${keys.sixth} { move-column-to-workspace 6; }
|
||||
Mod+Ctrl+Shift+${keys.seventh} { move-column-to-workspace 7; }
|
||||
Mod+Ctrl+Shift+${keys.eighth} { move-column-to-workspace 8; }
|
||||
Mod+Ctrl+Shift+${keys.ninth} { move-column-to-workspace 9; }
|
||||
'';
|
||||
in ''
|
||||
environment {
|
||||
DISPLAY ":123"
|
||||
CLUTTER_BACKEND "wayland"
|
||||
GDK_BACKEND "wayland"
|
||||
MOZ_ENABLE_WAYLAND "1"
|
||||
MOZ_WEBRENDER "1"
|
||||
QT_QPA_PLATFORM "wayland"
|
||||
SDL_VIDEODRIVER "wayland"
|
||||
XDG_SESSION_TYPE "wayland"
|
||||
}
|
||||
|
||||
input {
|
||||
keyboard {
|
||||
xkb {
|
||||
layout "us,ua"
|
||||
variant "colemak_dh_ortho,"
|
||||
}
|
||||
repeat-delay 200
|
||||
repeat-rate 50
|
||||
track-layout "window"
|
||||
}
|
||||
touchpad {
|
||||
tap
|
||||
natural-scroll
|
||||
accel-speed 0.2
|
||||
accel-profile "flat"
|
||||
}
|
||||
mouse {
|
||||
accel-speed 0.0
|
||||
accel-profile "flat"
|
||||
}
|
||||
touch {
|
||||
map-to-output "eDP-1"
|
||||
}
|
||||
warp-mouse-to-focus
|
||||
workspace-auto-back-and-forth
|
||||
}
|
||||
|
||||
cursor {
|
||||
xcursor-theme "${cursor.name}"
|
||||
xcursor-size ${toString cursor.size}
|
||||
}
|
||||
|
||||
hotkey-overlay {
|
||||
skip-at-startup
|
||||
}
|
||||
|
||||
prefer-no-csd
|
||||
|
||||
screenshot-path "${xdgPics}/screenshots/screenshot-%Y-%m-%d-%H-%M-%S.png"
|
||||
|
||||
animations {
|
||||
slowdown 0.5
|
||||
}
|
||||
|
||||
layout {
|
||||
gaps 3
|
||||
|
||||
// background-color "#${colors.base02}"
|
||||
background-color "transparent"
|
||||
center-focused-column "never" // "on-overflow"
|
||||
default-column-width { proportion 1.0; }
|
||||
|
||||
preset-column-widths {
|
||||
proportion 0.33333
|
||||
proportion 0.66667
|
||||
}
|
||||
|
||||
struts {
|
||||
left 36
|
||||
right 36
|
||||
}
|
||||
|
||||
tab-indicator {
|
||||
active-color "#${colors.base04}"
|
||||
inactive-color "#${colors.base03}"
|
||||
corner-radius 6
|
||||
gap 3
|
||||
gaps-between-tabs 3
|
||||
// length total-proportion=0.3
|
||||
place-within-column
|
||||
position "left"
|
||||
width 6
|
||||
}
|
||||
focus-ring {
|
||||
width 1
|
||||
active-color "#${colors.base0D}"
|
||||
inactive-color "#${colors.base03}"
|
||||
urgent-color "#${colors.base08}"
|
||||
}
|
||||
border {
|
||||
off
|
||||
width 1
|
||||
active-color "#${colors.base0D}"
|
||||
inactive-color "#${colors.base03}"
|
||||
urgent-color "#${colors.base08}"
|
||||
}
|
||||
}
|
||||
|
||||
window-rule {
|
||||
geometry-corner-radius 12
|
||||
clip-to-geometry true
|
||||
}
|
||||
window-rule {
|
||||
match is-window-cast-target=true
|
||||
focus-ring {
|
||||
width 3
|
||||
active-color "#${colors.base0F}"
|
||||
inactive-color "#${colors.base03}"
|
||||
}
|
||||
border {
|
||||
width 3
|
||||
active-color "#${colors.base0F}"
|
||||
inactive-color "#${colors.base03}"
|
||||
}
|
||||
}
|
||||
|
||||
layer-rule {
|
||||
match namespace="^wpaperd.*$"
|
||||
place-within-backdrop true
|
||||
}
|
||||
overview {
|
||||
workspace-shadow {
|
||||
off
|
||||
}
|
||||
}
|
||||
layer-rule {
|
||||
match namespace="waybar"
|
||||
match at-startup=true
|
||||
|
||||
opacity 0.99 // fixes the black fill
|
||||
}
|
||||
|
||||
window-rule {
|
||||
match title="Картинка в картинці"
|
||||
match title="Picture-in-Picture"
|
||||
open-floating true
|
||||
}
|
||||
window-rule {
|
||||
match app-id="org.wezfurlong.wezterm"
|
||||
match app-id="com.mitchellh.ghostty"
|
||||
default-column-width { proportion 1.0; }
|
||||
}
|
||||
window-rule {
|
||||
match app-id="re.sonny.Junction"
|
||||
match app-id="com.github.hluk.copyq"
|
||||
open-floating true
|
||||
open-focused true
|
||||
}
|
||||
|
||||
window-rule {
|
||||
match app-id="com.mitchellh.ghostty"
|
||||
draw-border-with-background false
|
||||
}
|
||||
|
||||
window-rule {
|
||||
match app-id=r#"^org\.keepassxc\.KeePassXC$"#
|
||||
match app-id=r#"^org\.gnome\.World\.Secrets$"#
|
||||
match app-id=r#"^Bitwarden$"#
|
||||
match app-id="io.github.kukuruzka165.materialgram"
|
||||
match app-id="org.telegram.desktop"
|
||||
match app-id="org.signal.Signal"
|
||||
match app-id="WebCord"
|
||||
// block-out-from "screen-capture"
|
||||
block-out-from "screencast"
|
||||
}
|
||||
|
||||
|
||||
binds {
|
||||
Mod+Shift+Slash { show-hotkey-overlay; }
|
||||
|
||||
Mod+Tab { focus-workspace-previous; }
|
||||
Mod+C { center-column; }
|
||||
Mod+M { maximize-column; }
|
||||
Mod+H { set-column-width "50%"; }
|
||||
Mod+T { set-column-width "33%"; }
|
||||
Mod+Shift+T { set-column-width "67%"; }
|
||||
Mod+V { toggle-column-tabbed-display; }
|
||||
Mod+G { switch-focus-between-floating-and-tiling; }
|
||||
Mod+X { spawn "pkill" "-SIGUSR1" "waybar"; } // hide/show waybar
|
||||
|
||||
Mod+Ctrl+Comma { consume-or-expel-window-left; }
|
||||
Mod+Ctrl+Period { consume-or-expel-window-right; }
|
||||
|
||||
Mod+Ctrl+Q { close-window; }
|
||||
Mod+Ctrl+M { fullscreen-window; }
|
||||
Mod+Ctrl+G { toggle-window-floating; }
|
||||
|
||||
Mod+Ctrl+Shift+M { toggle-windowed-fullscreen; }
|
||||
|
||||
Mod+Minus { set-column-width "-10%"; }
|
||||
Mod+Equal { set-column-width "+10%"; }
|
||||
Mod+Comma { set-column-width "-10%"; }
|
||||
Mod+Period { set-column-width "+10%"; }
|
||||
Mod+Shift+Comma { set-window-height "-10%"; }
|
||||
Mod+Shift+Period { set-window-height "+10%"; }
|
||||
|
||||
Mod+Space { switch-layout "next"; }
|
||||
|
||||
Mod+Ctrl+Space repeat=false { toggle-overview; }
|
||||
|
||||
Mod+Return repeat=false { spawn "sh" "-c" "$TERMINAL"; }
|
||||
Mod+BackSpace repeat=false { spawn "${launcher}"; }
|
||||
Mod+A repeat=false { spawn "${launcher}"; }
|
||||
Mod+Ctrl+L repeat=false { spawn "${lockscreen}"; }
|
||||
Mod+Ctrl+V repeat=false { spawn "copyq" "menu"; }
|
||||
|
||||
Mod+Shift+W repeat=false { spawn "walker" "-m" "windows"; }
|
||||
|
||||
Mod+Ctrl+Shift+BracketLeft { quit; }
|
||||
Mod+Ctrl+Shift+BracketRight { power-off-monitors; }
|
||||
|
||||
Print { screenshot; }
|
||||
Ctrl+Print { screenshot-screen; }
|
||||
Shift+Print { screenshot-window; }
|
||||
|
||||
// Caps_Lock { spawn "swayosd-client" "--caps-lock"; }
|
||||
// XF86AudioRaiseVolume allow-when-locked=true { spawn "wpctl" "set-volume" "-l" "1.0" "@DEFAULT_AUDIO_SINK@" "5%+"; }
|
||||
// XF86AudioLowerVolume allow-when-locked=true { spawn "wpctl" "set-volume" "-l" "1.0" "@DEFAULT_AUDIO_SINK@" "5%-"; }
|
||||
// XF86AudioMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"; }
|
||||
// XF86AudioMicMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle"; }
|
||||
XF86AudioRaiseVolume allow-when-locked=true { spawn "swayosd-client" "--output-volume" "raise"; }
|
||||
XF86AudioLowerVolume allow-when-locked=true { spawn "swayosd-client" "--output-volume" "lower"; }
|
||||
XF86AudioMute allow-when-locked=true { spawn "swayosd-client" "--output-volume" "mute-toggle"; }
|
||||
XF86AudioMicMute allow-when-locked=true { spawn "swayosd-client" "--input-volume" "mute-toggle"; }
|
||||
XF86AudioPlay allow-when-locked=true { spawn "playerctl" "play-pause"; }
|
||||
XF86AudioPause allow-when-locked=true { spawn "playerctl" "pause"; }
|
||||
XF86AudioPrev allow-when-locked=true { spawn "playerctl" "previous"; }
|
||||
XF86AudioNext allow-when-locked=true { spawn "playerctl" "next"; }
|
||||
|
||||
XF86ScreenSaver allow-when-locked=true { spawn "${lockscreen}"; }
|
||||
XF86MonBrightnessUp allow-when-locked=true { spawn "brightnessctl" "s" "5%+"; }
|
||||
XF86MonBrightnessDown allow-when-locked=true { spawn "brightnessctl" "s" "5%-"; }
|
||||
Alt+XF86MonBrightnessUp allow-when-locked=true { spawn "brightnessctl" "s" "5%+" "-d" "${keyboard}::kbd_backlight"; }
|
||||
Alt+XF86MonBrightnessDown allow-when-locked=true { spawn "brightnessctl" "s" "5%-" "-d" "${keyboard}::kbd_backlight"; }
|
||||
XF86KbdBrightnessUp allow-when-locked=true { spawn "brightnessctl" "s" "5%+" "-d" "${keyboard}::kbd_backlight"; }
|
||||
XF86KbdBrightnessDown allow-when-locked=true { spawn "brightnessctl" "s" "5%-" "-d" "${keyboard}::kbd_backlight"; }
|
||||
|
||||
|
||||
Mod+Home { focus-column-first; }
|
||||
Mod+End { focus-column-last; }
|
||||
Mod+Ctrl+Home { move-column-to-first; }
|
||||
Mod+Ctrl+End { move-column-to-last; }
|
||||
|
||||
Mod+Next { focus-workspace-down; }
|
||||
Mod+Prior { focus-workspace-up; }
|
||||
Mod+Ctrl+Next { move-column-to-workspace-down; }
|
||||
Mod+Ctrl+Prior { move-column-to-workspace-up; }
|
||||
Mod+Shift+Next { move-workspace-down; }
|
||||
Mod+Shift+Prior { move-workspace-up; }
|
||||
|
||||
Mod+WheelScrollDown cooldown-ms=150 { focus-workspace-down; }
|
||||
Mod+WheelScrollUp cooldown-ms=150 { focus-workspace-up; }
|
||||
Mod+Ctrl+WheelScrollDown cooldown-ms=150 { move-column-to-workspace-down; }
|
||||
Mod+Ctrl+WheelScrollUp cooldown-ms=150 { move-column-to-workspace-up; }
|
||||
|
||||
Mod+WheelScrollRight { focus-column-right; }
|
||||
Mod+WheelScrollLeft { focus-column-left; }
|
||||
Mod+Ctrl+WheelScrollRight { move-column-right; }
|
||||
Mod+Ctrl+WheelScrollLeft { move-column-left; }
|
||||
Mod+Shift+WheelScrollDown { focus-column-right; }
|
||||
Mod+Shift+WheelScrollUp { focus-column-left; }
|
||||
Mod+Ctrl+Shift+WheelScrollDown { move-column-right; }
|
||||
Mod+Ctrl+Shift+WheelScrollUp { move-column-left; }
|
||||
|
||||
Mod+TouchpadScrollDown { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.02+"; }
|
||||
Mod+TouchpadScrollUp { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.02-"; }
|
||||
|
||||
${genArrowNavigation arrows}
|
||||
${genArrowNavigation homerow-arrows}
|
||||
${genWorkspacesNavigation letters}
|
||||
${genWorkspacesNavigation numbers}
|
||||
}
|
||||
'';
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user