Compare commits
189
Commits
master
...
8ddaaa374e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8ddaaa374e | ||
|
|
d7c523ea60 | ||
|
|
5989570450 | ||
|
|
9237d71172 | ||
|
|
277d2ee24c | ||
|
|
b41db12b50 | ||
|
|
2e60c07ddf | ||
|
|
5da1e8c5ab | ||
|
|
ea7dbcfed6 | ||
|
|
fe4c4aacf4 | ||
|
|
72b9b8cae8 | ||
|
|
edcdbcb07a | ||
|
|
22f9404e91 | ||
|
|
65cd79347d | ||
|
|
78ffadb359 | ||
|
|
1deab78c30 | ||
|
|
f56f489bbf | ||
|
|
a00f09a6c6 | ||
|
|
ca31952a00 | ||
|
|
dcf4bbc71c | ||
|
|
1790a01ead | ||
|
|
51f17dda5c | ||
|
|
8455342613 | ||
|
|
92a25a36d4 | ||
|
|
3ea4a75c02 | ||
|
|
6352ee2ca0 | ||
|
|
f12213d0f2 | ||
|
|
2752bafd16 | ||
|
|
0e89bcdaa8 | ||
|
|
efbbb2b76b | ||
|
|
b5cedb2940 | ||
|
|
2f4fbef5d0 | ||
|
|
3f87532d53 | ||
|
|
137b8dbc59 | ||
|
|
d8e22d6f5f | ||
|
|
960246f28f | ||
|
|
8c6e28146d | ||
|
|
77c414f1ef | ||
|
|
26a943d3a6 | ||
|
|
0babe75851 | ||
|
|
afda132cbe | ||
|
|
8d163ea3ca | ||
|
|
76598321c9 | ||
|
|
f88758f87e | ||
|
|
8575154151 | ||
|
|
bc8285b7b5 | ||
|
|
513504ecef | ||
|
|
5f8e979805 | ||
|
|
a7df4160bc | ||
|
|
38a744f6c4 | ||
|
|
babc60de92 | ||
|
|
d54e4b6482 | ||
|
|
1a8f367614 | ||
|
|
4ac5742347 | ||
|
|
a6bb089d8a | ||
|
|
358a895a19 | ||
|
|
85e1b4cfd4 | ||
|
|
455b830577 | ||
|
|
3b6d055911 | ||
|
|
45c2bbd057 | ||
|
|
7712ac153d | ||
|
|
136aff1baa | ||
|
|
74d7747ae1 | ||
|
|
71961b3079 | ||
|
|
a5d8ad919a | ||
|
|
0ce30deab9 | ||
|
|
474d678c6c | ||
|
|
4976849510 | ||
|
|
65dd738ef8 | ||
|
|
da90991f23 | ||
|
|
6cf741ac6f | ||
|
|
d40a0b5d9c | ||
|
|
e61fc254e7 | ||
|
|
72f10f76c5 | ||
|
|
b50e14a5a3 | ||
|
|
1b53bdf6ee | ||
|
|
2e7354993c | ||
|
|
c75b1e89ec | ||
|
|
6c9921f20d | ||
|
|
94e5e9e703 | ||
|
|
57b7679873 | ||
|
|
da5fc9adbc | ||
|
|
9706b7954c
|
||
|
|
396db61e5e
|
||
|
|
063cfe0ac0
|
||
|
|
82e9a0e807
|
||
|
|
3304573292
|
||
|
|
26753a5b98
|
||
|
|
51280986ed
|
||
|
|
6a6be514df | ||
|
|
0b7bf06f58
|
||
|
|
c11584e31e
|
||
|
|
6fc5cee147
|
||
|
|
adc82860eb
|
||
|
|
bd9bf6ccc7
|
||
|
|
75bb7846f9
|
||
|
|
7747587e69
|
||
|
|
7c37e7122f
|
||
|
|
02aef91f3a
|
||
|
|
ba0aac7807
|
||
|
|
b27399db29 | ||
|
|
a98c3f84ce | ||
|
|
7069a9e1f0
|
||
|
|
86a972fd61
|
||
|
|
d793b0e635
|
||
|
|
1f034a5ebc
|
||
|
|
b96b2986f0
|
||
|
|
4570dfb4b4
|
||
|
|
88efa96ac7
|
||
|
|
48ce8bdf9d
|
||
|
|
724633d928
|
||
|
|
7eedb9098a
|
||
|
|
6432eb6171
|
||
|
|
4b7d0a0980
|
||
|
|
de77adcfcb
|
||
|
|
16f84aaa04
|
||
|
|
24f013c765
|
||
|
|
a84a509cf8
|
||
|
|
df54654750
|
||
|
|
cddf52d5d3 | ||
|
|
01c5f62314 | ||
|
|
3279001345
|
||
|
|
2ea3557973
|
||
|
|
9cdd54c6e8
|
||
|
|
28bf565203
|
||
|
|
b1df12ae65 | ||
|
|
5912338271 | ||
|
|
a5d2aad596 | ||
|
|
56add43822 | ||
|
|
d524383340 | ||
|
|
51566b7224 | ||
|
|
2d322ab1f2 | ||
|
|
8c39e606e3 | ||
|
|
d275bc88b2 | ||
|
|
3acbf43b4e | ||
|
|
729fe36326 | ||
|
|
530be0cf44 | ||
|
|
6105e157c7 | ||
|
|
4b0e3a61e9 | ||
|
|
680b3cd3d6 | ||
|
|
830336ee06 | ||
|
|
01bc1610bf | ||
|
|
d26818f47a | ||
|
|
ca50e2af2b | ||
|
|
0cc88081d1 | ||
|
|
dee91dd001 | ||
|
|
510e179b78 | ||
|
|
ea39ab9992 | ||
|
|
f2c215460b | ||
|
|
96d83ec1b4 | ||
|
|
a3f6c55b93 | ||
|
|
879ea3474a | ||
|
|
41cf1a5894 | ||
|
|
b294b8c8ee | ||
|
|
e677754de3 | ||
|
|
4f11c8139f | ||
|
|
e46c205fe3 | ||
|
|
290b694877 | ||
|
|
8ad47d16eb | ||
|
|
e3f8430193 | ||
|
|
46d4249637 | ||
|
|
8c1f94d05a | ||
|
|
bac068cf69 | ||
|
|
6cbc8b393d | ||
|
|
ac3eee4bb0 | ||
|
|
045f44e2d2 | ||
|
|
a198789a17 | ||
|
|
7fa285f0cc | ||
|
|
bebf7e8b6d | ||
|
|
6f2c1bed14 | ||
|
|
dfa96985d6 | ||
|
|
2a6196cc70 | ||
|
|
23a0e060ef | ||
|
|
040923c626 | ||
|
|
2c3de69e72 | ||
|
|
8ea1207bb9 | ||
|
|
21fe030dc7 | ||
|
|
f6950c7e78 | ||
|
|
f76b88cf4b | ||
|
|
6e5568e330 | ||
|
|
1308aae228 | ||
|
|
ded07cb14a | ||
|
|
81ab925d88 | ||
|
|
e909e76c9e | ||
|
|
3fc9f416f9 | ||
|
|
c3672ea118 | ||
|
|
1dee7a5769 | ||
|
|
e0a0721dea | ||
|
|
5cad49555e |
@@ -0,0 +1 @@
|
||||
screenshot.png filter=lfs diff=lfs merge=lfs -text
|
||||
+1
-1
@@ -5,7 +5,7 @@ creation_rules:
|
||||
key_groups:
|
||||
- age:
|
||||
- *primary
|
||||
- path_regex: nixos/hosts/(Rias|Senko|Eclipse)/secrets/.+$
|
||||
- path_regex: host/(Rias|Senko|Inaho|Eclipse)/secrets/.+$
|
||||
key_groups:
|
||||
- age:
|
||||
- *primary
|
||||
|
||||
@@ -1,12 +1,47 @@
|
||||
# ❄️ My NixOS Config
|
||||
|
||||
```bash
|
||||
git clone https://github.com/Andrey0189/nixos-config
|
||||
mv nixos-config $HOME/nix # Config is supposed to be in the ~/nix directory
|
||||
cd $HOME/nix
|
||||
sudo nixos-rebuild switch --flake .
|
||||
home-manager switch --flake .
|
||||
This configuration is based on [&'s config](https://github.com/Andrey0189/nixos-config)
|
||||
|
||||
## Users
|
||||
- [Sweetbread](./user/sweetbread)
|
||||
- [Chest](./user/chest)
|
||||
|
||||
## Hosts
|
||||
- [Rias](./host/Rias)
|
||||
- [Senko](./host/Senko)
|
||||
- [Eclipse](./host/Eclipse)
|
||||
- [Impreza](./host/Impreza)
|
||||
|
||||
## How does this work?
|
||||
The [flake](./flake.nix) file is the starting point. While installing/rebuilding
|
||||
the correct `host` is chosen, which includes `./host/${host}/configuration.nix`.
|
||||
|
||||
It includes 2 (actually, more, but hey!) files:
|
||||
- [`./host/modules/common.nix`](./host/modules/common.nix): Common setting
|
||||
for all hosts (I don't say)
|
||||
- [`./user/common.nix`](./user/common.nix): Common settings for all users (you
|
||||
got the idea) and setup of [home-manager](https://github.com/nix-community/home-manager)
|
||||
|
||||
It allows me to remove duplications and add multiple users to one host
|
||||
|
||||
Example with Rias:
|
||||
```
|
||||
Enjoy!
|
||||
./host/Rias/configuration.nix
|
||||
./host/Rias/modules/*
|
||||
./host/modules/gpu/nvidia.nix
|
||||
./host/modules/common.nix
|
||||
./host/Rias/hardware-configuration.nix
|
||||
./modules/host.nix
|
||||
./modules/host/*
|
||||
./host/modules/packages.nix
|
||||
./user/common.nix
|
||||
./user/sweetbread/home.nix
|
||||
./user/sweetbread/modules/*
|
||||
./modules/user.nix
|
||||
./modules/user/*
|
||||
```
|
||||
|
||||
## Programs
|
||||
Most of programs are defined in [user modules](./modules/user)
|
||||
|
||||

|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
{
|
||||
disko.devices = {
|
||||
disk = {
|
||||
my-disk = {
|
||||
device = "/dev/sdb";
|
||||
type = "disk";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
type = "EF00";
|
||||
size = "256M";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
};
|
||||
};
|
||||
|
||||
swap = {
|
||||
size = "8G";
|
||||
content = {
|
||||
type = "swap";
|
||||
resumeDevice = true;
|
||||
};
|
||||
};
|
||||
|
||||
root = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "ext4";
|
||||
mountpoint = "/";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Generated
+531
-276
File diff suppressed because it is too large
Load Diff
@@ -3,27 +3,42 @@
|
||||
|
||||
nixConfig = {
|
||||
extra-substituters = [
|
||||
"https://cache.garnix.io"
|
||||
"https://nix.lair.moe/main"
|
||||
"https://nix-community.cachix.org"
|
||||
"https://hyprland.cachix.org"
|
||||
"https://ezkea.cachix.org"
|
||||
"https://yazi.cachix.org"
|
||||
];
|
||||
extra-trusted-public-keys = [
|
||||
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
|
||||
"main:tR2gNhCBJHKAlVgohPNHBhGnWL55tB8SxXmMWJe5lo8="
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||
"ezkea.cachix.org-1:ioBmUbJTZIKsHmWWXPe1FSFbeVe+afhfgqgTSNd34eI="
|
||||
"yazi.cachix.org-1:Dcdz63NZKfvUCbDGngQDAZq6kOroIrFoyO064uvLh8k="
|
||||
];
|
||||
};
|
||||
|
||||
inputs = {
|
||||
|
||||
aagl.url = "github:ezKEa/aagl-gtk-on-nix";
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.05";
|
||||
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-26.05";
|
||||
nixpkgs-pinned.url = "github:nixos/nixpkgs/ec942ba042dad5ef097e2ef3a3effc034241f011";
|
||||
disko = {
|
||||
url = "github:nix-community/disko";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
sops-nix.url = "github:Mic92/sops-nix";
|
||||
stylix.url = "github:danth/stylix";
|
||||
ags.url = "github:Aylur/ags";
|
||||
ayugram-desktop.url = "github:/ayugram-port/ayugram-desktop/release?submodules=1";
|
||||
tlock.url = "git+https://github.com/eklairs/tlock?submodules=1";
|
||||
ags.url = "github:Aylur/ags/3ed9737bdbc8fc7a7c7ceef2165c9109f336bff6";
|
||||
helix-steel.url = "github:mattwparas/helix/steel-event-system";
|
||||
|
||||
hyprpanel.url = "github:Jas-SinghFSU/HyprPanel";
|
||||
hyprland.url = "github:hyprwm/Hyprland";
|
||||
yazi.url = "github:sxyazi/yazi";
|
||||
yazi-plugins = {
|
||||
url = "github:yazi-rs/plugins";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
hyprland.url = "github:hyprwm/Hyprland/v0.54.2-b";
|
||||
hyprland-plugins = {
|
||||
url = "github:hyprwm/hyprland-plugins";
|
||||
inputs.hyprland.follows = "hyprland";
|
||||
@@ -35,91 +50,24 @@
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, nixpkgs-stable, home-manager, ... }@inputs: let
|
||||
outputs = { self, nixpkgs, nixpkgs-stable, nixpkgs-pinned, home-manager, ... }@inputs: let
|
||||
system = "x86_64-linux";
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [ inputs.hyprpanel.overlay ];
|
||||
config = { allowUnfree = true; };
|
||||
mkHost = hostname: nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inherit inputs;
|
||||
pkgs-stable = import nixpkgs-stable { inherit system config; };
|
||||
pkgs-pinned = import nixpkgs-pinned { inherit system config; };
|
||||
};
|
||||
modules = [ ./host/${hostname}/configuration.nix ];
|
||||
};
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
Rias = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
pkgs-stable = import nixpkgs-stable {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
inherit inputs system;
|
||||
};
|
||||
modules = [
|
||||
./nixos/hosts/Rias/configuration.nix
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
];
|
||||
};
|
||||
|
||||
Senko = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
pkgs-stable = import nixpkgs-stable {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
inherit inputs system;
|
||||
};
|
||||
modules = [
|
||||
./nixos/hosts/Senko/configuration.nix
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
];
|
||||
};
|
||||
|
||||
Eclipse = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
pkgs-stable = import nixpkgs-stable {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
inherit inputs system;
|
||||
};
|
||||
modules = [
|
||||
./nixos/hosts/Eclipse/configuration.nix
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
homeConfigurations = {
|
||||
sweetbread = home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
extraSpecialArgs = {
|
||||
inherit inputs;
|
||||
pkgs-stable = import nixpkgs-stable {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
};
|
||||
modules = [
|
||||
./home-manager/users/sweetbread/home.nix
|
||||
inputs.sops-nix.homeManagerModules.sops
|
||||
inputs.stylix.homeManagerModules.stylix
|
||||
inputs.ags.homeManagerModules.default
|
||||
];
|
||||
};
|
||||
|
||||
chest = home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
extraSpecialArgs = {
|
||||
inherit inputs;
|
||||
pkgs-stable = import nixpkgs-stable {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
};
|
||||
modules = [
|
||||
./home-manager/users/chest/home.nix
|
||||
inputs.sops-nix.homeManagerModules.sops
|
||||
inputs.stylix.homeManagerModules.stylix
|
||||
inputs.ags.homeManagerModules.default
|
||||
];
|
||||
};
|
||||
Rias = mkHost "Rias";
|
||||
Senko = mkHost "Senko";
|
||||
Eclipse = mkHost "Eclipse";
|
||||
Impreza = mkHost "Impreza";
|
||||
Inaho = mkHost "Inaho";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,325 +0,0 @@
|
||||
{ inputs, pkgs, config, ... }: {
|
||||
# imports = [ inputs.ags.homeManagerModules.default ];
|
||||
|
||||
programs.ags = {
|
||||
enable = true;
|
||||
|
||||
# null or path, leave as null if you don't want hm to manage the config
|
||||
configDir = null;
|
||||
|
||||
# additional packages to add to gjs's runtime
|
||||
extraPackages = with pkgs; [
|
||||
gtksourceview
|
||||
webkitgtk
|
||||
accountsservice
|
||||
];
|
||||
};
|
||||
|
||||
xdg.configFile."ags/config.js".text = /*js*/ ''
|
||||
const hyprland = await Service.import("hyprland")
|
||||
const notifications = await Service.import("notifications")
|
||||
const mpris = await Service.import("mpris")
|
||||
const audio = await Service.import("audio")
|
||||
const battery = await Service.import("battery")
|
||||
const systemtray = await Service.import("systemtray")
|
||||
|
||||
const date = Variable("", {
|
||||
poll: [1000, 'date "+%H:%M:%S %b %e."'],
|
||||
})
|
||||
|
||||
// widgets can be only assigned as a child in one container
|
||||
// so to make a reuseable widget, make it a function
|
||||
// then you can simply instantiate one by calling it
|
||||
|
||||
function Workspaces() {
|
||||
const activeId = hyprland.active.workspace.bind("id")
|
||||
const workspaces = hyprland.bind("workspaces")
|
||||
.as(ws => ws.map(({ id }) => Widget.Button({
|
||||
on_clicked: () => hyprland.messageAsync(`dispatch workspace ''${id}`),
|
||||
child: Widget.Label(`''${id}`),
|
||||
class_name: activeId.as(i => `''${i === id ? "focused" : ""}`),
|
||||
})))
|
||||
|
||||
return Widget.Box({
|
||||
class_name: "workspaces",
|
||||
children: workspaces,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
function ClientTitle() {
|
||||
return Widget.Label({
|
||||
class_name: "client-title",
|
||||
label: hyprland.active.client.bind("title"),
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
function Clock() {
|
||||
return Widget.Label({
|
||||
class_name: "clock",
|
||||
label: date.bind(),
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// we don't need dunst or any other notification daemon
|
||||
// because the Notifications module is a notification daemon itself
|
||||
function Notification() {
|
||||
const popups = notifications.bind("popups")
|
||||
return Widget.Box({
|
||||
class_name: "notification",
|
||||
visible: popups.as(p => p.length > 0),
|
||||
children: [
|
||||
Widget.Icon({
|
||||
icon: "preferences-system-notifications-symbolic",
|
||||
}),
|
||||
Widget.Label({
|
||||
label: popups.as(p => p[0]?.summary || ""),
|
||||
}),
|
||||
],
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
function Media() {
|
||||
const label = Utils.watch("default", mpris, "player-changed", () => {
|
||||
if (mpris.players[0]) {
|
||||
const { track_artists, track_title } = mpris.players[0]
|
||||
return `''${track_artists.join(", ")} - ''${track_title}`
|
||||
} else {
|
||||
return "Nothing is playing"
|
||||
}
|
||||
})
|
||||
|
||||
print(Object.values(label))
|
||||
if (label != "default") {
|
||||
return Widget.Button({
|
||||
class_name: "media",
|
||||
on_primary_click: () => mpris.getPlayer("")?.playPause(),
|
||||
on_scroll_up: () => mpris.getPlayer("")?.next(),
|
||||
on_scroll_down: () => mpris.getPlayer("")?.previous(),
|
||||
child: Widget.Label({ label }),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function Volume() {
|
||||
const icons = {
|
||||
101: "overamplified",
|
||||
67: "high",
|
||||
34: "medium",
|
||||
1: "low",
|
||||
0: "muted",
|
||||
}
|
||||
|
||||
function getIcon() {
|
||||
const icon = audio.speaker.is_muted ? 0 : [101, 67, 34, 1, 0].find(
|
||||
threshold => threshold <= audio.speaker.volume * 100)
|
||||
|
||||
return `audio-volume-''${icons[icon]}-symbolic`
|
||||
}
|
||||
|
||||
const icon = Widget.Icon({
|
||||
icon: Utils.watch(getIcon(), audio.speaker, getIcon),
|
||||
})
|
||||
|
||||
const slider = Widget.Slider({
|
||||
hexpand: true,
|
||||
draw_value: false,
|
||||
on_change: ({ value }) => audio.speaker.volume = value,
|
||||
setup: self => self.hook(audio.speaker, () => {
|
||||
self.value = audio.speaker.volume || 0
|
||||
}),
|
||||
})
|
||||
|
||||
return Widget.Box({
|
||||
class_name: "volume",
|
||||
css: "min-width: 180px",
|
||||
children: [icon, slider],
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
function BatteryLabel() {
|
||||
const value = battery.bind("percent").as(p => p > 0 ? p / 100 : 0)
|
||||
const icon = battery.bind("percent").as(p =>
|
||||
`battery-level-''${Math.floor(p / 10) * 10}-symbolic`)
|
||||
|
||||
return Widget.Box({
|
||||
class_name: "battery",
|
||||
visible: battery.bind("available"),
|
||||
children: [
|
||||
Widget.Icon({ icon }),
|
||||
Widget.LevelBar({
|
||||
widthRequest: 140,
|
||||
vpack: "center",
|
||||
value,
|
||||
}),
|
||||
],
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
function SysTray() {
|
||||
const items = systemtray.bind("items")
|
||||
.as(items => items.map(item => Widget.Button({
|
||||
child: Widget.Icon({ icon: item.bind("icon") }),
|
||||
on_primary_click: (_, event) => item.activate(event),
|
||||
on_secondary_click: (_, event) => item.openMenu(event),
|
||||
tooltip_markup: item.bind("tooltip_markup"),
|
||||
})))
|
||||
|
||||
return Widget.Box({
|
||||
children: items,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// layout of the bar
|
||||
function Left() {
|
||||
return Widget.Box({
|
||||
spacing: 8,
|
||||
children: [
|
||||
Workspaces(),
|
||||
ClientTitle(),
|
||||
],
|
||||
})
|
||||
}
|
||||
|
||||
function Center() {
|
||||
return Widget.Box({
|
||||
spacing: 8,
|
||||
children: [
|
||||
Media(),
|
||||
Notification(),
|
||||
],
|
||||
})
|
||||
}
|
||||
|
||||
function Right() {
|
||||
return Widget.Box({
|
||||
hpack: "end",
|
||||
spacing: 8,
|
||||
children: [
|
||||
Volume(),
|
||||
BatteryLabel(),
|
||||
Clock(),
|
||||
SysTray(),
|
||||
],
|
||||
})
|
||||
}
|
||||
|
||||
function Bar(monitor = 0) {
|
||||
return Widget.Window({
|
||||
name: `bar-''${monitor}`, // name has to be unique
|
||||
class_name: "bar",
|
||||
monitor,
|
||||
anchor: ["top", "left", "right"],
|
||||
exclusivity: "exclusive",
|
||||
child: Widget.CenterBox({
|
||||
start_widget: Left(),
|
||||
center_widget: Center(),
|
||||
end_widget: Right(),
|
||||
}),
|
||||
})
|
||||
}
|
||||
|
||||
App.config({
|
||||
style: "./style.css",
|
||||
windows: [
|
||||
Bar(),
|
||||
|
||||
// you can call it, for each monitor
|
||||
// Bar(0),
|
||||
// Bar(1)
|
||||
],
|
||||
})
|
||||
|
||||
export { }
|
||||
'';
|
||||
|
||||
xdg.configFile."ags/style.css".text = let
|
||||
colors = config.lib.stylix.colors;
|
||||
|
||||
color = {
|
||||
base = colors.base00;
|
||||
mantle = colors.base01;
|
||||
surface0 = colors.base02;
|
||||
surface1 = colors.base03;
|
||||
surface2 = colors.base04;
|
||||
text = colors.base05;
|
||||
rosewater = colors.base06;
|
||||
lavander = colors.base07;
|
||||
red = colors.base08;
|
||||
peach = colors.base09;
|
||||
yellow = colors.base0A;
|
||||
green = colors.base0B;
|
||||
teal = colors.base0C;
|
||||
blue = colors.base0D;
|
||||
mauve = colors.base0E;
|
||||
flamingo = colors.base0F;
|
||||
};
|
||||
in /*css*/ ''
|
||||
* {
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
window.bar {
|
||||
background-color: transparent;
|
||||
color: #${color.text};
|
||||
}
|
||||
|
||||
button {
|
||||
/* size: 20px; */
|
||||
background-color: transparent;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
button:active {
|
||||
background-color: /*#${color.surface0}*/ red;
|
||||
}
|
||||
|
||||
label {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.workspaces {
|
||||
background-color: #${color.base};
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.workspaces button {
|
||||
color: #${color.surface2};
|
||||
background: transparent;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.workspaces button:hover {
|
||||
color: #${color.text};
|
||||
}
|
||||
|
||||
.workspaces button.focused {
|
||||
background-color: #${color.surface0};
|
||||
color: #${color.text};
|
||||
}
|
||||
|
||||
.client-title {
|
||||
color: @theme_selected_bg_color;
|
||||
}
|
||||
|
||||
.notification {
|
||||
color: yellow;
|
||||
}
|
||||
|
||||
levelbar block,
|
||||
highlight {
|
||||
min-height: 10px;
|
||||
}
|
||||
'';
|
||||
|
||||
# home.packages = [ pkgs.ags ];
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
# Simple Bar
|
||||
|
||||
setup
|
||||
|
||||
```bash
|
||||
mkdir -p ~/.config/ags
|
||||
git clone https://github.com/Aylur/ags.git /tmp/ags
|
||||
cp -r /tmp/ags/example/simple-bar/* ~/.config/ags
|
||||
|
||||
# optionally setup types
|
||||
ags --init -c ~/.config/ags/config.js
|
||||
```
|
||||
|
||||
running
|
||||
|
||||
```bash
|
||||
ags -c ~/.config/ags/config.js &
|
||||
```
|
||||
@@ -1,219 +0,0 @@
|
||||
const hyprland = await Service.import("hyprland")
|
||||
const notifications = await Service.import("notifications")
|
||||
const mpris = await Service.import("mpris")
|
||||
const audio = await Service.import("audio")
|
||||
const battery = await Service.import("battery")
|
||||
const systemtray = await Service.import("systemtray")
|
||||
|
||||
const date = Variable("", {
|
||||
poll: [1000, 'date "+%H:%M:%S %b %e."'],
|
||||
})
|
||||
|
||||
// widgets can be only assigned as a child in one container
|
||||
// so to make a reuseable widget, make it a function
|
||||
// then you can simply instantiate one by calling it
|
||||
|
||||
function Workspaces() {
|
||||
const activeId = hyprland.active.workspace.bind("id")
|
||||
const workspaces = hyprland.bind("workspaces")
|
||||
.as(ws => ws.map(({ id }) => Widget.Button({
|
||||
on_clicked: () => hyprland.messageAsync(`dispatch workspace ${id}`),
|
||||
child: Widget.Label(`${id}`),
|
||||
class_name: activeId.as(i => `${i === id ? "focused" : ""}`),
|
||||
})))
|
||||
|
||||
return Widget.Box({
|
||||
class_name: "workspaces",
|
||||
children: workspaces,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
function ClientTitle() {
|
||||
return Widget.Label({
|
||||
class_name: "client-title",
|
||||
label: hyprland.active.client.bind("title"),
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
function Clock() {
|
||||
return Widget.Label({
|
||||
class_name: "clock",
|
||||
label: date.bind(),
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// we don't need dunst or any other notification daemon
|
||||
// because the Notifications module is a notification daemon itself
|
||||
function Notification() {
|
||||
const popups = notifications.bind("popups")
|
||||
return Widget.Box({
|
||||
class_name: "notification",
|
||||
visible: popups.as(p => p.length > 0),
|
||||
children: [
|
||||
Widget.Icon({
|
||||
icon: "preferences-system-notifications-symbolic",
|
||||
}),
|
||||
Widget.Label({
|
||||
label: popups.as(p => p[0]?.summary || ""),
|
||||
}),
|
||||
],
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
function Media() {
|
||||
const label = Utils.watch("", mpris, "player-changed", () => {
|
||||
if (mpris.players[0]) {
|
||||
const { track_artists, track_title } = mpris.players[0]
|
||||
return `${track_artists.join(", ")} - ${track_title}`
|
||||
} else {
|
||||
return "Nothing is playing"
|
||||
}
|
||||
})
|
||||
|
||||
return Widget.Button({
|
||||
class_name: "media",
|
||||
on_primary_click: () => mpris.getPlayer("")?.playPause(),
|
||||
on_scroll_up: () => mpris.getPlayer("")?.next(),
|
||||
on_scroll_down: () => mpris.getPlayer("")?.previous(),
|
||||
child: Widget.Label({ label }),
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
function Volume() {
|
||||
const icons = {
|
||||
101: "overamplified",
|
||||
67: "high",
|
||||
34: "medium",
|
||||
1: "low",
|
||||
0: "muted",
|
||||
}
|
||||
|
||||
function getIcon() {
|
||||
const icon = audio.speaker.is_muted ? 0 : [101, 67, 34, 1, 0].find(
|
||||
threshold => threshold <= audio.speaker.volume * 100)
|
||||
|
||||
return `audio-volume-${icons[icon]}-symbolic`
|
||||
}
|
||||
|
||||
const icon = Widget.Icon({
|
||||
icon: Utils.watch(getIcon(), audio.speaker, getIcon),
|
||||
})
|
||||
|
||||
const slider = Widget.Slider({
|
||||
hexpand: true,
|
||||
draw_value: false,
|
||||
on_change: ({ value }) => audio.speaker.volume = value,
|
||||
setup: self => self.hook(audio.speaker, () => {
|
||||
self.value = audio.speaker.volume || 0
|
||||
}),
|
||||
})
|
||||
|
||||
return Widget.Box({
|
||||
class_name: "volume",
|
||||
css: "min-width: 180px",
|
||||
children: [icon, slider],
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
function BatteryLabel() {
|
||||
const value = battery.bind("percent").as(p => p > 0 ? p / 100 : 0)
|
||||
const icon = battery.bind("percent").as(p =>
|
||||
`battery-level-${Math.floor(p / 10) * 10}-symbolic`)
|
||||
|
||||
return Widget.Box({
|
||||
class_name: "battery",
|
||||
visible: battery.bind("available"),
|
||||
children: [
|
||||
Widget.Icon({ icon }),
|
||||
Widget.LevelBar({
|
||||
widthRequest: 140,
|
||||
vpack: "center",
|
||||
value,
|
||||
}),
|
||||
],
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
function SysTray() {
|
||||
const items = systemtray.bind("items")
|
||||
.as(items => items.map(item => Widget.Button({
|
||||
child: Widget.Icon({ icon: item.bind("icon") }),
|
||||
on_primary_click: (_, event) => item.activate(event),
|
||||
on_secondary_click: (_, event) => item.openMenu(event),
|
||||
tooltip_markup: item.bind("tooltip_markup"),
|
||||
})))
|
||||
|
||||
return Widget.Box({
|
||||
children: items,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// layout of the bar
|
||||
function Left() {
|
||||
return Widget.Box({
|
||||
spacing: 8,
|
||||
children: [
|
||||
Workspaces(),
|
||||
ClientTitle(),
|
||||
],
|
||||
})
|
||||
}
|
||||
|
||||
function Center() {
|
||||
return Widget.Box({
|
||||
spacing: 8,
|
||||
children: [
|
||||
Media(),
|
||||
Notification(),
|
||||
],
|
||||
})
|
||||
}
|
||||
|
||||
function Right() {
|
||||
return Widget.Box({
|
||||
hpack: "end",
|
||||
spacing: 8,
|
||||
children: [
|
||||
Volume(),
|
||||
BatteryLabel(),
|
||||
Clock(),
|
||||
SysTray(),
|
||||
],
|
||||
})
|
||||
}
|
||||
|
||||
function Bar(monitor = 0) {
|
||||
return Widget.Window({
|
||||
name: `bar-${monitor}`, // name has to be unique
|
||||
class_name: "bar",
|
||||
monitor,
|
||||
anchor: ["top", "left", "right"],
|
||||
exclusivity: "exclusive",
|
||||
child: Widget.CenterBox({
|
||||
start_widget: Left(),
|
||||
center_widget: Center(),
|
||||
end_widget: Right(),
|
||||
}),
|
||||
})
|
||||
}
|
||||
|
||||
App.config({
|
||||
style: "./style.css",
|
||||
windows: [
|
||||
Bar(),
|
||||
|
||||
// you can call it, for each monitor
|
||||
// Bar(0),
|
||||
// Bar(1)
|
||||
],
|
||||
})
|
||||
|
||||
export { }
|
||||
@@ -1,16 +0,0 @@
|
||||
{
|
||||
imports = [
|
||||
./kitty.nix
|
||||
./qt.nix
|
||||
./sops.nix
|
||||
./neofetch.nix
|
||||
./syncthing.nix
|
||||
./yazi.nix
|
||||
./ags.nix
|
||||
./zsh.nix
|
||||
./helix.nix
|
||||
|
||||
./wms/wofi.nix
|
||||
./wms/mako.nix
|
||||
];
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
{
|
||||
programs.helix = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
|
||||
settings = {
|
||||
# theme = "catppuccin-mocha";
|
||||
editor = {
|
||||
whitespace.render = {
|
||||
space = "all";
|
||||
tab = "all";
|
||||
nbsp = "none";
|
||||
nnbsp = "none";
|
||||
newline = "none";
|
||||
};
|
||||
|
||||
indent-guides.render = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
{ lib, pkgs, ... }: {
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
settings = lib.mkDefault {
|
||||
dynamic_background_opacity = "yes";
|
||||
background_opacity = 0.5;
|
||||
background_blur = true;
|
||||
background = "#1d2021";
|
||||
font_size = 13.0;
|
||||
cursor_blink_interval = "0.5 ease-in-out";
|
||||
};
|
||||
};
|
||||
programs.zsh.envExtra = "TERM=xterm-256color";
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme.name = "qtct";
|
||||
style.name = "kvantum";
|
||||
};
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
{
|
||||
services.syncthing.enable = true;
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
let
|
||||
colors = config.lib.stylix.colors;
|
||||
in {
|
||||
home.packages = [ pkgs.mako ];
|
||||
xdg.configFile."mako/config".text = ''
|
||||
background-color=#${colors.base00}
|
||||
text-color=#${colors.base05}
|
||||
border-color=#${colors.base0B}
|
||||
border-radius=10
|
||||
margin=16
|
||||
progress-color=over #${colors.base0A}
|
||||
default-timeout=5000
|
||||
|
||||
[urgency=high]
|
||||
border-color=#${colors.base09}
|
||||
|
||||
[urgency=low]
|
||||
border-color=#${colors.base04}
|
||||
'';
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
{ pkgs, ... }: {
|
||||
xdg.configFile."wofi/style.css".source = pkgs.fetchurl {
|
||||
name = "style.css";
|
||||
url = "https://github.com/joao-vitor-sr/wofi-themes-collection/raw/main/themes/nord.css";
|
||||
sha256 = "sha256-rMDtE7Q0hmqd9LD+Ur/QR6cMan9ev6e9IyzpwY367c0=";
|
||||
};
|
||||
}
|
||||
@@ -1,56 +0,0 @@
|
||||
{ pkgs, lib, ... }: let
|
||||
yazi-plugins = pkgs.fetchFromGitHub {
|
||||
owner = "yazi-rs";
|
||||
repo = "plugins";
|
||||
rev = "c5785059611624e20a37ba573620f30acc28a26a";
|
||||
hash = "sha256-wlSBtabIsEUJhuHmXwgpSnwZp9WaVQFBg6s1XXjubrE=";
|
||||
};
|
||||
in {
|
||||
programs.yazi = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
shellWrapperName = "y";
|
||||
|
||||
settings = {
|
||||
manager = {
|
||||
show_hidden = true;
|
||||
};
|
||||
preview = {
|
||||
max_width = 1000;
|
||||
max_height = 1000;
|
||||
};
|
||||
};
|
||||
|
||||
plugins = {
|
||||
chmod = "${yazi-plugins}/chmod.yazi";
|
||||
full-border = "${yazi-plugins}/full-border.yazi";
|
||||
max-preview = "${yazi-plugins}/max-preview.yazi";
|
||||
starship = pkgs.fetchFromGitHub {
|
||||
owner = "Rolv-Apneseth";
|
||||
repo = "starship.yazi";
|
||||
rev = "77a65f5a367f833ad5e6687261494044006de9c3";
|
||||
sha256 = "sha256-sAB0958lLNqqwkpucRsUqLHFV/PJYoJL2lHFtfHDZF8=";
|
||||
};
|
||||
};
|
||||
|
||||
initLua = ''
|
||||
require("full-border"):setup()
|
||||
require("starship"):setup()
|
||||
'';
|
||||
|
||||
keymap = {
|
||||
manager.prepend_keymap = [
|
||||
{
|
||||
on = "T";
|
||||
run = "plugin --sync max-preview";
|
||||
desc = "Maximize or restore the preview pane";
|
||||
}
|
||||
{
|
||||
on = ["c" "m"];
|
||||
run = "plugin chmod";
|
||||
desc = "Chmod on selected files";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
{ pkgs-stable, ... }: {
|
||||
home.packages = with pkgs-stable; [
|
||||
(blender.override { cudaSupport = true; })
|
||||
];
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
{ pkgs, ... }: {
|
||||
home.packages = with pkgs; [
|
||||
vscode
|
||||
jetbrains.pycharm-community
|
||||
jetbrains.idea-community
|
||||
android-studio
|
||||
|
||||
cmake
|
||||
gnumake
|
||||
nodejs
|
||||
(python3.withPackages (ps: with ps; [ requests bpython ]))
|
||||
python311Packages.pip
|
||||
rocmPackages.llvm.clang-tools-extra
|
||||
rocmPackages.llvm.clang
|
||||
ncurses
|
||||
];
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
{ pkgs, inputs, ... }: {
|
||||
home.packages = with pkgs; [
|
||||
google-chrome
|
||||
inputs.ayugram-desktop.packages.${pkgs.system}.ayugram-desktop
|
||||
vesktop
|
||||
obs-studio
|
||||
mpv
|
||||
obsidian
|
||||
thunderbird
|
||||
];
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
{ pkgs, inputs, ... }: {
|
||||
home.packages = with pkgs; [
|
||||
scrot
|
||||
ffmpeg
|
||||
yt-dlp
|
||||
bat
|
||||
fd
|
||||
feh
|
||||
imv
|
||||
gromit-mpx
|
||||
notify-desktop
|
||||
inputs.tlock.packages.${system}.default
|
||||
];
|
||||
}
|
||||
@@ -1,229 +0,0 @@
|
||||
{ pkgs, lib, config, collection, swww_flags, inputs }: {
|
||||
home.packages = with pkgs; [
|
||||
swww
|
||||
kitty
|
||||
pamixer
|
||||
wofi
|
||||
clipse
|
||||
grimblast
|
||||
xclip
|
||||
clipnotify
|
||||
];
|
||||
|
||||
wayland.windowManager.hyprland =
|
||||
let
|
||||
colors = config.lib.stylix.colors;
|
||||
|
||||
wallpaper_changer = pkgs.writers.writePython3Bin "wallpaper_changer" {
|
||||
libraries = [ pkgs.python3Packages.requests ];
|
||||
flakeIgnore = [ "E501" "E111" "E701" "E241" "E731" ];
|
||||
} /*py*/ ''
|
||||
import requests as requests
|
||||
from random import choice
|
||||
from os import system, mkdir, listdir
|
||||
from os.path import exists
|
||||
|
||||
notify = lambda s: system(f"notify-desktop Wallpaper '{s}'")
|
||||
folder = "${config.home.homeDirectory}/Wallpapers"
|
||||
url = "https://wallhaven.cc/api/v1/collections/${collection}"
|
||||
with open("${config.sops.secrets."tokens/apis/wallhaven".path}") as f:
|
||||
token = f.read()
|
||||
|
||||
notify("Updating wallpaper!")
|
||||
|
||||
try:
|
||||
json = requests.get(url, params={'apikey': token}).json()
|
||||
|
||||
wallpaper = choice(json['data'])
|
||||
link = wallpaper['path']
|
||||
format = wallpaper['file_type']
|
||||
id = wallpaper['id']
|
||||
|
||||
if format == "image/jpeg": ext = "jpg"
|
||||
else: ext = "png"
|
||||
|
||||
filename = f"{id}.{ext}"
|
||||
|
||||
if not exists(f"{folder}/{filename}"):
|
||||
if not exists(folder):
|
||||
mkdir(f"{folder}")
|
||||
|
||||
notify("Downloading...")
|
||||
with open(f"{folder}/{filename}", 'wb') as f:
|
||||
r = requests.get(link)
|
||||
f.write(r.content)
|
||||
|
||||
except requests.exceptions.ConnectionError:
|
||||
notify("Offline mode")
|
||||
filename = choice(listdir(folder))
|
||||
|
||||
finally:
|
||||
system(f"swww img {folder}/{filename} ${swww_flags}")
|
||||
'';
|
||||
|
||||
clipsync = pkgs.writers.writeBash "clipsync" ''
|
||||
while clipnotify; do
|
||||
xclip -q -sel clip -t image/png -o > /dev/null && \
|
||||
xclip -sel clip -t image/png -o | wl-copy
|
||||
xclip -q -sel clip -o > /dev/null && \
|
||||
xclip -sel clip -o | wl-copy
|
||||
done
|
||||
'';
|
||||
in {
|
||||
enable = true;
|
||||
xwayland.enable = true;
|
||||
|
||||
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
|
||||
plugins = with inputs.hyprland-plugins.packages.${pkgs.system}; [
|
||||
hyprbars
|
||||
];
|
||||
|
||||
settings = {
|
||||
"$mainMod" = "SUPER";
|
||||
|
||||
env = [
|
||||
"LIBVA_DRIVER_NAME,nvidia"
|
||||
"XDG_SESSION_TYPE,wayland"
|
||||
"GBM_BACKEND,nvidia"
|
||||
"__GLX_VENDOR_LIBRARY_NAME,nvidia"
|
||||
"WLR_NO_HARDWARE_CURSORS,1"
|
||||
"XDG_CURRENT_DESKTOP,Hyprland"
|
||||
"XDG_SESSION_TYPE,wayland"
|
||||
"XDG_SESSION_DESKTOP,Hyprland"
|
||||
"XCURSOR_SIZE,36"
|
||||
"QT_QPA_PLATFORM,wayland"
|
||||
"XDG_SCREENSHOTS_DIR,~/screens"
|
||||
];
|
||||
|
||||
cursor.no_hardware_cursors = true;
|
||||
|
||||
debug = {
|
||||
disable_logs = false;
|
||||
enable_stdout_logs = true;
|
||||
};
|
||||
|
||||
input = {
|
||||
kb_layout = "us,ru";
|
||||
kb_variant = "lang";
|
||||
kb_options = "grp:caps_toggle";
|
||||
|
||||
follow_mouse = 1;
|
||||
|
||||
touchpad = {
|
||||
natural_scroll = false;
|
||||
};
|
||||
|
||||
sensitivity = 0; # -1.0 - 1.0, 0 means no modification.
|
||||
};
|
||||
|
||||
windowrule = [
|
||||
"float, ^(imv)$"
|
||||
"float, ^(feh)$"
|
||||
"float, ^(mpv)$"
|
||||
"float, ^(nmtui)$"
|
||||
"float, title:^(Список друзей)"
|
||||
];
|
||||
|
||||
windowrulev2 = [
|
||||
"float, class:(clipse)"
|
||||
"size 622 652, class:(clipse)"
|
||||
];
|
||||
|
||||
exec-once = [
|
||||
"systemctl --user start plasma-polkit-agent"
|
||||
"swww init"
|
||||
"${lib.getExe wallpaper_changer}"
|
||||
"${lib.getExe pkgs.hyprpanel}"
|
||||
"${clipsync}"
|
||||
"clipse -listen"
|
||||
];
|
||||
|
||||
bind = [
|
||||
"$mainMod, V, exec, kitty --class clipse -e clipse"
|
||||
|
||||
"$mainMod, Return, exec, kitty"
|
||||
"$mainMod, Q, killactive,"
|
||||
"$mainMod, M, exit,"
|
||||
"$mainMod, E, exec, kitty -e sh -c yazi"
|
||||
"$mainMod, F, togglefloating,"
|
||||
"$mainMod, D, exec, wofi --show drun"
|
||||
"$mainMod, P, pseudo, # dwindle"
|
||||
"$mainMod, J, togglesplit, # dwindle"
|
||||
|
||||
# Move focus with mainMod + arrow keys
|
||||
"$mainMod, left, movefocus, l"
|
||||
"$mainMod, right, movefocus, r"
|
||||
"$mainMod, up, movefocus, u"
|
||||
"$mainMod, down, movefocus, d"
|
||||
|
||||
# Moving windows
|
||||
"$mainMod SHIFT, left, swapwindow, l"
|
||||
"$mainMod SHIFT, right, swapwindow, r"
|
||||
"$mainMod SHIFT, up, swapwindow, u"
|
||||
"$mainMod SHIFT, down, swapwindow, d"
|
||||
|
||||
# Window resizing X Y
|
||||
"$mainMod CTRL, left, resizeactive, -60 0"
|
||||
"$mainMod CTRL, right, resizeactive, 60 0"
|
||||
"$mainMod CTRL, up, resizeactive, 0 -60"
|
||||
"$mainMod CTRL, down, resizeactive, 0 60"
|
||||
|
||||
# Switch workspaces with mainMod + [0-9]
|
||||
"$mainMod, 1, workspace, 1"
|
||||
"$mainMod, 2, workspace, 2"
|
||||
"$mainMod, 3, workspace, 3"
|
||||
"$mainMod, 4, workspace, 4"
|
||||
"$mainMod, 5, workspace, 5"
|
||||
"$mainMod, 6, workspace, 6"
|
||||
"$mainMod, 7, workspace, 7"
|
||||
"$mainMod, 8, workspace, 8"
|
||||
"$mainMod, 9, workspace, 9"
|
||||
"$mainMod, 0, workspace, 10"
|
||||
|
||||
# Move active window to a workspace with mainMod + SHIFT + [0-9]
|
||||
"$mainMod SHIFT, 1, movetoworkspacesilent, 1"
|
||||
"$mainMod SHIFT, 2, movetoworkspacesilent, 2"
|
||||
"$mainMod SHIFT, 3, movetoworkspacesilent, 3"
|
||||
"$mainMod SHIFT, 4, movetoworkspacesilent, 4"
|
||||
"$mainMod SHIFT, 5, movetoworkspacesilent, 5"
|
||||
"$mainMod SHIFT, 6, movetoworkspacesilent, 6"
|
||||
"$mainMod SHIFT, 7, movetoworkspacesilent, 7"
|
||||
"$mainMod SHIFT, 8, movetoworkspacesilent, 8"
|
||||
"$mainMod SHIFT, 9, movetoworkspacesilent, 9"
|
||||
"$mainMod SHIFT, 0, movetoworkspacesilent, 10"
|
||||
|
||||
"$mainMod SHIFT, F, fullscreen"
|
||||
|
||||
# Scroll through existing workspaces with mainMod + scroll
|
||||
"$mainMod, mouse_down, workspace, e+1"
|
||||
"$mainMod, mouse_up, workspace, e-1"
|
||||
|
||||
# Keyboard backlight
|
||||
"$mainMod, F3, exec, brightnessctl -d *::kbd_backlight set +33%"
|
||||
"$mainMod, F2, exec, brightnessctl -d *::kbd_backlight set 33%-"
|
||||
|
||||
# Volume and Media Control
|
||||
", XF86AudioRaiseVolume, exec, pamixer -i 5 "
|
||||
", XF86AudioLowerVolume, exec, pamixer -d 5 "
|
||||
", XF86AudioMute, exec, pamixer -t"
|
||||
", XF86AudioMicMute, exec, pamixer --default-source -m"
|
||||
|
||||
# Brightness control
|
||||
", XF86MonBrightnessDown, exec, brightnessctl set 5%- "
|
||||
", XF86MonBrightnessUp, exec, brightnessctl set +5% "
|
||||
|
||||
# Waybar
|
||||
"$mainMod, B, exec, pkill -SIGUSR1 waybar"
|
||||
#"$mainMod, W, exec, pkill -SIGUSR2 waybar"
|
||||
|
||||
"$mainMod, W, exec, ${lib.getExe wallpaper_changer}"
|
||||
];
|
||||
|
||||
# Move/resize windows with mainMod + LMB/RMB and dragging
|
||||
bindm = [
|
||||
"$mainMod, mouse:272, movewindow"
|
||||
"$mainMod, mouse:273, resizewindow"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,455 +0,0 @@
|
||||
{ pkgs, config, active_color }: {
|
||||
home.packages = [ pkgs.pulsemixer ];
|
||||
wayland.windowManager.hyprland.settings.windowrule = [
|
||||
"float, ^(pulsemixer)"
|
||||
"float, ^(nmtui)"
|
||||
];
|
||||
|
||||
xdg.configFile."waybar/scripts/wttr.py".source = pkgs.fetchurl {
|
||||
name = "waybar-wttr.py";
|
||||
url = "https://gist.githubusercontent.com/bjesus/f8db49e1434433f78e5200dc403d58a3/raw/47f9ffd573dc8e8edce0ea6708601b8e685a70ab/waybar-wttr.py";
|
||||
sha256 = "15j2cqg405q37wrrlm70mhp7rx6xnrn92rfm1ix6g3nl98ksh45g";
|
||||
};
|
||||
|
||||
programs.waybar =
|
||||
let
|
||||
colors = config.lib.stylix.colors;
|
||||
in {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
mainBar = {
|
||||
layer = "top";
|
||||
position = "top";
|
||||
margin = "9 13 -10 18";
|
||||
|
||||
modules-left = ["hyprland/workspaces" "hyprland/language" "keyboard-state" "hyprland/submap"];
|
||||
modules-center = ["mpris" "wlr/taskbar"];
|
||||
modules-right = ["group/system" "battery" "pulseaudio" "clock" "tray"];
|
||||
|
||||
"hyprland/workspaces" = {
|
||||
disable-scroll = true;
|
||||
};
|
||||
|
||||
"wlr/taskbar" = {
|
||||
on-click = "activate";
|
||||
on-click-middle = "close";
|
||||
on-click-right = "minimize";
|
||||
};
|
||||
|
||||
"group/system" = {
|
||||
orientation = "inherit";
|
||||
drawer = {
|
||||
transition-duration = 500;
|
||||
transition-left-to-right = false;
|
||||
};
|
||||
modules = [
|
||||
"network"
|
||||
"custom/mem"
|
||||
"cpu"
|
||||
"temperature"
|
||||
"backlight"
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
"hyprland/language" = {
|
||||
format-en = "US";
|
||||
format-ru = "RU";
|
||||
min-length = 5;
|
||||
tooltip = false;
|
||||
};
|
||||
|
||||
"keyboard-state" = {
|
||||
capslock = true;
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
locked = "CUPS";
|
||||
unlocked = "";
|
||||
};
|
||||
};
|
||||
|
||||
"clock" = {
|
||||
tooltip = false;
|
||||
format = "{:%a, %d %b %R}";
|
||||
};
|
||||
|
||||
"custom/weather" = {
|
||||
format = "{}";
|
||||
tooltip = true;
|
||||
interval = 1800;
|
||||
exec = "python3 $HOME/.config/waybar/scripts/wttr.py";
|
||||
return-type = "json";
|
||||
};
|
||||
|
||||
"pulseaudio" = {
|
||||
# scroll-step = 1; # %, can be a float
|
||||
reverse-scrolling = 1;
|
||||
format = "{volume}% {icon} {format_source}";
|
||||
format-bluetooth = "{volume}% {icon} {format_source}";
|
||||
format-bluetooth-muted = " {icon} {format_source}";
|
||||
format-muted = " {format_source}";
|
||||
format-source = "{volume}% ";
|
||||
format-source-muted = "";
|
||||
format-icons = {
|
||||
headphone = "";
|
||||
hands-free = "";
|
||||
headset = "";
|
||||
phone = "";
|
||||
portable = "";
|
||||
car = "";
|
||||
default = ["" "" ""];
|
||||
};
|
||||
on-click = "kitty --class pulsemixer -e pulsemixer";
|
||||
min-length = 13;
|
||||
};
|
||||
|
||||
"custom/mem" = {
|
||||
format = "{} ";
|
||||
interval = 3;
|
||||
exec = "free -h | awk '/Mem:/{printf $3}'";
|
||||
tooltip = false;
|
||||
};
|
||||
|
||||
"cpu" = {
|
||||
interval = 2;
|
||||
format = "{usage}% ";
|
||||
min-length = 6;
|
||||
};
|
||||
|
||||
"temperature" = {
|
||||
# thermal-zone = 2;
|
||||
# hwmon-path = "/sys/class/hwmon/hwmon2/temp1_input";
|
||||
critical-threshold = 80;
|
||||
# format-critical = "{temperatureC}°C {icon}";
|
||||
format = "{temperatureC}°C {icon}";
|
||||
format-icons = ["" "" "" "" ""];
|
||||
tooltip = false;
|
||||
};
|
||||
|
||||
"network" = {
|
||||
format = "{ifname}";
|
||||
format-wifi = "{essid} ({signalStrength}%) ";
|
||||
format-ethernet = "{ifname} ";
|
||||
format-disconnected = "";
|
||||
tooltip-format = "{ifname}";
|
||||
tooltip-format-wifi = "{essid} ({signalStrength}%) ";
|
||||
tooltip-format-ethernet = "{ifname} ";
|
||||
tooltip-format-disconnected = "Disconnected";
|
||||
max-length = 50;
|
||||
on-click = "kitty --class nmtui -e sh -c nmtui";
|
||||
};
|
||||
|
||||
"backlight" = {
|
||||
device = "intel_backlight";
|
||||
format = "{percent}% {icon}";
|
||||
format-icons = [""];
|
||||
min-length = 7;
|
||||
};
|
||||
|
||||
battery = {
|
||||
states = {
|
||||
warning = 30;
|
||||
critical = 15;
|
||||
};
|
||||
format = "{capacity}%";
|
||||
format-charging = "{capacity}% {time}";
|
||||
format-plugged = "{capacity}%";
|
||||
format-alt = "{time}";
|
||||
format-time = "{H}:{m}";
|
||||
};
|
||||
|
||||
mpris = {
|
||||
format = "{title}";
|
||||
format-len = "20";
|
||||
};
|
||||
|
||||
tray = {
|
||||
icon-size = 16;
|
||||
spacing = 0;
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
style = /*css*/
|
||||
''
|
||||
* {
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
/* `otf-font-awesome` is required to be installed for icons */
|
||||
font-family: JetBrains Mono;
|
||||
font-weight: bold;
|
||||
min-height: 20px;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
window#waybar.hidden {
|
||||
opacity: 0.2;
|
||||
}
|
||||
|
||||
#workspaces {
|
||||
margin-right: 8px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
background: #${colors.base00};
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
transition: none;
|
||||
color: #${colors.base04};
|
||||
background: transparent;
|
||||
padding: 5px;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
#workspaces button.persistent {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
|
||||
#workspaces button:hover {
|
||||
transition: none;
|
||||
box-shadow: inherit;
|
||||
text-shadow: inherit;
|
||||
border-radius: inherit;
|
||||
color: #${colors.base05};
|
||||
}
|
||||
|
||||
#workspaces button.active {
|
||||
background: #${colors.base02};
|
||||
color: #${colors.base05};
|
||||
border-radius: inherit;
|
||||
}
|
||||
|
||||
#taskbar {
|
||||
border-radius: 10px;
|
||||
color: #${colors.base05};
|
||||
background: #${colors.base00};
|
||||
}
|
||||
|
||||
#taskbar button {
|
||||
transition: none;
|
||||
background: transparent;
|
||||
border-radius: 10px;
|
||||
padding: 8px;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
#taskbar button:hover {
|
||||
transition: none;
|
||||
box-shadow: inherit;
|
||||
text-shadow: inherit;
|
||||
border-radius: inherit;
|
||||
background: #${colors.base02};
|
||||
}
|
||||
|
||||
#taskbar button.active {
|
||||
background: ${active_color};
|
||||
}
|
||||
|
||||
#language {
|
||||
padding: 8px 0px 8px 8px;
|
||||
border-radius: 10px 0px 0px 10px;
|
||||
transition: none;
|
||||
color: #${colors.base05};
|
||||
background: #${colors.base00};
|
||||
}
|
||||
|
||||
#keyboard-state {
|
||||
margin-right: 8px;
|
||||
padding: 8px 8px 8px 0px;
|
||||
border-radius: 0px 10px 10px 0px;
|
||||
transition: none;
|
||||
color: #${colors.base05};
|
||||
background: #${colors.base00};
|
||||
}
|
||||
|
||||
#custom-pacman {
|
||||
padding-left: 16px;
|
||||
padding-right: 8px;
|
||||
border-radius: 10px 0px 0px 10px;
|
||||
transition: none;
|
||||
color: #${colors.base05};
|
||||
background: #${colors.base00};
|
||||
}
|
||||
|
||||
#custom-mail {
|
||||
margin-right: 8px;
|
||||
padding-right: 16px;
|
||||
border-radius: 0px 10px 10px 0px;
|
||||
transition: none;
|
||||
color: #${colors.base05};
|
||||
background: #${colors.base00};
|
||||
}
|
||||
|
||||
#submap {
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
color: #${colors.base05};
|
||||
background: #${colors.base00};
|
||||
}
|
||||
|
||||
#clock {
|
||||
margin-right: 8px;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
color: #${colors.base05};
|
||||
background: #${colors.base00};
|
||||
}
|
||||
|
||||
#network {
|
||||
margin-right: 8px;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
color: #${colors.base05};
|
||||
background: #${colors.base00};
|
||||
}
|
||||
|
||||
#network.disconnected {
|
||||
color: #${colors.base00};
|
||||
background-color: #${colors.base08};
|
||||
}
|
||||
|
||||
#custom-weather {
|
||||
padding-right: 16px;
|
||||
border-radius: 0px 10px 10px 0px;
|
||||
transition: none;
|
||||
color: #${colors.base05};
|
||||
background: #${colors.base00};
|
||||
}
|
||||
|
||||
#pulseaudio {
|
||||
margin-right: 8px;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
color: #${colors.base05};
|
||||
background: #${colors.base00};
|
||||
}
|
||||
|
||||
#pulseaudio.muted {
|
||||
background-color: #${colors.base08};
|
||||
color: #${colors.base01};
|
||||
}
|
||||
|
||||
#custom-mem {
|
||||
margin-right: 8px;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
color: #${colors.base05};
|
||||
background: #${colors.base00};
|
||||
}
|
||||
|
||||
#cpu {
|
||||
margin-right: 8px;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
color: #${colors.base05};
|
||||
background: #${colors.base00};
|
||||
}
|
||||
|
||||
#temperature {
|
||||
margin-right: 8px;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
color: #${colors.base05};
|
||||
background: #${colors.base00};
|
||||
}
|
||||
|
||||
#temperature.critical {
|
||||
background-color: #${colors.base08};
|
||||
}
|
||||
|
||||
#backlight {
|
||||
margin-right: 8px;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
color: #${colors.base05};
|
||||
background: #${colors.base00};
|
||||
}
|
||||
|
||||
#battery {
|
||||
margin-right: 8px;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
color: #${colors.base05};
|
||||
background: #${colors.base00};
|
||||
}
|
||||
|
||||
#battery.charging {
|
||||
color: #${colors.base05};
|
||||
background-color: #${colors.base0B};
|
||||
}
|
||||
|
||||
#battery.warning:not(.charging) {
|
||||
background-color: #${colors.base09};
|
||||
color: black;
|
||||
}
|
||||
|
||||
#battery.critical:not(.charging) {
|
||||
background-color: #${colors.base08};
|
||||
color: #${colors.base05};
|
||||
animation-name: blink;
|
||||
animation-duration: 0.5s;
|
||||
animation-timing-function: linear;
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
|
||||
#tray {
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
border-radius: 10px;
|
||||
transition: none;
|
||||
color: #${colors.base05};
|
||||
background: #${colors.base00};
|
||||
}
|
||||
|
||||
#mpris{
|
||||
background: #${colors.base00};
|
||||
border-radius: 10px;
|
||||
color: #${colors.base05};
|
||||
padding: 0px 8px;
|
||||
margin: 0px 8px;
|
||||
}
|
||||
|
||||
#mpris.playing {
|
||||
background-color: #${colors.base0B};
|
||||
color: #${colors.base01};
|
||||
}
|
||||
|
||||
#mpris.paused {
|
||||
background-color: #${colors.base0A};
|
||||
color: #${colors.base01};
|
||||
}
|
||||
|
||||
@keyframes blink {
|
||||
to {
|
||||
background-color: #${colors.base05};
|
||||
color: #${colors.base00};
|
||||
}
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
{ pkgs, ... }: {
|
||||
imports = [
|
||||
../../modules/bundle.nix
|
||||
|
||||
../../packages/desktop.nix
|
||||
../../packages/art.nix
|
||||
|
||||
./modules/aagl.nix
|
||||
./modules/git.nix
|
||||
./modules/hyprland.nix
|
||||
./modules/style.nix
|
||||
./modules/waybar.nix
|
||||
];
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
home = {
|
||||
username = "chest";
|
||||
homeDirectory = "/home/chest";
|
||||
stateVersion = "23.11";
|
||||
|
||||
packages = with pkgs; [
|
||||
nautilus
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
let
|
||||
aagl-gtk-on-nix = import (
|
||||
builtins.fetchTarball {
|
||||
url = "https://github.com/ezKEa/aagl-gtk-on-nix/archive/main.tar.gz";
|
||||
sha256 = "14fnbcvmr1b8jkkjfbyarljwawgh3as9skdyvyc10b1nqh0641h0";
|
||||
}
|
||||
);
|
||||
in
|
||||
{
|
||||
home.packages = [ aagl-gtk-on-nix.the-honkers-railway-launcher ];
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "cheeest";
|
||||
userEmail = "a.e.sunduk@gmail.com";
|
||||
};
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
{ pkgs, config, lib, ... }: {
|
||||
stylix = {
|
||||
enable = true;
|
||||
targets = {
|
||||
hyprland.enable = false;
|
||||
waybar.enable = false;
|
||||
kitty.variant256Colors = true;
|
||||
};
|
||||
|
||||
base16Scheme = "${pkgs.base16-schemes}/share/themes/eris.yaml";
|
||||
polarity = "dark";
|
||||
|
||||
image = pkgs.fetchurl {
|
||||
url = "https://w.wallhaven.cc/full/kx/wallhaven-kxedr7.jpg";
|
||||
sha256 = "0ypqnq7bsr2giq7nq1c3xrw2m0gkii9j5zhfp512r93wc96zvm50";
|
||||
};
|
||||
|
||||
fonts = {
|
||||
monospace = {
|
||||
name = "JetBrains Mono";
|
||||
package = pkgs.jetbrains-mono;
|
||||
};
|
||||
|
||||
sizes = {
|
||||
applications = 13;
|
||||
desktop = 12;
|
||||
};
|
||||
};
|
||||
|
||||
opacity = {
|
||||
popups = .8;
|
||||
terminal = .5;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
{ pkgs, config, ... }: {
|
||||
imports = [(
|
||||
import ../../../patterns/waybar.nix {
|
||||
inherit pkgs;
|
||||
inherit config;
|
||||
active_color = "#d197d9";
|
||||
}
|
||||
)];
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
{ pkgs, ... }: {
|
||||
imports = [
|
||||
../../modules/bundle.nix
|
||||
../../modules/hyprlock.nix
|
||||
|
||||
../../packages/coding.nix
|
||||
../../packages/desktop.nix
|
||||
../../packages/utils.nix
|
||||
../../packages/art.nix
|
||||
|
||||
./modules/git.nix
|
||||
./modules/hyprland.nix
|
||||
./modules/style.nix
|
||||
./modules/waybar.nix
|
||||
];
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
home = {
|
||||
username = "sweetbread";
|
||||
homeDirectory = "/home/sweetbread";
|
||||
stateVersion = "23.11";
|
||||
};
|
||||
|
||||
services.syncthing.enable = true;
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "Sweetbread";
|
||||
userEmail = "sweetbread@coders-squad.com";
|
||||
};
|
||||
}
|
||||
@@ -1,97 +0,0 @@
|
||||
{ pkgs, lib, config, inputs, ... }: {
|
||||
imports = [(
|
||||
import ../../../patterns/hyprland.nix {
|
||||
inherit lib;
|
||||
inherit pkgs;
|
||||
inherit config;
|
||||
inherit inputs;
|
||||
collection = "sweetbread/1764377";
|
||||
swww_flags = "--transition-type center";
|
||||
}
|
||||
)];
|
||||
|
||||
wayland.windowManager.hyprland = let
|
||||
colors = config.lib.stylix.colors;
|
||||
in {
|
||||
settings = {
|
||||
monitor = [
|
||||
"DP-3, 3440x1440@165.00Hz, auto-right, 1"
|
||||
# "HDMI-A-1, 3840x2160@60.00Hz, auto-left, 2"
|
||||
"HDMI-A-1, disabled"
|
||||
",preferred,auto,1"
|
||||
];
|
||||
|
||||
general = {
|
||||
gaps_in = 5;
|
||||
gaps_out = 20;
|
||||
border_size = 3;
|
||||
"col.active_border" = "rgba(${colors.base0C}ee) rgba(${colors.base0B}ee) 45deg";
|
||||
"col.inactive_border" = "rgba(${colors.base05}aa)";
|
||||
|
||||
layout = "dwindle";
|
||||
};
|
||||
|
||||
decoration = {
|
||||
rounding = 10;
|
||||
|
||||
blur = {
|
||||
enabled = true;
|
||||
size = 16;
|
||||
passes = 2;
|
||||
new_optimizations = true;
|
||||
};
|
||||
|
||||
shadow = {
|
||||
enabled = true;
|
||||
range = 4;
|
||||
render_power = 3;
|
||||
color = "rgba(1a1a1aee)";
|
||||
};
|
||||
};
|
||||
|
||||
animations = {
|
||||
enabled = true;
|
||||
|
||||
bezier = "myBezier, 0.05, 0.9, 0.1, 1.05";
|
||||
|
||||
animation = [
|
||||
"windows, 1, 7, myBezier"
|
||||
"windowsOut, 1, 7, default, popin 80%"
|
||||
"border, 1, 10, default"
|
||||
"borderangle, 1, 8, default"
|
||||
"fade, 1, 7, default"
|
||||
"workspaces, 1, 6, default"
|
||||
];
|
||||
};
|
||||
|
||||
dwindle = {
|
||||
pseudotile = true;
|
||||
smart_split = true;
|
||||
};
|
||||
|
||||
master.new_status = "master";
|
||||
|
||||
gestures = {
|
||||
workspace_swipe = true;
|
||||
workspace_swipe_fingers = 3;
|
||||
workspace_swipe_invert = true;
|
||||
workspace_swipe_distance = 200;
|
||||
workspace_swipe_forever = true;
|
||||
};
|
||||
|
||||
misc = {
|
||||
animate_manual_resizes = true;
|
||||
animate_mouse_windowdragging = true;
|
||||
enable_swallow = true;
|
||||
render_ahead_of_time = false;
|
||||
disable_hyprland_logo = false;
|
||||
};
|
||||
|
||||
bind = [
|
||||
" , Print, exec, grimblast --notify --freeze copy output"
|
||||
"CTRL, Print, exec, grimblast --notify --freeze copy area"
|
||||
"ALT , Print, exec, grimblast --notify --freeze copy active"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
{ pkgs, config, lib, ... }: {
|
||||
stylix = {
|
||||
enable = true;
|
||||
targets = {
|
||||
hyprland.enable = false;
|
||||
waybar.enable = false;
|
||||
kitty.variant256Colors = true;
|
||||
};
|
||||
|
||||
base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml";
|
||||
polarity = "dark";
|
||||
|
||||
image = pkgs.fetchurl {
|
||||
url = "https://w.wallhaven.cc/full/kx/wallhaven-kxedr7.jpg";
|
||||
sha256 = "0ypqnq7bsr2giq7nq1c3xrw2m0gkii9j5zhfp512r93wc96zvm50";
|
||||
};
|
||||
|
||||
fonts = {
|
||||
monospace = {
|
||||
name = "JetBrains Mono";
|
||||
package = pkgs.jetbrains-mono;
|
||||
};
|
||||
|
||||
serif = {
|
||||
name = "Gabriela";
|
||||
package = (pkgs.google-fonts.override { fonts = [ "Gabriela" ]; });
|
||||
};
|
||||
|
||||
sizes = {
|
||||
applications = 13;
|
||||
desktop = 12;
|
||||
};
|
||||
};
|
||||
|
||||
opacity = {
|
||||
popups = .8;
|
||||
terminal = .75;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
{ pkgs, config, ... }: {
|
||||
imports = [(
|
||||
import ../../../patterns/waybar.nix {
|
||||
inherit pkgs;
|
||||
inherit config;
|
||||
active_color = "#${config.lib.stylix.colors.base0B}";
|
||||
}
|
||||
)];
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
{ config, pkgs, pkgs-stable, pkgs-pinned, lib, inputs, ... }: {
|
||||
imports = [
|
||||
./secrets/secrets.nix
|
||||
./modules/aagl.nix
|
||||
./modules/grub.nix
|
||||
./modules/zram.nix
|
||||
../modules/gpu/nvidia.nix
|
||||
|
||||
(import ../modules/common.nix {
|
||||
inherit lib;
|
||||
inherit inputs;
|
||||
hostname = "Eclipse";
|
||||
})
|
||||
|
||||
(import ../../user/common.nix {
|
||||
inherit config;
|
||||
inherit pkgs;
|
||||
inherit pkgs-stable;
|
||||
inherit pkgs-pinned;
|
||||
inherit lib;
|
||||
inherit inputs;
|
||||
name = "chest";
|
||||
})
|
||||
];
|
||||
|
||||
nixpkgs.config.allowBroken = true;
|
||||
programs.gamemode.enable = true;
|
||||
services.printing.enable = true;
|
||||
virtualisation.virtualbox.host.enable = true;
|
||||
users.extraGroups.vboxusers.members = [ "chest" ];
|
||||
}
|
||||
+19
-11
@@ -13,21 +13,27 @@
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/34e32809-6876-4361-95d8-70a479ea8e19";
|
||||
fsType = "ext4";
|
||||
};
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-label/NixOS";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/2B65-0D2E";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-partlabel/EFI\\x20system\\x20partition";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" "nofail" ];
|
||||
};
|
||||
|
||||
fileSystems."/mnt/D" = {
|
||||
fileSystems."/mnt/D" = {
|
||||
device = "/dev/disk/by-uuid/E030A4DF30A4BDC2";
|
||||
fsType = "ntfs";
|
||||
options = ["umask=0022" "gid=100" "uid=1002"];
|
||||
options = ["umask=0022" "gid=100" "uid=1000" "nofail" ];
|
||||
};
|
||||
|
||||
fileSystems."/mnt/F" = {
|
||||
device = "/dev/disk/by-uuid/1C6278FC2848E1EF";
|
||||
fsType = "ntfs";
|
||||
options = ["umask=0022" "gid=100" "uid=1000" "nofail" ];
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
@@ -41,4 +47,6 @@
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
boot.loader.grub.useOSProber = true;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
{ inputs, ... }: {
|
||||
imports = [ inputs.aagl.nixosModules.default ];
|
||||
nix.settings = inputs.aagl.nixConfig; # Set up Cachix
|
||||
programs.honkers-railway-launcher.enable = true;
|
||||
programs.sleepy-launcher.enable = true;
|
||||
programs.anime-game-launcher.enable = true;
|
||||
networking.hosts."0.0.0.0" = [
|
||||
"overseauspider.yuanshen.com"
|
||||
"log-upload-os.hoyoverse.com"
|
||||
"log-upload-os.mihoyo.com"
|
||||
"dump.gamesafe.qq.com"
|
||||
|
||||
"apm-log-upload-os.hoyoverse.com"
|
||||
"zzz-log-upload-os.hoyoverse.com"
|
||||
|
||||
"log-upload.mihoyo.com"
|
||||
"devlog-upload.mihoyo.com"
|
||||
"uspider.yuanshen.com"
|
||||
"sg-public-data-api.hoyoverse.com"
|
||||
"hkrpg-log-upload-os.hoyoverse.com"
|
||||
"public-data-api.mihoyo.com"
|
||||
|
||||
"prd-lender.cdp.internal.unity3d.com"
|
||||
"thind-prd-knob.data.ie.unity3d.com"
|
||||
"thind-gke-usc.prd.data.corp.unity3d.com"
|
||||
"cdp.cloud.unity3d.com"
|
||||
"remote-config-proxy-prd.uca.cloud.unity3d.com"
|
||||
|
||||
"pc.crashsight.wetest.net"
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
{ pkgs, lib, ... }: {
|
||||
wayland.windowManager.hyprland = let
|
||||
wallpaper = pkgs.fetchurl {
|
||||
name = "miku_wallpaper.jpg";
|
||||
url = "https://c.lair.moe/pub/miku_wallpaper.jpeg?raw";
|
||||
hash = "sha256-inK4X5KzQk5FHwDw2DYy43nm7XtXlC6I0S1PkYUv+3w=";
|
||||
};
|
||||
in {
|
||||
settings = {
|
||||
monitor = [
|
||||
"DP-3 , 1920x1080@165, 0x0 , 1"
|
||||
"HDMI-A-1, preferred , -1080x0, 1, transform, 1"
|
||||
];
|
||||
|
||||
workspace = [
|
||||
"1, monitor:DP-3, default:true"
|
||||
"10, monitor:HDMI-A-1, default:true"
|
||||
];
|
||||
|
||||
exec-once = [
|
||||
"hyprctl dispatch workspace 1"
|
||||
"${lib.getExe pkgs.swww} img -o HDMI-A-1 ${wallpaper}"
|
||||
"${lib.getExe pkgs.linux-wallpaperengine} ~/.local/share/wpe/wallpaper --assets-dir ~/.local/share/wpe/assets --screen-root DP-3 --noautomute"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
zramSwap = {
|
||||
enable = true;
|
||||
algorithm = "lz4";
|
||||
memoryPercent = 100;
|
||||
memoryPercent = 125;
|
||||
priority = 999;
|
||||
};
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,29 @@
|
||||
{ config, pkgs, pkgs-stable, pkgs-pinned, lib, inputs, ... }: {
|
||||
imports = [
|
||||
./secrets/secrets.nix
|
||||
./modules/grub.nix
|
||||
../modules/gpu/intel.nix
|
||||
|
||||
(import ../modules/common.nix {
|
||||
inherit lib;
|
||||
inherit inputs;
|
||||
hostname = "Impreza";
|
||||
})
|
||||
|
||||
(import ../../user/common.nix {
|
||||
inherit config;
|
||||
inherit pkgs;
|
||||
inherit pkgs-stable;
|
||||
inherit pkgs-pinned;
|
||||
inherit lib;
|
||||
inherit inputs;
|
||||
name = "chest";
|
||||
})
|
||||
];
|
||||
|
||||
nix.settings.cores = 3;
|
||||
nixpkgs.config.allowBroken = true;
|
||||
programs.gamemode.enable = true;
|
||||
hardware.bluetooth.enable = true;
|
||||
host.laptop = true;
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "usbhid" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-label/NixOS";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-label/EFI";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" "nofail" ];
|
||||
};
|
||||
|
||||
fileSystems."/mnt/Windows" = {
|
||||
device = "/dev/disk/by-label/Windows";
|
||||
fsType = "ntfs";
|
||||
options = [ "umask=0022" "gid=100" "uid=1000" "nofail" ];
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
|
||||
boot.loader.grub.useOSProber = true;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{ pkgs, ... }: let
|
||||
theme = pkgs.fetchFromGitHub {
|
||||
owner = "OliveThePuffin";
|
||||
repo = "yorha-grub-theme";
|
||||
rev = "4d9cd37baf56c4f5510cc4ff61be278f11077c81";
|
||||
hash = "sha256-XVzYDwJM7Q9DvdF4ZOqayjiYpasUeMhAWWcXtnhJ0WQ=";
|
||||
};
|
||||
in {
|
||||
boot.loader.grub = {
|
||||
gfxmodeEfi = "1920x1080";
|
||||
theme = "${theme}/yorha-1920x1080";
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{ pkgs, lib, ... }: {
|
||||
wayland.windowManager.hyprland = let
|
||||
wallpaper = pkgs.fetchurl {
|
||||
name = "miku_wallpaper.jpg";
|
||||
url = "https://c.lair.moe/pub/miku_wallpaper.jpeg?raw";
|
||||
hash = "sha256-inK4X5KzQk5FHwDw2DYy43nm7XtXlC6I0S1PkYUv+3w=";
|
||||
};
|
||||
in {
|
||||
settings = {
|
||||
exec-once = [
|
||||
"${lib.getExe pkgs.swww} img -o eDP-1 ${wallpaper}"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
../Eclipse/secrets
|
||||
@@ -0,0 +1,49 @@
|
||||
ThinkPad T480
|
||||
|
||||
CPU: Intel i5-8350U
|
||||
RAM: 16GB planned (8GB stock + 8GB SO-DIMM)
|
||||
SSD: 256GB NVMe stock; disko assumes `/dev/nvme0n1`
|
||||
|
||||
## Installation notes
|
||||
|
||||
This host uses `disko` with GPT + unencrypted EFI System Partition + LUKS + Btrfs subvolumes.
|
||||
|
||||
Before formatting, verify the target disk:
|
||||
|
||||
```bash
|
||||
lsblk
|
||||
```
|
||||
|
||||
If the internal drive is not `/dev/nvme0n1`, edit `host/Inaho/disko.nix` first.
|
||||
For a 2.5" SATA SSD/HDD it will usually be `/dev/sda`.
|
||||
|
||||
Then partition, format and mount:
|
||||
|
||||
```bash
|
||||
sudo nix --experimental-features "nix-command flakes" run github:nix-community/disko/latest -- \
|
||||
--mode destroy,format,mount ./host/Inaho/disko.nix
|
||||
```
|
||||
|
||||
This destroys the selected disk.
|
||||
|
||||
After that install the host:
|
||||
|
||||
```bash
|
||||
sudo nixos-install --flake .#Inaho
|
||||
```
|
||||
|
||||
The flake contains a new `disko` input. If `flake.lock` has not been updated yet, run:
|
||||
|
||||
```bash
|
||||
nix flake lock --update-input disko
|
||||
```
|
||||
|
||||
## After first boot
|
||||
|
||||
Update firmware, especially BIOS/UEFI and Thunderbolt, when batteries are installed and charged:
|
||||
|
||||
```bash
|
||||
sudo fwupdmgr refresh
|
||||
sudo fwupdmgr get-updates
|
||||
sudo fwupdmgr update
|
||||
```
|
||||
@@ -0,0 +1,42 @@
|
||||
{ config, pkgs, pkgs-stable, pkgs-pinned, lib, inputs, ... }: {
|
||||
imports = [
|
||||
inputs.disko.nixosModules.disko
|
||||
./disko.nix
|
||||
./secrets/secrets.nix
|
||||
./modules/grub.nix
|
||||
./modules/syncthing.nix
|
||||
../modules/thinkpad.nix
|
||||
../modules/gpu/intel.nix
|
||||
|
||||
(import ../modules/common.nix {
|
||||
inherit lib;
|
||||
inherit inputs;
|
||||
hostname = "Inaho";
|
||||
})
|
||||
|
||||
(import ../../user/common.nix {
|
||||
inherit config;
|
||||
inherit pkgs;
|
||||
inherit pkgs-stable;
|
||||
inherit pkgs-pinned;
|
||||
inherit lib;
|
||||
inherit inputs;
|
||||
name = "sweetbread";
|
||||
fullname = "Sweet Bread";
|
||||
})
|
||||
];
|
||||
|
||||
hardware.bluetooth.enable = true;
|
||||
host.laptop = true;
|
||||
|
||||
hardware.usb-modeswitch.enable = true;
|
||||
networking.modemmanager.enable = true;
|
||||
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
gamescopeSession.enable = true;
|
||||
};
|
||||
environment.systemPackages = with pkgs; [
|
||||
pkgs-stable.bottles
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
{ lib, ... }:
|
||||
|
||||
let
|
||||
# Verify with `lsblk` before running disko. For the stock T480 NVMe setup
|
||||
# this is usually correct; for a 2.5" SATA SSD/HDD change it to /dev/sda.
|
||||
disk = "/dev/sda";
|
||||
|
||||
btrfsMountOptions = [
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
"ssd"
|
||||
"discard=async"
|
||||
];
|
||||
in {
|
||||
disko.devices = {
|
||||
disk = {
|
||||
main = {
|
||||
type = "disk";
|
||||
device = disk;
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
priority = 1;
|
||||
name = "ESP";
|
||||
start = "1M";
|
||||
size = "512M";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [ "umask=0077" ];
|
||||
};
|
||||
};
|
||||
|
||||
luks = {
|
||||
priority = 2;
|
||||
name = "cryptsystem";
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "luks";
|
||||
name = "crypted";
|
||||
settings = {
|
||||
# Allows fstrim/discard through LUKS for SSDs.
|
||||
allowDiscards = true;
|
||||
};
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = [ "-f" "-L" "NixOS" ];
|
||||
subvolumes = {
|
||||
"/root" = {
|
||||
mountpoint = "/";
|
||||
mountOptions = btrfsMountOptions;
|
||||
};
|
||||
|
||||
"/home" = {
|
||||
mountpoint = "/home";
|
||||
mountOptions = btrfsMountOptions;
|
||||
};
|
||||
|
||||
"/nix" = {
|
||||
mountpoint = "/nix";
|
||||
mountOptions = btrfsMountOptions;
|
||||
};
|
||||
|
||||
"/log" = {
|
||||
mountpoint = "/var/log";
|
||||
mountOptions = btrfsMountOptions;
|
||||
};
|
||||
|
||||
"/swap" = {
|
||||
mountpoint = "/.swapvol";
|
||||
swap.swapfile.size = "16G";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
# File systems and swap are declared in ./disko.nix.
|
||||
# If you regenerate this file after installation, use:
|
||||
# nixos-generate-config --no-filesystems --root /mnt
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" "rtsx_pci_sdmmc" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" "thinkpad_acpi" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{ pkgs, ... }: let
|
||||
theme = pkgs.fetchFromGitHub {
|
||||
owner = "Patato777";
|
||||
repo = "dotfiles";
|
||||
rev = "cc363921707807d7ad3e36b462f0df793a0fe18a";
|
||||
hash = "sha256-fpXGFNrzbV6K9hoZRX4tGieTLzhpPeGm6wn8CF4OGow=";
|
||||
};
|
||||
in {
|
||||
boot.loader.grub = {
|
||||
gfxmodeEfi = "1920x1080";
|
||||
theme = "${theme}/grub/themes/virtuaverse";
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
wayland.windowManager.hyprland = {
|
||||
settings = {
|
||||
monitor = [
|
||||
"eDP-1, 1920x1080@60, 0x0, 1"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
{ config, ... }: {
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
openDefaultPorts = true;
|
||||
|
||||
user = "sweetbread";
|
||||
dataDir = "/home/sweetbread/.config/syncthing";
|
||||
|
||||
key = config.sops.secrets.syncthing_key.path;
|
||||
cert = config.sops.secrets.syncthing_cert.path;
|
||||
|
||||
settings = {
|
||||
devices = {
|
||||
Rias.id = "EC5AGVN-2RKJDHN-NOSB7PQ-IRYCEEW-NPPDUGX-6QGSLUU-YIT5ZZZ-RVPTHQ6";
|
||||
Akeno.id = "QDW3WJX-J7ETS4R-32CUAIY-EGNM2RD-ZEHOUW2-CHOEOUG-USZOWTR-HHQS2QX";
|
||||
Koneko.id = "PJFWQRY-ZFUBGDR-NV7KVBL-UBDQ4HT-KPTYP34-MUDFPJU-4EZUHTT-ZLYRMAB";
|
||||
};
|
||||
|
||||
folders = {
|
||||
"Music" = {
|
||||
path = "/home/sweetbread/Music";
|
||||
devices = [ "Rias" "Akeno" "Koneko" ];
|
||||
};
|
||||
|
||||
"Obsidian" = {
|
||||
path = "/home/sweetbread/Documents/Obsidian";
|
||||
devices = [ "Rias" "Akeno" "Koneko" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.syncthing.environment.STNODEFAULTFOLDER = "true";
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
sops = {
|
||||
age.keyFile = "/root/age.key";
|
||||
secrets = {
|
||||
vpn_bolt = {
|
||||
format = "binary";
|
||||
sopsFile = ../../Rias/secrets/vpn_bolt.db;
|
||||
};
|
||||
|
||||
syncthing_cert = {
|
||||
format = "binary";
|
||||
sopsFile = ./syncthing_cert.pem;
|
||||
};
|
||||
syncthing_key = {
|
||||
format = "binary";
|
||||
sopsFile = ./syncthing_key.pem;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"data": "ENC[AES256_GCM,data:rMr83F9VyGV5dp2XqXGAh3X2sCczUb0chH/2Hn9N9tijfRsOLGqHuy/zy29aOHR0PJ4euTU3bhmxWrBV/7oTnnEfI7DFF0vX4eBDaK8BzwAzrzXHYJOAgcwuYSqEEyWiLvTGABuLhTEto9kIMLxVIssa679s7zQSRwemVJSA3fEdtYD0BLAiO/ZtiAEmitgEt4EBRp9DhJPqlh2YfMmP6DpkDSy0hk+S+0NZg7eyrp7fivldiLzjsYDwCsugFcZQtWOqLMHY0kYhou8c2CKXu8UyqVVx24DyWfBfD1TH2pOk1ZsXFsxhFFKp5wcsfi0xDF1BG4hANcHVa6pR6y5JxNzh53xaH3NuvNJFEQSGJw5fNMuCrDnkYLDpU3xezzjvvxI01y7i2A00zsLli1fc9HA67ZlP1OBzsI7FyMgZlnOXQpbqnkj+kZdYAdOTjjMzQvrPusVS3RvqvcWj1qZtnHa1ZGmWh7xG0J10lQB4uDmTSxWoUUi7VmLXTC16HQNMySd8GbFmD/4Nj+/SxDShgsiug7L4hICjPC8Isosy99tE2wRXpjmMYUdlD7zu/vyEMxVPhkWnJyZZPXG+DjGBc/Diaw4ufYNxUs4yIRDceMArirubt/sN/eUoGOBGVWxvGm0/olTott7Yr+YKRSrDyWo9SWCz1qgz/ydpXm+xE7bPtbj9eAObZwneB/0tZTyo8o1WKd9yUST89m91EMQ31R97yCBwDW19VftWVCZH2w+QHNunih4ZUNiALQS745T2petbvc63iNiZswu0l3qoVM8x3y1RhAPLbsZpwQWSca307iDfBTB6uVW4HwLtL30=,iv:ajC3mjCYKUqS7XGIN64NiJoG6wHMvGdcHhazSO860ms=,tag:31fWG7m2neW2Pft9TjmBGg==,type:str]",
|
||||
"sops": {
|
||||
"age": [
|
||||
{
|
||||
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBuQUNTSDVIeDRuMmtTWXZD\nU0x4OVJrUStFeW5QV0pOZ2hEZnJZQ09UbW5RCmwxbjhuWis1Q3BCTGtOdS8zNE0w\nL0pDK3dBY1hxZ2dCNG96RlA0dkNWVWMKLS0tIHFld2hUdm11dk5hT2ZtRXpId0VG\nRDM0L05jS0lGcnJBYWVNWElIazdlaUEKugvBGcCzYTZL6aC6mI6GCzhiPFYql75z\nSBfalDmqSVU2k1IBqsNHIYSxzOXwUiGS3MSHJUCf7M2y9X3dHJGeyw==\n-----END AGE ENCRYPTED FILE-----\n",
|
||||
"recipient": "age1j3uuyax673fvl5x4dveupq3dylngnrq0e5uy7fmclsexkfd25vysk646wk"
|
||||
}
|
||||
],
|
||||
"lastmodified": "2026-07-21T20:27:59Z",
|
||||
"mac": "ENC[AES256_GCM,data:lYZH1f3TyvcgqWI9hVOP3l2xImRh+LL0volXVUYSdGBnQTsAJfzMdsol/SsETwNNn+KrANC3ucO0/MXOWDK7ZPJ5Oq9R+OQnM8LK9/5mNfbzgodTw0RaH8FsrrtBCtHn3H2rlrBoPFEArblWKOh0G9iyrmufT09OREGt/G0tE5o=,iv:vmB1CY3sVajvLS8zAS/0I+NgnAOStbUkzQdw6XY45y4=,tag:mZP/eZVn+DJq+OT1ghtOkQ==,type:str]",
|
||||
"version": "3.13.2"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"data": "ENC[AES256_GCM,data:2nMwCxU1y0zE5VtnmEf3lT4XyI9e8dokPkipo3TXpxuRJZ9OXCOb0n4pHb4Xx9OlDgAeW2UX70cR1Wtj7QPQx9h/HYZTmUeIP4rvlTPhaxs/2F33ud1lPKceV2DK2q8G/EvPLnlCcLWMvy6BVsqBlNmjAzNonWI=,iv:7H0o0i3zp7K2demt1O2Pw4BNt+2q4PhHBw1K/jC7OH4=,tag:Bx82eo5kQqwlb6egYmopgQ==,type:str]",
|
||||
"sops": {
|
||||
"age": [
|
||||
{
|
||||
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSA2Vzl3M3pFblY5SmRQRUtI\nNWFCbWZJQTJTOWFHdTd1YkJEbXFGOFhBTUNNClBKdWhGdmh3Q2dUNkpMUUU3Zmdq\nUFd1M2twNW1KRGErRHUvc1BLY2pMT3MKLS0tIElVZ0RVVFQrb1FuYnJ0OU44RWZK\nbnpJZnFLR3kzV3VRaytQRDMrYkg5S2sKkr97EwJmtcIsRYH4di+tadTWnWzuCDa9\ngY+CKCVEPUgD1AXSgCwCP2AVd/zaKUbm6d6UA2QzZyqGsRim56WFsQ==\n-----END AGE ENCRYPTED FILE-----\n",
|
||||
"recipient": "age1j3uuyax673fvl5x4dveupq3dylngnrq0e5uy7fmclsexkfd25vysk646wk"
|
||||
}
|
||||
],
|
||||
"lastmodified": "2026-07-21T20:28:23Z",
|
||||
"mac": "ENC[AES256_GCM,data:ohYjzIYDilW7lsmZFZXpF629yevO2p8laA7Zl0+NCvZ8dB4nthLUePsnLTYCrEo5ADbboM5Cka11FiYbmB1IMR4mEdRwTN37EsQtyYLZbZ+j4XPsuXO0UT0NmWWiFNJlQEWfTVbhaZRDQXcPpVvm+6qQfRub018/0C59oWpmbyA=,iv:SX1QDDUWZyxE0zODAImcGGHJI7KGKYx9/6Q9F+9SVCQ=,tag:AExTZIfAKTCeU9c3Qj+IUw==,type:str]",
|
||||
"version": "3.13.2"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
My desktop
|
||||
|
||||
- **CPU:** Intel i5-10600KF
|
||||
- **GPU:** NVidia GeForce RTX 3060 Ti
|
||||
- **RAM:** 32GB
|
||||
- **SSD:** 512GB
|
||||
- **HDD:** 1TB
|
||||
@@ -0,0 +1,33 @@
|
||||
{ config, pkgs, pkgs-stable, pkgs-pinned, lib, inputs, ... }: {
|
||||
imports = [
|
||||
./secrets/secrets.nix
|
||||
./modules/grub.nix
|
||||
./modules/syncthing.nix
|
||||
./modules/rgb.nix
|
||||
../modules/gpu/nvidia.nix
|
||||
|
||||
(import ../modules/common.nix {
|
||||
inherit lib;
|
||||
inherit inputs;
|
||||
hostname = "Rias";
|
||||
})
|
||||
|
||||
(import ../../user/common.nix {
|
||||
inherit config;
|
||||
inherit pkgs;
|
||||
inherit pkgs-stable;
|
||||
inherit pkgs-pinned;
|
||||
inherit lib;
|
||||
inherit inputs;
|
||||
name = "sweetbread";
|
||||
fullname = "Sweet Bread";
|
||||
})
|
||||
];
|
||||
|
||||
programs.gamemode.enable = true;
|
||||
services.printing.enable = true;
|
||||
hardware.opentabletdriver.enable = true;
|
||||
|
||||
environment.systemPackages = [ pkgs.android-tools ];
|
||||
users.users.sweetbread.extraGroups = [ "kvm" ];
|
||||
}
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
fileSystems."/mnt/D" = {
|
||||
device = "/dev/disk/by-label/Data";
|
||||
fsType = "ntfs";
|
||||
fsType = "ntfs3";
|
||||
options = ["umask=0022" "gid=100" "uid=1000" "nofail" ];
|
||||
};
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
{ pkgs, lib, ...}: {
|
||||
wayland.windowManager.hyprland = let
|
||||
monitor-switcher = pkgs.writers.writeBashBin "monitor_switcher" /*bash*/ ''
|
||||
MODE=$1
|
||||
|
||||
case $MODE in
|
||||
"tv")
|
||||
hyprctl keyword monitor "DP-3, 1920x1080@60, 3840x0, 1"
|
||||
hyprctl keyword monitor "HDMI-A-1, 3840x2160@60, 0x0, 1"
|
||||
notify-send "TV mode"
|
||||
;;
|
||||
|
||||
"mirror")
|
||||
hyprctl keyword monitor "HDMI-A-1, 3840x2160@60, 0x0, 1"
|
||||
hyprctl keyword monitor "DP-3, preferred, auto, 1, mirror, HDMI-A-1"
|
||||
notify-send "TV-only mode"
|
||||
;;
|
||||
|
||||
"display"|*)
|
||||
hyprctl keyword monitor "HDMI-A-1, disable"
|
||||
hyprctl keyword monitor "DP-3, 3440x1440@165, 0x0, 1"
|
||||
notify-send "Display mode"
|
||||
;;
|
||||
|
||||
esac
|
||||
'';
|
||||
in {
|
||||
settings = {
|
||||
monitor = [
|
||||
"DP-3, 3440x1440@165, auto-right, 1"
|
||||
# "HDMI-A-1, 3840x2160@60, auto-left, 2"
|
||||
"HDMI-A-1, disabled"
|
||||
];
|
||||
|
||||
bind = [
|
||||
'', XF86Calculator, exec, ghostty --title=pulsemixer -e pulsemixer''
|
||||
|
||||
''$mainMod, F1, exec, ${lib.getExe monitor-switcher} tv''
|
||||
''$mainMod, F2, exec, ${lib.getExe monitor-switcher} mirror''
|
||||
''$mainMod, F3, exec, ${lib.getExe monitor-switcher}''
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{ pkgs, ... }:{
|
||||
services.hardware.openrgb = {
|
||||
enable = true;
|
||||
package = pkgs.openrgb-with-all-plugins;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
openrgb-with-all-plugins
|
||||
i2c-tools
|
||||
pciutils
|
||||
];
|
||||
|
||||
hardware.i2c.enable = true;
|
||||
boot.kernelModules = [ "i2c-dev" ];
|
||||
|
||||
users.groups.i2c.members = [ "sweetbread" ];
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
{ config, ... }: {
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
openDefaultPorts = true;
|
||||
|
||||
user = "sweetbread";
|
||||
dataDir = "/home/sweetbread/.config/syncthing";
|
||||
|
||||
key = config.sops.secrets.syncthing_key.path;
|
||||
cert = config.sops.secrets.syncthing_cert.path;
|
||||
|
||||
settings = {
|
||||
devices = {
|
||||
Akeno = { id = "QDW3WJX-J7ETS4R-32CUAIY-EGNM2RD-ZEHOUW2-CHOEOUG-USZOWTR-HHQS2QX"; };
|
||||
Koneko = { id = "PJFWQRY-ZFUBGDR-NV7KVBL-UBDQ4HT-KPTYP34-MUDFPJU-4EZUHTT-ZLYRMAB"; };
|
||||
};
|
||||
|
||||
folders = {
|
||||
"Books" = {
|
||||
path = "/mnt/D/SyncThing/Books";
|
||||
devices = [ "Akeno" "Koneko" ];
|
||||
};
|
||||
|
||||
".RPI" = {
|
||||
path = "/mnt/D/SyncThing/.RPI";
|
||||
devices = [ "Akeno" "Koneko" ];
|
||||
};
|
||||
|
||||
"JoiPlay" = {
|
||||
path = "/mnt/D/SyncThing/JoiPlay";
|
||||
devices = [ "Akeno" ];
|
||||
};
|
||||
|
||||
"Music" = {
|
||||
path = "/home/sweetbread/Music";
|
||||
devices = [ "Akeno" "Koneko" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.syncthing.environment.STNODEFAULTFOLDER = "true";
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
sops = {
|
||||
age.keyFile = "/root/age.key";
|
||||
secrets = {
|
||||
vpn_bolt = {
|
||||
format = "binary";
|
||||
sopsFile = ./vpn_bolt.db;
|
||||
};
|
||||
|
||||
syncthing_cert = {
|
||||
format = "binary";
|
||||
sopsFile = ./syncthing_cert.pem;
|
||||
};
|
||||
syncthing_key = {
|
||||
format = "binary";
|
||||
sopsFile = ./syncthing_key.pem;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"data": "ENC[AES256_GCM,data:FrQVoWDaUZUh8OfSjJ4f1TsPutY6PyMTIPYgWfG1wg/t8orJC52QsoZEabj46tIcLDSJaGSETf3lvCXnmesFAeqUuMK4axAcqPSBRd+kSoCSg/KzHdkQD5C4JiYWUWdIdvMYMUz086mFiHSyyzvbPYCAKrWYtQsQcJPEYmuvQl/0vFPjquR9Mla+/89MXebWBSGys43PKzQUfWjgrLmR7v2ac7lbRxnhBNP/eGayM4auzZVCtLV0UBs3TS5GTPSKAcQeAmmHbzdRJg8vVM1deKv9s/Tjy3ygRthqjCuVF2xcLetb2SDhYKMcgZRXT+AtnEyiV72wxqaExtWsUjJvR8b7COsFpBWbXT+AY+FkSKaGz00DaXncBKSP/zmiUYyaMplvQESFlIpduzF/DRuyQrq+KAwnJZql0rlvfzcEYgQKJENeQwHAq8Itu+HcHzmCEbY4d+LvEznEwlQ6eL6y3tNzoWzfhRQUz4Ki+54DPLGlGtOe9dTM8cWHtl/mZniNzY6FXNiEqbHrepzq7WEXSPi69Hj2OfdvSTQX4HMnp5Tw0i95zhfHDmzp62Kr6YLj0KYZsj6gsC3/6SYB0YNn5pMo1IpBonJxyKeAUz9NvrMcy1/7z/h9OOejPPM3xm48XJ4/7mMhOyB13VPYMZZMUajqUgu2qdGgDxl+DY140LAoQ8bRs3wvTwCwZuCA9Fj4gtn4+04EIil+lPjwEYH/2VIX4MmhxlyxZ2ECAqWf9LJgRy+3asvE8qPxmXNLSd1JqThAYoezJOZf6T5blzOwaXKzmom1hAtkptVjz+fvudwSZQcMOBnrSI1lkWeaeTFvQQOe4jUhaRB83NfbSpm6CFhqHJKjDorP6L5zwOx663YyJcZB2sAcotKGzDi3lQqfh8HGmrGLnc1+J+d9L7NbccgsfWYzfk04tqwv6WI+rpXqR0HlLyg+SDjtl49tuC1c6U9atNKPpyuqWHW2DiM8dgERmJfNz8OGjK2mnU7onGeUyrBvXrIcfe+z/fuymzJ5eHnU3VfMxz9Py97AK7M7KN/tRhR7Grx6Sqs=,iv:imkydsFKhiTrqyi1rXidCLCDGtL8RuY6ZiiiHyMFeAg=,tag:HwvqV4xt0nQZb1El+XrO+w==,type:str]",
|
||||
"sops": {
|
||||
"kms": null,
|
||||
"gcp_kms": null,
|
||||
"azure_kv": null,
|
||||
"hc_vault": null,
|
||||
"age": [
|
||||
{
|
||||
"recipient": "age1j3uuyax673fvl5x4dveupq3dylngnrq0e5uy7fmclsexkfd25vysk646wk",
|
||||
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSA5TGk2MWdnZzc3UVZ2Ui9w\nVWgxcFJDUThhM0pDbVR1ZXd6U3BhLzM0U1ZNClJpaHlCdU9mTURKSzdSbE52SFR6\ncUdzVkJ2MElNUHg3UzJHc0tNb3dJamMKLS0tIGErZXJGOXFLUCt1SG93aW01aEEw\nTmNiN1VUUUp2TWlKTlpDWDVwVUk2VjgKpUD72/hlXLEzciW/kewu0hZanGA8+Gfh\ndCro8OOJaOe2INCrioOL9kMZvdpxq96fw+kir1FkkJBkepJgcdCTgA==\n-----END AGE ENCRYPTED FILE-----\n"
|
||||
}
|
||||
],
|
||||
"lastmodified": "2024-12-17T12:28:22Z",
|
||||
"mac": "ENC[AES256_GCM,data:n4Bj/FaPaN+IyVXz8Bmu+tfuULxcJpDnAiYhGawMhbfFCL2tGFVi7G0WdnopdSrZV++9iZnb4z5a/al1WbmIIy/iJS7v2EKNzK08U9xdJDKgEQKXJms/df13f/FRDxV3nfCHX8UBtSJNdcXBY5O77o+VUUcjkpbzVrwWjAaMcOk=,iv:5z25Ereng1O47fk8w4OA52Gk4CAqW2Ot97Cp7UR0zqw=,tag:h9WL5ESZwd9BCa7bbUahOg==,type:str]",
|
||||
"pgp": null,
|
||||
"unencrypted_suffix": "_unencrypted",
|
||||
"version": "3.9.1"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"data": "ENC[AES256_GCM,data:6VJ1TgANh3bVkWEsPFQYFLjdrbsggQ3mCOpLWIo7Q9hCxsUeI0sL4npsXAVoEfTndWkv1zBgzVjzw+KcY8IDu27uTwguPrPk/R0T1aAa1Y8LEoOVmqZVw6GxiiqEYVcbOERkSi3kFSocynzFljDAqPnaYUVoAkB9mFPtO5KeXMjKXMtkJhcFjPkIzLzcHHBEeVUynn4utQaKspj6xVWc+NX/+G+Oh4kfm4RJyD/v5WEWQh2bFtiVwLhgRNiw210SuFZJqst8SoAXjG3LivpAJXapnn1xC3t8Vn4RXHC+JVl/7amDkGY+GOK+k68ou0TS+dWMAEZhiVWsOToeb4C5wPbvDADNRFx78HORsKprAcPgOvYkvaDX+A242KVz4w9j,iv:uD6GkozkTM4mP0jfQ9+oNN4o/kMiscYbggF0Lgum3Wk=,tag:CHO2KBgWnRQ9zvYC4br38A==,type:str]",
|
||||
"sops": {
|
||||
"kms": null,
|
||||
"gcp_kms": null,
|
||||
"azure_kv": null,
|
||||
"hc_vault": null,
|
||||
"age": [
|
||||
{
|
||||
"recipient": "age1j3uuyax673fvl5x4dveupq3dylngnrq0e5uy7fmclsexkfd25vysk646wk",
|
||||
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSA3di9JS0g0cUFxK1cwSkU3\nTmdHRW5NTjQzWWtSR2xYUnlEOG1va3BhY3k0CnRrZkRydGQ0SkczVTB0TkRDejVt\nS0NweDBuNDErNUVjazRTQ1RFYks4NWcKLS0tIGRPL1Z1aWNyS0FBSnZhZWFCWHBS\nVzhLYUdkNWhyVEx2aGtuWGZHM3J2Uk0KrZsGNRPlUB02xJvNeD3VFbRIVAL8bnei\nxS/mwnx6V2o+yJX7RHEj7D466L6zzm0CtDaz7PT4vyJxDBjpRuMBhg==\n-----END AGE ENCRYPTED FILE-----\n"
|
||||
}
|
||||
],
|
||||
"lastmodified": "2024-12-17T12:28:38Z",
|
||||
"mac": "ENC[AES256_GCM,data:g/WhHfiukviJDExEsVFo4JOkVayeZEZpexmEvUn2IOGQ13qTD1rVakR/0cF/XowxsiCBwicn5Fc5FRFe696MBzIyetNNt75jWKC/tasWGk5khrQI6Jwj3kt1nmsQmdahQ4shmjfiLmeELy8fGBe7ASCvu+gZCEfg8OaZRRxmh/E=,iv:S1FlplJsJcsv4Cm8AOYfW15rFE7a5bcUBej7hp6tnNI=,tag:AdgkSbl5ikGnpvG9Z4D9Sg==,type:str]",
|
||||
"pgp": null,
|
||||
"unencrypted_suffix": "_unencrypted",
|
||||
"version": "3.9.1"
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
My laptop `HP Pavilion 15-cb012ur`
|
||||
@@ -0,0 +1,30 @@
|
||||
{ config, pkgs, pkgs-stable, pkgs-pinned, lib, inputs, ... }: {
|
||||
imports = [
|
||||
./secrets/secrets.nix
|
||||
./modules/grub.nix
|
||||
../modules/gpu/nvidia.nix
|
||||
|
||||
(import ../modules/common.nix {
|
||||
inherit lib;
|
||||
inherit inputs;
|
||||
hostname = "Senko";
|
||||
})
|
||||
|
||||
(import ../../user/common.nix {
|
||||
inherit config;
|
||||
inherit pkgs;
|
||||
inherit pkgs-stable;
|
||||
inherit pkgs-pinned;
|
||||
inherit lib;
|
||||
inherit inputs;
|
||||
name = "sweetbread";
|
||||
fullname = "Sweet Bread";
|
||||
})
|
||||
];
|
||||
|
||||
hardware.bluetooth.enable = true;
|
||||
host.laptop = true;
|
||||
host.nvidia.prime.enable = true;
|
||||
|
||||
environment.systemPackages = [ pkgs.dbgate ];
|
||||
}
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/D706-818C";
|
||||
device = "/dev/disk/by-partlabel/EFI";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" "nofail" ];
|
||||
};
|
||||
@@ -0,0 +1,13 @@
|
||||
{ pkgs, ... }: let
|
||||
theme = pkgs.fetchFromGitHub {
|
||||
owner = "Patato777";
|
||||
repo = "dotfiles";
|
||||
rev = "cc363921707807d7ad3e36b462f0df793a0fe18a";
|
||||
hash = "sha256-fpXGFNrzbV6K9hoZRX4tGieTLzhpPeGm6wn8CF4OGow=";
|
||||
};
|
||||
in {
|
||||
boot.loader.grub = {
|
||||
gfxmodeEfi = "1920x1080";
|
||||
theme = "${theme}/grub/themes/virtuaverse";
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
wayland.windowManager.hyprland = {
|
||||
settings = {
|
||||
monitor = [
|
||||
"eDP-1, 1920x1080@60, 0x0, 1"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
sops = {
|
||||
age.keyFile = "/root/age.key";
|
||||
secrets = {
|
||||
vpn_bolt = {
|
||||
format = "binary";
|
||||
sopsFile = ../../Rias/secrets/vpn_bolt.db;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
{ lib, inputs, hostname }: {
|
||||
imports = [
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
../${hostname}/hardware-configuration.nix
|
||||
../../modules/host.nix
|
||||
./packages.nix
|
||||
];
|
||||
|
||||
options = {
|
||||
host = {
|
||||
laptop = lib.mkEnableOption "laptop mode";
|
||||
|
||||
nvidia.prime = {
|
||||
enable = lib.mkEnableOption "NVIDIA PRIME offload for hybrid graphics";
|
||||
intelBusId = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "PCI:0:2:0";
|
||||
description = "Intel/iGPU Bus ID used by NVIDIA PRIME.";
|
||||
};
|
||||
nvidiaBusId = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "PCI:1:0:0";
|
||||
description = "NVIDIA dGPU Bus ID used by NVIDIA PRIME.";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
nix.settings = {
|
||||
keep-going = true;
|
||||
extra-substituters = [ "https://nix.lair.moe/main" ];
|
||||
extra-trusted-public-keys = [ "main:kpwMe+9BsGJ/IUb7i3iadaV38y5/Yuqoct0mf7wI9ds=" ];
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
};
|
||||
networking.hostName = hostname;
|
||||
time.timeZone = lib.mkDefault "Europe/Moscow";
|
||||
i18n.defaultLocale = lib.mkDefault "ru_RU.UTF-8";
|
||||
system.stateVersion = "23.05";
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
{ config, pkgs-stable, ... }:
|
||||
{
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
extraPackages = with pkgs-stable; [
|
||||
intel-media-driver
|
||||
intel-compute-runtime
|
||||
libvdpau-va-gl
|
||||
];
|
||||
extraPackages32 = with pkgs-stable.pkgsi686Linux; [
|
||||
intel-media-driver
|
||||
];
|
||||
};
|
||||
|
||||
nixpkgs.config.packageOverrides = pkgs-stable: {
|
||||
vaapiIntel = pkgs-stable.vaapiIntel.override { enableHybridCodec = true; };
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs-stable; [
|
||||
intel-gpu-tools
|
||||
libva-utils
|
||||
clinfo
|
||||
];
|
||||
|
||||
boot.kernelParams = [ "i915.force_probe=*" ];
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
{ config, pkgs-stable, lib, ... }: let
|
||||
primeCfg = config.host.nvidia.prime;
|
||||
isPrimeOffload = primeCfg.enable;
|
||||
in {
|
||||
boot = {
|
||||
kernelParams = [ "nvidia-drm.modeset=1" ];
|
||||
initrd.kernelModules = lib.optionals isPrimeOffload [ "i915" ];
|
||||
};
|
||||
|
||||
services.xserver.videoDrivers =
|
||||
if isPrimeOffload
|
||||
then [ "modesetting" "nvidia" ]
|
||||
else [ "nvidia" ];
|
||||
|
||||
hardware = {
|
||||
graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
extraPackages = with pkgs-stable; [
|
||||
# nvidia-vaapi-driver
|
||||
intel-media-driver
|
||||
libvdpau-va-gl
|
||||
];
|
||||
extraPackages32 = with pkgs-stable.pkgsi686Linux; [ nvidia-vaapi-driver intel-media-driver ];
|
||||
};
|
||||
|
||||
nvidia = {
|
||||
modesetting.enable = true;
|
||||
powerManagement = {
|
||||
enable = true;
|
||||
finegrained = false;
|
||||
};
|
||||
open = false;
|
||||
nvidiaSettings = true;
|
||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
|
||||
prime = lib.optionalAttrs isPrimeOffload {
|
||||
offload = {
|
||||
enable = true;
|
||||
enableOffloadCmd = true;
|
||||
};
|
||||
intelBusId = primeCfg.intelBusId;
|
||||
nvidiaBusId = primeCfg.nvidiaBusId;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
environment.sessionVariables = {
|
||||
__GL_VRR_ALLOWED = 1;
|
||||
ELECTRON_OZONE_PLATFORM_HINT = "auto";
|
||||
NIXOS_OZONE_WL = 1;
|
||||
} // lib.optionalAttrs isPrimeOffload {
|
||||
LIBVA_DRIVER_NAME = "iHD";
|
||||
} // lib.optionalAttrs (!isPrimeOffload) {
|
||||
WLR_NO_HARDWARE_CURSORS = 1;
|
||||
WLR_DRM_NO_ATOMIC = 1;
|
||||
GBM_BACKEND = "nvidia-drm";
|
||||
LIBVA_DRIVER_NAME = "nvidia";
|
||||
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
{ pkgs, inputs, ... }: {
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
file
|
||||
tree
|
||||
wget
|
||||
git
|
||||
(btop.override { cudaSupport = true; })
|
||||
unzip
|
||||
yazi
|
||||
zip
|
||||
lazygit
|
||||
httpie
|
||||
ncdu
|
||||
tldr
|
||||
helix
|
||||
pinentry-gnome3
|
||||
];
|
||||
|
||||
fonts = {
|
||||
enableDefaultPackages = false;
|
||||
packages = with pkgs; [
|
||||
jetbrains-mono # Best mono font
|
||||
noto-fonts-cjk-sans # Japanese
|
||||
powerline-symbols # Console decoration
|
||||
unifont # Other
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
{ config, lib, pkgs, ... }: {
|
||||
# T480-specific hardware defaults.
|
||||
hardware = {
|
||||
enableRedistributableFirmware = true;
|
||||
|
||||
trackpoint = {
|
||||
enable = true;
|
||||
emulateWheel = true;
|
||||
};
|
||||
};
|
||||
|
||||
boot = {
|
||||
supportedFilesystems = [ "btrfs" ];
|
||||
|
||||
initrd.availableKernelModules = [
|
||||
"nvme"
|
||||
"ahci"
|
||||
"xhci_pci"
|
||||
"usb_storage"
|
||||
"usbhid"
|
||||
"sd_mod"
|
||||
"rtsx_pci_sdmmc"
|
||||
];
|
||||
|
||||
kernelModules = [ "kvm-intel" "thinkpad_acpi" ];
|
||||
|
||||
kernelParams = [
|
||||
# Prefer S3/deep sleep when BIOS exposes it. If suspend behaves worse,
|
||||
# remove this and use the BIOS sleep setting instead.
|
||||
"mem_sleep_default=deep"
|
||||
];
|
||||
};
|
||||
|
||||
powerManagement.enable = true;
|
||||
services = {
|
||||
# Firmware updates for BIOS/UEFI, Thunderbolt, SSDs where LVFS supports it.
|
||||
fwupd.enable = true;
|
||||
|
||||
# Helps Intel laptops keep sane thermal behaviour under load.
|
||||
thermald.enable = true;
|
||||
|
||||
# Fingerprint reader support. If fprintd does not detect the reader,
|
||||
# leaving this enabled is harmless; login can still use a password.
|
||||
fprintd.enable = true;
|
||||
|
||||
logind.settings.Login = {
|
||||
HandleLidSwitch = "suspend";
|
||||
HandleLidSwitchExternalPower = "suspend";
|
||||
HandlePowerKey = "poweroff";
|
||||
};
|
||||
|
||||
tlp.settings = {
|
||||
# Preserve batteries when the laptop is usually on AC.
|
||||
# Raise STOP_* to 100 if maximum autonomy matters more than battery wear.
|
||||
START_CHARGE_THRESH_BAT0 = 70;
|
||||
STOP_CHARGE_THRESH_BAT0 = 95;
|
||||
START_CHARGE_THRESH_BAT1 = 70;
|
||||
STOP_CHARGE_THRESH_BAT1 = 85;
|
||||
RESTORE_THRESHOLDS_ON_BAT = 1;
|
||||
|
||||
# NVMe/SATA SSD power saving without making the system too sluggish.
|
||||
AHCI_RUNTIME_PM_ON_AC = "on";
|
||||
AHCI_RUNTIME_PM_ON_BAT = "auto";
|
||||
SATA_LINKPWR_ON_AC = "med_power_with_dipm";
|
||||
SATA_LINKPWR_ON_BAT = "med_power_with_dipm";
|
||||
|
||||
# Usually safe on ThinkPads; disable if some USB device randomly disconnects.
|
||||
USB_AUTOSUSPEND = 1;
|
||||
};
|
||||
};
|
||||
|
||||
networking.networkmanager.wifi.powersave = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
acpi
|
||||
lm_sensors
|
||||
pciutils
|
||||
powertop
|
||||
smartmontools
|
||||
usbutils
|
||||
nvme-cli
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
{ pkgs, ... }: {
|
||||
imports = [
|
||||
./host/bluetooth.nix
|
||||
./host/bootloader.nix
|
||||
./host/console.nix
|
||||
./host/db.nix
|
||||
./host/env.nix
|
||||
./host/gamemode.nix
|
||||
./host/gpg.nix
|
||||
./host/laptop.nix
|
||||
./host/network.nix
|
||||
./host/printing.nix
|
||||
./host/shutdown-on-lan.nix
|
||||
./host/sound.nix
|
||||
./host/virtmanager.nix
|
||||
./host/vpn.nix
|
||||
./host/yggdrasil.nix
|
||||
];
|
||||
|
||||
programs = {
|
||||
dconf.enable = true;
|
||||
hyprland.enable = true;
|
||||
fuse.enable = true;
|
||||
};
|
||||
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
xdgOpenUsePortal = true;
|
||||
|
||||
extraPortals = with pkgs; [
|
||||
xdg-desktop-portal-hyprland
|
||||
xdg-desktop-portal-gtk
|
||||
xdg-desktop-portal-termfilechooser
|
||||
];
|
||||
|
||||
config = {
|
||||
common = {
|
||||
default = [ "hyprland" "gtk" ];
|
||||
"org.freedesktop.impl.portal.FileChooser" = [ "termfilechooser" "gtk" ];
|
||||
"org.freedesktop.impl.portal.Settings" = [ "gtk" ];
|
||||
};
|
||||
|
||||
hyprland = {
|
||||
default = [ "hyprland" "gtk" ];
|
||||
"org.freedesktop.impl.portal.FileChooser" = [ "termfilechooser" "gtk" ];
|
||||
"org.freedesktop.impl.portal.Settings" = [ "gtk" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
gvfs.enable = true;
|
||||
fstrim.enable = true;
|
||||
upower.enable = true;
|
||||
};
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
{ config, lib, ... }: {
|
||||
hardware.bluetooth =
|
||||
lib.mkIf config.hardware.bluetooth.enable {
|
||||
powerOnBoot = true;
|
||||
settings = {
|
||||
General = {
|
||||
@@ -2,21 +2,17 @@
|
||||
boot = {
|
||||
loader = {
|
||||
timeout = 3;
|
||||
# systemd-boot.enable = true;
|
||||
efi.efiSysMountPoint = "/boot";
|
||||
efi = {
|
||||
efiSysMountPoint = "/boot";
|
||||
canTouchEfiVariables = true;
|
||||
};
|
||||
|
||||
grub = {
|
||||
grub = {
|
||||
enable = true;
|
||||
efiSupport = true;
|
||||
efiInstallAsRemovable = true;
|
||||
device = "nodev";
|
||||
};
|
||||
# efi.canTouchEfiVariables = true;
|
||||
};
|
||||
# initrd = {
|
||||
# verbose = false;
|
||||
# # systemd.enable = true;
|
||||
# };
|
||||
consoleLogLevel = 0;
|
||||
kernelParams = [
|
||||
# "quiet"
|
||||
@@ -31,7 +27,6 @@
|
||||
enable = true;
|
||||
theme = "black_hud";
|
||||
themePackages = with pkgs; [
|
||||
# By default we would install all themes
|
||||
(adi1090x-plymouth-themes.override {
|
||||
selected_themes = [ "black_hud" ];
|
||||
})
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
console = {
|
||||
font = "LatArCyrHeb-19";
|
||||
colors = [
|
||||
"16161E"
|
||||
"1A1B26"
|
||||
"2F3549"
|
||||
"444B6A"
|
||||
"787C99"
|
||||
"787C99"
|
||||
"CBCCD1"
|
||||
"D5D6DB"
|
||||
"F7768E"
|
||||
"FF9E64"
|
||||
"E0AF68"
|
||||
"41A6B5"
|
||||
"7DCFFF"
|
||||
"7AA2F7"
|
||||
"BB9AF7"
|
||||
"D18616"
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{ lib, ... }:{
|
||||
services.postgresql = {
|
||||
enable = true;
|
||||
ensureDatabases = [ "mydatabase" ];
|
||||
authentication = lib.mkOverride 10 ''
|
||||
#type database DBuser auth-method
|
||||
local all all trust
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{ lib, ... }: {
|
||||
environment.variables = {
|
||||
EDITOR = "hx";
|
||||
RANGER_LOAD_DEFAULT_RC = "FALSE";
|
||||
# GTK/Electron apps do not consistently use the portal picker unless this
|
||||
# variable is present in the graphical session environment.
|
||||
GTK_USE_PORTAL = "1";
|
||||
|
||||
# Qt/Telegram-like apps otherwise keep using their own picker. This makes
|
||||
# them ask xdg-desktop-portal for file/folder selection.
|
||||
QT_QPA_PLATFORMTHEME = lib.mkForce "xdgdesktopportal";
|
||||
TDESKTOP_USE_GTK_FILE_DIALOG = "1";
|
||||
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{ config, pkgs, pkgs-stable, lib, ... }:
|
||||
|
||||
lib.mkIf config.programs.gamemode.enable {
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
gamescopeSession.enable = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
mangohud
|
||||
protonup-ng
|
||||
pkgs-stable.bottles
|
||||
pkgs-stable.heroic
|
||||
prismlauncher
|
||||
];
|
||||
|
||||
environment.sessionVariables = {
|
||||
STEAM_EXTRA_COMPAT_TOOLS_PATHS =
|
||||
"\${HOME}/.steam/root/compatibilitytools.d";
|
||||
};
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
{ pkgs, ...}: {
|
||||
{
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
@@ -0,0 +1,19 @@
|
||||
{ config, lib, ... }:
|
||||
|
||||
lib.mkIf config.host.laptop {
|
||||
services.tlp = {
|
||||
enable = true;
|
||||
settings = {
|
||||
CPU_SCALING_GOVERNOR_ON_AC = "powersave";
|
||||
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
|
||||
|
||||
CPU_ENERGY_PERF_POLICY_ON_AC = "balance_performance";
|
||||
CPU_ENERGY_PERF_POLICY_ON_BAT = "balance_power";
|
||||
|
||||
CPU_MIN_PERF_ON_AC = 0;
|
||||
CPU_MAX_PERF_ON_AC = 100;
|
||||
CPU_MIN_PERF_ON_BAT = 0;
|
||||
CPU_MAX_PERF_ON_BAT = 75;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
networking = {
|
||||
enableIPv6 = true;
|
||||
useDHCP = false;
|
||||
nameservers = [ "64.188.64.176" "1.1.1.1" ];
|
||||
|
||||
dhcpcd.extraConfig = "nohook resolv.conf";
|
||||
|
||||
networkmanager = {
|
||||
enable = true;
|
||||
dns = "none";
|
||||
insertNameservers = [ "64.188.64.176" "1.1.1.1" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
lib.mkIf config.services.printing.enable {
|
||||
services = {
|
||||
printing.drivers = with pkgs; [
|
||||
brlaser
|
||||
];
|
||||
|
||||
avahi = {
|
||||
enable = true;
|
||||
nssmdns4 = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
};
|
||||
|
||||
hardware.sane = {
|
||||
enable = true;
|
||||
extraBackends = with pkgs; [ sane-airscan ];
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
sane-frontends
|
||||
simple-scan
|
||||
];
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
{ pkgs, lib, ... }:
|
||||
let
|
||||
sol = pkgs.writers.writePython3 "shutdown-on-lan.py" {
|
||||
libraries = [ pkgs.python312Packages.psutil ];
|
||||
flakeIgnore = [ "E501" "E302" "E305" ];
|
||||
libraries = ps: [ ps.psutil ];
|
||||
flakeIgnore = [ "E302" "E305" "E501" "E701" ];
|
||||
} /*py*/ ''
|
||||
# https://habr.com/ru/articles/816765/
|
||||
|
||||
@@ -21,20 +21,26 @@
|
||||
ip_addr = mac_addr = None
|
||||
|
||||
while not ip_addr or not mac_addr or ip_addr == '127.0.0.1':
|
||||
net = psutil.net_if_addrs()
|
||||
for item in net[list(net.keys())[-1]]:
|
||||
addr = item.address
|
||||
# В IPv4-адресах разделители - точки
|
||||
if '.' in addr:
|
||||
ip_addr = addr
|
||||
# В MAC-адресах разделители либо тире, либо одинарное двоеточие.
|
||||
# Двойное двоеточие - это разделители для адресов IPv6
|
||||
elif ('-' in addr or ':' in addr) and '::' not in addr:
|
||||
# Приводим MAC-адрес к одному формату. Формат может меняться в зависимости от ОС
|
||||
mac_addr = addr.replace(':', '-').upper()
|
||||
nets = psutil.net_if_addrs()
|
||||
for net in list(nets.keys())[::-1]:
|
||||
if net in ('lo', 'tun0'): continue
|
||||
logger.debug(str(net))
|
||||
for item in nets[net]:
|
||||
# logger.debug(str(item))
|
||||
addr = item.address
|
||||
logger.debug(addr)
|
||||
# В IPv4-адресах разделители - точки
|
||||
if '.' in addr:
|
||||
ip_addr = addr
|
||||
# В MAC-адресах разделители либо тире, либо одинарное двоеточие.
|
||||
# Двойное двоеточие - это разделители для адресов IPv6
|
||||
elif ('-' in addr or ':' in addr) and '::' not in addr:
|
||||
# Приводим MAC-адрес к одному формату. Формат может меняться в зависимости от ОС
|
||||
mac_addr = addr.replace(':', '-').upper()
|
||||
if not ip_addr or not mac_addr or ip_addr == '127.0.0.1':
|
||||
logger.debug('Не удалось получить IP или MAC-адрес сетевого интерфейса')
|
||||
logger.error('Не удалось получить IP или MAC-адрес сетевого интерфейса')
|
||||
sleep(10)
|
||||
logger.debug(mac_addr)
|
||||
return ip_addr, mac_addr
|
||||
|
||||
def assemble_wol_packet(mac_address: str) -> str:
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
security.rtkit.enable = true;
|
||||
|
||||
services = {
|
||||
pulseaudio.enable = false;
|
||||
|
||||
pipewire = {
|
||||
enable = true;
|
||||
|
||||
alsa = {
|
||||
enable = true;
|
||||
support32Bit = true;
|
||||
};
|
||||
|
||||
pulse.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
virtualisation.libvirtd.enable = true;
|
||||
programs.virt-manager.enable = true;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
{ pkgs-pinned, lib, ... }: {
|
||||
programs.clash-verge = {
|
||||
enable = true;
|
||||
package = pkgs-pinned.clash-verge-rev;
|
||||
serviceMode = true;
|
||||
tunMode = true;
|
||||
autoStart = true;
|
||||
};
|
||||
|
||||
systemd.services.clash-verge.serviceConfig = {
|
||||
CapabilityBoundingSet = lib.mkForce [
|
||||
"CAP_NET_ADMIN"
|
||||
"CAP_NET_RAW"
|
||||
"CAP_SYS_ADMIN"
|
||||
"CAP_DAC_OVERRIDE"
|
||||
"CAP_DAC_READ_SEARCH"
|
||||
"CAP_SYS_PTRACE"
|
||||
"CAP_SETUID"
|
||||
"CAP_SETGID"
|
||||
"CAP_CHOWN"
|
||||
"CAP_MKNOD"
|
||||
];
|
||||
|
||||
AmbientCapabilities = [
|
||||
"CAP_DAC_READ_SEARCH"
|
||||
"CAP_SYS_PTRACE"
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
services.yggdrasil = {
|
||||
enable = true;
|
||||
persistentKeys = true;
|
||||
settings = {
|
||||
Peers = [
|
||||
"tcp://box.paulll.cc:13337"
|
||||
"tcp://lair.moe:5001"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{ config, lib, ... }: {
|
||||
imports = [
|
||||
./user/btop.nix
|
||||
./user/ghostty.nix
|
||||
./user/helix.nix
|
||||
./user/hyprland.nix
|
||||
./user/hyprlock.nix
|
||||
./user/mako.nix
|
||||
./user/neofetch.nix
|
||||
./user/qt.nix
|
||||
./user/quickshell.nix
|
||||
./user/stylix.nix
|
||||
./user/sops.nix
|
||||
./user/ssh.nix
|
||||
./user/walker.nix
|
||||
./user/wob.nix
|
||||
./user/yazi.nix
|
||||
./user/zsh.nix
|
||||
|
||||
./user/packages/art.nix
|
||||
./user/packages/desktop.nix
|
||||
./user/packages/utils.nix
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{ pkgs, ... }: {
|
||||
programs.btop = {
|
||||
enable = true;
|
||||
package = pkgs.btop.override { cudaSupport = true; };
|
||||
settings = {
|
||||
shown_boxes = "proc cpu gpu0 mem net";
|
||||
# color_theme = "TTY";
|
||||
update_ms = 1000;
|
||||
cpu_single_graph = true;
|
||||
only_physical = false;
|
||||
net_auto = false;
|
||||
net_iface = "eno1";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{ config, pkgs, ... }: let
|
||||
ghosttyWithGL = (config.lib.nixGL.wrap pkgs.ghostty);
|
||||
shaders = pkgs.fetchFromGitHub {
|
||||
owner = "sahaj-b";
|
||||
repo = "ghostty-cursor-shaders";
|
||||
rev = "06d4e90fb5410e9c4d0b3131584060adddf89406";
|
||||
hash = "sha256-G/UIr1bKnxn1AcHl/4FL/jou6b7M2VeREslYVELxdmw=";
|
||||
};
|
||||
in {
|
||||
programs.ghostty = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
package = ghosttyWithGL;
|
||||
|
||||
settings = {
|
||||
confirm-close-surface = false;
|
||||
copy-on-select = false;
|
||||
title-report = true;
|
||||
|
||||
custom-shader = "${shaders}/cursor_warp.glsl";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,190 @@
|
||||
{ inputs, pkgs, ... }: let
|
||||
helixSteel =
|
||||
inputs.helix-steel.packages.${pkgs.system}.default.overrideAttrs (old: {
|
||||
cargoBuildFlags = (old.cargoBuildFlags or []) ++ [
|
||||
"--features"
|
||||
"steel,git"
|
||||
];
|
||||
});
|
||||
|
||||
comment-headers = pkgs.fetchurl {
|
||||
url = "https://github.com/codingvivi/comment-dividers.hx/raw/refs/heads/main/comment_headers.scm";
|
||||
name = "comment_headers.scm";
|
||||
hash = "sha256-ohgn6DFJl0rdRJuri6Frs/uUlUsPxMvPHDuw4FS3qEE=";
|
||||
};
|
||||
|
||||
patched-comment-headers = pkgs.runCommand "comment_headers.scm" { } ''
|
||||
install -m 0644 ${comment-headers} "$out"
|
||||
|
||||
${pkgs.python3}/bin/python3 - <<'PY'
|
||||
from pathlib import Path
|
||||
import os
|
||||
import sys
|
||||
|
||||
p = Path(os.environ["out"])
|
||||
s = p.read_text()
|
||||
|
||||
start_marker = "(define (get-block-delims)"
|
||||
end_marker = "(define (delete_till_first_nonwhitespace!)"
|
||||
|
||||
try:
|
||||
start = s.index(start_marker)
|
||||
end = s.index(end_marker, start)
|
||||
except ValueError as e:
|
||||
sys.exit(f"failed to find function markers: {e}")
|
||||
|
||||
new_get_block_delims = """(define (get-block-delims)
|
||||
(helix.static.open_above)
|
||||
(helix.static.insert_string "test_string")
|
||||
(helix.static.normal_mode)
|
||||
(helix.static.extend_to_line_bounds)
|
||||
(helix.static.trim_selections)
|
||||
(helix.static.toggle_comments)
|
||||
(let* ([commented-test-string (helix.static.current-highlighted-text!)]
|
||||
[strings-without-whitespace (split-whitespace commented-test-string)])
|
||||
(delete-line-noyank!)
|
||||
(cond
|
||||
[(and (> (length strings-without-whitespace) 1)
|
||||
(equal? (last strings-without-whitespace) "test_string"))
|
||||
(list (first strings-without-whitespace) "")]
|
||||
[(> (length strings-without-whitespace) 2)
|
||||
(list (first strings-without-whitespace) (last strings-without-whitespace))]
|
||||
[else
|
||||
(list "" "")])))
|
||||
|
||||
"""
|
||||
|
||||
s = s[:start] + new_get_block_delims + s[end:]
|
||||
|
||||
old = "(make-line line-length fill-pattern #f padding-pattern)"
|
||||
new = "(make-line line-length \"\" fill-pattern padding-pattern)"
|
||||
|
||||
if old not in s:
|
||||
sys.exit("failed to find insert-divider make-line call")
|
||||
|
||||
s = s.replace(old, new)
|
||||
|
||||
p.write_text(s)
|
||||
PY
|
||||
'';
|
||||
in {
|
||||
home.packages = with pkgs; [
|
||||
asm-lsp
|
||||
fasm
|
||||
];
|
||||
|
||||
programs.helix = {
|
||||
enable = true;
|
||||
package = helixSteel;
|
||||
defaultEditor = true;
|
||||
|
||||
languages = {
|
||||
language-server.asm-lsp.command = "asm-lsp";
|
||||
|
||||
language = [
|
||||
{
|
||||
name = "nasm";
|
||||
file-types = [ "asm" "inc" ];
|
||||
comment-token = ";";
|
||||
language-servers = [ "asm-lsp" ];
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
settings = {
|
||||
# theme = "catppuccin-mocha";
|
||||
editor = {
|
||||
rulers = [ 81 ];
|
||||
insert-final-newline = false;
|
||||
indent-guides.render = true;
|
||||
|
||||
whitespace.render = {
|
||||
space = "all";
|
||||
tab = "all";
|
||||
nbsp = "none";
|
||||
nnbsp = "none";
|
||||
newline = "none";
|
||||
};
|
||||
|
||||
cursor-shape = {
|
||||
normal = "block";
|
||||
insert = "bar";
|
||||
select = "underline";
|
||||
};
|
||||
};
|
||||
|
||||
keys.normal = {
|
||||
space = {
|
||||
C-a = {
|
||||
b = ":fasm-build";
|
||||
r = ":fasm-run";
|
||||
c = ":fasm-clean";
|
||||
};
|
||||
|
||||
C-c = {
|
||||
h = ":comment-h1";
|
||||
j = ":comment-h2";
|
||||
k = ":comment-h3";
|
||||
d = ":comment-divider";
|
||||
};
|
||||
};
|
||||
|
||||
S-down = ["extend_to_line_bounds" "delete_selection" "paste_after"];
|
||||
S-up = ["extend_to_line_bounds" "delete_selection" "move_line_up" "paste_before"];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
xdg.configFile = {
|
||||
"asm-lsp/.asm-lsp.toml".text = ''
|
||||
[default_config]
|
||||
assembler = "fasm"
|
||||
instruction_set = "x86/x86-64"
|
||||
|
||||
[opts]
|
||||
compiler = "fasm"
|
||||
diagnostics = true
|
||||
default_diagnostics = true
|
||||
'';
|
||||
|
||||
"helix/cogs/comment_headers.scm".source = patched-comment-headers;
|
||||
"helix/helix.scm".text = ''
|
||||
(require (prefix-in div. "cogs/comment_headers.scm"))
|
||||
(require (prefix-in helix. "helix/commands.scm"))
|
||||
|
||||
(provide comment-h1
|
||||
comment-h2
|
||||
comment-h3
|
||||
comment-divider
|
||||
fasm-build
|
||||
fasm-run
|
||||
fasm-clean)
|
||||
|
||||
(define (comment-h1)
|
||||
(div.insert-h1!))
|
||||
|
||||
(define (comment-h2)
|
||||
(div.insert-h2!))
|
||||
|
||||
(define (comment-h3)
|
||||
(div.insert-h3!))
|
||||
|
||||
(define (comment-divider)
|
||||
(div.insert-divider! 80 "~"))
|
||||
|
||||
(define (fasm-build)
|
||||
(helix.write)
|
||||
(helix.run-shell-command "just" "build"))
|
||||
|
||||
(define (fasm-run)
|
||||
(helix.write)
|
||||
(helix.run-shell-command "just" "run"))
|
||||
|
||||
(define (fasm-clean)
|
||||
(helix.run-shell-command "just" "clean"))
|
||||
'';
|
||||
"helix/init.scm".text = ''
|
||||
;; Steel init file
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,256 @@
|
||||
{ pkgs, lib, config, osConfig, inputs, username, ... }: let
|
||||
optImport = path: lib.optional (builtins.pathExists path) path;
|
||||
hostname = osConfig.networking.hostName;
|
||||
in {
|
||||
imports = [
|
||||
./hyprland/zoom.nix
|
||||
] ++
|
||||
optImport ../../host/${hostname}/modules/hyprland.nix ++
|
||||
optImport ../../user/${username}/modules/hyprland.nix;
|
||||
|
||||
home.packages = with pkgs; [
|
||||
ghostty
|
||||
pamixer
|
||||
clipse
|
||||
wl-clipboard
|
||||
wl-clip-persist
|
||||
xclip
|
||||
awww
|
||||
wifitui
|
||||
( pkgs.callPackage ./packages/drvs/yin.nix {} )
|
||||
];
|
||||
|
||||
wayland.windowManager.hyprland = let
|
||||
colors = config.lib.stylix.colors;
|
||||
in {
|
||||
enable = true;
|
||||
configType = "hyprlang";
|
||||
xwayland.enable = true;
|
||||
|
||||
package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
|
||||
plugins = with inputs.hyprland-plugins.packages.${pkgs.stdenv.hostPlatform.system}; [
|
||||
# hyprbars # Version mismatch
|
||||
];
|
||||
|
||||
settings = {
|
||||
"$mainMod" = "SUPER";
|
||||
|
||||
ecosystem = {
|
||||
no_donation_nag = true;
|
||||
no_update_news = true;
|
||||
};
|
||||
|
||||
env = [
|
||||
"XDG_SESSION_TYPE,wayland"
|
||||
"QT_QPA_PLATFORM,wayland"
|
||||
"QT_QPA_PLATFORMTHEME,xdgdesktopportal"
|
||||
"GTK_USE_PORTAL,1"
|
||||
"TDESKTOP_USE_GTK_FILE_DIALOG,1"
|
||||
"NIXOS_OZONE_WL,1"
|
||||
"ELECTRON_OZONE_PLATFORM_HINT,auto"
|
||||
|
||||
"XDG_CURRENT_DESKTOP,Hyprland"
|
||||
"XDG_SESSION_DESKTOP,Hyprland"
|
||||
|
||||
"XCURSOR_SIZE, ${toString config.stylix.cursor.size}"
|
||||
"XCURSOR_THEME, ${config.stylix.cursor.name}"
|
||||
|
||||
"XDG_SCREENSHOTS_DIR,~/screens"
|
||||
];
|
||||
|
||||
cursor.no_hardware_cursors = true;
|
||||
|
||||
debug = {
|
||||
disable_logs = false;
|
||||
enable_stdout_logs = true;
|
||||
};
|
||||
|
||||
general = {
|
||||
"col.inactive_border" = lib.mkForce "rgba(00000000)";
|
||||
};
|
||||
|
||||
decoration.inactive_opacity = lib.mkDefault .95;
|
||||
decoration.border_part_of_window = false;
|
||||
|
||||
misc = {
|
||||
focus_on_activate = true;
|
||||
};
|
||||
|
||||
input = {
|
||||
kb_layout = "us,ru";
|
||||
kb_options = "grp:caps_toggle";
|
||||
numlock_by_default = true;
|
||||
|
||||
follow_mouse = 1;
|
||||
|
||||
touchpad = {
|
||||
natural_scroll = false;
|
||||
};
|
||||
|
||||
sensitivity = 0;
|
||||
};
|
||||
|
||||
gestures = {
|
||||
workspace_swipe_invert = true;
|
||||
workspace_swipe_distance = 200;
|
||||
workspace_swipe_forever = true;
|
||||
};
|
||||
|
||||
gesture = [
|
||||
"3, horizontal, workspace"
|
||||
];
|
||||
|
||||
workspace = [
|
||||
"w[t1], gapsout:0"
|
||||
];
|
||||
|
||||
windowrule = [
|
||||
"match:class imv, float 1"
|
||||
"match:class feh, float 1"
|
||||
"match:class mpv, float 1"
|
||||
|
||||
"match:title Список друзей, float 1"
|
||||
"match:title wifitui, float 1"
|
||||
"match:title pulsemixer, float 1"
|
||||
|
||||
"match:title clipse, float 1"
|
||||
"match:title clipse, size 622 652"
|
||||
|
||||
"match:focus 1, rounding 0"
|
||||
"match:float 0, match:workspace w[t1], border_size 0"
|
||||
];
|
||||
|
||||
exec-once = lib.mkBefore [
|
||||
"systemctl --user start plasma-polkit-agent"
|
||||
"${lib.getExe' pkgs.dbus "dbus-update-activation-environment"} --systemd --all"
|
||||
"systemctl --user import-environment XDG_CURRENT_DESKTOP XDG_SESSION_DESKTOP XDG_SESSION_TYPE WAYLAND_DISPLAY DISPLAY GTK_USE_PORTAL QT_QPA_PLATFORMTHEME TDESKTOP_USE_GTK_FILE_DIALOG NIXOS_OZONE_WL ELECTRON_OZONE_PLATFORM_HINT"
|
||||
"awww-daemon"
|
||||
"wl-clip-persist --clipboard both"
|
||||
"clipse -listen"
|
||||
"${lib.getExe' pkgs.udiskie "udiskie"}"
|
||||
];
|
||||
|
||||
bind = [
|
||||
"$mainMod, V, exec, ghostty --title=clipse -e clipse"
|
||||
|
||||
"$mainMod, Return, exec, ghostty"
|
||||
"$mainMod, Q, killactive,"
|
||||
"$mainMod, M, exit,"
|
||||
"$mainMod, E, exec, ghostty -e sh -c yazi"
|
||||
"$mainMod, F, togglefloating,"
|
||||
"$mainMod, P, pseudo, # dwindle"
|
||||
"$mainMod, J, layoutmsg, togglesplit"
|
||||
"$mainMod, K, layoutmsg, swapsplit"
|
||||
|
||||
# Move focus with mainMod + arrow keys
|
||||
"$mainMod, left, movefocus, l"
|
||||
"$mainMod, right, movefocus, r"
|
||||
"$mainMod, up, movefocus, u"
|
||||
"$mainMod, down, movefocus, d"
|
||||
|
||||
# Moving windows
|
||||
"$mainMod SHIFT, left, swapwindow, l"
|
||||
"$mainMod SHIFT, right, swapwindow, r"
|
||||
"$mainMod SHIFT, up, swapwindow, u"
|
||||
"$mainMod SHIFT, down, swapwindow, d"
|
||||
|
||||
# Window resizing X Y
|
||||
"$mainMod CTRL, left, resizeactive, -60 0"
|
||||
"$mainMod CTRL, right, resizeactive, 60 0"
|
||||
"$mainMod CTRL, up, resizeactive, 0 -60"
|
||||
"$mainMod CTRL, down, resizeactive, 0 60"
|
||||
|
||||
# Switch workspaces with mainMod + [0-9]
|
||||
"$mainMod, 1, workspace, 1"
|
||||
"$mainMod, 2, workspace, 2"
|
||||
"$mainMod, 3, workspace, 3"
|
||||
"$mainMod, 4, workspace, 4"
|
||||
"$mainMod, 5, workspace, 5"
|
||||
"$mainMod, 6, workspace, 6"
|
||||
"$mainMod, 7, workspace, 7"
|
||||
"$mainMod, 8, workspace, 8"
|
||||
"$mainMod, 9, workspace, 9"
|
||||
"$mainMod, 0, workspace, 10"
|
||||
|
||||
# Move active window to a workspace with mainMod + SHIFT + [0-9]
|
||||
"$mainMod SHIFT, 1, movetoworkspacesilent, 1"
|
||||
"$mainMod SHIFT, 2, movetoworkspacesilent, 2"
|
||||
"$mainMod SHIFT, 3, movetoworkspacesilent, 3"
|
||||
"$mainMod SHIFT, 4, movetoworkspacesilent, 4"
|
||||
"$mainMod SHIFT, 5, movetoworkspacesilent, 5"
|
||||
"$mainMod SHIFT, 6, movetoworkspacesilent, 6"
|
||||
"$mainMod SHIFT, 7, movetoworkspacesilent, 7"
|
||||
"$mainMod SHIFT, 8, movetoworkspacesilent, 8"
|
||||
"$mainMod SHIFT, 9, movetoworkspacesilent, 9"
|
||||
"$mainMod SHIFT, 0, movetoworkspacesilent, 10"
|
||||
|
||||
"$mainMod SHIFT, F, fullscreen"
|
||||
|
||||
# Scroll through existing workspaces with mainMod + scroll
|
||||
"$mainMod, mouse_down, workspace, e-1"
|
||||
"$mainMod, mouse_up, workspace, e+1"
|
||||
|
||||
# Keyboard backlight
|
||||
"$mainMod, F3, exec, ${lib.getExe pkgs.brightnessctl} -d *::kbd_backlight set +33%"
|
||||
"$mainMod, F2, exec, ${lib.getExe pkgs.brightnessctl} -d *::kbd_backlight set 33%-"
|
||||
|
||||
# Volume and Media Control
|
||||
", XF86AudioMute, exec, pamixer -t"
|
||||
", XF86AudioMicMute, exec, pamixer --default-source -m"
|
||||
", XF86AudioPlay, exec, ${lib.getExe pkgs.playerctl} play-pause"
|
||||
|
||||
", XF86Explorer, exec, ghostty -e sh -c yazi"
|
||||
", XF86Mail, exec, thunderbird"
|
||||
", XF86WWW, exec, google-chrome-stable" # TODO: Replace hard-code to some variable
|
||||
|
||||
# Brightness control
|
||||
", XF86MonBrightnessDown, exec, ${lib.getExe pkgs.brightnessctl} set 5%- "
|
||||
", XF86MonBrightnessUp, exec, ${lib.getExe pkgs.brightnessctl} set +5% "
|
||||
];
|
||||
|
||||
binde = [
|
||||
", XF86AudioRaiseVolume, exec, pamixer -i 5 "
|
||||
", XF86AudioLowerVolume, exec, pamixer -d 5 "
|
||||
];
|
||||
|
||||
bindc = [
|
||||
", XF86AudioPrev, exec, ${lib.getExe pkgs.playerctl} position 5-"
|
||||
", XF86AudioNext, exec, ${lib.getExe pkgs.playerctl} position 5+"
|
||||
];
|
||||
|
||||
bindo = [
|
||||
", XF86AudioPrev, exec, ${lib.getExe pkgs.playerctl} previous"
|
||||
", XF86AudioNext, exec, ${lib.getExe pkgs.playerctl} next"
|
||||
];
|
||||
|
||||
# Move/resize windows with mainMod + LMB/RMB and dragging
|
||||
bindm = [
|
||||
"$mainMod, mouse:272, movewindow"
|
||||
"$mainMod, mouse:273, resizewindow"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
|
||||
extraPortals = [
|
||||
pkgs.xdg-desktop-portal-gtk
|
||||
pkgs.xdg-desktop-portal-termfilechooser
|
||||
];
|
||||
|
||||
config = {
|
||||
common = {
|
||||
default = [ "hyprland" "gtk" ];
|
||||
"org.freedesktop.impl.portal.FileChooser" = [ "termfilechooser" "gtk" ];
|
||||
"org.freedesktop.impl.portal.Settings" = [ "gtk" ];
|
||||
};
|
||||
|
||||
hyprland = {
|
||||
default = [ "hyprland" "gtk" ];
|
||||
"org.freedesktop.impl.portal.FileChooser" = [ "termfilechooser" "gtk" ];
|
||||
"org.freedesktop.impl.portal.Settings" = [ "gtk" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
bind = [
|
||||
# "$mainMod, mouse_down, exec, hyprctl -q keyword cursor:zoom_factor $(hyprctl getoption cursor:zoom_factor -j | jq '.float * 1.1')"
|
||||
# "$mainMod, mouse_up , exec, hyprctl -q keyword cursor:zoom_factor $(hyprctl getoption cursor:zoom_factor -j | jq '(.float * 0.9) | if . < 1 then 1 else . end')"
|
||||
|
||||
"$mainMod SHIFT, mouse_up , exec, hyprctl -q keyword cursor:zoom_factor 1"
|
||||
"$mainMod SHIFT, mouse_down , exec, hyprctl -q keyword cursor:zoom_factor 1"
|
||||
"$mainMod SHIFT, minus , exec, hyprctl -q keyword cursor:zoom_factor 1"
|
||||
"$mainMod SHIFT, KP_SUBTRACT, exec, hyprctl -q keyword cursor:zoom_factor 1"
|
||||
"$mainMod SHIFT, 0 , exec, hyprctl -q keyword cursor:zoom_factor 1"
|
||||
];
|
||||
|
||||
binde = [
|
||||
"$mainMod, equal , exec, hyprctl -q keyword cursor:zoom_factor $(hyprctl getoption cursor:zoom_factor -j | jq '.float * 1.1')"
|
||||
"$mainMod, minus , exec, hyprctl -q keyword cursor:zoom_factor $(hyprctl getoption cursor:zoom_factor -j | jq '(.float * 0.9) | if . < 1 then 1 else . end')"
|
||||
"$mainMod, KP_ADD , exec, hyprctl -q keyword cursor:zoom_factor $(hyprctl getoption cursor:zoom_factor -j | jq '.float * 1.1')"
|
||||
"$mainMod, KP_SUBTRACT, exec, hyprctl -q keyword cursor:zoom_factor $(hyprctl getoption cursor:zoom_factor -j | jq '(.float * 0.9) | if . < 1 then 1 else . end')"
|
||||
];
|
||||
};
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user