refactor(treewide)

This commit is contained in:
ooks-io 2024-06-11 22:37:17 +12:00
parent 25d48ac2ac
commit c4fc882042
99 changed files with 634 additions and 477 deletions

200
flake.lock generated
View file

@ -45,11 +45,11 @@
]
},
"locked": {
"lastModified": 1716080827,
"narHash": "sha256-2R9LBCR8TlMuK4Md9ELwPVuwRQWI3pAh7Nj9e318Hk4=",
"lastModified": 1718078026,
"narHash": "sha256-LbQabH6h86ZzTvDnaZHmMwedRZNB2jYtUQzmoqWQoJ8=",
"owner": "ipetkov",
"repo": "crane",
"rev": "a7146b04405d93b24a1bac76d93270787872c8be",
"rev": "a3f0c63eed74a516298932b9b1627dd80b9c3892",
"type": "github"
},
"original": {
@ -89,11 +89,11 @@
},
"locked": {
"dir": "pkgs/firefox-addons",
"lastModified": 1716523398,
"narHash": "sha256-21xkaFKGaemklawPst+6FDcJUTaHYWBkJSVnreJEnRU=",
"lastModified": 1718078599,
"narHash": "sha256-M9mpMKEkbUlABh5oWPfECo3fxkNICUDnZtS5nRUcLas=",
"owner": "rycee",
"repo": "nur-expressions",
"rev": "c90137a4cd0e332ebd1f5f8051863d28eba45fdc",
"rev": "ae1539401cb36215599e079ee3d41c50895c4307",
"type": "gitlab"
},
"original": {
@ -110,11 +110,11 @@
]
},
"locked": {
"lastModified": 1715865404,
"narHash": "sha256-/GJvTdTpuDjNn84j82cU6bXztE0MSkdnTWClUCRub78=",
"lastModified": 1717285511,
"narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "8dc45382d5206bd292f9c2768b8058a8fd8311d9",
"rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8",
"type": "github"
},
"original": {
@ -194,7 +194,7 @@
},
"flake-utils_3": {
"inputs": {
"systems": "systems_8"
"systems": "systems_7"
},
"locked": {
"lastModified": 1710146030,
@ -212,7 +212,7 @@
},
"flake-utils_4": {
"inputs": {
"systems": "systems_9"
"systems": "systems_8"
},
"locked": {
"lastModified": 1701680307,
@ -230,7 +230,7 @@
},
"flake-utils_5": {
"inputs": {
"systems": "systems_12"
"systems": "systems_11"
},
"locked": {
"lastModified": 1710146030,
@ -256,11 +256,11 @@
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1716520196,
"narHash": "sha256-OdZe7n3+cHUnN3Lq5Ou89OEJq0kMdbnFMJeKCE+CFnc=",
"lastModified": 1718059146,
"narHash": "sha256-NRTN1Fxlj6upu68uD1ajANd6OEPzprgq65Z3hTzGV7A=",
"owner": "helix-editor",
"repo": "helix",
"rev": "f1c9580e4b636d014fefb61080d8d019c14e37b7",
"rev": "265608a3d8d0497fbbec86721fdd548931132839",
"type": "github"
},
"original": {
@ -276,11 +276,11 @@
]
},
"locked": {
"lastModified": 1716457508,
"narHash": "sha256-ZxzffLuWRyuMrkVVq7wastNUqeO0HJL9xqfY1QsYaqo=",
"lastModified": 1717931644,
"narHash": "sha256-Sz8Wh9cAiD5FhL8UWvZxBfnvxETSCVZlqWSYWaCPyu0=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "850cb322046ef1a268449cf1ceda5fd24d930b05",
"rev": "3d65009effd77cb0d6e7520b68b039836a7606cf",
"type": "github"
},
"original": {
@ -376,18 +376,25 @@
},
"hyprlang_2": {
"inputs": {
"hyprutils": [
"hyprlock",
"hyprutils"
],
"nixpkgs": [
"hyprlock",
"nixpkgs"
],
"systems": "systems_4"
"systems": [
"hyprlock",
"systems"
]
},
"locked": {
"lastModified": 1713121246,
"narHash": "sha256-502X0Q0fhN6tJK7iEUA8CghONKSatW/Mqj4Wappd++0=",
"lastModified": 1717881852,
"narHash": "sha256-XeeVoKHQgfKuXoP6q90sUqKyl7EYy3ol2dVZGM+Jj94=",
"owner": "hyprwm",
"repo": "hyprlang",
"rev": "78fcaa27ae9e1d782faa3ff06c8ea55ddce63706",
"rev": "ec6938c66253429192274d612912649a0cfe4d28",
"type": "github"
},
"original": {
@ -399,7 +406,7 @@
"hyprlang_3": {
"inputs": {
"nixpkgs": "nixpkgs_4",
"systems": "systems_6"
"systems": "systems_5"
},
"locked": {
"lastModified": 1713121246,
@ -421,7 +428,7 @@
"xdg-portal-hyprland",
"nixpkgs"
],
"systems": "systems_10"
"systems": "systems_9"
},
"locked": {
"lastModified": 1713121246,
@ -440,15 +447,16 @@
"hyprlock": {
"inputs": {
"hyprlang": "hyprlang_2",
"hyprutils": "hyprutils",
"nixpkgs": "nixpkgs_3",
"systems": "systems_5"
"systems": "systems_4"
},
"locked": {
"lastModified": 1716461934,
"narHash": "sha256-5j/GfBVkgqGTlEA7s/6CBn0pKK6ohXQi38lkKeno/mA=",
"lastModified": 1717883389,
"narHash": "sha256-2A4Q56JFd3t9j3Xpa0kxw2fjv8nNqgNBOA34rRcLA8I=",
"owner": "hyprwm",
"repo": "hyprlock",
"rev": "972c1c27e6b057e5e891b6ae9f5b2c83bac1e087",
"rev": "c5b8ad03d03ddbd2b0ff8615c2f6dba31374b6a8",
"type": "github"
},
"original": {
@ -461,14 +469,14 @@
"inputs": {
"hyprlang": "hyprlang_3",
"nixpkgs": "nixpkgs_5",
"systems": "systems_7"
"systems": "systems_6"
},
"locked": {
"lastModified": 1716311836,
"narHash": "sha256-HWsl4uUqEOvrvm8QCNKJWBP2xB3irsy+xMvyvLVHITk=",
"lastModified": 1717919427,
"narHash": "sha256-50HWM67p81v+dhvcOS0UFQiPGh8McUHs40UGqkz6s9I=",
"owner": "hyprwm",
"repo": "hyprpaper",
"rev": "678d0e8959cf7adbc3825d578595e82305573991",
"rev": "f4abf5902f3f0c51d2aab8a521f7c1b1b08afd64",
"type": "github"
},
"original": {
@ -477,6 +485,31 @@
"type": "github"
}
},
"hyprutils": {
"inputs": {
"nixpkgs": [
"hyprlock",
"nixpkgs"
],
"systems": [
"hyprlock",
"systems"
]
},
"locked": {
"lastModified": 1717881334,
"narHash": "sha256-a0inRgJhPL6v9v7RPM/rx1kbXdfe3xJA1c9z0ZkYnh4=",
"owner": "hyprwm",
"repo": "hyprutils",
"rev": "0693f9398ab693d89c9a0aa3b3d062dd61b7a60e",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprutils",
"type": "github"
}
},
"nh": {
"inputs": {
"nixpkgs": [
@ -484,11 +517,11 @@
]
},
"locked": {
"lastModified": 1714905986,
"narHash": "sha256-Vj7iFkLrd7MDeeMVVol5uHTcaLwDq4a3vNx+6Sy1FLU=",
"lastModified": 1717227663,
"narHash": "sha256-f6wh1HMkW7Ks9PKOsS95odyCjZOMuiK6B9NJTRsMApg=",
"owner": "viperML",
"repo": "nh",
"rev": "127a23c82aa41091e97466092d2547c08c2a9a9d",
"rev": "0d76479fcdec0243ea560d1e2fde854337787e3a",
"type": "github"
},
"original": {
@ -506,11 +539,11 @@
"rust-overlay": "rust-overlay_2"
},
"locked": {
"lastModified": 1714571717,
"narHash": "sha256-o4tqlTzi9kcVub167kTGXgCac9jM3kW4+v9MH/ue4Hk=",
"lastModified": 1717086091,
"narHash": "sha256-GmsEQa4HZeMfec37LZnwG/Lt/XmqFLXsjv5QWojeNiM=",
"owner": "oxalica",
"repo": "nil",
"rev": "2f3ed6348bbf1440fcd1ab0411271497a0fbbfa4",
"rev": "ab3ddb8f063774cf7e22eb610f5ecfdb77309f3c",
"type": "github"
},
"original": {
@ -568,11 +601,11 @@
]
},
"locked": {
"lastModified": 1717297675,
"narHash": "sha256-43UmlS1Ifx17y93/Vc258U7bOlAAIZbu8dsGDHOIIr0=",
"lastModified": 1718011381,
"narHash": "sha256-sFXI+ZANp/OC+MwfJoZgPSf4xMdtzQMe1pS3FGti4C8=",
"owner": "nix-community",
"repo": "nix-index-database",
"rev": "972a52bee3991ae1f1899e6452e0d7c01ee566d9",
"rev": "88ad3d7501e22b2401dd72734b032b7baa794434",
"type": "github"
},
"original": {
@ -697,11 +730,11 @@
},
"nixpkgs-small": {
"locked": {
"lastModified": 1716479278,
"narHash": "sha256-2eh7rYxQOntkUjFXtlPH7lBuUDd4isu/YHRjNJW7u1Q=",
"lastModified": 1718083092,
"narHash": "sha256-EQsPXycAbmby4meQUNLYfFaGOiqz2J9AlwFRV4UiHnY=",
"owner": "Nixos",
"repo": "nixpkgs",
"rev": "2ee89d5a0167a8aa0f2a5615d2b8aefb1f299cd4",
"rev": "aa1ebdaf49a606e21c06e0f6ed7aece9a41831c3",
"type": "github"
},
"original": {
@ -713,11 +746,11 @@
},
"nixpkgs_10": {
"locked": {
"lastModified": 1716097317,
"narHash": "sha256-1UMrLtgzielG/Sop6gl6oTSM4pDt7rF9j9VuxhDWDlY=",
"lastModified": 1717893485,
"narHash": "sha256-WMU6ZRZrBgEUDIF0siu2aIyVAXcxfElSwzZtS/mSpN4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "8535fb92661f37ff9f0da3007fbc942f7d134b41",
"rev": "3bcedce9f4de37570242faf16e1e143583407eab",
"type": "github"
},
"original": {
@ -745,11 +778,11 @@
},
"nixpkgs_3": {
"locked": {
"lastModified": 1712963716,
"narHash": "sha256-WKm9CvgCldeIVvRz87iOMi8CFVB1apJlkUT4GGvA0iM=",
"lastModified": 1717602782,
"narHash": "sha256-pL9jeus5QpX5R+9rsp3hhZ+uplVHscNJh8n8VpqscM0=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "cfd6b5fc90b15709b780a5a1619695a88505a176",
"rev": "e8057b67ebf307f01bdcc8fba94d94f75039d1f6",
"type": "github"
},
"original": {
@ -809,11 +842,11 @@
},
"nixpkgs_7": {
"locked": {
"lastModified": 1716330097,
"narHash": "sha256-8BO3B7e3BiyIDsaKA0tY8O88rClYRTjvAp66y+VBUeU=",
"lastModified": 1717974879,
"narHash": "sha256-GTO3C88+5DX171F/gVS3Qga/hOs/eRMxPFpiHq2t+D8=",
"owner": "Nixos",
"repo": "nixpkgs",
"rev": "5710852ba686cc1fd0d3b8e22b3117d43ba374c2",
"rev": "c7b821ba2e1e635ba5a76d299af62821cbcb09f3",
"type": "github"
},
"original": {
@ -987,11 +1020,11 @@
]
},
"locked": {
"lastModified": 1714529851,
"narHash": "sha256-YMKJW880f7LHXVRzu93xa6Ek+QLECIu0IRQbXbzZe38=",
"lastModified": 1717035469,
"narHash": "sha256-MzH+yjKULH3HCRj9QCTwBvqq4LZkR0ZqRE/QfGOGC2E=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "9ca720fdcf7865385ae3b93ecdf65f1a64cb475e",
"rev": "095702e63a40e86f339d11864da9dc965b70a01e",
"type": "github"
},
"original": {
@ -1012,11 +1045,11 @@
]
},
"locked": {
"lastModified": 1716085073,
"narHash": "sha256-3+9gI93XxszWA2+9S2xZfws1QArPX/MC6nahOGpcMB4=",
"lastModified": 1718072316,
"narHash": "sha256-p33h73iQ1HkLalCplV5MH0oP3HXRaH3zufnFqb5//ps=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "cfc8776011bd83508324115d353222475e1601c0",
"rev": "bedc47af18fc41bb7d2edc2b212d59ca36253f59",
"type": "github"
},
"original": {
@ -1072,21 +1105,6 @@
}
},
"systems_11": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"owner": "nix-systems",
"repo": "default-linux",
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default-linux",
"type": "github"
}
},
"systems_12": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
@ -1178,16 +1196,16 @@
},
"systems_7": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default-linux",
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default-linux",
"repo": "default",
"type": "github"
}
},
@ -1208,16 +1226,16 @@
},
"systems_9": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"repo": "default-linux",
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"repo": "default-linux",
"type": "github"
}
},
@ -1268,14 +1286,14 @@
"hyprland-protocols": "hyprland-protocols",
"hyprlang": "hyprlang_4",
"nixpkgs": "nixpkgs_9",
"systems": "systems_11"
"systems": "systems_10"
},
"locked": {
"lastModified": 1716290197,
"narHash": "sha256-1u9Exrc7yx9qtES2brDh7/DDZ8w8ap1nboIOAtCgeuM=",
"lastModified": 1717918856,
"narHash": "sha256-I38bmPLqamvOfVSArd1hhZtkVRAYBK38fOHZCU1P9Qg=",
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"rev": "91e48d6acd8a5a611d26f925e51559ab743bc438",
"rev": "72907822c19afc0983c69d59d299204381623725",
"type": "github"
},
"original": {
@ -1292,11 +1310,11 @@
"rust-overlay": "rust-overlay_3"
},
"locked": {
"lastModified": 1716477488,
"narHash": "sha256-uOw+L0rrppQqhus1X49v3AnTGfU49HB4IVdpQ+pUEjc=",
"lastModified": 1718092736,
"narHash": "sha256-UO2+Lfgv0qBlOW1oddarZV5OEufm+Im5RMqbGdJHvGI=",
"owner": "dj95",
"repo": "zjstatus",
"rev": "61b35de31ab03a4de317c8bd8be1f6922a52e823",
"rev": "eed126b31e7a94d16bc4aa7ef5c2d81e45a28569",
"type": "github"
},
"original": {

View file

@ -4,11 +4,11 @@ let
inherit (lib) mkDefault mkIf;
monitors = osConfig.ooknet.host.hardware.monitors;
cfg = config.ooknet.theme.wallpaper;
cfg = config.ooknet.wallpaper;
in
{
config = mkIf cfg.enable {
ooknet.theme.wallpaper.path =
ooknet.wallpaper.path =
let
largest = f: xs: builtins.head (builtins.sort (a: b: a > b) (map f xs));
largestWidth = largest (x: x.width) monitors;

View file

@ -0,0 +1,7 @@
{
imports = [
./home-manager.nix
./mime-apps.nix
./user-dirs.nix
];
}

View file

@ -12,11 +12,15 @@
enable = true;
createDirectories = true;
desktop = "${config.home.homeDirectory}/Desktop";
code = "${config.home.homeDirectory}/Code";
documents = "${config.home.homeDirectory}/Documents";
music = "${config.home.homeDirectory}/Media/Music";
videos = "${config.home.homeDirectory}/Media/Videos";
pictures = "${config.home.homeDirectory}/Media/Pictures";
extraConfig = {
XDG_SCREENSHOTS_DIR = "${config.xdg.userDirs.pictures}/Screenshots";
XDG_CODE_DIR = "${config.home.homeDirectory}/Code";
XDG_RECORDINGs_DIR = "${config.xdg.userDirs.videos}/Recordings";
};
};
};
}

View file

@ -1,10 +1,8 @@
{
imports = [
./editor # Still need to implement nvim
./fileManager
./multiplexer # Still need to implement tmux and screen
./prompt # only Starship is currently implemented
./shell
./utility
./tools
];
}

View file

@ -1,27 +1,6 @@
{ lib, ... }:
{
imports = [
./helix
# ./nvim
];
options.ooknet.console.editor = {
helix = {
enable = lib.mkEnableOption "Enable helix text editor";
default = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Set helix as the default text editor in environment variables";
};
};
nvim = {
enable = lib.mkEnableOption "Enable nvim text editor";
default = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Set nvim as the default text editor in environment variables";
};
};
};
}

View file

@ -1,17 +1,7 @@
{ lib, config, ... }:
{
imports = [
./zellij
#./screen
./tmux
];
options.ooknet.console.multiplexer = {
zellij = {
enable = lib.mkEnableOption "Enable zellij multiplexer";
};
tmux = {
enable = lib.mkEnableOption "Enable tmux multiplexer";
};
};
}

View file

@ -8,7 +8,7 @@ in
{
config = mkIf cfg.enable {
fzf = {
programs.fzf = {
enable = true;
enableFishIntegration = mkIf (admin.shell == "fish") true;
defaultCommand = "rg --files --hidden";

View file

@ -1,7 +1,9 @@
{ pkgs, lib, config, ... }:
let
cfg = config.ooknet.console.utility.tools;
cfg = config.ooknet.tools.utils;
in
{
config = lib.mkIf cfg.enable {
home.packages = with pkgs; [

View file

@ -1,5 +1,5 @@
{
imports = [
./vesktop.nix
]
];
}

View file

@ -5,7 +5,7 @@ let
inherit (lib) mkIf;
cfg = config.ooknet.communication.discord;
discord = config.ooknet.desktop.discord;
fonts = config.ooknet.theme.fonts;
fonts = config.ooknet.fonts;
in
{
@ -20,7 +20,6 @@ in
*/
:root {
/* Palette */
--nix-bg1: #${palette.base00};
--nix-bg2: #${palette.base01};
--nix-bg3: #${palette.base02};

View file

@ -0,0 +1,17 @@
{ lib, config, pkgs, ... }:
let
inherit (lib) mkIf;
cfg = config.ooknet.gaming.wine;
in
{
config = mkIf cfg.enable {
home.packages = with pkgs; [
winetricks
protontricks
protonup-qt
wineWowPackages.full
];
};
}

View file

@ -1,6 +1,6 @@
{
imports = [
#./spotify --- still needs to be implemented
./tui
./tui.nix
];
}

View file

@ -4,7 +4,7 @@ let
inherit (config.colorscheme) palette;
inherit (lib) mkIf;
cfg = config.ooknet.desktop.media.music.tui;
cfg = config.ooknet.media.music.tui;
zellij = config.ooknet.multiplexer.zellij;
multiplexer= config.ooknet.console.multiplexer;

View file

@ -4,7 +4,7 @@ let
inherit (config.colorscheme) palette;
inherit (lib) mkIf;
fonts = config.ooknet.fonts;
cfg = config.ooknet.desktop.terminal.foot;
cfg = config.ooknet.terminal.foot;
terminal = config.ooknet.desktop.terminal;
in

View file

@ -1,13 +1,12 @@
{ lib, config, osConfig, ... }:
{ lib, osConfig, ... }:
let
inherit (lib) mkIf;
inherit (builtins) elem;
host = osConfig.ooknet.host;
cfg = osConfig.ooknet.programs.kdeconnect;
in
{
config = mkIf (elem "workstation" host.function) {
config = mkIf cfg.enable {
services.kdeconnect = {
enable = true;
indicator = true;

View file

@ -9,6 +9,6 @@ in
{
config = mkIf (launcher == "rofi") {
home.packages = [ inputs.ooks-scripts.packages.${pkgs.system}.powermenu ];
ooknet.binds.powermenu = "powermenu -c dmenu";
ooknet.binds.powerMenu = "powermenu -c dmenu";
};
}

View file

@ -20,30 +20,24 @@ in
"SUPERSHIFT, S, exec, ${binds.steam}"
"SUPER, escape, exec, ${binds.terminalLaunch} --title=BTOP btop"
"SUPER CTRL, return, exec, ${binds.zellijMenu}"
"SUPER, delete, exec, ${binds.powermenu}"
"SUPER, delete, exec, ${binds.powerMenu}"
# Spotify PLayer Controls
"SUPER, bracketright, exec, ${spotifyctl} playback next"
"SUPER, bracketleft, exec, ${spotifyctl} playback previous"
"SUPER, backslash, exec, ${spotifyctl} playback play-pause"
"SUPER, M, exec, ${binds.spotify.launch}"
"SUPER, bracketright, exec, ${binds.spotify.next}"
"SUPER, bracketleft, exec, ${binds.spotify.previous}"
"SUPER, backslash, exec, ${binds.spotify.play}"
# Brightness
",XF86MonBrightnessUp, exec, hyprbrightness up"
",XF86MonBrightnessDown, exec, hyprbrightness down"
# Volume
",XF86AudioRaiseVolume, exec, hyprvolume up"
",XF86AudioLowerVolume, exec, hyprvolume down"
",XF86AudioMute, exec, hyprvolume mute"
# Window Management
"SUPER, Q, killactive"
"SUPER CTRL, backspace, killactive"
"SUPERSHIFT ALT, delete, exec, hyprkillsession"
@ -54,28 +48,24 @@ in
"SUPER, S, togglesplit" # dwindle
# Focus
"SUPER, left, movefocus,l"
"SUPER, right, movefocus,r"
"SUPER, up, movefocus,u"
"SUPER, down, movefocus,d"
# Move
"SUPERSHIFT, left, movewindow,l"
"SUPERSHIFT, right, movewindow,r"
"SUPERSHIFT, up, movewindow,u"
"SUPERSHIFT, down, movewindow,d"
#Resize
"SUPER CTRL, left, resizeactive,-20 0"
"SUPERCTRL, right, resizeactive,20 0"
"SUPER CTRL, up, resizeactive,0 -20"
"SUPERCTRL, down, resizeactive,0 20"
# Switch workspace
"SUPER, 1, workspace,1"
"SUPER, 2, workspace,2"
"SUPER, 3, workspace,3"
@ -91,7 +81,6 @@ in
"SUPER, tab, focusCurrentOrLast"
# Move workspace
"SUPERSHIFT, 1, movetoworkspace,1"
"SUPERSHIFT, 2, movetoworkspace,2"
"SUPERSHIFT, 3, movetoworkspace,3"

View file

@ -1,37 +1,11 @@
{ lib, config, osConfig, ... }:
let
inherit (lib) mkIf;
cfg = config.ooknet.desktop.wayland;
gpu = osConfig.ooknet.host.hardware.gpu;
in
{
imports = [
./bar
./compositor
./launcher
./lockscreen
./notification
./utility
./windowManager
./launcher
./variables.nix
];
config = mkIf cfg.enable {
home.sessionVariables = {
CLUTTER_BACKEND = "wayland";
NIXOS_OZONE_WL = "1";
GDK_BACKEND = "wayland";
QT_QPA_PLATFORM = "wayland";
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
MOZ_ENABLE_WAYLAND = "1";
MOZ_DBUS_REMOTE = "1";
XDG_SESSION_TYPE = "wayland";
SDL_VIDEODRIVER = "wayland";
} // mkIf (gpu == "nvidia") {
LIBVA_DRIVER_NAME = "nvidia";
GBM_BACKEND = "nvidia-drm";
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
WLR_NO_HARDWARE_CURSORS = "1";
};
};
}

View file

@ -9,7 +9,7 @@ in
{
config = mkIf (wayland.locker == "hyprlock") {
ooknet.binds.locker = "hyprlock";
ooknet.binds.lock = "hyprlock";
programs.hyprlock = {
settings = {
enable = true;

View file

@ -9,7 +9,7 @@ let
in
{
config = mkIf (wayland.locker == "swaylock") {
ooknet.binds.locker = "swaylock";
ooknet.binds.lock = "swaylock";
programs.swaylock = {
enable = true;
settings = {

View file

@ -0,0 +1,28 @@
{ lib, config, osConfig, ... }:
let
inherit (lib) mkIf;
cfg = config.ooknet.wayland;
gpu = osConfig.ooknet.host.hardware.gpu;
in
{
config = mkIf cfg.enable {
home.sessionVariables = {
CLUTTER_BACKEND = "wayland";
NIXOS_OZONE_WL = "1";
GDK_BACKEND = "wayland";
QT_QPA_PLATFORM = "wayland";
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
MOZ_ENABLE_WAYLAND = "1";
MOZ_DBUS_REMOTE = "1";
XDG_SESSION_TYPE = "wayland";
SDL_VIDEODRIVER = "wayland";
} // mkIf (gpu == "nvidia") {
LIBVA_DRIVER_NAME = "nvidia";
GBM_BACKEND = "nvidia-drm";
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
WLR_NO_HARDWARE_CURSORS = "1";
};
};
}

View file

@ -0,0 +1,10 @@
{
imports = [
./cursor.nix
./fonts.nix
./gtk.nix
./qt.nix
./theme.nix
./wallpaper.nix
];
}

View file

@ -17,7 +17,7 @@ let
};
in
{
options.ooknet.theme.fonts = {
options.ooknet.fonts = {
enable = lib.mkEnableOption "Whether to enable font profiles";
monospace = mkFontOption "monospace";
regular = mkFontOption "regular";

View file

@ -5,5 +5,5 @@ let
in
{
options.ooknet.gtk.enable = mkEnableOption;
options.ooknet.gtk.enable = mkEnableOption "";
}

View file

@ -0,0 +1,8 @@
{
imports = [
./editor.nix
./multiplexer.nix
./shell.nix
./tools.nix
];
}

8
home/options/default.nix Normal file
View file

@ -0,0 +1,8 @@
{
imports = [
./appearance
./console
./desktop
./profiles
];
}

View file

@ -0,0 +1,15 @@
{
imports = [
./binds.nix
./browser.nix
./communication.nix
./creative.nix
./gaming.nix
./media.nix
./productivity.nix
./security.nix
./terminal.nix
./tools.nix
./wayland.nix
];
}

View file

@ -9,5 +9,6 @@ in
factorio.enable = mkEnableOption "";
bottles.enable = mkEnableOption "";
lutris.enable = mkEnableOption "";
wine.enable = mkEnableOption "";
};
}

View file

@ -7,5 +7,6 @@ in
{
options.ooknet.terminal = {
foot.enable = mkEnableOption "";
kitty.enable = mkEnableOption "";
};
}

View file

@ -6,7 +6,7 @@ let
in
{
ooknet.wayland = {
options.ooknet.wayland = {
enable = mkEnableOption "";
compositor = mkOption {
type = nullOr (enum [ "hyprland" ]);

View file

@ -0,0 +1,6 @@
{
imports = [
./desktop.nix
./console.nix
];
}

View file

@ -1,42 +1,7 @@
{ lib, config, ... }:
let
profileEnabler = let
reducer = l: r: {"${r}".enable = true;} // l;
in
builtins.foldl' reducer {} config.activeProfiles;
in
{
imports = [
./base
./hyprland
#./creative
./productivity
./gaming
./desktop-environments
./themes
./suites
];
options = {
activeProfiles = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [];
};
profiles = {
base = {
enable = lib.mkEnableOption "Enable the base profile";
};
hyprland = {
enable = lib.mkEnableOption "Enable the hyprland profile";
};
gaming = {
enable = lib.mkEnableOption "Enable the gaming profile";
};
productivity = {
enable = lib.mkEnableOption "Enable the productivity profile";
};
};
};
config.profiles = profileEnabler;
}

View file

@ -1,5 +1,5 @@
{
imports = [
./services
./hyprland.nix
];
}

View file

@ -0,0 +1,16 @@
{ osConfig, lib, ... }:
let
inherit (lib) mkIf;
inherit (builtins) elem;
profiles = osConfig.ooknet.host.profiles;
in
{
config = mkIf (elem "creative" profiles) {
ooknet.creative = {
audacity.enable = true;
inkscape.enable = true;
};
};
}

View file

@ -0,0 +1,7 @@
{
imports = [
./gaming.nix
./creative.nix
./productivity.nix
];
}

View file

@ -1,25 +1,16 @@
{ config, lib, pkgs, ... }:
let
cfg = config.profiles.gaming;
in
{
{ osConfig, lib, ... }:
imports = [
../../modules
];
config = lib.mkIf cfg.enable {
homeModules.desktop = {
gaming = {
lutris.enable = false;
};
let
inherit (lib) mkIf;
inherit (builtins) elem;
profiles = osConfig.ooknet.host.profiles;
in
{
config = mkIf (elem "gaming" profiles) {
ooknet.gaming = {
wine.enable = true;
bottles.enable = true;
};
home.packages = with pkgs; [
bottles
winetricks
protontricks
protonup-qt
wineWowPackages.full
];
};
}

View file

@ -1,20 +1,17 @@
{ config, lib, ... }:
let
cfg = config.profiles.productivity;
in
{
{ osConfig, lib, ... }:
imports = [
../../modules
];
config = lib.mkIf cfg.enable {
homeModules.desktop = {
productivity = {
obsidian.enable = true;
zathura.enable = true;
office.enable = true;
};
let
inherit (lib) mkIf;
inherit (builtins) elem;
profiles = osConfig.ooknet.host.profiles;
in
{
config = mkIf (elem "productiviy" profiles) {
ooknet.productivity = {
notes.obsidian.enable = true;
office.libreoffice.enable = true;
pdf.zathura.enable = true;
};
};
}

View file

@ -1,29 +1,6 @@
{ lib, config, ... }:
# let
# cfg = config.theme;
# in
{
imports = [
./minimal
./phone
./minimal.nix
# ./phone.nix
];
options.theme = {
minimal.enable = lib.mkEnableOption "enable minimal theme";
phone.enable = lib.mkEnableOption "Enable phone theme";
};
# config = {
# assertions = [
# {
# assertion =
# (lib.length (lib.filter (x: x) [
# cfg.minimal or false
# cfg.OTHERTHEMEHERE or false
# ]) <= 1);
# }
# ];
# };
}

View file

@ -7,7 +7,6 @@ let
in
{
imports = [ inputs.nix-colors.homeManagerModule ];
config = mkIf (theme == "phone") {
colorscheme = colorSchemes.gruvbox-material-dark-soft;

View file

@ -13,7 +13,7 @@ in
name = "ooksdesk";
type = "desktop";
role = "workstation";
profiles = [ "gaming" "creativity" ];
profiles = [ "gaming" "creative" ];
admin = {
name = "ooks";
shell = "fish";

8
nixos/default.nix Normal file
View file

@ -0,0 +1,8 @@
{
imports = [
./modules
./options
./profiles
./roles
];
}

View file

@ -1,23 +1,11 @@
{ lib, ... }:
{
imports = [
./shell
./boot
./nix
./displayManager
./networking
./locale.nix
./virtualization
./nix
./security
./services
./host
./shell
./locale.nix
];
options.ooknet = {
virtualisation = {
enable = lib.mkEnableOption "Enable virtualisation module";
};
};
}

View file

@ -1,8 +0,0 @@
{
imports = [
./system76Scheduler.nix
./dbus.nix
./gnome.nix
./gvfs.nix
];
}

View file

@ -0,0 +1,9 @@
{
imports = [
./base
./gaming
./host
./programs
./services
];
}

View file

@ -0,0 +1,8 @@
{
imports = [
./steam.nix
./gamemode.nix
./gamescope.nix
./openPorts.nix
];
}

View file

@ -0,0 +1,24 @@
{ lib, config, pkgs, ... }:
let
inherit (lib) mkIf;
cfg = config.ooknet.gaming.gamemode;
in
{
config = mkIf cfg.enable {
programs.gamemode = {
enable = true;
settings = {
general = {
renice = 15;
softrealtime = "auto";
};
custom = {
start = "${pkgs.libnotify}/bin/notify-send 'GameMode started'";
end = "${pkgs.libnotify}/bin/notify-send 'GameMode ended'";
};
};
};
};
}

View file

@ -0,0 +1,16 @@
{ lib, config, pkgs, ... }:
let
inherit (lib) mkIf;
cfg = config.ooknet.gaming.gamescope;
in
{
config = mkIf cfg.enable {
hardware.opengl.extraPackages = [ pkgs.gamescope ];
programs.gamescope = {
enable = true;
capSysNice = true;
};
};
}

View file

@ -0,0 +1,22 @@
{ lib, config, ... }:
let
inherit (lib) mkIf;
cfg = config.ooknet.gaming.openPorts;
in
{
config = mkIf cfg.enable {
networking.firewall = {
allowedTCPPorts = [ 3074 ];
allowedUDPPorts = [
88
500
3074
2075
3544
4500
];
};
};
}

View file

@ -0,0 +1,35 @@
{ lib, config, pkgs, ... }:
let
inherit (lib) mkIf;
cfg = config.ooknet.gaming.steam;
steamFix = pkgs.steam.override {
extraPkgs = pkgs: with pkgs; [
xorg.libXcursor
xorg.libXi
xorg.libXinerama
xorg.libXScrnSaver
libpng
libpulseaudio
libvorbis
stdenv.cc.cc.lib
libkrb5
keyutils
mangohud
winetricks
protontricks
gtk3
gtk3-x11
];
};
in
{
config = mkIf cfg.enable {
programs.steam = {
enable = true;
package = steamFix;
extraCompatPackages = [ pkgs.proton-ge-bin.steamcompattool ];
};
};
}

View file

@ -2,8 +2,6 @@
imports = [
./admin.nix
./name.nix
./type.nix
./role.nix
./hardware
];
}

View file

@ -4,6 +4,5 @@
./gpu
./features
./common.nix
./monitors.nix
];
}

View file

@ -2,16 +2,17 @@
let
inherit (lib) mkIf;
host = config.ooknet.host;
admin = config.ooknet.host.admin;
cfg = config.ooknet.programs._1password;
in
{
config = mkIf (host.type != "phone") {
config = mkIf cfg.enable {
programs = {
_1password.enable = true;
_1password-gui = {
enable = true;
polkitPolicyOwners = [ "${host.admin.name}" ];
polkitPolicyOwners = [ "${admin.name}" ];
};
};
};

View file

@ -0,0 +1,12 @@
{ lib, config, ... }:
let
inherit (lib) mkIf;
cfg = config.ooknet.programs.dconf;
in
{
config = mkIf cfg.enable {
programs.dconf.enable = true;
};
}

View file

@ -0,0 +1,14 @@
{ lib, config, ... }:
let
inherit (lib) mkIf;
cfg = config.ooknet.programs.kdeconnect;
in
{
config = mkIf cfg.enable {
programs.kdeconnect = {
enable = true;
};
};
}

View file

@ -1,69 +0,0 @@
{ lib, config, pkgs, ... }:
let
inherit (lib) mkIf;
inherit (builtins) elem;
steamFix = pkgs.steam.override {
extraPkgs = pkgs: with pkgs; [
xorg.libXcursor
xorg.libXi
xorg.libXinerama
xorg.libXScrnSaver
libpng
libpulseaudio
libvorbis
stdenv.cc.cc.lib
libkrb5
keyutils
mangohud
winetricks
protontricks
gtk3
gtk3-x11
];
};
host = config.ooknet.host;
in
{
config = mkIf (elem "gaming" host.function) {
hardware.opengl.extraPackages = [ pkgs.gamescope ];
services.flatpak.enable = true;
programs = {
steam = {
enable = true;
package = steamFix;
extraCompatPackages = [ pkgs.proton-ge-bin.steamcompattool ];
};
gamescope = {
enable = true;
capSysNice = true;
};
gamemode = {
enable = true;
settings = {
general = {
renice = 15;
softrealtime = "auto";
};
custom = {
start = "${pkgs.libnotify}/bin/notify-send 'GameMode started'";
end = "${pkgs.libnotify}/bin/notify-send 'GameMode ended'";
};
};
};
};
networking.firewall = {
allowedTCPPorts = [ 3074 ];
allowedUDPPorts = [
88
500
3074
2075
3544
4500
];
};
};
}

View file

@ -1,5 +0,0 @@
{
imports = [
./nixarr.nix
];
}

View file

@ -1,25 +0,0 @@
{ config, inputs, ... }:
let
admin = config.ooknet.host.admin;
in
{
imports = [ inputs.nixarr.nixosModules.default ];
nixarr = {
enable = true;
mediaDir = "/jellyfin";
stateDir = "/var/lib/nixarr";
mediaUsers = ["${admin.name}"];
jellyfin.enable = true;
sonarr.enable = true;
radarr.enable = true;
prowlarr.enable = true;
transmission.enable = true;
};
fileSystems."/jellyfin" = {
device = "/dev/disk/by-label/jellyfin";
fsType = "btrfs";
};
}

View file

@ -1,5 +0,0 @@
{
imports = [
./programs
];
}

View file

@ -1,13 +0,0 @@
{ lib, config, ... }:
let
inherit (lib) mkIf;
inherit (builtins) elem;
host = config.ooknet.host;
in
{
config = mkIf (elem "workstation" host.function){
programs.dconf.enable = true;
};
}

View file

@ -1,7 +0,0 @@
{ ... }:
{
programs.kdeconnect = {
enable = true;
};
}

View file

@ -2,12 +2,11 @@
let
inherit (lib) mkIf;
inherit (lib.lists) any elem;
hasFunction = f: elem f config.ooknet.host.function;
cfg = config.ooknet.services.dbus;
in
{
config = mkIf (any hasFunction ["workstation" "gaming"]) {
config = mkIf cfg.enable {
services.dbus = {
enable = true;
packages = with pkgs; [ dconf gcr udisks2 ];

View file

@ -0,0 +1,10 @@
{
imports = [
./system76Scheduler.nix
./dbus.nix
./gnome.nix
./gvfs.nix
# ./nixarr.nix
./flatpak.nix
];
}

View file

@ -0,0 +1,12 @@
{ lib, config, ... }:
let
inherit (lib) mkIf;
cfg = config.ooknet.services.flatpak;
in
{
config = mkIf cfg.enable {
services.flatpak.enable = true;
};
}

View file

@ -2,11 +2,11 @@
let
inherit (lib) mkIf;
host = config.ooknet.host;
cfg = config.ooknet.services.gnomeServices;
in
{
config = mkIf (host.type != "phone" && host.type != "server") {
config = mkIf cfg.enable {
services = {
gnome = {
glib-networking.enable = true;

View file

@ -2,11 +2,11 @@
let
inherit (lib) mkIf;
host = config.ooknet.host;
cfg = config.ooknet.services.gvfs;
in
{
config = mkIf ( host.type != "phone") {
config = mkIf cfg.enable {
services.gvfs.enable = true;
};
}

View file

@ -0,0 +1,29 @@
{ config, inputs, lib, ... }:
let
inherit (lib) mkIf;
admin = config.ooknet.host.admin;
cfg = config.ooknet.services.nixarr;
in
{
imports = [ inputs.nixarr.nixosModules.default ];
config = mkIf cfg.enable {
nixarr = {
enable = true;
mediaDir = "/jellyfin";
stateDir = "/var/lib/nixarr";
mediaUsers = ["${admin.name}"];
jellyfin.enable = true;
sonarr.enable = true;
radarr.enable = true;
prowlarr.enable = true;
transmission.enable = true;
};
fileSystems."/jellyfin" = {
device = "/dev/disk/by-label/jellyfin";
fsType = "btrfs";
};
};
}

View file

@ -2,12 +2,11 @@
let
inherit (lib) mkIf;
host = config.ooknet.host;
cfg = config.ooknet.services.system76Scheduler;
in
{
config = mkIf (host.type != "phone") {
config = mkIf cfg.enable {
services.system76-scheduler = {
enable = true;
};

View file

@ -0,0 +1,8 @@
{
imports = [
./gaming.nix
./host.nix
./programs.nix
./services.nix
];
}

14
nixos/options/gaming.nix Normal file
View file

@ -0,0 +1,14 @@
{ lib, ... }:
let
inherit (lib) mkEnableOption;
in
{
options.ooknet.gaming = {
steam.enable = mkEnableOption "";
gamescope.enable = mkEnableOption "";
gamemode.enable = mkEnableOption "";
openPorts.enable = mkEnableOption "";
};
}

View file

@ -24,7 +24,7 @@ in
};
profiles = mkOption {
type = listOf (enum ["gaming" "creativity" "media-server"]);
type = listOf (enum ["gaming" "creative" "productivity" "media-server"]);
default = [];
};

View file

@ -0,0 +1,13 @@
{ lib, ... }:
let
inherit (lib) mkEnableOption;
in
{
options.ooknet.programs = {
_1password.enable = mkEnableOption "";
dconf.enable = mkEnableOption "";
kdeconnect.enable = mkEnableOption "";
};
}

View file

@ -0,0 +1,16 @@
{ lib, ... }:
let
inherit (lib) mkEnableOption;
in
{
options.ooknet.services = {
nixarr.enable = mkEnableOption "";
gnomeServices.enable = mkEnableOption "";
gvfs.enable = mkEnableOption "";
dbus.enable = mkEnableOption "";
system76Scheduler.enable = mkEnableOption "";
flatpak.enable = mkEnableOption "";
};
}

View file

@ -0,0 +1,6 @@
{
imports = [
./gaming.nix
./media-server.nix
];
}

18
nixos/profiles/gaming.nix Normal file
View file

@ -0,0 +1,18 @@
{ lib, config, ... }:
let
inherit (lib) mkIf;
inherit (builtins) elem;
profiles = config.ooknet.host.profiles;
in
{
config = mkIf (elem "gaming" profiles) {
ooknet.gaming = {
steam.enable = true;
gamescope.enable = true;
gamemode.enable = true;
};
ooknet.services.flatpak.enable = true;
};
}

View file

@ -0,0 +1,13 @@
{ lib, config, ... }:
let
inherit (lib) mkIf;
inherit (builtins) elem;
profiles = config.ooknet.host.profiles;
in
{
config = mkIf (elem "media-server" profiles) {
ooknet.services.nixarr.enable = true;
};
}

5
nixos/roles/default.nix Normal file
View file

@ -0,0 +1,5 @@
{
imports = [
./desktop-workstation.nix
];
}

View file

@ -0,0 +1,24 @@
{ lib, config, ... }:
let
inherit (lib) mkIf;
host = config.ooknet.host;
in
{
config = mkIf (host.type == "desktop" && host.role == "workstation") {
ooknet = {
services = {
gnomeServices.enable = true;
gvfs.enable = true;
dbus.enable = true;
system76Scheduler.enable = true;
};
programs = {
_1password.enable = true;
dconf.enable = true;
kdeconnect.enable = true;
};
};
};
}

View file

@ -5,17 +5,9 @@ let
hm = inputs.home-manager.nixosModules.home-manager;
sys = "${self}/sys";
nixosModules = "${self}/nixos";
hosts = "${self}/hosts";
base = "${sys}/modules/base";
roles = "${sys}/modules/roles";
gaming = "${roles}/gaming";
workstation = "${roles}/workstation";
media-server = "${roles}/media-server";
specialArgs = {inherit inputs self;};
in
@ -27,9 +19,7 @@ in
modules = [
"${hosts}/ooksdesk"
hm
base
gaming
workstation
nixosModules
];
};
ookst480s = nixosSystem {
@ -38,9 +28,7 @@ in
modules = [
"${hosts}/ookst480s"
hm
base
workstation
nixosModules
];
};
ooksmedia = nixosSystem {
@ -49,11 +37,7 @@ in
modules = [
"${hosts}/ooksmedia"
hm
base
gaming
workstation
media-server
nixosModules
];
};
};