1
0
Fork 0
mirror of https://git.sr.ht/~neverness/ultima synced 2024-12-27 02:53:53 +00:00
This commit is contained in:
neverness 2024-12-20 22:10:11 +09:00
parent afeceb316d
commit 10e827be06
75 changed files with 816 additions and 1185 deletions

View file

@ -703,6 +703,21 @@
"type": "github"
}
},
"impermanence": {
"locked": {
"lastModified": 1734200366,
"narHash": "sha256-0NursoP4BUdnc+wy+Mq3icHkXu/RgP1Sjo0MJxV2+Dw=",
"owner": "nix-community",
"repo": "impermanence",
"rev": "c6323585fa0035d780e3d8906eb1b24b65d19a48",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "impermanence",
"type": "github"
}
},
"nix-update": {
"inputs": {
"flake-parts": "flake-parts_2",
@ -905,6 +920,26 @@
"type": "github"
}
},
"nypkgs": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1726657437,
"narHash": "sha256-eBeVOFceQkYfWHAwdQ+aM8vLAbsuuWUgek2f6dFBTl0=",
"owner": "yunfachi",
"repo": "nypkgs",
"rev": "698ab4159dc38affee2fc5886468af139de8d95e",
"type": "github"
},
"original": {
"owner": "yunfachi",
"repo": "nypkgs",
"type": "github"
}
},
"parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib_2"
@ -978,10 +1013,12 @@
"hardware": "hardware",
"home-manager": "home-manager",
"hyprland": "hyprland",
"impermanence": "impermanence",
"nixpkgs": "nixpkgs_3",
"nixpkgsMaster": "nixpkgsMaster",
"nixpkgsStable": "nixpkgsStable",
"nur": "nur",
"nypkgs": "nypkgs",
"parts": "parts",
"phani": "phani",
"spicetify": "spicetify",
@ -1315,11 +1352,11 @@
]
},
"locked": {
"lastModified": 1734232136,
"narHash": "sha256-rQd9jiPTGVchefiwJhx1xUlCLcnOCWQ7KlQ+Pkio9zU=",
"lastModified": 1734657663,
"narHash": "sha256-1Et05foPKYyWAHUftrrzWgfddnd0r0sm2WCuNeVDDkA=",
"owner": "0xc000022070",
"repo": "zen-browser-flake",
"rev": "6acd5e9515e0d53347b7883ac02ac7ab4bd03a2c",
"rev": "f5181bde713d1aa5c8d95d00f4f47cd937d2b3e8",
"type": "github"
},
"original": {

View file

@ -5,6 +5,7 @@
nixpkgsMaster.url = "github:nixos/nixpkgs/master"; # MASTER
nur.url = "github:nix-community/NUR"; # NUR
impermanence.url = "github:nix-community/impermanence"; # IMPERA
hardware.url = "github:NixOS/nixos-hardware/master"; # HARDWARE
parts.url = "github:hercules-ci/flake-parts"; # PARTS
gaming.url = "github:fufexan/nix-gaming"; # GAMING
@ -22,6 +23,10 @@
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
nypkgs = {
url = "github:yunfachi/nypkgs";
inputs.nixpkgs.follows = "nixpkgs";
};
zen = {
# COOL BROWSER
url = "github:0xc000022070/zen-browser-flake";
@ -64,9 +69,14 @@
};
};
outputs = inputs:
outputs =
inputs:
inputs.parts.lib.mkFlake { inherit inputs; } {
perSystem = { pkgs, ... }: { formatter = pkgs.nixfmt-rfc-style; };
perSystem =
{ pkgs, ... }:
{
formatter = pkgs.nixfmt-rfc-style;
};
systems = [ "x86_64-linux" ]; # YOUR SYSTEM IDK
imports = [ ./jetpure ]; # YOUR MACHINES
};

View file

@ -3,10 +3,12 @@ let
# CONFIGURATION
X = import ../libx/builder.nix {
inherit inputs lib;
disk = "/dev/disk/by-uuid/d8440438-2f95-4854-b139-bf0a3e91a81f";
# VARIABLES
hostName = "jetpure";
userName = "nixzoid";
flakeDir = "/persist/flake";
is = "desktop";
# SYS INFA
plfrm = "x86_64-linux";
ver = "24.05";

View file

@ -4,10 +4,7 @@ let
inherit (x) False;
in
{
imports = [
./parts
../../modules/home
];
imports = [ ./parts ];
module = {
programs = {
# PROGRAMS
@ -45,8 +42,6 @@ in
};
custom = {
anicli = True;
mabel = False;
torrent = False;
};
};
shells = {
@ -76,7 +71,7 @@ in
wm = {
# WINDOW MANAGER
hyprland = True;
sway = False;
sway = True;
terminals = {
# TERMINALS
kitty = True;
@ -86,9 +81,11 @@ in
misc = {
# IDK
mako = True;
waybar = False;
nwg = True;
rofi = True;
waybar = False;
wob = False;
yofi = False;
};
};
misc = {

View file

@ -1,18 +1,18 @@
{ x, config, ... }:
with x;
let
m = config.wayland.windowManager.sway.config.modifier;
X = "exec";
inherit (x) False;
in
{
module.wm.sway = {
bars = False;
programs = {
"${m}+b" = "${X} floorp";
# PROGRAMS
"${m}+b" = "${X} qutebrowser";
"${m}+v" = "${X} telegram-desktop";
"${m}+n" = "${X} kitty -T Explorer yazi";
"${m}+u" = "${X} onlyoffice-desktopeditors";
"${m}+i" = "${X} libreoffice";
# "${m}+i" = "${X} libreoffice";
};
};
}

View file

@ -4,10 +4,7 @@ let
inherit (x) False;
in
{
imports = [
./parts
../../modules/nixos
];
imports = [ ./parts ];
module = {
themes.stylix = True // {
theme = "paradise";
@ -22,6 +19,8 @@ in
boot = True // {
plymouth = True;
};
disko = True;
impermanence = False;
network = True;
security = True;
};

View file

@ -1,10 +1,6 @@
{ inputs, ... }:
{
imports = with inputs; [
imports = [
./disks.nix
./pkgs.nix
disko.nixosModules.default
(import ./disko.nix {
device = "/dev/by-id/ata-KINGSTON_SA400S37240G_50026B72828C9A2D";
})
];
}

View file

@ -1,82 +0,0 @@
{
device ? throw,
...
}:
{
# sudo nix run nixpkgs#disko -- --mode disko ./disko.nix --arg device '"/dev/sdX"'
disko.devices.disk.main = {
inherit device;
type = "disk";
content = {
type = "gpt";
partitions = {
esp = {
name = "esp";
size = "512M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [
"umask=0077"
"fmask=0077"
"dmask=0077"
];
};
};
root = {
name = "nixos";
size = "100%";
content = {
type = "btrfs";
extraArgs = [ "-f" ];
subvolumes = {
"/rootfs".mountpoint = "/";
"/home" = {
mountpoint = "/home";
mountOptions = [ "compress=zstd:5" ];
};
"/nix" = {
mountpoint = "/nix";
mountOptions = [
"compress=zstd:5"
"noatime"
];
};
"/persist" = {
mountpoint = "/persist";
mountOptions = [
"compress=zstd:5"
"noatime"
];
};
};
};
};
};
};
};
fileSystems =
let
fsType = "ext4";
options = [
"nosuid"
"nodev"
"nofail"
"x-gvfs-show"
];
in
{
"/mnt/HDD" = {
label = "BIG_BUCK";
device = "/dev/disk/by-uuid/9290bc08-17fe-47db-a535-d4044b8c8dfb";
inherit fsType options;
};
"/mnt/SSD" = {
label = "FAST_BITCH";
device = "/dev/disk/by-uuid/e6bc9034-95a4-43bd-b5f5-c7c1743e9f7c";
inherit fsType options;
};
};
}

View file

@ -0,0 +1,24 @@
{
fileSystems =
let
fsType = "ext4";
options = [
"nosuid"
"nodev"
"nofail"
"x-gvfs-show"
];
in
{
"/mnt/HDD" = {
label = "BIG_BUCK";
device = "/dev/disk/by-uuid/9290bc08-17fe-47db-a535-d4044b8c8dfb";
inherit fsType options;
};
"/mnt/SSD" = {
label = "FAST_BITCH";
device = "/dev/disk/by-uuid/e6bc9034-95a4-43bd-b5f5-c7c1743e9f7c";
inherit fsType options;
};
};
}

View file

@ -2,12 +2,14 @@
inputs,
lib,
# VARIABLES
disk ? null,
hostName ? "sus",
userName ? "amogus",
flakeDir ? null,
is ? null,
# SYSINFO
plfrm,
ver,
plfrm ? "x86_64-linux",
ver ? "24.05",
dev,
...
}:
@ -17,14 +19,16 @@
# OTHER
inherit (inputs.nixpkgs.lib) nixosSystem;
inherit (inputs.home-manager.lib) homeManagerConfiguration;
pkgs = inputs.nixpkgs.legacyPackages.x86_64-linux;
pkgs = inputs.nixpkgs.legacyPackages.${plfrm};
# NEEDS
sec = import ./secrets.nix;
x = import ./options.nix { inherit lib; } // {
x = import ./options.nix { inherit inputs pkgs lib; } // {
inherit
disk
hostName
userName
flakeDir
is
plfrm
ver
dev
@ -37,11 +41,17 @@
{
# CONFIGURATION
nixosConfigurations.${hostName} = nixosSystem {
modules = [ ../${hostName}/host ];
modules = [
../modules/nixos
../${hostName}/host
];
specialArgs = args;
};
homeConfigurations.${userName} = homeManagerConfiguration {
modules = [ ../${hostName}/home ];
modules = [
../modules/home
../${hostName}/home
];
extraSpecialArgs = args;
inherit pkgs;
};

View file

@ -1,5 +1,9 @@
{ lib, ... }:
with lib;
{
inputs,
pkgs,
lib,
...
}:
let
def = {
default = false;
@ -8,8 +12,12 @@ let
default = null;
};
in
with types;
{
with lib;
with lib.types;
rec {
# ylib
ypkgs = inputs.nypkgs.legacyPackages.${pkgs.system};
umport = ypkgs.lib.umport;
# enable = true; ++ enable = false;
True = {
enable = true;

View file

@ -1,9 +1,21 @@
{ x, ... }:
{
imports = [
./misc
./programs
./shells
./themes
./wm
];
imports = x.umport {
paths = [
./misc
./programs
./shells
./themes
./wm
];
# include & exclude files/directories
include = [
./programs/custom/anicli/default.nix
];
exclude = [
./programs/gui/floorp/addons.nix
./themes/stylix/image.nix
./programs/custom
];
};
}

View file

@ -1,9 +0,0 @@
{
imports = [
./home-manager
./minimal
./xdg
./dconf.nix
./nix.nix
];
}

View file

@ -15,7 +15,6 @@ in
mime.enable = mkBool;
};
imports = [ ./mimeApps.nix ];
config = {
xdg = {
mime = True;

View file

@ -1,20 +0,0 @@
{
imports = [
./bat
./cava
./eza
./fetch
./fzf
./git
./helix
./joshuto
./legendary
./micro
./rmpc
./rustmission
./top
./yazi
./zoxide
./pkgs.nix
];
}

View file

@ -1,4 +1,3 @@
{ ... }:
{
programs.helix.settings.keys = {
normal = {

View file

@ -16,12 +16,6 @@ in
};
};
imports = [
./settings.nix
./binds.nix
./languages.nix
./theme.nix
];
config = mkIf cfg.enable {
programs.helix = True // {
defaultEditor = true;

View file

@ -6,127 +6,169 @@ let
unit = " ";
};
auto-format = true;
in {
in
{
programs.helix = with pkgs; {
languages = {
language = let prettier = nodePackages_latest.prettier;
in [
language =
let
prettier = nodePackages_latest.prettier;
in
[
{
# NIX LSP
inherit auto-format indent;
name = "nix";
language-servers = [
"nixd"
"nil"
];
formatter.command = "${getExe nixfmt-rfc-style}";
}
{
# HTML
inherit auto-format indent;
name = "html";
language-servers = [ "vscode-html" ];
formatter = {
command = "${getExe prettier}";
args = [
"--use-tabs"
"--parser"
"html"
];
};
}
{
# JSON
inherit auto-format indent;
name = "json";
language-servers = [ "vscode-json" ];
formatter = {
command = "${getExe prettier}";
args = [
"--use-tabs"
"--parser"
"json"
];
};
}
{
# JSON
inherit auto-format indent;
name = "jsonc";
language-servers = [ "vscode-json" ];
formatter = {
command = "${getExe prettier}";
args = [
"--use-tabs"
"--parser"
"json"
];
};
}
{
# CSS
inherit auto-format indent;
name = "css";
language-servers = [ "vscode-css" ];
formatter = {
command = "${getExe prettier}";
args = [
"--use-tabs"
"--parser"
"css"
];
};
}
{
# MARKDOWN
inherit auto-format indent;
name = "markdown";
language-servers = [ "marksman" ];
formatter = {
command = "${getExe prettier}";
args = [
"--use-tabs"
"--parser"
"markdown"
];
};
}
{
# TYPESCRIPT
inherit auto-format indent;
name = "typescript";
language-servers = [ "typescript" ];
formatter = {
command = "${getExe prettier}";
args = [
"--use-tabs"
"--parser"
"typescript"
];
};
}
{
# PYTHON
inherit auto-format indent;
name = "python";
language-servers = [
"pylsp"
"ruff"
];
shebangs = [ "${getExe python39}" ];
file-types = [
"py"
"pyi"
"py3"
"pyw"
".pythonstartup"
".pythonrc"
];
roots = [
"."
"pyproject.toml"
"pyrightconfig.json"
];
comment-token = "#";
scope = "source.python";
injection-regex = "python";
formatter = {
command = "${getExe ruff}";
args = [
"format"
"-"
];
};
}
];
language-server =
let
vscode = vscode-langservers-extracted;
typescript = typescript-language-server;
in
{
# NIX LSP
name = "nix";
language-servers = [ "nixd" "nil" ];
formatter.command = "${getExe nixfmt-rfc-style}";
indent = indent;
inherit auto-format;
}
{
# HTML
name = "html";
language-servers = [ "vscode-html" ];
indent = indent;
inherit auto-format;
formatter = {
command = "${prettier}/bin/prettier";
args = [ "--use-tabs" "--parser" "html" ];
};
}
{
# JSON
name = "json";
language-servers = [ "vscode-json" ];
indent = indent;
inherit auto-format;
formatter = {
command = "${prettier}/bin/prettier";
args = [ "--use-tabs" "--parser" "json" ];
};
}
{
# JSON
name = "jsonc";
language-servers = [ "vscode-json" ];
indent = indent;
inherit auto-format;
formatter = {
command = "${prettier}/bin/prettier";
args = [ "--use-tabs" "--parser" "json" ];
};
}
{
# CSS
name = "css";
language-servers = [ "vscode-css" ];
indent = indent;
inherit auto-format;
formatter = {
command = "${prettier}/bin/prettier";
args = [ "--use-tabs" "--parser" "css" ];
};
}
{
# MARKDOWN
name = "markdown";
language-servers = [ "marksman" ];
indent = indent;
inherit auto-format;
formatter = {
command = "${prettier}/bin/prettier";
args = [ "--use-tabs" "--parser" "markdown" ];
};
}
{
# TYPESCRIPT
name = "typescript";
language-servers = [ "typescript" ];
indent = indent;
inherit auto-format;
formatter = {
command = "${prettier}/bin/prettier";
args = [ "--use-tabs" "--parser" "typescript" ];
};
}
{
# PYTHON
name = "python";
language-servers = [ "pylsp" "ruff" ];
shebangs = [ "${python39}/bin/python" ];
file-types = [ "py" "pyi" "py3" "pyw" ".pythonstartup" ".pythonrc" ];
roots = [ "." "pyproject.toml" "pyrightconfig.json" ];
comment-token = "#";
scope = "source.python";
injection-regex = "python";
indent = indent;
inherit auto-format;
formatter = {
command = "${ruff}/bin/ruff";
args = [ "format" "-" ];
};
}
];
language-server = let
vscode = vscode-langservers-extracted;
typescript = typescript-language-server;
in {
nil.command = "${nil}/bin/nil";
nixd.command = "${nixd}/bin/nixd";
typescript.command = "${typescript}/bin/typescript-language-server";
vscode-html.command = "${vscode}/bin/vscode-html-language-server";
vscode-json.command = "${vscode}/bin/vscode-json-language-server";
vscode-css.command = "${vscode}/bin/vscode-css-language-server";
marksman.command = "${marksman}/bin/marksman";
ruff.command = "${ruff-lsp}/bin/ruff-lsp";
pyright = {
command = "${pyright}/bin/pyright-langserver";
args = [ "--stdio" ];
config = {
reportMissingTypeStubs = false;
python.analysis = {
typeCheckingMode = "basic";
autoImportCompletions = true;
nil.command = "${getExe nil}";
nixd.command = "${getExe nixd}";
typescript.command = "${getExe typescript}";
vscode-html.command = "${vscode}/bin/vscode-html-language-server";
vscode-json.command = "${vscode}/bin/vscode-json-language-server";
vscode-css.command = "${vscode}/bin/vscode-css-language-server";
marksman.command = "${getExe marksman}";
ruff.command = "${getExe ruff-lsp}";
pyright = {
command = "${getExe pyright}";
args = [ "--stdio" ];
config = {
reportMissingTypeStubs = false;
python.analysis = {
typeCheckingMode = "basic";
autoImportCompletions = true;
};
};
};
};
};
};
extraPackages = with pkgs; [
# OTHER LSP

View file

@ -1,62 +0,0 @@
{
fetchurl,
nodeEnv,
globalBuildInputs ? [ ],
...
}:
let
sources = {
"@taplo/core-0.1.1" = {
name = "_at_taplo_slash_core";
packageName = "@taplo/core";
version = "0.1.1";
src = fetchurl {
url = "https://registry.npmjs.org/@taplo/core/-/core-0.1.1.tgz";
sha512 = "BG/zLGf5wiNXGEVPvUAAX/4ilB3PwDUY2o0MV0y47mZbDZ9ad9UK/cIQsILat3bqbPJsALVbU6k3cskNZ3vAQg==";
};
};
"@taplo/lib-0.4.0-alpha.2" = {
name = "_at_taplo_slash_lib";
packageName = "@taplo/lib";
version = "0.4.0-alpha.2";
src = fetchurl {
url = "https://registry.npmjs.org/@taplo/lib/-/lib-0.4.0-alpha.2.tgz";
sha512 = "DV/Re3DPVY+BhBtLZ3dmP4mP6YMLSsgq9qGLXwOV38lvNF/fBlgvQswzlXmzCEefL/3q2eMoefZpOI/+GLuCNA==";
};
};
"prettier-3.3.3" = {
name = "prettier";
packageName = "prettier";
version = "3.3.3";
src = fetchurl {
url = "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz";
sha512 = "i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==";
};
};
};
in
{
prettier-plugin-sh = nodeEnv.buildNodePackage {
name = "prettier-plugin-sh";
packageName = "prettier-plugin-sh";
version = "0.14.0";
src = fetchurl {
url = "https://registry.npmjs.org/prettier-plugin-toml/-/prettier-plugin-toml-2.0.1.tgz";
sha512 = "99z1YOkViECHtXQjGIigd3talI/ybUI1zB3yniAwUrlWBXupNXThB1hM6bwSMUEj2/+tomTlMtT98F5t4s8IWA==";
};
dependencies = [
sources."@taplo/core-0.1.1"
sources."@taplo/lib-0.4.0-alpha.2"
sources."prettier-3.3.3"
];
buildInputs = globalBuildInputs;
meta = {
description = "An opinionated `toml` formatter plugin for Prettier";
homepage = "https://github.com/un-ts/prettier/tree/master/packages/prettier";
license = "MIT";
};
production = true;
bypassCache = true;
reconstructLock = true;
};
}

View file

@ -1,4 +1,3 @@
{ ... }:
{
programs.helix = {
settings = {

View file

@ -16,10 +16,5 @@ in
};
};
imports = [
./mimetype.nix
./settings.nix
./theme.nix
];
config = mkIf cfg.enable { programs.joshuto = True; };
}

View file

@ -16,13 +16,5 @@ in
};
};
imports = [
./sets.nix
./binds.nix
./theme.nix
./lua.nix
./plugins.nix
./starship.nix
];
config = mkIf cfg.enable { programs.yazi = True // { }; };
}

View file

@ -1,37 +0,0 @@
{ lib, config, ... }:
{
xdg.configFile = {
"yazi/star.toml".text = ''
format = """
$directory\
$git_branch\
$git_status\
$git_metrics\
"""
[directory]
style = "bold fg:green"
format = "in [$path ]($style)"
truncation_length = 3
truncation_symbol = "/"
read_only = '[󰌾]'
read_only_style = 'bold fg:red'
[git_branch]
style = "bold fg:yellow"
[git_status]
style = "bold fg:red"
[git_metrics]
added_style = "bold fg:blue"
deleted_style = "bold fg:red"
[directory.substitutions]
"Documents" = "󰈙 "
"Downloads" = " "
"Music" = " "
"Pictures" = " "
'';
};
}

View file

@ -1,21 +0,0 @@
{
x,
pkgs,
lib,
config,
...
}:
with lib;
with x;
let
cfg = config.module.programs.custom.ctree;
in
{
options = {
module.programs.custom.ctree = {
enable = mkBool;
};
};
config = mkIf cfg.enable { home.packages = [ (pkgs.callPackage ./pkg.nix { }) ]; };
}

View file

@ -1,25 +0,0 @@
{
lib,
stdenv,
fetchurl,
}:
stdenv.mkDerivation rec {
pname = "ctree";
version = "1.0.4";
src = fetchurl {
url = "https://github.com/gleich/ctree/releases/download/v${version}/ctree_${version}_linux_amd64.tar.gz";
hash = "sha256-2gD6ESzpz9sMJx1iRL438lP4QR/PVCZ5vMqfkpG3e0E=";
};
# installPhase = ''
# mkdir -p $out/bin
# cp foo $out/bin
# '';
meta = with lib; {
homepage = "https://github.com/gleich/ctree";
maintainers = with maintainers; [ azikx ];
mainProgram = "ctree";
};
}

View file

@ -1,8 +0,0 @@
{
imports = [
./anicli
./ctree
./mabel
./torrent
];
}

View file

@ -1,21 +0,0 @@
{
x,
pkgs,
lib,
config,
...
}:
with lib;
with x;
let
cfg = config.module.programs.custom.mabel;
in
{
options = {
module.programs.custom.mabel = {
enable = mkBool;
};
};
config = mkIf cfg.enable { home.packages = [ (pkgs.callPackage ./pkg.nix { }) ]; };
}

View file

@ -1,25 +0,0 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "mabel";
version = "0.1.7";
src = fetchFromGitHub {
owner = "smmr-software";
repo = "mabel";
rev = "v${version}";
hash = "sha256-KqZGwicWCi+9TLF4AwD3zL/Kz5C2a9iXAtcQYaswpWo=";
};
vendorHash = "sha256-xWOPiSX2cEmekd2k96O81qn3ygW1nU1MU4qL+JJN0AE=";
meta = with lib; {
homepage = "https://github.com/smmr-software/mabel";
changelog = "https://github.com/smmr-software/mabel/releases/tag/v${version}";
maintainers = with maintainers; [ uwugda ];
mainProgram = "mabel";
};
}

View file

@ -1,21 +0,0 @@
{
x,
pkgs,
lib,
config,
...
}:
with lib;
with x;
let
cfg = config.module.programs.custom.torrent;
in
{
options = {
module.programs.custom.torrent = {
enable = mkBool;
};
};
config = mkIf cfg.enable { home.packages = [ (pkgs.callPackage ./pkg.nix { }) ]; };
}

View file

@ -1,11 +0,0 @@
{ buildPythonPackage, fetchurl }:
buildPythonPackage {
pname = "tor2mag";
version = "0.0.1";
doCheck = false;
src = fetchurl {
url = "https://raw.githubusercontent.com/repolho/torrent2magnet/refs/heads/master/torrent2magnet.py";
sha256 = "sha256-sXMCx9dYg/JYQqbsDHBMJqRqT16WPbBj1O3+Hqxxhkc=";
};
}

View file

@ -1,7 +0,0 @@
{
imports = [
./cli
./custom
./gui
];
}

View file

@ -1,14 +0,0 @@
{
imports = [
./floorp
./minecraft
./mpv
./obs
./qbittorrent
./qutebrowser
./spotify
./swayimg
./zed
./pkgs.nix
];
}

View file

@ -21,10 +21,6 @@ in
};
};
imports = [
./user
./settings.nix
];
config = mkIf cfg.enable {
programs.floorp = True // {
profiles.${userName} = {

View file

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

View file

@ -1,73 +0,0 @@
{
lib,
stdenv,
python3Packages,
fetchFromGitHub,
fetchurl,
installShellFiles,
libX11,
libXext,
libXcursor,
libXrandr,
libXxf86vm,
libpulseaudio,
libGL,
glfw,
openal,
udev,
flite,
java ? [ ],
}:
let
runtimeLibs = [
libX11
libXext
libXcursor
libXrandr
libXxf86vm
libpulseaudio
libGL
glfw
openal
(lib.getLib stdenv.cc.cc)
udev
] ++ lib.optional flite;
patch = fetchurl {
url = "https://raw.githubusercontent.com/NixOS/nixpkgs/refs/heads/nixos-unstable/pkgs/by-name/po/portablemc/use-builtin-java.patch";
hash = "";
};
in
python3Packages.buildPythonApplication rec {
pname = "portablemc";
version = "4.4.0";
pyproject = true;
disabled = python3Packages.pythonOlder "3.8";
src = fetchFromGitHub {
owner = "mindstorm38";
repo = "portablemc";
rev = "refs/tags/v${version}";
hash = "sha256-JDosvjbpoDC+xJ15ejcMJd+jA09RLR+whVZblMu+ljk=";
};
patches = [ patch ];
nativeBuildInputs = [ installShellFiles ];
build-system = [ python3Packages.poetry-core ];
dependencies = [ python3Packages.certifi ];
postInstall = ''
installShellCompletion --cmd portablemc \
--bash <($out/bin/portablemc show completion bash) \
--zsh <($out/bin/portablemc show completion zsh)
'';
preFixup = ''
makeWrapperArgs+=(
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath runtimeLibs}
--prefix PATH : ${lib.makeBinPath [ java ]}
)
'';
meta = {
mainProgram = "portablemc";
maintainers = with lib.maintainers; [
tomasajt
uwugda
];
};
}

View file

@ -17,10 +17,6 @@ in
};
};
imports = [
./bindings.nix
./osc.nix
];
config = mkIf cfg.enable {
programs.mpv = True // {
scripts = with pkgs.mpvScripts; [

View file

@ -0,0 +1,26 @@
{
x,
...
}:
with x;
let
us = "spawn --userscript";
in
{
programs.qutebrowser = True // {
keyBindings = {
normal = {
xb = "config-cycle statusbar.show always never";
xt = "config-cycle tabs.show always never";
xx = "config-cycle statusbar.show always never;; config-cycle tabs.show always never";
M = "hint links spawn mpv {hint-url}";
# QUTE PASS
zz = "${us} qute-pass";
zu = "${us} qute-pass --username-only";
zp = "${us} qute-pass --password-only";
# DOWNLOADS
sd = "${us} downloads";
};
};
};
}

View file

@ -19,15 +19,13 @@ in
};
config = mkIf cfg.enable {
home.packages = with pkgs; [ python312Packages.adblock ];
programs.qutebrowser = True // {
keyBindings = {
normal = {
xb = "config-cycle statusbar.show always never";
xt = "config-cycle tabs.show always never";
xx = "config-cycle statusbar.show always never;; config-cycle tabs.show always never";
};
};
settings = {
editor.command = [
"hx"
"{file}"
];
confirm_quit = [ "downloads" ];
scrolling = {
bar = "overlay";
@ -45,10 +43,13 @@ in
];
};
tabs = {
position = "top";
show = "switching";
tooltips = false;
max_width = 300;
min_width = 300;
title = {
format = "{audio}{index}: {current_title}";
format = "{index}: {current_title}";
format_pinned = "{index}";
};
};
@ -60,7 +61,20 @@ in
fg = frc "${base00}";
};
};
fonts = with config.stylix.fonts; {
default_family = mkForce "${monospace.name}";
};
content.blocking.enabled = true;
hints = {
scatter = false;
chars = "asdfghjkl";
};
};
searchEngines = {
DEFAULT = "https://www.google.com/search?hl=en&q={}";
nx = "https://wiki.nixos.org/index.php?search={}";
g = "https://www.google.com/search?hl=en&q={}";
d = "https://duckduckgo.com/?q={}";
};
greasemonkey = with pkgs; [
(fetchurl {

View file

@ -20,7 +20,7 @@ in
};
};
imports = [ inputs.spicetify.homeManagerModules.default ];
imports = with inputs; [ spicetify.homeManagerModules.default ];
config = mkIf cfg.enable {
programs.spicetify = True // {
theme = spicePkgs.themes.sleek // {

View file

@ -23,157 +23,151 @@ in
xdg.configFile = with config.lib.stylix.colors; {
"swayimg/config".text = ''
[general]
mode = viewer
position = parent
size = fullscreen
sigusr1 = reload
sigusr2 = next_file
app_id = swayimg
mode = viewer
position = parent
size = fullscreen
sigusr1 = reload
sigusr2 = next_file
app_id = swayimg
[viewer]
window = #000000ff
transparency = grid
scale = optimal
fixed = yes
antialiasing = no
slideshow = no
slideshow_time = 3
history = 1
preload = 1
window = #000000ff
transparency = grid
scale = optimal
fixed = yes
antialiasing = no
slideshow = no
slideshow_time = 3
history = 1
preload = 1
[gallery]
size = 200
cache = 100
fill = yes
antialiasing = yes
window = #${base00}ff
background = #${base01}ff
select = #${base02}ff
border = #${base0E}ff
shadow = #${base00}a0
size = 200
cache = 100
fill = yes
antialiasing = yes
window = #${base00}ff
background = #${base01}ff
select = #${base02}ff
border = #${base0E}ff
shadow = #${base00}a0
[list]
order = alpha
loop = yes
recursive = no
all = yes
order = alpha
loop = yes
recursive = no
all = yes
[font]
name = ${font.monospace.name}
size = 14
color = #${base06}ff
shadow = #${base00}a0
name = ${font.monospace.name}
size = 14
color = #${base06}ff
shadow = #${base00}a0
[info]
show = yes
info_timeout = 5
status_timeout = 3
show = yes
info_timeout = 5
status_timeout = 3
[info.viewer]
top_left = none
top_right = index
bottom_left = none
bottom_right = none
top_left = none
top_right = index
bottom_left = none
bottom_right = none
[info.gallery]
top_left = none
top_right = index
bottom_left = none
bottom_right = none
top_left = none
top_right = index
bottom_left = none
bottom_right = none
[keys.viewer]
F1 = help
Home = first_file
g = first_file
End = last_file
Shift+g = last_file
Prior = prev_file
Next = next_file
h = zoom +10
j = next_file
k = prev_file
l = zoom -10
Space = next_file
Shift+d = prev_dir
d = next_dir
Shift+o = prev_frame
o = next_frame
c = skip_file
Shift+s = slideshow
s = animation
f = fullscreen
Return = mode
Left = step_left 10
Right = step_right 10
Up = step_up 10
Down = step_down 10
Equal = zoom +10
Plus = zoom +10
Minus = zoom -10
w = zoom width
Shift+w = zoom height
z = zoom fit
Shift+z = zoom fill
0 = zoom real
BackSpace = zoom optimal
bracketleft = rotate_left
bracketright = rotate_right
m = flip_vertical
Shift+m = flip_horizontal
a = antialiasing
r = reload
i = info
Shift+Delete = exec rm "%"; skip_file
Escape = exit
q = exit
# Mouse related
ScrollLeft = step_right 5
ScrollRight = step_left 5
ScrollUp = step_up 5
ScrollDown = step_down 5
Ctrl+ScrollUp = zoom +10
Ctrl+ScrollDown = zoom -10
Shift+ScrollUp = prev_file
Shift+ScrollDown = next_file
Alt+ScrollUp = prev_frame
Alt+ScrollDown = next_frame
F1 = help
Home = first_file
g = first_file
End = last_file
Shift+g = last_file
Prior = prev_file
Next = next_file
h = zoom +10
j = next_file
k = prev_file
l = zoom -10
Space = next_file
Shift+d = prev_dir
d = next_dir
Shift+o = prev_frame
o = next_frame
c = skip_file
Shift+s = slideshow
s = animation
f = fullscreen
Return = mode
Left = step_left 10
Right = step_right 10
Up = step_up 10
Down = step_down 10
Equal = zoom +10
Plus = zoom +10
Minus = zoom -10
w = zoom width
Shift+w = zoom height
z = zoom fit
Shift+z = zoom fill
0 = zoom real
BackSpace = zoom optimal
bracketleft = rotate_left
bracketright = rotate_right
m = flip_vertical
Shift+m = flip_horizontal
a = antialiasing
r = reload
i = info
Shift+Delete = exec rm "%"; skip_file
Escape = exit
q = exit
# Mouse related
ScrollLeft = step_right 5
ScrollRight = step_left 5
ScrollUp = step_up 5
ScrollDown = step_down 5
Ctrl+ScrollUp = zoom +10
Ctrl+ScrollDown = zoom -10
Shift+ScrollUp = prev_file
Shift+ScrollDown = next_file
Alt+ScrollUp = prev_frame
Alt+ScrollDown = next_frame
[keys.gallery]
F1 = help
Home = first_file
g = first_file
End = last_file
Shift+g = last_file
Left = step_left
Right = step_right
Up = step_up
Down = step_down
h = step_left
j = step_down
k = step_up
l = step_right
Prior = page_up
Next = page_down
c = skip_file
f = fullscreen
Return = mode
a = antialiasing
r = reload
i = info
Shift+Delete = exec rm "%"; skip_file
Escape = exit
q = exit
# Mouse related
ScrollLeft = step_right
ScrollRight = step_left
ScrollUp = step_up
ScrollDown = step_down
F1 = help
Home = first_file
g = first_file
End = last_file
Shift+g = last_file
Left = step_left
Right = step_right
Up = step_up
Down = step_down
h = step_left
j = step_down
k = step_up
l = step_right
Prior = page_up
Next = page_down
c = skip_file
f = fullscreen
Return = mode
a = antialiasing
r = reload
i = info
Shift+Delete = exec rm "%"; skip_file
Escape = exit
q = exit
# Mouse related
ScrollLeft = step_right
ScrollRight = step_left
ScrollUp = step_up
ScrollDown = step_down
'';
};
};

View file

@ -1,13 +0,0 @@
{
imports = [
./bash
./fish
./nushell
./tmux
./zsh
./abbrs.nix
./alias.nix
./starship.nix
./var.nix
];
}

View file

@ -18,11 +18,6 @@ in
};
};
imports = [
./misc
./colors.nix
./plugins.nix
];
config = mkIf cfg.enable {
programs.fish = True // {
package = pkgs.fish;

View file

@ -1,45 +0,0 @@
{ x, ... }:
with x;
{
programs.fish.functions = {
clone.body = ''
echo "cd ~/git/"
cd $HOME/git
git clone $argv && cd $(basename $argv .git)
'';
# NIX
rebuild.body = ''
git add --all ${flakeDir}/.
for ARG in $argv
if [ $ARG = home ]
command nh home switch
return $status
else if [ $ARG = host ]
command sudo nh os switch
return $status
else
else if [ $ARG = both ]
command nh home switch
command sudo nh os switch
return $status
else
command echo "Select 'home' or 'host' os 'both'"
end
end
'';
nrun.body = ''
nix run nixpkgs#$argv
'';
nshell.body = ''
nix shell nixpkgs#$argv
'';
nbuild.body = ''
nix build nixpkgs#$argv
'';
nclean.body = ''
nix-env --delete-generations old
nix-store --gc
nix-collect-garbage -d
'';
};
}

View file

@ -1,6 +0,0 @@
{
imports = [
# IDK
# ./fish-helix.nix
];
}

View file

@ -1,29 +0,0 @@
{ pkgs, ... }:
{
xdg.configFile =
let
fun = "fish/functions";
hx = pkgs.fetchFromSourcehut {
owner = "~neverness";
repo = "fish_hx";
rev = "main";
sha256 = "sha256-57EWMjsUit8la6t62SVv5ocgY2EqrGx7sF2BjGWDw5Q=";
};
count = "fish_bind_count.fish";
cmd = "fish_helix_command.fish";
binds = "fish_helix_key_bindings.fish";
mode = "fish_default_mode_prompt.fish";
in
{
"${fun}/${count}".source = "${hx}/${count}";
"${fun}/${cmd}".source = "${hx}/${cmd}";
"${fun}/${binds}".source = "${hx}/${binds}";
"${fun}/${mode}".source = "${hx}/${mode}";
};
programs.fish.plugins = with pkgs.fishPlugins; [
{
name = "tide";
src = tide.src;
}
];
}

View file

@ -18,7 +18,6 @@ in
};
};
imports = [ ./plugins.nix ];
config = mkIf cfg.enable {
programs.zsh =
with pkgs;

View file

@ -1,7 +0,0 @@
{
imports = [
./gtk
./qt
./stylix
];
}

View file

@ -16,11 +16,6 @@ in
};
};
imports = [
./qt5ct.nix
./qt6ct.nix
./color.nix
];
config = mkIf cfg.enable {
qt = True // {
platformTheme.name = "qtct";

View file

@ -1,10 +1,11 @@
{ pkgs, config, ... }:
let
font = config.stylix.fonts;
st = "${pkgs.libsForQt5.qt5ct}/share/qt5ct/qss";
in
{
xdg.configFile = {
"qt5ct/qt5ct.conf".text = with pkgs.libsForQt5; ''
"qt5ct/qt5ct.conf".text = ''
[Appearance]
color_scheme_path=${config.home.homeDirectory}/.config/qt5ct/colors/paradise.conf
custom_palette=true
@ -24,13 +25,13 @@ in
double_click_interval=400
gui_effects=@Invalid()
keyboard_scheme=2
menus_have_icons=true
menus_have_icons=false
show_shortcuts_in_context_menus=true
stylesheets=@Invalid()
toolbutton_style=4
underline_shortcut=1
wheel_scroll_lines=3
stylesheets=${qt5ct}/share/qt5ct/qss/scrollbar-simple.qss, ${qt5ct}/share/qt5ct/qss/sliders-simple.qss, ${qt5ct}/share/qt5ct/qss/tooltip-simple.qss, ${qt5ct}/share/qt5ct/qss/traynotification-simple.qss
stylesheets=${st}/fusion-fixes.qss, ${st}/scrollbar-simple.qss, ${st}/sliders-simple.qss, ${st}/tooltip-simple.qss, ${st}/traynotification-simple.qss
[PaletteEditor]
geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\0\0\0\0\0\0\0\x2v\0\0\x2\x10\0\0\0\0\0\0\0\0\0\0\x2v\0\0\x2\x10\0\0\0\0\x2\0\0\0\a\x80\0\0\0\0\0\0\0\0\0\0\x2v\0\0\x2\x10)

View file

@ -1,10 +1,11 @@
{ pkgs, config, ... }:
let
font = config.stylix.fonts;
st = "${pkgs.qt6ct}/share/qt5ct/qss";
in
{
xdg.configFile = {
"qt6ct/qt6ct.conf".text = with pkgs; ''
"qt6ct/qt6ct.conf".text = ''
[Appearance]
color_scheme_path=${config.home.homeDirectory}/.config/qt6ct/colors/paradise.conf
custom_palette=true
@ -24,13 +25,13 @@ in
double_click_interval=400
gui_effects=@Invalid()
keyboard_scheme=2
menus_have_icons=true
menus_have_icons=false
show_shortcuts_in_context_menus=true
stylesheets=@Invalid()
toolbutton_style=4
underline_shortcut=1
wheel_scroll_lines=3
stylesheets=${qt6ct}/share/qt6ct/qss/scrollbar-simple.qss, ${qt6ct}/share/qt6ct/qss/sliders-simple.qss, ${qt6ct}/share/qt6ct/qss/tooltip-simple.qss, ${qt6ct}/share/qt6ct/qss/traynotification-simple.qss
stylesheets=${st}/fusion-fixes.qss, ${st}/scrollbar-simple.qss, ${st}/sliders-simple.qss, ${st}/tooltip-simple.qss, ${st}/traynotification-simple.qss
[PaletteEditor]
geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\0\0\0\0\0\0\0\x2v\0\0\x2\x10\0\0\0\0\0\0\0\0\0\0\x2v\0\0\x2\x10\0\0\0\0\x2\0\0\0\a\x80\0\0\0\0\0\0\0\0\0\0\x2v\0\0\x2\x10)

View file

@ -88,9 +88,13 @@ in
# WM
hyprland = True;
sway = True;
river = True;
# MISC PROGRAMS
foot = True;
kitty = True;
mako = False;
rofi = True;
bemenu = True;
# TOOLS
nixvim = True;
yazi = True;
@ -98,6 +102,7 @@ in
bat = True;
mangohud = True;
# GUI
spicetify = False;
vesktop = True;
qutebrowser = True;
firefox = True;

View file

@ -5,14 +5,11 @@
stylix = with pkgs; {
image =
let
img =
let
cfg = config.module.themes.stylix;
in
fetchurl {
url = cfg.image;
sha256 = cfg.hash;
};
cfg = config.module.themes.stylix;
img = fetchurl {
url = cfg.image;
sha256 = cfg.hash;
};
in
runCommand "output.png" { } ''
${lutgen}/bin/lutgen apply ${img} -o $out -- ${

View file

@ -1,8 +0,0 @@
{
imports = [
./hyprland
./misc
./sway
./terminals
];
}

View file

@ -1,10 +1,17 @@
{ pkgs, config, ... }:
{
pkgs,
lib,
config,
...
}:
with lib;
let
cfg = config.module.wm.hyprland;
mic = "fixf4=$(cat /sys/class/leds/platform::micmute/brightness); echo $((1-fixf4)) | doas tee /sys/class/leds/platform::micmute/brightness; wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle";
workspaces = (
builtins.concatLists (
builtins.genList (
workspaces =
with builtins;
(concatLists (
genList (
i:
let
ws = i + 1;
@ -14,8 +21,7 @@ let
"$mod SHIFT, code:1${toString i}, movetoworkspace, ${toString ws}"
]
) 10
)
);
));
in
{
wayland.windowManager.hyprland.settings = {
@ -38,10 +44,10 @@ in
"$ex" = "exec";
bind =
# KEYBOARD
with pkgs;
[
# MENU
"$m, $tb, exec, ${pkgs.nwg-drawer}/bin/nwg-drawer -ovl -nocats -nofs -d -c 5 -mb -49"
"$m, $tb, exec, ${getExe nwg-drawer} -ovl -nocats -nofs -d -c 5 -mb -49"
# BUILTIN COMMANDS
"$m, $sp, togglefloating"
@ -71,7 +77,9 @@ in
"$m, $nx, workspace, e+1"
"$m, $pr, workspace, e-1"
] ++ workspaces ++ cfg.programs;
]
++ workspaces
++ cfg.programs;
# HOLDING BUTTONS
binde =

View file

@ -20,11 +20,6 @@ in
};
};
imports = [
./binds.nix
./rules.nix
./sets.nix
];
config = mkIf cfg.enable {
wayland.windowManager.hyprland = True // {
xwayland = True;

View file

@ -1,27 +0,0 @@
{ pkgs, ... }:
{
wayland.windowManager.hyprland = {
plugins = with pkgs.hyprlandPlugins; [ hypr-dynamic-cursors ];
settings.plugin =
let
dynamic-cursors = {
enabled = true;
mode = "stretch";
threshold = 2;
stretch = {
limit = 3000;
function = "quadratic";
};
hyprcursor = {
nearest = false;
enabled = true;
resolution = "-1";
fallback = "clientside";
};
};
in
{
inherit dynamic-cursors;
};
};
}

View file

@ -9,6 +9,7 @@ in
wayland.windowManager.hyprland = {
settings = with config.lib.stylix.colors; {
env = [ "SLURP_ARGS, -b ${base00}CC -c ${base0F}FF -B ${base02}CC" ];
exec-once = cfg.autostart;
monitor =
let
res = "1920x1080";
@ -17,7 +18,6 @@ in
trs = "0";
in
"eDP-1, ${res}@${fps}, 0x0, ${scl}, transform, ${trs}";
exec-once = cfg.autostart;
# APPERANCE
general = {
@ -88,7 +88,6 @@ in
input = {
kb_layout = "us,ru";
kb_options = "grp:caps_toggle";
accel_profile = "adaptive";
touchpad = {
natural_scroll = false;
disable_while_typing = true;

View file

@ -1,8 +0,0 @@
{
imports = [
./mako
./nwg
./waybar
./wob
];
}

View file

@ -0,0 +1,35 @@
{
x,
pkgs,
lib,
config,
...
}:
with lib;
with x;
let
cfg = config.module.wm.misc.rofi;
in
{
options = {
module.wm.misc.rofi = {
enable = mkBool;
};
};
config = mkIf cfg.enable {
programs.rofi = True // {
location = "bottom";
terminal = "kitty";
package = pkgs.rofi-wayland;
plugins = with pkgs; [
rofi-file-browser
rofi-power-menu
rofi-screenshot
rofi-bluetooth
rofi-calc
rofimoji
];
};
};
}

View file

@ -16,7 +16,6 @@ in
};
};
imports = [ ./style.nix ];
config = mkIf cfg.enable {
programs.waybar =
with config.lib.stylix.colors;
@ -41,6 +40,19 @@ in
"9" = "";
"10" = "";
};
bat_icons = [
"󰁺"
"󰁻"
"󰁼"
"󰁽"
"󰁾"
"󰁿"
"󰂀"
"󰂁"
"󰂂"
"󰁹"
];
in
{
layer = "top";
@ -165,9 +177,6 @@ in
5
6
7
8
9
10
];
};
};
@ -211,18 +220,7 @@ in
format = "{capacity}% {icon}";
format-alt = "{time} {icon}";
format-charging = "{capacity}% 󱐋";
format-icons = [
"󰁺"
"󰁻"
"󰁼"
"󰁽"
"󰁾"
"󰁿"
"󰂀"
"󰂁"
"󰂂"
"󰁹"
];
format-icons = bat_icons;
states = {
critical = 15;
warning = 30;

View file

@ -0,0 +1,60 @@
{
x,
pkgs,
lib,
config,
...
}:
with lib;
with x;
let
cfg = config.module.wm.misc.yofi;
font = config.stylix.fonts;
icon = config.gtk.iconTheme.name;
in
{
options = {
module.wm.misc.yofi = {
enable = mkBool;
};
};
config = mkIf cfg.enable {
home.packages = with pkgs; [ yofi ];
xdg.configFile = with config.lib.stylix.colors; {
"yofi/yofi.config".text = ''
width = 500
height = 300
force_window = false
corner_radius = "32"
font = "${font.monospace.name}"
font_size = 24
bg_color = 0x${base00}ff
bg_border_color = 0x${base0E}ff
bg_border_width = 4.0
font_color = 0x${base0E}ff
[input_text]
font_color = 0x${base0F}ff
bg_color = 0x${base01}ff
margin = "8" # equivalent to "5 5 5 5"
padding = "3 -4" # equivalent to "1.7 -4 1.7 -4"
corner_radius = "12"
[list_items]
font_color = 0x${base0E}ff
selected_font_color = 0x${base0D}ff
match_color = 0x${base0A}ff
margin = "10 60"
hide_actions = true
action_left_margin = 60
item_spacing = 2
icon_spacing = 5
[icon]
theme = "${icon}"
size = 32
'';
};
};
}

View file

@ -8,7 +8,6 @@ let
# MODIFIERS
m = config.wayland.windowManager.sway.config.modifier;
s = "Shift";
c = "Ctrl";
a = "Alt";
# BUTTUONS
rt = "Return";
@ -24,76 +23,73 @@ let
# PROGRAMS
pic = "$(xdg-user-dir PICTURES)/$(date +'scr_%d-%m-%y|%H:%M:%S.png')";
in
with pkgs;
{
wayland.windowManager.sway.config.keybindings =
with pkgs;
lib.mkForce {
# SWAY NATIVE CMD
"${m}+q" = "kill";
"${m}+f" = "fullscreen";
"${m}+${s}+f" = "move position center";
wayland.windowManager.sway.config.keybindings = lib.mkForce {
# SWAY NATIVE CMD
"${m}+q" = "kill";
"${m}+f" = "fullscreen";
"${m}+${s}+f" = "move position center";
"${m}+${sp}" = "floating toggle";
"${m}+${sp}" = "floating toggle";
"${m}+w" = "${ex} killall -SIGUSR1 waybar";
# PROGRAMS
"${m}+w" = "${ex} killall -SIGUSR1 waybar";
"${m}+${tb}" = "${ex} rofi";
"Mod4+${rt}" = "${ex} kitty";
# PROGRAMS
"${m}+${rt}" = "${ex} ${kitty}/bin/kitty";
"${m}+${a}+${rt}" = "${ex} ${kitti3}/bin/kitti3";
# SCREENSHOT
"${pr}" = "${grimblast}/bin/grimblast copysave area";
"${pr}+${s}" = "${grimblast}/bin/grimblast copysave output ${pic}";
"${pr}+${a}" = "${grimblast}/bin/grimblast copysave active ${pic}";
"${m}+${tb}" = "${anyrun}/bin/anyrun";
# CONTROL
"${m}+g" = "layout tabbed";
"${m}+${s}+g" = "layout toggle split";
"${pr}" = "${grimblast}/bin/grimblast copysave area";
"${pr}+${s}" = "${grimblast}/bin/grimblast copysave output ${pic}";
"${pr}+${a}" = "${grimblast}/bin/grimblast copysave active ${pic}";
"${m}+p" = "move scratchpad";
"${m}+${s}+p" = "scratchpad show";
# CONTROL
"${m}+g" = "layout tabbed";
"${m}+${s}+g" = "layout toggle split";
"${m}+Home" = "exit";
"${m}+${s}+Home" = "reload";
"${m}+p" = "move scratchpad";
"${m}+${s}+p" = "scratchpad show";
# WORKSPACES SWITCH
"${m}+1" = "${ws} ${nm} 1";
"${m}+2" = "${ws} ${nm} 2";
"${m}+3" = "${ws} ${nm} 3";
"${m}+4" = "${ws} ${nm} 4";
"${m}+5" = "${ws} ${nm} 5";
"${m}+6" = "${ws} ${nm} 6";
"${m}+7" = "${ws} ${nm} 7";
"${m}+8" = "${ws} ${nm} 8";
"${m}+9" = "${ws} ${nm} 9";
"${m}+0" = "${ws} ${nm} 10";
"${m}+Home" = "exit";
"${m}+${s}+Home" = "reload";
# WORKSPACES MOVE
"${m}+${s}+1" = "${mv} ${cn} to ${ws} ${nm} 1";
"${m}+${s}+2" = "${mv} ${cn} to ${ws} ${nm} 2";
"${m}+${s}+3" = "${mv} ${cn} to ${ws} ${nm} 3";
"${m}+${s}+4" = "${mv} ${cn} to ${ws} ${nm} 4";
"${m}+${s}+5" = "${mv} ${cn} to ${ws} ${nm} 5";
"${m}+${s}+6" = "${mv} ${cn} to ${ws} ${nm} 6";
"${m}+${s}+7" = "${mv} ${cn} to ${ws} ${nm} 7";
"${m}+${s}+8" = "${mv} ${cn} to ${ws} ${nm} 8";
"${m}+${s}+9" = "${mv} ${cn} to ${ws} ${nm} 9";
"${m}+${s}+0" = "${mv} ${cn} to ${ws} ${nm} 10";
# WORKSPACES SWITCH
"${m}+1" = "${ws} ${nm} 1";
"${m}+2" = "${ws} ${nm} 2";
"${m}+3" = "${ws} ${nm} 3";
"${m}+4" = "${ws} ${nm} 4";
"${m}+5" = "${ws} ${nm} 5";
"${m}+6" = "${ws} ${nm} 6";
"${m}+7" = "${ws} ${nm} 7";
"${m}+8" = "${ws} ${nm} 8";
"${m}+9" = "${ws} ${nm} 9";
"${m}+0" = "${ws} ${nm} 10";
# HJKL
# "${m}+h" = "focus left";
# "${m}+j" = "focus down";
# "${m}+k" = "focus up";
# "${m}+l" = "focus right";
# WORKSPACES MOVE
"${m}+${s}+1" = "${mv} ${cn} to ${ws} ${nm} 1";
"${m}+${s}+2" = "${mv} ${cn} to ${ws} ${nm} 2";
"${m}+${s}+3" = "${mv} ${cn} to ${ws} ${nm} 3";
"${m}+${s}+4" = "${mv} ${cn} to ${ws} ${nm} 4";
"${m}+${s}+5" = "${mv} ${cn} to ${ws} ${nm} 5";
"${m}+${s}+6" = "${mv} ${cn} to ${ws} ${nm} 6";
"${m}+${s}+7" = "${mv} ${cn} to ${ws} ${nm} 7";
"${m}+${s}+8" = "${mv} ${cn} to ${ws} ${nm} 8";
"${m}+${s}+9" = "${mv} ${cn} to ${ws} ${nm} 9";
"${m}+${s}+0" = "${mv} ${cn} to ${ws} ${nm} 10";
"${m}+${s}+h" = "move left";
"${m}+${s}+j" = "move down";
"${m}+${s}+k" = "move up";
"${m}+${s}+l" = "move right";
# HJKL
"${m}+h" = "focus left";
"${m}+j" = "focus down";
"${m}+k" = "focus up";
"${m}+l" = "focus right";
"${m}+${s}+h" = "move left";
"${m}+${s}+j" = "move down";
"${m}+${s}+k" = "move up";
"${m}+${s}+l" = "move right";
"${m}+${a}+h" = "move workspace to output left";
"${m}+${a}+j" = "move workspace to output down";
"${m}+${a}+k" = "move workspace to output up";
"${m}+${a}+l" = "move workspace to output right";
};
"${m}+${a}+h" = "move workspace to output left";
"${m}+${a}+j" = "move workspace to output down";
"${m}+${a}+k" = "move workspace to output up";
"${m}+${a}+l" = "move workspace to output right";
};
}

View file

@ -16,15 +16,10 @@ in
enable = mkBool;
binds.enable = mkBool;
sets.enable = mkBool;
bars.enable = mkBool;
programs = mkOpt.attrs.str;
};
};
imports = [
./binds.nix
./sets.nix
];
config = mkIf cfg.enable {
wayland.windowManager.sway = True // {
package = pkgs.swayfx;

View file

@ -6,36 +6,33 @@
}:
with lib;
let
mod = config.wayland.windowManager.sway.config.modifier;
cfg = config.module.wm.sway;
font = config.stylix.fonts;
border = 2;
titlebar = false;
win = {
border = 2;
titlebar = false;
};
in
{
config = mkMerge [
(mkIf cfg.bars.enable {
wayland.windowManager.sway.config.bars = [ { command = "${waybar}/bin/waybar"; } ];
})
(mkIf cfg.sets.enable {
wayland.windowManager.sway = with config.lib.stylix.colors; {
config = with pkgs; {
# INPUTS
seat."*".hide_cursor = "1";
input."*" = {
xkb_layout = "us,ru";
xkb_options = "grp:caps_toggle";
};
# BARS
bars = [ ];
# AUTOSTART
startup = [
{ command = "${mako}/bin/mako"; }
{
command = "${autotiling-rs}/bin/autotiling-rs";
always = true;
}
{ command = "${autotiling-rs}/bin/autotiling-rs"; }
];
bars = [ ];
fonts = {
names = [ "${font.monospace.name}" ];
};
fonts.names = [ "${font.monospace.name}" ];
# MOVEMENT & BINDS
modifier = "Mod4";
bindkeysToCode = true;
@ -47,13 +44,11 @@ in
smartBorders = "on";
smartGaps = true;
};
window = {
inherit border titlebar;
window = win // {
hideEdgeBorders = "smart";
};
floating = with config.wayland.windowManager.sway.config; {
inherit border titlebar;
modifier = "${modifier}";
floating = win // {
modifier = "${mod}";
};
# COLORS
colors = lib.mkForce {

View file

@ -1,7 +0,0 @@
{
imports = [
./foot
./kitty
./wezterm
];
}

View file

@ -16,10 +16,5 @@ in
};
};
imports = [
./sets.nix
./binds.nix
./colors.nix
];
config = mkIf cfg.enable { programs.kitty = True // { }; };
}

View file

@ -1,11 +1,20 @@
{ x, ... }:
{
imports = [
./base
./hardware
./misc
./programs
./services
./theme
./virt
];
imports = x.umport {
paths = [
./base
./hardware
./misc
./programs
./services
./themes
./virt
];
# include & exclude files/directories
include = [ ];
exclude = [
./services/transmission/torque.nix
./programs/torrserver/package.nix
];
};
}

View file

@ -1,10 +0,0 @@
{
imports = [
./amd
./bluetooth
./boot
./network
./security
./sound
];
}

View file

@ -0,0 +1,79 @@
{
x,
inputs,
lib,
config,
...
}:
with lib;
with x;
let
cfg = config.module.hardware.disko;
device = "${disk}";
in
{
options = {
module.hardware.disko = {
enable = mkBool;
};
};
imports = with inputs; [
disko.nixosModules.default
];
config = mkIf cfg.enable {
disko.devices.disk.main = {
inherit device;
type = "disk";
content = {
type = "gpt";
partitions = {
esp = {
name = "esp";
size = "512M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [
"umask=0077"
"fmask=0077"
"dmask=0077"
];
};
};
root = {
name = "nixos";
size = "100%";
content = {
type = "btrfs";
extraArgs = [ "-f" ];
subvolumes = {
"/rootfs".mountpoint = "/";
"/home" = {
mountpoint = "/home";
mountOptions = [ "compress=zstd:5" ];
};
"/nix" = {
mountpoint = "/nix";
mountOptions = [
"compress=zstd:5"
"noatime"
];
};
"/persist" = {
mountpoint = "/persist";
mountOptions = [
"compress=zstd:5"
"noatime"
];
};
};
};
};
};
};
};
};
}

View file

@ -17,62 +17,39 @@ in
};
};
imports = [ inputs.impermanence.nixosModules.impermanence ];
imports = with inputs; [ impermanence.nixosModules.impermanence ];
config = mkIf cfg.enable {
programs.fuse.userAllowOther = true;
environment.persistence."/persistent" = {
enable = true; # NB: Defaults to true, not needed
hideMounts = true;
directories = [
"/var/log"
"/var/lib/bluetooth"
"/var/lib/nixos"
"/var/lib/systemd/coredump"
"/etc/NetworkManager/system-connections"
{
directory = "/var/lib/colord";
user = "colord";
group = "colord";
mode = "u=rwx,g=rx,o=";
boot.initrd.systemd.services.rollback = {
description = "Rollback BTRFS root subvolume to a pristine state";
unitConfig.DefaultDependencies = "no";
serviceConfig.Type = "oneshot";
wantedBy = [ "initrd.target" ];
after = [ "systemd-cryptsetup@crypted.service" ];
before = [ "sysroot.mount" ];
script = ''
mkdir -p /btrfs_tmp
mount ${disk} /btrfs_tmp
if [[ -e /btrfs_tmp/root ]]; then
mkdir -p /btrfs_tmp/old_roots
timestamp=$(date --date="@$(stat -c %Y /btrfs_tmp/root)" "+%Y-%m-%-d_%H:%M:%S")
mv /btrfs_tmp/root "/btrfs_tmp/old_roots/$timestamp"
fi
delete_subvolume_recursively() {
IFS=$'\n'
for i in $(btrfs subvolume list -o "$1" | cut -f 9- -d ' '); do
delete_subvolume_recursively "/btrfs_tmp/$i"
done
btrfs subvolume delete "$1"
}
];
files = [
"/etc/machine-id"
{
file = "/var/keys/secret_file";
parentDirectory = {
mode = "u=rwx,g=,o=";
};
}
];
users.talyz = {
directories = [
"Downloads"
"Music"
"Pictures"
"Documents"
"Videos"
"VirtualBox VMs"
{
directory = ".gnupg";
mode = "0700";
}
{
directory = ".ssh";
mode = "0700";
}
{
directory = ".nixops";
mode = "0700";
}
{
directory = ".local/share/keyrings";
mode = "0700";
}
".local/share/direnv"
];
files = [ ".screenrc" ];
};
for i in $(find /btrfs_tmp/old_roots/ -maxdepth 1 -mtime +30); do
delete_subvolume_recursively "$i"
done
btrfs subvolume create /btrfs_tmp/root
umount /btrfs_tmp
'';
};
};
}

View file

@ -1,14 +0,0 @@
{
imports = [
./console
./locales
./minimal
./power
./protonmail
./system76
./terraria
./users
./variables
./nix.nix
];
}

View file

@ -1,11 +0,0 @@
{
imports = [
./common
./hamachi
./hyprland
./steam
./sway
./torrserver
./winapps
];
}

View file

@ -1,16 +0,0 @@
{
imports = [
./autocpu
./dbus
./deluge
./getty
./gvfs
./polkit
./printing
./tailscale
./tlp
./transmission
./zapret
./zram
];
}

View file

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