Compare commits

..

30 commits
main ... gnome

Author SHA1 Message Date
Leonardo Eugênio 5bccabc8c8 update 2024-09-15 19:50:52 -03:00
Leonardo Eugênio 9f05154dad home: remove engrampa 2024-09-13 19:52:58 -03:00
Leonardo Eugênio 8d37bc0c88 update 2024-09-11 20:26:53 -03:00
Leonardo Eugênio ba07cf6a42 gnome: show controller battery in top bar 2024-09-11 20:26:37 -03:00
Leonardo Eugênio 0a4cabca4b monolith: don't use controller touchpads as mice 2024-09-11 20:26:08 -03:00
Leonardo Eugênio b2bdcb1724 helix: minor updates 2024-09-06 00:10:22 -03:00
Leonardo Eugênio 16d3af4edb update 2024-09-05 22:14:22 -03:00
Leonardo Eugênio 8e839d9174 monolith: undervolt to -120 2024-09-05 22:14:15 -03:00
Leonardo Eugênio d710bed16a firefox: improve theme 2024-09-05 22:13:38 -03:00
Leonardo Eugênio d6d5643040 Revert "monolith: switch to latest kernel"
This reverts commit 42de0ba722.
2024-09-02 19:13:59 -03:00
Leonardo Eugênio 99168284c6 update 2024-08-30 19:25:43 -03:00
Leonardo Eugênio 42de0ba722 monolith: switch to latest kernel 2024-08-30 19:25:36 -03:00
Leonardo Eugênio 03fd8951d8 krita: fix missing thumbnails 2024-08-30 18:29:12 -03:00
Leonardo Eugênio 6cc1f8a381 firefox: hide private browsing icon 2024-08-29 12:55:50 -03:00
Leonardo Eugênio b6799321c1 hardware: remove controller hacks 2024-08-28 19:56:54 -03:00
Leonardo Eugênio 14d4d41b48 update 2024-08-28 10:52:38 -03:00
Leonardo Eugênio 139d76bca8 environment: set codium as default editor 2024-08-28 10:52:32 -03:00
Leonardo Eugênio 65edfe5a9a gnome: install draw-on-your-screen2 2024-08-23 23:55:33 -03:00
lelgenio a28e50f48a syncthing: restore syncthing 2024-08-23 16:15:23 -03:00
Leonardo Eugênio 8e028e7066 vscode: update config 2024-08-23 14:12:47 -03:00
Leonardo Eugênio 79d96e3c60 vscode: fix nix formatter 2024-08-22 18:05:40 -03:00
Leonardo Eugênio 7d6c0d50d7 vscode: fix typescript and other extensions 2024-08-22 18:05:18 -03:00
Leonardo Eugênio 92c5040b91 fish: remove useless init commands 2024-08-21 11:48:45 -03:00
Leonardo Eugênio 59c5099cd6 monolith: enable auto updates 2024-08-20 19:43:49 -03:00
Leonardo Eugênio c6c4417aeb update 2024-08-20 19:39:53 -03:00
Leonardo Eugênio a7770ae62e scripts: cleanup old scripts 2024-08-20 19:21:57 -03:00
Leonardo Eugênio 2e2f2239a5 tree-wide: remove sway related config 2024-08-20 19:16:39 -03:00
Leonardo Eugênio 7780de1f47 variables: switch to gnome 2024-08-20 14:16:08 -03:00
Leonardo Eugênio b094f8ea74 firefox: update gnome theme 2024-08-20 14:15:58 -03:00
Leonardo Eugênio 9ffd7e1175 firefox: remove extensions 2024-08-20 14:15:46 -03:00
140 changed files with 482 additions and 8047 deletions

View file

@ -57,22 +57,6 @@
"type": "gitlab" "type": "gitlab"
} }
}, },
"catboy-spinner": {
"flake": false,
"locked": {
"lastModified": 1728098748,
"narHash": "sha256-FHM/a+wqctmg1LXf/XB6TcXowL0Wzbq1kSCGVnxGgL8=",
"ref": "refs/heads/main",
"rev": "c6fc11b0900826508f6a766c65cf92e0c7c4eab9",
"revCount": 4,
"type": "git",
"url": "https://git.lelgenio.com/lelgenio/catboy-spinner"
},
"original": {
"type": "git",
"url": "https://git.lelgenio.com/lelgenio/catboy-spinner"
}
},
"crane": { "crane": {
"inputs": { "inputs": {
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
@ -98,27 +82,6 @@
} }
}, },
"crane_2": { "crane_2": {
"inputs": {
"nixpkgs": [
"made-you-look",
"nixpkgs"
]
},
"locked": {
"lastModified": 1718730147,
"narHash": "sha256-QmD6B6FYpuoCqu6ZuPJH896ItNquDkn0ulQlOn4ykN8=",
"owner": "ipetkov",
"repo": "crane",
"rev": "32c21c29b034d0a93fdb2379d6fabc40fc3d0e6c",
"type": "github"
},
"original": {
"owner": "ipetkov",
"repo": "crane",
"type": "github"
}
},
"crane_3": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"warthunder-leak-counter", "warthunder-leak-counter",
@ -213,11 +176,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1730190761, "lastModified": 1724769572,
"narHash": "sha256-o5m5WzvY6cGIDupuOvjgNSS8AN6yP2iI9MtUC6q/uos=", "narHash": "sha256-K+HQbC2/hnGngIB019mX6f4XUrf7dB1eBfiUHW4Vx48=",
"owner": "nix-community", "owner": "nix-community",
"repo": "disko", "repo": "disko",
"rev": "3979285062d6781525cded0f6c4ff92e71376b55", "rev": "b89a61129f3976d6440e2356ac5d3e30930f7012",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -226,22 +189,40 @@
"type": "github" "type": "github"
} }
}, },
"dzgui": {
"flake": false,
"locked": {
"lastModified": 1702780245,
"narHash": "sha256-cdW5LN2Q7eYW8xIqKPQfeYPd7e6VdJGaoA9NMHesCrE=",
"owner": "aclist",
"repo": "dztui",
"rev": "28323f3edb8fa747dc559d1939ccdd7729e4e3a1",
"type": "github"
},
"original": {
"owner": "aclist",
"repo": "dztui",
"type": "github"
}
},
"dzgui-nix": { "dzgui-nix": {
"inputs": { "inputs": {
"dzgui": "dzgui",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
] ]
}, },
"locked": { "locked": {
"lastModified": 1727831626, "lastModified": 1702850463,
"narHash": "sha256-Gvt5lapgNRRTL95gFH8vm48f8gjsk7GYM4Qo5aUOzzo=", "narHash": "sha256-qR/c/GjsLUzrCyHN/Q9nnClduf6OqTg26S1AFYKPzxA=",
"owner": "lelgenio", "owner": "lelgenio",
"repo": "dzgui-nix", "repo": "dzgui-nix",
"rev": "38cf2b507d75cc36ec127b21fc5a4144fc821525", "rev": "2ed6515b27d8186b9fedfe1dcaf861f07e796a0d",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "lelgenio", "owner": "lelgenio",
"ref": "dzgui-4.1.0",
"repo": "dzgui-nix", "repo": "dzgui-nix",
"type": "github" "type": "github"
} }
@ -353,7 +334,7 @@
}, },
"flake-utils_4": { "flake-utils_4": {
"inputs": { "inputs": {
"systems": "systems_4" "systems": "systems_5"
}, },
"locked": { "locked": {
"lastModified": 1681202837, "lastModified": 1681202837,
@ -391,24 +372,6 @@
"inputs": { "inputs": {
"systems": "systems_7" "systems": "systems_7"
}, },
"locked": {
"lastModified": 1681202837,
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "cfacdce06f30d2b68473a46042957675eebb3401",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_7": {
"inputs": {
"systems": "systems_8"
},
"locked": { "locked": {
"lastModified": 1710146030, "lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
@ -423,22 +386,6 @@
"type": "github" "type": "github"
} }
}, },
"hello-fonts": {
"flake": false,
"locked": {
"lastModified": 1728232065,
"narHash": "sha256-1DUW1YqZALPFxBM7HYcNZiCZQvMqUiJ1m04NU4IIe3I=",
"ref": "refs/heads/main",
"rev": "10f7485fea930bb45e97fbda0cd68f199a7e8f59",
"revCount": 1,
"type": "git",
"url": "https://git.lelgenio.com/lelgenio/hello-fonts"
},
"original": {
"type": "git",
"url": "https://git.lelgenio.com/lelgenio/hello-fonts"
}
},
"home-manager": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -446,11 +393,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1726989464, "lastModified": 1720042825,
"narHash": "sha256-Vl+WVTJwutXkimwGprnEtXc/s/s8sMuXzqXaspIGlwM=", "narHash": "sha256-A0vrUB6x82/jvf17qPCpxaM+ulJnD8YZwH9Ci0BsAzE=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "2f23fa308a7c067e52dfcc30a0758f47043ec176", "rev": "e1391fb22e18a36f57e6999c7a9f966dc80ac073",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -460,28 +407,6 @@
"type": "github" "type": "github"
} }
}, },
"made-you-look": {
"inputs": {
"crane": "crane_2",
"flake-utils": "flake-utils_4",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1728159958,
"narHash": "sha256-r/h/ch70KfOQ8moftDhHagu3WajglaqU+hrEzUtTM1Y=",
"ref": "refs/heads/main",
"rev": "96e978aa2f414d4b92b78e7ae975d7ff7db95a91",
"revCount": 3,
"type": "git",
"url": "https://git.lelgenio.com/lelgenio/made-you-look"
},
"original": {
"type": "git",
"url": "https://git.lelgenio.com/lelgenio/made-you-look"
}
},
"nix-index-database": { "nix-index-database": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -489,11 +414,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1729999765, "lastModified": 1724576102,
"narHash": "sha256-LYsavZXitFjjyETZoij8usXjTa7fa9AIF3Sk3MJSX+Y=", "narHash": "sha256-uM7n5nNL6fmA0bwMJBNll11f4cMWOFa2Ni6F5KeIldM=",
"owner": "Mic92", "owner": "Mic92",
"repo": "nix-index-database", "repo": "nix-index-database",
"rev": "0e3a8778c2ee218eff8de6aacf3d2fa6c33b2d4f", "rev": "e333d62b70b179da1dd78d94315e8a390f2d12e5",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -531,11 +456,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1730137625, "lastModified": 1726320982,
"narHash": "sha256-9z8oOgFZiaguj+bbi3k4QhAD6JabWrnv7fscC/mt0KE=", "narHash": "sha256-RuVXUwcYwaUeks6h3OLrEmg14z9aFXdWppTWPMTwdQw=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "64b80bfb316b57cdb8919a9110ef63393d74382a", "rev": "8f7492cce28977fbf8bd12c72af08b1f6c7c3e49",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -546,16 +471,16 @@
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1729880355, "lastModified": 1726334142,
"narHash": "sha256-RP+OQ6koQQLX5nw0NmcDrzvGL8HDLnyXt/jHhL1jwjM=", "narHash": "sha256-SxGeAYrGoCnaGkQHNzGvExpgJv1pfS5J2pMX7zlwWxE=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "18536bf04cd71abd345f9579158841376fdd0c5a", "rev": "d9d07251f12399413e6d33d5875a6f1994ef75a7",
"type": "github" "type": "github"
}, },
"original": { "original": {
"id": "nixpkgs", "id": "nixpkgs",
"ref": "nixos-unstable", "ref": "nixpkgs-unstable",
"type": "indirect" "type": "indirect"
} }
}, },
@ -594,14 +519,11 @@
"root": { "root": {
"inputs": { "inputs": {
"agenix": "agenix", "agenix": "agenix",
"catboy-spinner": "catboy-spinner",
"demoji": "demoji", "demoji": "demoji",
"dhist": "dhist", "dhist": "dhist",
"disko": "disko", "disko": "disko",
"dzgui-nix": "dzgui-nix", "dzgui-nix": "dzgui-nix",
"hello-fonts": "hello-fonts",
"home-manager": "home-manager", "home-manager": "home-manager",
"made-you-look": "made-you-look",
"nix-index-database": "nix-index-database", "nix-index-database": "nix-index-database",
"nixos-mailserver": "nixos-mailserver", "nixos-mailserver": "nixos-mailserver",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
@ -609,11 +531,8 @@
"plymouth-themes": "plymouth-themes", "plymouth-themes": "plymouth-themes",
"ranger-icons": "ranger-icons", "ranger-icons": "ranger-icons",
"tlauncher": "tlauncher", "tlauncher": "tlauncher",
"tomater": "tomater",
"vpsadminos": "vpsadminos",
"warthunder-leak-counter": "warthunder-leak-counter", "warthunder-leak-counter": "warthunder-leak-counter",
"wl-crosshair": "wl-crosshair", "wl-crosshair": "wl-crosshair"
"youre-wrong": "youre-wrong"
} }
}, },
"rust-analyzer-src": { "rust-analyzer-src": {
@ -765,24 +684,9 @@
"type": "github" "type": "github"
} }
}, },
"systems_8": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"tlauncher": { "tlauncher": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_5", "flake-utils": "flake-utils_4",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
] ]
@ -801,25 +705,9 @@
"url": "https://git.lelgenio.xyz/lelgenio/tlauncher-nix" "url": "https://git.lelgenio.xyz/lelgenio/tlauncher-nix"
} }
}, },
"tomater": {
"flake": false,
"locked": {
"lastModified": 1728089744,
"narHash": "sha256-WOz/qUKyao7lM2qcwqqcJDw4jI8mUJL6kNUNm0sxPKk=",
"ref": "refs/heads/main",
"rev": "efff561c745514a7874e3f5de95307a74efc7df9",
"revCount": 1,
"type": "git",
"url": "https://git.lelgenio.com/lelgenio/tomater"
},
"original": {
"type": "git",
"url": "https://git.lelgenio.com/lelgenio/tomater"
}
},
"utils": { "utils": {
"inputs": { "inputs": {
"systems": "systems_5" "systems": "systems_4"
}, },
"locked": { "locked": {
"lastModified": 1709126324, "lastModified": 1709126324,
@ -835,25 +723,10 @@
"type": "github" "type": "github"
} }
}, },
"vpsadminos": {
"locked": {
"lastModified": 1730290190,
"narHash": "sha256-a+op2lnWrCytuEhLOE24SKR/irRfjwDEHkpLyAL5P90=",
"owner": "vpsfreecz",
"repo": "vpsadminos",
"rev": "63ac771b9667b45ab2ea87363f69ca7f85668e9b",
"type": "github"
},
"original": {
"owner": "vpsfreecz",
"repo": "vpsadminos",
"type": "github"
}
},
"warthunder-leak-counter": { "warthunder-leak-counter": {
"inputs": { "inputs": {
"crane": "crane_3", "crane": "crane_2",
"flake-utils": "flake-utils_6", "flake-utils": "flake-utils_5",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
] ]
@ -874,7 +747,7 @@
}, },
"wl-crosshair": { "wl-crosshair": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_7", "flake-utils": "flake-utils_6",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
] ]
@ -892,22 +765,6 @@
"repo": "wl-crosshair", "repo": "wl-crosshair",
"type": "github" "type": "github"
} }
},
"youre-wrong": {
"flake": false,
"locked": {
"lastModified": 1728228087,
"narHash": "sha256-W40rQbQAo3lGrKlfenSA8JaGwZMSx/X4lP71enQtK7Y=",
"ref": "refs/heads/main",
"rev": "64e7876233e99ad7223cae29688374a1c1ff569a",
"revCount": 2,
"type": "git",
"url": "https://git.lelgenio.com/lelgenio/youre-wrong"
},
"original": {
"type": "git",
"url": "https://git.lelgenio.com/lelgenio/youre-wrong"
}
} }
}, },
"root": "root", "root": "root",

View file

@ -2,13 +2,9 @@
description = "My system config"; description = "My system config";
inputs = { inputs = {
nixpkgs.url = "nixpkgs/nixos-24.05"; nixpkgs.url = "nixpkgs/nixos-24.05";
nixpkgs-unstable.url = "nixpkgs/nixos-unstable";
home-manager.url = "github:nix-community/home-manager/release-24.05"; home-manager.url = "github:nix-community/home-manager/release-24.05";
home-manager.inputs.nixpkgs.follows = "nixpkgs"; home-manager.inputs.nixpkgs.follows = "nixpkgs";
vpsadminos.url = "github:vpsfreecz/vpsadminos";
nix-index-database = { nix-index-database = {
url = "github:Mic92/nix-index-database"; url = "github:Mic92/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
@ -33,7 +29,7 @@
}; };
dzgui-nix = { dzgui-nix = {
url = "github:lelgenio/dzgui-nix"; url = "github:lelgenio/dzgui-nix/dzgui-4.1.0";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
@ -62,26 +58,6 @@
url = "git+https://git.lelgenio.com/lelgenio/warthunder-leak-counter"; url = "git+https://git.lelgenio.com/lelgenio/warthunder-leak-counter";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
made-you-look = {
url = "git+https://git.lelgenio.com/lelgenio/made-you-look";
inputs.nixpkgs.follows = "nixpkgs";
};
catboy-spinner = {
url = "git+https://git.lelgenio.com/lelgenio/catboy-spinner";
flake = false;
};
tomater = {
url = "git+https://git.lelgenio.com/lelgenio/tomater";
flake = false;
};
youre-wrong = {
url = "git+https://git.lelgenio.com/lelgenio/youre-wrong";
flake = false;
};
hello-fonts = {
url = "git+https://git.lelgenio.com/lelgenio/hello-fonts";
flake = false;
};
}; };
outputs = outputs =
inputs: inputs:
@ -99,9 +75,7 @@
pkgs = import inputs.nixpkgs nixpkgsConfig; pkgs = import inputs.nixpkgs nixpkgsConfig;
lib = inputs.nixpkgs.lib; lib = inputs.nixpkgs.lib;
packages = import ./pkgs { inherit pkgs inputs; }; old_overlays = (import ./overlays { inherit inputs; });
old_overlays = (import ./overlays { inherit packages inputs; });
specialArgs = { specialArgs = {
inherit inputs; inherit inputs;
@ -111,8 +85,6 @@
{ nixpkgs.pkgs = pkgs; } { nixpkgs.pkgs = pkgs; }
./system/configuration.nix ./system/configuration.nix
./system/secrets.nix ./system/secrets.nix
./system/greetd.nix
{ login-manager.greetd.enable = desktop == "sway"; }
inputs.agenix.nixosModules.default inputs.agenix.nixosModules.default
inputs.dzgui-nix.nixosModules.default inputs.dzgui-nix.nixosModules.default
@ -148,10 +120,16 @@
./hosts/monolith ./hosts/monolith
./system/monolith-gitlab-runner.nix ./system/monolith-gitlab-runner.nix
./system/monolith-forgejo-runner.nix ./system/monolith-forgejo-runner.nix
./system/nix-serve.nix
./system/steam.nix ./system/steam.nix
] ++ common_modules; ] ++ common_modules;
}; };
rainbow = lib.nixosSystem {
inherit system specialArgs;
modules = [
./hosts/rainbow
./system/rainbow-gitlab-runner.nix
] ++ common_modules;
};
double-rainbow = lib.nixosSystem { double-rainbow = lib.nixosSystem {
inherit system specialArgs; inherit system specialArgs;
modules = [ modules = [
@ -174,10 +152,7 @@
}; };
phantom = lib.nixosSystem { phantom = lib.nixosSystem {
inherit system specialArgs; inherit system specialArgs;
modules = [ modules = [ ./hosts/phantom ];
{ nixpkgs.pkgs = pkgs; }
./hosts/phantom
];
}; };
}; };
@ -192,7 +167,7 @@
modules = [ ./user/home.nix ]; modules = [ ./user/home.nix ];
}; };
packages.${system} = pkgs // packages; packages.${system} = pkgs;
formatter.${system} = pkgs.nixfmt-rfc-style; formatter.${system} = pkgs.nixfmt-rfc-style;
}; };

View file

@ -44,7 +44,7 @@ in
fsType = "vfat"; fsType = "vfat";
}; };
swapDevices = [ { device = "/swapfile"; } ]; swapDevices = [ ];
services.udev.extraRules = '' services.udev.extraRules = ''
# Force all disks to use mq-deadline scheduler # Force all disks to use mq-deadline scheduler

View file

@ -1,44 +0,0 @@
{ pkgs, lib, ... }:
let
undervoltGpu = pkgs.writeShellScript "undervolt-gpu" ''
set -xe
cd $1
echo "manual" > power_dpm_force_performance_level
echo "1" > pp_power_profile_mode
test -e pp_od_clk_voltage
echo "vo -120" > pp_od_clk_voltage
echo "c" > pp_od_clk_voltage
'';
in
{
boot.initrd.kernelModules = [ "amdgpu" ];
boot.kernelParams = [
"amdgpu.dcdebugmask=0x10" # amdgpu undervolting bug
"video=DP-1:1920x1080@144"
"amdgpu.ppfeaturemask=0xfffd7fff" # enable undervolting
];
systemd.services.amd-fan-control = {
script = ''
${lib.getExe pkgs.amd-fan-control} /sys/class/drm/card1/device 60 85
'';
wantedBy = [ "multi-user.target" ];
};
hardware.opengl.driSupport = true;
# # For 32 bit applications
hardware.opengl.driSupport32Bit = true;
hardware.opengl.extraPackages = with pkgs; [
libva
libvdpau
vaapiVdpau
rocm-opencl-icd
rocm-opencl-runtime
rocmPackages.rocm-smi
];
services.udev.extraRules = ''
ACTION=="add", SUBSYSTEM=="hwmon", ATTR{name}=="amdgpu", ATTR{power1_cap}="186000000", RUN+="${undervoltGpu} %S%p/device"
'';
}

View file

@ -23,8 +23,7 @@ in
imports = [ imports = [
(modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
./partition.nix ./partition.nix
./amdgpu.nix ./undervolt.nix
./factorio-server.nix
]; ];
boot.initrd.availableKernelModules = [ boot.initrd.availableKernelModules = [
"nvme" "nvme"
@ -37,22 +36,35 @@ in
hardware.opentabletdriver.enable = true; hardware.opentabletdriver.enable = true;
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.extraModulePackages = with config.boot.kernelPackages; [ zenpower ]; boot.extraModulePackages = with config.boot.kernelPackages; [ zenpower ];
boot.initrd.kernelModules = [ "amdgpu" ]; boot.initrd.kernelModules = [ "amdgpu" ];
boot.kernelModules = [ boot.kernelModules = [
"kvm-amd" "kvm-amd"
"amdgpu" "amdgpu"
"zenpower" "zenpower"
]; ];
boot.kernelParams = [
"amdgpu.dcdebugmask=0x10" # amdgpu undervolting bug
"video=DP-1:1920x1080@144"
];
systemd.sleep.extraConfig = '' systemd.sleep.extraConfig = ''
HibernateDelaySec=30s HibernateDelaySec=30s
SuspendState=mem SuspendState=mem
''; '';
hardware.opengl.driSupport = true;
# # For 32 bit applications
hardware.opengl.driSupport32Bit = true;
hardware.opengl.extraPackages = with pkgs; [
libva
libvdpau
vaapiVdpau
rocm-opencl-icd
rocm-opencl-runtime
rocmPackages.rocm-smi
];
fileSystems."/mnt/old" = { fileSystems."/mnt/old" = {
device = "/dev/disk/by-label/BTRFS_ROOT"; device = "/dev/disk/by-label/BTRFS_ROOT";
fsType = "btrfs"; fsType = "btrfs";
@ -134,9 +146,10 @@ in
virtualisation.virtualbox.host.enable = true; virtualisation.virtualbox.host.enable = true;
services.udev.extraRules = '' services.udev.extraRules = ''
# Fix broken suspend with Logitech USB dongle # Disable using controller touchpad as mouse
# `lsusb | grep Logitech` will return "vendor:product" # https://wiki.archlinux.org/title/Gamepad#libinput
ACTION=="add" SUBSYSTEM=="usb" ATTR{idVendor}=="046d" ATTR{idProduct}=="c547" ATTR{power/wakeup}="disabled" ATTRS{name}=="Wireless Controller Touchpad", ENV{LIBINPUT_IGNORE_DEVICE}="1"
# Force all disks to use mq-deadline scheduler # Force all disks to use mq-deadline scheduler
# For some reason "noop" is used by default which is kinda bad when io is saturated # For some reason "noop" is used by default which is kinda bad when io is saturated
ACTION=="add|change", KERNEL=="sd[a-z]*[0-9]*|mmcblk[0-9]*p[0-9]*|nvme[0-9]*n[0-9]*p[0-9]*", ATTR{../queue/scheduler}="mq-deadline" ACTION=="add|change", KERNEL=="sd[a-z]*[0-9]*|mmcblk[0-9]*p[0-9]*|nvme[0-9]*n[0-9]*p[0-9]*", ATTR{../queue/scheduler}="mq-deadline"
@ -161,4 +174,16 @@ in
# size = (1024 * 16) + (1024 * 2); # RAM size + 2 GB # size = (1024 * 16) + (1024 * 2); # RAM size + 2 GB
# } # }
# ]; # ];
system.autoUpgrade = {
enable = true;
dates = "04:40";
operation = "switch";
flags = [
"--update-input"
"nixpkgs"
"--print-build-logs"
];
flake = "/home/lelgenio/projects/nixos-config#monolith";
};
} }

View file

@ -1,17 +0,0 @@
{ config, pkgs, ... }:
{
services.factorio = {
enable = true;
package = pkgs.factorio-headless; # I override this in ./pkgs
public = true;
lan = true;
openFirewall = true;
admins = [ "lelgenio" ];
extraSettingsFile = config.age.secrets.factorio-settings.path;
};
age.secrets.factorio-settings = {
file = ../../secrets/factorio-settings.age;
mode = "777";
};
}

View file

@ -0,0 +1,18 @@
{ pkgs, ... }:
let
undervoltGpu = pkgs.writeShellScript "undervolt-gpu" ''
set -xe
cd $1
echo "manual" > power_dpm_force_performance_level
echo "1" > pp_power_profile_mode
test -e pp_od_clk_voltage
echo "vo -120" > pp_od_clk_voltage
echo "c" > pp_od_clk_voltage
'';
in
{
boot.kernelParams = [ "amdgpu.ppfeaturemask=0xfffd7fff" ];
services.udev.extraRules = ''
ACTION=="add", SUBSYSTEM=="hwmon", ATTR{name}=="amdgpu", ATTR{power1_cap}="186000000", RUN+="${undervoltGpu} %S%p/device"
'';
}

View file

@ -6,7 +6,7 @@
}: }:
{ {
imports = [ imports = [
inputs.vpsadminos.nixosConfigurations.container ./vpsadminos.nix
inputs.agenix.nixosModules.default inputs.agenix.nixosModules.default
../../system/nix.nix ../../system/nix.nix
./hardware-config.nix ./hardware-config.nix
@ -18,9 +18,9 @@
./writefreely.nix ./writefreely.nix
./email.nix ./email.nix
./forgejo.nix ./forgejo.nix
./warthunder-leak-counter.nix
./invidious.nix ./invidious.nix
./davi.nix ./davi.nix
./goofs.nix
]; ];
networking.hostName = "phantom"; networking.hostName = "phantom";
@ -56,18 +56,6 @@
identityPaths = [ "/root/.ssh/id_rsa" ]; identityPaths = [ "/root/.ssh/id_rsa" ];
}; };
virtualisation.docker = {
enable = true;
daemon.settings = {
# needed by bitbucket runner ???
log-driver = "json-file";
log-opts = {
max-size = "10m";
max-file = "3";
};
};
};
nix.settings = { nix.settings = {
cores = 1; cores = 1;
max-jobs = 1; max-jobs = 1;

View file

@ -27,9 +27,6 @@ in
ENABLED = true; ENABLED = true;
DEFAULT_ACTIONS_URL = "github"; DEFAULT_ACTIONS_URL = "github";
}; };
repository = {
ENABLE_PUSH_CREATE_USER = true;
};
server = { server = {
DOMAIN = "git.lelgenio.com"; DOMAIN = "git.lelgenio.com";
HTTP_PORT = 3000; HTTP_PORT = 3000;

View file

@ -1,46 +0,0 @@
{ inputs, config, ... }:
{
imports = [
inputs.warthunder-leak-counter.nixosModules.default
inputs.made-you-look.nixosModules.default
];
services.warthunder-leak-counter.enable = true;
services.nginx.virtualHosts."warthunder-leak-counter.lelgenio.com" = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://127.0.0.1:${toString config.services.warthunder-leak-counter.port}";
};
};
services.made-you-look.enable = true;
services.nginx.virtualHosts."coolest-thing-ever.lelgenio.com" = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://127.0.0.1:${toString config.services.made-you-look.port}";
};
};
services.nginx.virtualHosts."catboy-spinner.lelgenio.com" = {
enableACME = true;
forceSSL = true;
root = inputs.catboy-spinner;
};
services.nginx.virtualHosts."tomater.lelgenio.com" = {
enableACME = true;
forceSSL = true;
root = inputs.tomater;
};
services.nginx.virtualHosts."youre-wrong.lelgenio.com" = {
enableACME = true;
forceSSL = true;
root = inputs.youre-wrong;
};
services.nginx.virtualHosts."hello-fonts.lelgenio.com" = {
enableACME = true;
forceSSL = true;
root = inputs.hello-fonts;
};
}

View file

@ -5,12 +5,6 @@
... ...
}: }:
{ {
fileSystems."/var/lib/syncthing-data" = {
device = "172.16.130.7:/nas/5749/syncthinng_data";
fsType = "nfs";
options = [ "nofail" ];
};
swapDevices = [ swapDevices = [
{ {
device = "/swap/swapfile"; device = "/swap/swapfile";

View file

@ -1,40 +1,12 @@
{ {
inputs,
pkgs,
config,
...
}:
{
# Replace with unstable, since 24.05 does not have sig-helper
disabledModules = [ "services/web-apps/invidious.nix" ];
imports = [ (inputs.nixpkgs-unstable + "/nixos/modules/services/web-apps/invidious.nix") ];
services.invidious = { services.invidious = {
enable = true; enable = true;
domain = "invidious.lelgenio.com"; domain = "invidious.lelgenio.com";
nginx.enable = true; nginx.enable = true;
port = 10601; port = 10601;
http3-ytproxy.enable = true; settings.db = {
sig-helper = { user = "invidious";
enable = true; dbname = "invidious";
package = pkgs.unstable.inv-sig-helper;
}; };
# {
# "visitor_data": "...",
# "po_token": "..."
# }
extraSettingsFile = config.age.secrets.phantom-invidious-settings.path;
settings = {
force_resolve = "ipv6";
db = {
user = "invidious";
dbname = "invidious";
};
};
};
age.secrets.phantom-invidious-settings = {
file = ../../secrets/phantom-invidious-settings.age;
mode = "666";
}; };
} }

View file

@ -0,0 +1,76 @@
# This file provides compatibility for NixOS to run in a container on vpsAdminOS
# hosts.
#
# If you're experiencing issues, try updating this file to the latest version
# from vpsAdminOS repository:
#
# https://github.com/vpsfreecz/vpsadminos/blob/staging/os/lib/nixos-container/vpsadminos.nix
{
config,
pkgs,
lib,
...
}:
with lib;
let
nameservers = [
"1.1.1.1"
"2606:4700:4700::1111"
];
in
{
networking.nameservers = mkDefault nameservers;
services.resolved = mkDefault { fallbackDns = nameservers; };
networking.dhcpcd.extraConfig = "noipv4ll";
systemd.services.systemd-sysctl.enable = false;
systemd.services.systemd-oomd.enable = false;
systemd.sockets."systemd-journald-audit".enable = false;
systemd.mounts = [
{
where = "/sys/kernel/debug";
enable = false;
}
];
systemd.services.rpc-gssd.enable = false;
# Due to our restrictions in /sys, the default systemd-udev-trigger fails
# on accessing PCI devices, etc. Override it to match only network devices.
# In addition, boot.isContainer prevents systemd-udev-trigger.service from
# being enabled at all, so add it explicitly.
systemd.additionalUpstreamSystemUnits = [ "systemd-udev-trigger.service" ];
systemd.services.systemd-udev-trigger.serviceConfig.ExecStart = [
""
"-udevadm trigger --subsystem-match=net --action=add"
];
boot.isContainer = true;
boot.enableContainers = mkDefault true;
boot.loader.initScript.enable = true;
boot.specialFileSystems."/run/keys".fsType = mkForce "tmpfs";
boot.systemdExecutable = mkDefault "/run/current-system/systemd/lib/systemd/systemd systemd.unified_cgroup_hierarchy=0";
# Overrides for <nixpkgs/nixos/modules/virtualisation/container-config.nix>
documentation.enable = mkOverride 500 true;
documentation.nixos.enable = mkOverride 500 true;
networking.useHostResolvConf = mkOverride 500 false;
services.openssh.startWhenNeeded = mkOverride 500 false;
# Bring up the network, /ifcfg.{add,del} are supplied by the vpsAdminOS host
systemd.services.networking-setup = {
description = "Load network configuration provided by the vpsAdminOS host";
before = [ "network.target" ];
wantedBy = [ "network.target" ];
after = [ "network-pre.target" ];
path = [ pkgs.iproute2 ];
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
ExecStart = "${pkgs.bash}/bin/bash /ifcfg.add";
ExecStop = "${pkgs.bash}/bin/bash /ifcfg.del";
};
unitConfig.ConditionPathExists = "/ifcfg.add";
restartIfChanged = false;
};
}

View file

@ -0,0 +1,19 @@
{
inputs,
pkgs,
config,
...
}:
{
imports = [ inputs.warthunder-leak-counter.nixosModules.default ];
services.warthunder-leak-counter.enable = true;
services.nginx.virtualHosts."warthunder-leak-counter.lelgenio.com" = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://127.0.0.1:${toString config.services.warthunder-leak-counter.port}";
};
};
}

85
hosts/rainbow/default.nix Normal file
View file

@ -0,0 +1,85 @@
# 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,
...
}:
let
btrfs_options = [
"compress=zstd:3"
"noatime"
"x-systemd.device-timeout=0"
];
btrfs_ssd = [
"ssd"
"discard=async"
];
in
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"usb_storage"
"usbhid"
"sd_mod"
];
boot.initrd.kernelModules = [ "i915" ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "/dev/disk/by-label/BTRFS_ROOT";
fsType = "btrfs";
options = [ "subvol=@nixos" ] ++ btrfs_options ++ btrfs_ssd;
};
boot.initrd.luks.devices = {
"main" = {
bypassWorkqueues = true;
device = "/dev/disk/by-label/CRYPT_ROOT";
};
};
fileSystems."/home" = {
device = "/dev/disk/by-label/BTRFS_ROOT";
fsType = "btrfs";
options = [ "subvol=@home" ] ++ btrfs_options ++ btrfs_ssd;
};
boot.loader.efi.efiSysMountPoint = "/boot/efi";
fileSystems."/boot/efi" = {
device = "/dev/disk/by-uuid/DC3B-5753";
fsType = "vfat";
};
fileSystems."/swap" = {
device = "/dev/disk/by-label/BTRFS_ROOT";
fsType = "btrfs";
options = [ "subvol=@swap" ] ++ btrfs_ssd;
};
swapDevices = [
{
device = "/swap/swapfile";
size = (1024 * 8);
}
];
# 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.enp1s0.useDHCP = lib.mkDefault true;
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
networking.hostName = "rainbow"; # Define your hostname.
}

View file

@ -1,21 +1,16 @@
{ inputs, packages, ... }: { inputs, ... }:
rec { rec {
all = [ all = [
scripts scripts
unstable
themes themes
(import ../pkgs)
new-packages new-packages
patches
lib_extended lib_extended
disko disko
]; ];
scripts = (import ../scripts); scripts = (import ../scripts);
unstable = final: prev: {
unstable = import inputs.nixpkgs-unstable { inherit (final) system config; };
};
themes = ( themes = (
final: prev: { final: prev: {
papirus_red = (final.papirus-icon-theme.override { color = "red"; }); papirus_red = (final.papirus-icon-theme.override { color = "red"; });
@ -39,28 +34,12 @@ rec {
} }
); );
new-packages = ( new-packages = final: prev: {
final: prev: dhist = inputs.dhist.packages.${prev.system}.dhist;
packages demoji = inputs.demoji.packages.${prev.system}.default;
// { tlauncher = inputs.tlauncher.packages.${prev.system}.tlauncher;
dhist = inputs.dhist.packages.${prev.system}.dhist; wl-crosshair = inputs.wl-crosshair.packages.${prev.system}.default;
demoji = inputs.demoji.packages.${prev.system}.default; };
tlauncher = inputs.tlauncher.packages.${prev.system}.tlauncher;
wl-crosshair = inputs.wl-crosshair.packages.${prev.system}.default;
}
);
patches = (
final: prev: {
mySway = prev.sway.override {
withBaseWrapper = true;
withGtkWrapper = true;
sway-unwrapped = prev.sway-unwrapped.overrideAttrs (old: {
patches = old.patches ++ [ ../patches/sway/fix-hide_cursor-clearing-focus.patch ];
});
};
}
);
lib_extended = ( lib_extended = (
final: prev: { final: prev: {

View file

@ -1,19 +0,0 @@
commit 9c516cc61775a88312280f7732328d5fdf7af825
Author: lelgenio <lelgenio@disroot.org>
Date: Mon May 22 11:30:01 2023 -0300
fix: limit lowest value for corner-radious at 0
diff --git a/src/_sass/_variables.scss b/src/_sass/_variables.scss
index 9915a22..6e87a4f 100644
--- a/src/_sass/_variables.scss
+++ b/src/_sass/_variables.scss
@@ -24,7 +24,7 @@ $large-icon-size: 32px;
//
$window-radius: $default_corner + $space-size;
-$corner-radius: if($compact == 'false', $default_corner, $default_corner - 2px);
+$corner-radius: if($compact == 'false', $default_corner, max(0, $default_corner - 2px));
$material-radius: $default_corner / 2 + 4px;
$menu-radius: $default_corner / 4 + $space-size + 2px;
$popup-radius: $default_corner + $space-size + 2px;

View file

@ -1,24 +0,0 @@
From b21dc487ac4bfc086cf295e06b8d8765a99e7266 Mon Sep 17 00:00:00 2001
From: lelgenio <lelgenio@disroot.org>
Date: Thu, 24 Jun 2021 22:36:10 -0300
Subject: [PATCH] Fix #6297
This makes it so that `seat hide_cursor` no longer clears cursor focus when hidding.
Clearing focus casuses problems whenever keyboard and mouse are to be used in conjunction.
---
sway/input/cursor.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/sway/input/cursor.c b/sway/input/cursor.c
index 96b5b93514..99fe3b4e3f 100644
--- a/sway/input/cursor.c
+++ b/sway/input/cursor.c
@@ -236,7 +236,6 @@ void cursor_update_image(struct sway_cursor *cursor,
static void cursor_hide(struct sway_cursor *cursor) {
wlr_cursor_set_image(cursor->cursor, NULL, 0, 0, 0, 0, 0, 0);
cursor->hidden = true;
- wlr_seat_pointer_notify_clear_focus(cursor->seat->wlr_seat);
}
static int hide_notify(void *data) {

View file

@ -1,38 +0,0 @@
{
lib,
rustPlatform,
fetchFromGitHub,
pkg-config,
openssl,
zlib,
stdenv,
Security ? null,
}:
rustPlatform.buildRustPackage rec {
pname = "cargo-checkmate";
version = "0.1.10";
src = fetchFromGitHub {
owner = "cargo-checkmate";
repo = pname;
rev = "v${version}";
hash = "sha256-I8l/r26cDdimjgy/+IsasF4iHX09UGjVj0Yf6ScI3wQ=";
};
cargoSha256 = "sha256-hOB84u55ishahIFSqBnqccqH3OlC9J8mCYzsd23jTyA=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security ];
meta = with lib; {
description = "Check all the things.";
longDescriptin = ''
Perform a series of useful checks out of the box. cargo-checkmate
ensures your project builds, tests pass, has good format, doesn't
have dependencies with known vulnerabilities, and so on.
'';
homepage = "https://github.com/cargo-checkmate/cargo-checkmate";
license = with licenses; [ mit ];
};
}

View file

@ -1,14 +1,7 @@
# Custom packages, that can be defined similarly to ones from nixpkgs final: prev:
# You can build them using 'nix build .#example' or (legacy) 'nix-build -A example' let
inherit (final) callPackage;
{ pkgs, inputs }: in
rec { {
cargo-checkmate = pkgs.callPackage ./cargo-checkmate.nix { }; draw-on-your-screen2 = callPackage ./draw-on-your-screen2 { };
lipsum = pkgs.callPackage ./lipsum.nix { };
emmet-cli = pkgs.callPackage ./emmet-cli.nix { };
material-wifi-icons = pkgs.callPackage ./material-wifi-icons.nix { };
gnome-pass-search-provider = pkgs.callPackage ./gnome-pass-search-provider.nix { };
factorio-headless = pkgs.callPackage ./factorio-headless {
inherit (pkgs.unstable) factorio-headless;
};
} }

View file

@ -0,0 +1,21 @@
{ fetchFromGitHub, stdenv }:
stdenv.mkDerivation {
pname = "draw-on-your-screen";
version = "unstable-2024-06-18";
src = fetchFromGitHub {
owner = "zhrexl";
repo = "DrawOnYourScreen2";
rev = "9b5c6633a1c2b8c5b35bac45276ad1302542ab9b";
hash = "sha256-J4ljx3HBe+86PGOIIgabtj8AuUAf88/bpTfRXowUng4=";
};
installPhase = ''
mkdir -p $out/share/gnome-shell/extensions/draw-on-your-screen2@zhrexl.github.com
cp -r ./* $out/share/gnome-shell/extensions/draw-on-your-screen2@zhrexl.github.com
mkdir -p $out/share/glib-2.0/
cp -r ./schemas/ $out/share/glib-2.0/
'';
}

View file

@ -1,27 +0,0 @@
{
lib,
buildNpmPackage,
fetchFromGitHub,
}:
buildNpmPackage rec {
pname = "emmet-cli";
version = "0.0.1";
src = fetchFromGitHub {
owner = "Delapouite";
repo = "emmet-cli";
rev = "407b0e8c59f65f205967d6be71105e0bd2001d62";
hash = "sha256-8lDgD1eIc2r5aB2baaiHKbkFdAxErX5p96MNqztR9rg=";
};
npmDepsHash = "sha256-Utgk/Cw83ffGr2/4aNkp3n3wSOojLZLA7OR+OakYBC0=";
dontNpmBuild = true;
meta = {
description = "Emmet command line interface";
homepage = "https://github.com/Delapouite/emmet-cli";
mainProgram = "emmet";
};
}

View file

@ -1,10 +0,0 @@
{ factorio-headless, pkgs }:
factorio-headless.overrideAttrs (_: rec {
version = "2.0.13";
src = pkgs.fetchurl {
name = "factorio_headless_x64-${version}.tar.xz";
url = "https://www.factorio.com/get-download/${version}/headless/linux64";
hash = "sha256-J7NpAaOeWTrfKEGMAoYULGx6n4PRVpY8c2m9QFolx9E=";
};
})

View file

@ -1,14 +0,0 @@
#!/bin/sh
set -xe
cd "$(dirname $0)"
current_version="$(rg '^.*?version\s*=\s*"(.+)".*?$' --replace '$1' ./default.nix)"
current_hash="$(rg '^.*?hash\s*=\s*"(.+)".*?$' --replace '$1' ./default.nix)"
new_version="$(curl https://factorio.com/api/latest-releases | jq -r .stable.headless)"
new_hash="$(nix-hash --to-sri --type sha256 $(nix-prefetch-url --type sha256 https://www.factorio.com/get-download/${new_version}/headless/linux64))"
sd "$current_version" "$new_version" ./default.nix
sd "$current_hash" "$new_hash" ./default.nix

View file

@ -1,64 +0,0 @@
{
stdenv,
fetchFromGitHub,
python3Packages,
wrapGAppsHook,
gtk3,
gobject-introspection,
gnome,
}:
let
inherit (python3Packages)
dbus-python
pygobject3
fuzzywuzzy
levenshtein
;
in
stdenv.mkDerivation rec {
pname = "gnome-pass-search-provider";
version = "1.4.0";
src = fetchFromGitHub {
owner = "jle64";
repo = "gnome-pass-search-provider";
rev = version;
hash = "sha256-PDR8fbDoT8IkHiTopQp0zd4DQg7JlacA6NdKYKYmrWw=";
};
nativeBuildInputs = [
python3Packages.wrapPython
wrapGAppsHook
];
propagatedBuildInputs = [
dbus-python
pygobject3
fuzzywuzzy
levenshtein
gtk3
gobject-introspection
];
env = {
LIBDIR = builtins.placeholder "out" + "/lib";
DATADIR = builtins.placeholder "out" + "/share";
};
postPatch = ''
substituteInPlace conf/org.gnome.Pass.SearchProvider.service.{dbus,systemd} \
--replace-fail "/usr/lib" "$LIBDIR"
'';
installPhase = ''
bash ./install.sh
'';
postFixup = ''
makeWrapperArgs=( "''${gappsWrapperArgs[@]}" )
wrapPythonProgramsIn "$out/lib" "$out $propagatedBuildInputs"
'';
}

View file

@ -1,32 +0,0 @@
{
stdenv,
fetchFromGitHub,
pkg-config,
vala,
wrapGAppsHook,
}:
stdenv.mkDerivation rec {
pname = "lipsum";
version = "0.0.1";
src = fetchFromGitHub {
owner = "hannenz";
repo = "lipsum";
rev = "0fb31e6ede10fbd78d7652f5fb21670cddd8e3ed";
hash = "sha256-a6uv0tJulN9cAGWxvQr8B0PUJEY8Rx4e759xzS66Xlo=";
};
nativeBuildInputs = [
pkg-config
vala
wrapGAppsHook
];
makeFlags = [ "PRG=${pname}" ];
installPhase = ''
install -Dm 755 "$pname" "$out/bin/$pname"
install -Dm 755 "./data/de.hannenz.lipsum.gschema.xml" "$out/share/glib-2.0/schemas/de.hannenz.lipsum.gschema.xml"
glib-compile-schemas "$out/share/glib-2.0/schemas/"
'';
}

View file

@ -1,16 +0,0 @@
{ stdenv, fetchFromGitHub }:
stdenv.mkDerivation rec {
pname = "material-wifi-icons";
version = "0.0.1";
src = fetchFromGitHub {
owner = "dcousens";
repo = "material-wifi-icons";
rev = "2daf6b3d96d65beb2a3e37a9a53556aab3826d97";
hash = "sha256-KykU5J7SdpBDG+6rkD//XeHd+6pK3qabe+88RduhwKc=";
};
installPhase = ''
install -D material-wifi.ttf $out/share/fonts/${pname}
'';
}

View file

@ -1,12 +0,0 @@
#!/bin/sh
exec diffr \
--colors 'refine-added:foreground:green:underline' \
--colors 'refine-added:background:none' \
--colors 'refine-removed:foreground:red:underline' \
--colors 'refine-removed:background:none' \
--colors 'added:foreground:green' \
--colors 'added:background:none' \
--colors 'removed:foreground:red' \
--colors 'removed:background:none' \
"$@"

View file

@ -1,30 +0,0 @@
{ pkgs, ... }:
pkgs.writeShellScriptBin "_gpg-unlock" ''
${pkgs.gnupg}/bin/gpg-connect-agent reloadagent /bye
set -e
test -f "$HOME/.config/.preset-password" || {
${pkgs.libnotify}/bin/notify-send "No preset password found"
exit 0;
}
get_keygrip() {
${pkgs.gnupg}/bin/gpg --list-secret-keys --with-keygrip |
${pkgs.gawk}/bin/awk '
/^ssb/ {
ssb=1
}
/Keygrip/{
if (ssb) print $3
}'
}
keygrip=$(get_keygrip)
test -n "$keygrip" || exit 0
${pkgs.coreutils}/bin/cat "$HOME/.config/.preset-password" |
${pkgs.coreutils}/bin/base64 -d |
${pkgs.gnupg}/libexec/gpg-preset-passphrase --preset "$keygrip"
''

View file

@ -1,11 +0,0 @@
#!/bin/sh
swayidlectl() {
systemctl --user $1 swayidle.service
}
if swayidlectl status > /dev/null; then
swayidlectl stop
else
swayidlectl start
fi

View file

@ -1,10 +0,0 @@
#!/bin/sh
for path
do
test -f "$path" &&
path=$(dirname "$path")
cd "$path"
terminal
done

View file

@ -1,50 +0,0 @@
#!/usr/bin/env bash
set -e
DEVICE="$1" # eg: /sys/class/drm/card1/device
HWMON=$(echo "$DEVICE"/hwmon/hwmon*)
exit() {
echo "Setting controll to auto" >&2
echo 2 > "$HWMON/pwm1_enable"
}
trap exit EXIT INT
bail() {
echo "Error: $@" >&2
echo "Exiting..." >&2
exit 1
}
if ! [ -d $HWMON ]; then
bail "Invalid HWMON"
fi
TEMP_INPUT="$HWMON/temp2_input"
if ! [ -f $TEMP_INPUT ]; then
bail "Invalid TEMP_INPUT"
fi
MIN="$2"
MAX="$3"
echo "Running..." >&2
while true; do
TEMPERATURE_RAW=$(cat "$TEMP_INPUT")
TEMPERATURE="$(( $TEMPERATURE_RAW / 1000 ))"
# Remap from a number between 60_000..90_000 to 0..255
PWM=$(( ($TEMPERATURE - $MIN) * 255 / ($MAX - $MIN) ))
if [ "$PWM" -gt 255 ]; then
PWM=255
elif [ "$PWM" -lt 0 ]; then
PWM=0
fi
echo 1 > "$HWMON/pwm1_enable"
echo "$PWM" > "$HWMON/pwm1"
sleep .1s
done

View file

@ -1,53 +0,0 @@
#!/usr/bin/env fish
# wrapper around bemenu
# bmenu * - use as dmenu, -p for custom prompt (man bemenu)
# bmenu run - select from .desktop files and run it
# bmenu start - internal option
if test "$argv[1]" = "run"
test -n "$argv[2]" && set t "$argv[2]" || set t "terminal"
test -n "$i3SOCK" && set wrapper 'i3-msg exec --'
test -n "$SWAYSOCK" && set wrapper 'swaymsg exec --'
exec j4-dmenu-desktop \
--dmenu="bmenu start -p Iniciar:" \
--term "$t" \
--wrapper="$wrapper" \
--no-generic
end
if test -n "$SWAYSOCK"
swaymsg -t get_outputs |
jq -r 'map(.focused)|reverse|index(true)' |
read focused_output
test -n "$focused_output"
and set focused_output "-m $focused_output"
end
set -l config "$HOME/.config/bmenu.conf"
if test -f $config
source $config
end
exec dhist wrap -- bemenu \
$focused_output\
--ignorecase\
--border 2\
--center\
--width-factor 0.5\
--no-overlap\
--list 30\
--prefix '>'\
--bdr "$bdr"\
--fn "$fn"\
--tb "$tb" --tf "$tf" \
--fb "$fb" --ff "$ff" \
--nb "$nb" --nf "$nf" \
--ab "$ab" --af "$af" \
--hb "$hb" --hf "$hf" \
$argv
# vim: ft=fish

View file

@ -1,47 +0,0 @@
#!/bin/sh
set -e -u
end(){
rm -r -- "$(dirname -- "$namebase")"
[ $# -ne 0 ] && echo $@ >&2
exit $#
}
if [ $# -ne 0 ] ; then
for i in "$@" ; do
printf "%s\n" "$i"
done | "$0"
exit $?
fi
namebase="$(mktemp -d)/blkrn"
echo '# Modify filenames without removing any line, quitting aborts' \
> "$namebase.2"
tee -- "$namebase.1" >> "$namebase.2"
exec </dev/tty >/dev/tty ||
end 'Interactive terminal needed'
"$EDITOR" -- "$namebase.2"
sed -i -- '1d' "$namebase.2"
! diff -- "$namebase.1" "$namebase.2" &> /dev/null || end "no changes"
[ `wc -l < "$namebase.1"` -eq `wc -l < "$namebase.2"` ] || end "Wrong number of lines"
{
echo '# Please review/modify this script or empty it to do nothing'
echo 'run(){'
echo ' mkdir -p "$(dirname "$2")"'
echo ' mv -T -- "$1" "$2"'
echo '}'
while read -r l1 <&3 && read -r l2 <&4; do
[ "$l1" = "$l2" ] || printf "%s\n%s\n" "$l1" "$l2"
done 3<"$namebase.1" 4<"$namebase.2" |
sed 's/\([\\"$`]\)/\\\1/g;s/^.*$/"&"/' |
xargs -d"\n" -L2 echo 'run'
} > "$namebase.sh"
"$EDITOR" -- "$namebase.sh"
sh -e -- "$namebase.sh"
end # exit normaly

View file

@ -1,10 +0,0 @@
#!/bin/sh
set -xe
grim -g "$(slurp -b aabbcc00 -p)" - |
convert - txt:- |
grep -oE '#[0-9A-Fa-f]{6}' |
wl-copy -n
notify-send "$(wl-paste)" "Copied to clipboard"

View file

@ -1,38 +0,0 @@
#!/bin/sh
set -e
CONTROLLER=$(find /sys/class/power_supply -maxdepth 1 -name '*controller*' || true)
if test -z "$CONTROLLER"; then
echo
exit 0
fi
CAPACITY=$(cat "$CONTROLLER/capacity")
echo -n '󰊴'
if test "$CAPACITY" -ge 90; then
echo '󰁹'
elif test "$CAPACITY" -ge 90; then
echo '󰂂'
elif test "$CAPACITY" -ge 80; then
echo '󰂁'
elif test "$CAPACITY" -ge 70; then
echo '󰂀'
elif test "$CAPACITY" -ge 60; then
echo '󰁿'
elif test "$CAPACITY" -ge 50; then
echo '󰁾'
elif test "$CAPACITY" -ge 40; then
echo '󰁽'
elif test "$CAPACITY" -ge 30; then
echo '󰁼'
elif test "$CAPACITY" -ge 20; then
echo '󰁻'
elif test "$CAPACITY" -ge 10; then
echo '󰁺'
else
echo '󰂎'
fi

View file

@ -18,125 +18,17 @@
--suffix PATH : ${lib.makeBinPath runtimeInputs} --suffix PATH : ${lib.makeBinPath runtimeInputs}
''; '';
createScripts = lib.mapAttrs (name: deps: wrapScript name ./${name} deps); createScripts = lib.mapAttrs (name: deps: wrapScript name ./${name} deps);
myPass = final.pass.withExtensions (ex: with ex; [ pass-otp ]);
in in
with final; with final;
createScripts { createScripts {
amd-fan-control = [ bash ];
br = [ ];
bmenu = [
bemenu
dhist
fish
j4-dmenu-desktop
jq
sway
];
down_meme = [
wl-clipboard
yt-dlp
libnotify
];
wl-copy-file = [ wl-copy-file = [
wl-clipboard wl-clipboard
fish fish
]; ];
_diffr = [ diffr ];
_thunar-terminal = [ terminal ];
_sway_idle_toggle = [ swayidle ];
kak-pager = [
fish
_diffr
];
kak-man-pager = [ kak-pager ];
helix-pager = [
fish
_diffr
];
helix-man-pager = [ helix-pager ];
musmenu = [
mpc-cli
wdmenu
trash-cli
xdg-user-dirs
libnotify
sd
wl-clipboard
];
showkeys = [ ]; # This will not work unless programs.wshowkeys is enabled systemwide
terminal = [ alacritty ];
playerctl-status = [ playerctl ];
pass-export = [
pass2csv
gnupg
sd
];
wpass = [
wdmenu
fd
myPass
sd
wl-clipboard
wtype
];
screenshotsh = [
capitaine-cursors
grim
slurp
jq
sway
wl-clipboard
xdg-user-dirs
];
volumesh = [
pulseaudio
libnotify
];
pulse_sink = [
pulseaudio
pamixer
wdmenu
];
color_picker = [
grim
slurp
wl-clipboard
libnotify
imagemagick
];
dzadd = [
procps
libnotify
wdmenu
jq
mpv
pqiv
python3Packages.deemix
mpc-cli
mpdDup
];
mpdDup = [
mpc-cli
perl
];
readQrCode = [
grim
zbar
wl-clipboard
];
pint-fmt = [ ];
powerplay-led-idle = [ powerplay-led-idle = [
bash bash
libinput libinput
libratbag libratbag
]; ];
vrr-fullscreen = [ ];
controller-battery = [ ];
}
// lib.mapAttrs importScript {
wdmenu = ./wdmenu.nix;
wlauncher = ./wlauncher.nix;
_gpg-unlock = ./_gpg-unlock.nix;
} }
) )

View file

@ -1,19 +0,0 @@
#!/bin/sh
DIR=$(mktemp -d)
cd "$DIR"
yt-dlp --merge-output-format mp4 "$(wl-paste)"
FILENAME="$(ls | head -n1)"
mkdir -p "$HOME/Downloads/Memes"
cp "$FILENAME" "$HOME/Downloads/Memes/$FILENAME"
wl-copy-file "$HOME/Downloads/Memes/$FILENAME"
notify-send "Meme downloaded" "$FILENAME"
rm -rf "$DIR"

View file

@ -1,176 +0,0 @@
#!/bin/sh
set -ex
tmpf=$(mktemp /tmp/dzadd.XXXXXX)
clean() {
test "$?" -eq "0" ||
notify-send "Exiting with error"
set +e
kill "$mpvPid"
rm -f "$tmpf"
}
trap clean EXIT
main() {
sType=$(printf "Track\nAlbum\nArtist" | wdmenu | tr '[:upper:]' '[:lower:]')
test -n "$sType" || exit 1
query=$(echo -n | wdmenu | sed 's/[^ a-z0-9]//g;s/ /+/g')
test -n "$query" || exit 1
case "$sType" in
track)
deezer_category="track"
jqFilter='.data[]| "\(.title) - \(.album.title) - \(.artist.name) |\(.id)"'
;;
album)
deezer_category="album"
jqFilter='.data[]| "\(.nb_tracks) - \(.title) - \(.artist.name) |\(.id)"'
;;
artist)
deezer_category="artist"
jqFilter='.data[]| "\(.nb_fan) - \(.name) |\(.id)"'
;;
top50)
deezer_category="artist"
jqFilter='.data[]| "\(.nb_fan) - \(.name) |\(.id)"'
;;
*)
exit 1
;;
esac
curl -m30 -s "api.deezer.com/search/${deezer_category}?q=${query}" |
sed 's/|//g' |
jq -r "$jqFilter" >"$tmpf"
pick_song
}
pick_song() {
choice=$(cat "$tmpf" | cut -d\| -f1 | wdmenu)
choice=$(grep "$choice" "$tmpf" | head -n 1)
choiceId=$(printf "%s" "$choice" | cut -d\| -f2)
case "$sType" in
top50)
choiceUrl="http://deezer.com/${deezer_category}/${choiceId}/top?=limit=50"
;;
*)
choiceUrl="http://deezer.com/${deezer_category}/${choiceId}"
;;
esac
pick_action "$choiceUrl"
}
pick_action() {
choiceUrl="$1"
COMMON_CHOISES="View Image\nDownload\nCopy URL\nAnother"
choice=$(printf "Preview\n${COMMON_CHOISES}" | wdmenu)
case "$choice" in
"Preview")
common_preview
;;
"View Image")
common_art
;;
"Download")
common_download
;;
"Copy URL")
wl-copy
;;
"Another")
pick_song
;;
*)
exit 1
;;
esac
}
common_preview() {
case "$sType" in
track)
;;
album)
preview_suffix=tracks
;;
artist)
preview_suffix=top
;;
top50)
preview_suffix=top
;;
*)
exit 1
;;
esac
choicePreview=$(
curl -m30 -s "http://api.deezer.com/${deezer_category}/${choiceId}/${preview_suffix}" |
jq -r '.preview, .data[0].preview | select(. != null)'
)
mpv --quiet --volume=50 --no-resume-playback "$choicePreview" &
mpvPid="$!"
choice=$(printf "$COMMON_CHOISES" | wdmenu -p 'Download?')
kill "$mpvPid" || true
}
common_art() {
case "$sType" in
track)
image_filter='.album.cover_big'
;;
album)
image_filter='.cover_big'
;;
artist)
image_filter='.picture_big'
;;
top50)
image_filter='.picture_big'
;;
*)
exit 1
;;
esac
curl -m30 -s "api.deezer.com/${deezer_category}/${choiceId}" |
jq -r "$image_filter" |
xargs curl -m30 -s |
pqiv -
pick_action
}
common_download() {
notify-send "Starting Download"
deemix "$choiceUrl" </dev/null &&
notify-send "Download Successful" ||
notify-send "Download Failed"
mpc add /
mpdDup
}
main

View file

@ -1,3 +0,0 @@
#!/bin/sh
col -b -x | hx

View file

@ -1,28 +0,0 @@
#!/usr/bin/env fish
if test (count $argv) -ne 0
for i in $argv
cat "$i"
end | eval (status filename)
exit 0
end
set term_line_count (tput lines)
while read line
set -a input_lines "$line"
set input_line_count (printf "%s\n" $input_lines | wc -l)
if test "$term_line_count" -lt "$input_line_count"
begin
printf "%s\n" $input_lines
cat
end | hx
exit 0
end
end
printf "%s\n" $input_lines

View file

@ -1,8 +0,0 @@
#!/bin/sh
kak -e '
map global normal q :q<ret>;
set buffer filetype man;
rmhl global/number-lines;
set global scrolloff 10,0
'

View file

@ -1,33 +0,0 @@
#!/usr/bin/env fish
if test (count $argv) -ne 0
for i in $argv
cat "$i"
end | eval (status filename)
exit 0
end
set term_line_count (tput lines)
while read line
set -a input_lines "$line"
set input_line_count (printf "%s\n" $input_lines | wc -l)
if test "$term_line_count" -lt "$input_line_count"
begin
printf "%s\n" $input_lines
cat
end | kak -e '
exec <a-o>
map global normal q :q<ret>;
rmhl global/number-lines;
set global scrolloff 10,0;
'
exit 0
end
end
printf "%s\n" $input_lines

View file

@ -1,5 +0,0 @@
#!/bin/sh
mpc playlist -f '%position%\t%file%' |
sort -k 2 |
perl -ne 'm/(.*)\t(.*)/; print "$1\n" if $2 eq $prev; $prev=$2' |
mpc del

View file

@ -1,111 +0,0 @@
#!/bin/sh
set -e
menu=wdmenu
search() {
tabs 8
mpc playlist --format '%artist% : %title%@pos:%position%' |
sed '/^ : \t/d'|
column -ts"@" |
$menu |
grep -o 'pos:.*' |
cut -d: -f2 |
xargs -r mpc play
}
get_current() {
music_root=$(xdg-user-dir MUSIC || echo "$HOME/Music")
current_file=$(mpc current -f %file%)
echo "${music_root}/${current_file}"
}
delete() {
current=$(get_current)
answer=$(printf "nothing\n$current" | $menu -p"delete?")
if test "$answer" = "$current"; then
trash "$answer"
mpc --quiet next
mpc --quiet update
path=$(echo $answer | sd "$HOME" '~')
notify-send "Removed Music" "$path"
fi
}
yank() {
current=$(get_current)
# Some programs need you to pass a path, not the contents
wl-copy --type 'text/uri-list' "file:///${current}"
notify-send "Yanked Music" "$(echo $current | sd "$HOME" "~")"
}
padd() {
get_current
cd "$music_root"
choice=$(fd -E '*.lrc' -E '*.m3u8' | sort | $menu -p "Add Songs(Use Ctrl):")
mpc add "$choice" &&
notify-send "Added Music" "$(echo $choice | sd "$HOME" "~")" ||
notify-send "Failed to Add Music" "$(echo $choice | sd "$HOME" "~")"
mpdDup
}
pclear() {
mpc clear &&
notify-send "Cleared Playlist" ||
notify-send "Failed Clear Playlist"
}
psave() {
name=$(mpc playlist | $menu -p 'Save Playlist(Use Shift): ')
mpc save "$name" &&
notify-send "Created playlist" "$name" ||
notify-send "Failed to Create Playlist" "$name"
}
pload() {
name=$(mpc lsplaylists | $menu -p 'Load Playlist: ')
mpc clear
mpc load "$name" &&
notify-send "Loaded playlist" "$name" ||
notify-send "Failed to Load Playlist" "$name"
}
pdelete() {
name=$(mpc lsplaylists | $menu -p 'Delete Playlist: ')
mpc delete "$name" &&
notify-send "Deleted playlist" "$name" ||
notify-send "Failed to Delete Playlist" "$name"
}
usage() {
cmdname=$(basename "$0")
echo "Commands:"
echo " $cmdname search -- Search and play songs."
echo " $cmdname delete -- Prompt to delete the current song."
echo " $cmdname yank -- Copy current music to clipboard."
echo "Playlist Commands:"
echo " $cmdname padd -- Add song"
echo " $cmdname pclear -- Clear"
echo " $cmdname psave -- Save"
echo " $cmdname pload -- Load"
echo " $cmdname pdelete -- Delete"
}
case "$1" in
delete | search | yank | padd | pclear | psave | pload | pdelete)
"$1"
;;
*)
usage
test -n "$1"
echo "Unreconized option: $1"
;;
esac

View file

@ -1,13 +0,0 @@
#!/bin/sh
if test -z "$PASSWORD_STORE_DIR"; then
PASSWORD_STORE_DIR="$HOME/.password-store"
fi
pass2csv "$PASSWORD_STORE_DIR" "$HOME/passwords.csv" \
-f User '(user|login)(:\s*)?' \
-f TOTP 'otpauth(:)?' \
-f URL 'url(:\s*)?'
# Fix TOTP format for keepass
sd '"//totp/.*?secret=(.*?)(&.*?)?"' '"$1"' "$HOME/passwords.csv"

View file

@ -1,7 +0,0 @@
#!/bin/sh
file="$(mktemp)"
cat - >"$file"
./vendor/bin/pint --quiet "$file"
cat "$file"
rm "$file"

View file

@ -1,10 +0,0 @@
#!/bin/sh
PLAYERCTL="playerctl --ignore-player=mpd"
test "$(LC_ALL=C $PLAYERCTL status)" = "Playing" \
&& printf " %s" "$($PLAYERCTL metadata title)" \
&& test -n "$($PLAYERCTL metadata artist)" \
&& printf " - %s" "$($PLAYERCTL metadata artist)"
echo ""

View file

@ -1,26 +0,0 @@
#!/bin/sh
list_sinks() {
env LC_ALL=C pactl list sinks
}
desc=$(
list_sinks |
grep -ie "description:" |
cut -d: -f2 |
sed 's/^ //g;s/ $//g;' |
wdmenu -i -p "Output:"
)
device=$(
list_sinks |
grep -C2 "Description: $desc"|
grep Name |
cut -d: -f2 |
xargs
)
vol=$(pamixer --get-volume)
pactl set-default-sink "$device"
pamixer --set-volume "$vol"

View file

@ -1,18 +0,0 @@
#!/bin/sh
set -o pipefail
main() {
if wl-paste | zbarimg -q --raw - | wl-copy
then
notify-send "Copied" "QrCode was copied to clipboard"
rm "$LOGFILE"
else
notify-send "Failed to read QrCode" "Log file is '$LOGFILE'"
fi
}
LOGFILE=$(mktemp /tmp/qrcode-XXXXXXXX.log)
main > "$LOGFILE" 2>&1

View file

@ -1,49 +0,0 @@
#!/bin/sh
export XCURSOR_SIZE=40
export XCURSOR_THEME='capitaine-cursors-light'
screenshot="grim"
copy="wl-copy -t image/png"
if which xdg-user-dir >/dev/null 2>&1; then
DESTFOLDER="$(xdg-user-dir PICTURES)"
else
for i in Images Imagens Pictures Fotos ""; do
DESTFOLDER="$HOME/$i"
test -d "$DESTFOLDER" &&
break
done
fi
DESTFOLDER="$DESTFOLDER/Screenshots"
mkdir -p "$DESTFOLDER"
DESTFILE="$DESTFOLDER/$(date +'%Y-%m-%d-%H%M%S_screenshot.png')"
case $1 in
def)
# Screenshot to file
$screenshot "$DESTFILE"
echo "$DESTFILE"
;;
area)
# Screen area to file
$screenshot -g "$(slurp -d -b 30303088)" "$DESTFILE"
echo "$DESTFILE"
;;
area-clip)
# Screen area to clipboard
$screenshot -g "$(slurp -d -b 30303088)" - | $copy
;;
clip)
# Focused monitor to clipboard
cur_output=$(swaymsg -t get_outputs |
jq -r '.[] | select(.focused) | .name')
test -n "$cur_output" &&
$screenshot -o "$cur_output" - | $copy ||
$screenshot - | $copy
;;
esac

View file

@ -1,10 +0,0 @@
#!/bin/sh
pidof wshowkeys && pkill wshowkeys ||
exec wshowkeys \
-a bottom -a right \
-F 'Inter 20' \
-b 202020AA \
-s DD5050 \
-t 1 \
-m 100

View file

@ -1,18 +0,0 @@
#!/bin/sh
CLASS="terminal"
while test $# -gt 0;do
case $1 in
-c|--class)
shift
CLASS=$1
shift
;;
*)
break
;;
esac
done
exec alacritty --class "$CLASS" "$@"

View file

@ -1,139 +0,0 @@
#!/bin/sh
set -xe
# depends on: awk, pactl, pacmd, notify-send
MAX_VOL=150
STEP=10
notify() {
volume=$(get_vol_$TARGET)
if is_muted_$TARGET; then
s="Muted"
else
s="Volume"
fi
s=$(echo "${TARGET} ${s}" | sed 's/^\(.\)/\U\1/')
notify-send "${s}" "${volume}%" \
--app-name=volumesh \
--hint=int:value:"$volume"
}
round() {
awk '{
print int($1/'$STEP')*'$STEP';
}'
}
round_vol() {
rounded=$(get_vol_$TARGET | round)
newvol=$(min $MAX_VOL $rounded)
}
min() {
printf '%i\n' ${@} | sort -n | head -n1
}
# Pulse{{{
get_vol_system() {
pamixer --get-volume
}
is_muted_system() {
test "$(pamixer --get-mute)" = "true" >/dev/null
}
change_vol_system() {
pamixer "-$1" "$(min 120 $2)"
round_vol
pamixer --set-volume "${newvol}"
if
test -n "$VOLUME_CHANGE_SOUND"
then
paplay "$VOLUME_CHANGE_SOUND"
fi
}
toggle_mute_system() {
pactl set-sink-mute @DEFAULT_SINK@ toggle
}
#}}}
# Mpd {{{
get_vol_mpd() {
env LC_ALL=C mpc vol |
sed -e 's/^.*://g' -e 's/%.*$//g' -e 's/ //g'
}
is_muted_mpd() {
env LC_ALL=C mpc status | grep '\[paused\]' 1>/dev/null
}
change_vol_mpd() {
case $1 in
d)
op="-";;
i)
op="+";;
esac
mpc vol "${op}${2}" &>/dev/null
round_vol
mpc vol "${newvol}" &>/dev/null
}
toggle_mute_mpd() {
mpc toggle
}
#}}}
usage() {
local CNAME=$(basename $0)
echo "${CNAME} [-m][-di <amount>]"
echo "${CNAME} [-m][-t]"
echo ""
echo "Options:"
echo " -m --mpd Target mpd instead of PulseAudio"
echo " -i --increase <amount> of volume to increase"
echo " -d --decrease <amount> of volume to decrease"
echo " -t --toggle Mute/Unmute target"
echo " -h --help Show This help message"
exit "$1"
}
TARGET=system
while [ $# -gt 0 ]; do
case $1 in
-m | --mpd)
TARGET=mpd
shift
;;
-i | --increase)
shift
change_vol_$TARGET i $1
shift
;;
-d | --decrease)
shift
change_vol_$TARGET d $1
shift
;;
-t | --toggle)
toggle_mute_$TARGET
shift
;;
-h | --help)
usage 0
;;
*)
usage 1
;;
esac
done
notify
# vim: fdm=marker

View file

@ -1,28 +0,0 @@
#!/usr/bin/env bash
# List of supported outputs for VRR
output_vrr_whitelist=(
"DP-1"
"DP-2"
)
# Toggle VRR for fullscreened apps in prespecified displays to avoid stutters while in desktop
swaymsg -t subscribe -m '[ "window" ]' | while read window_json; do
window_event=$(echo ${window_json} | jq -r '.change')
# Process only focus change and fullscreen toggle
if [[ $window_event = "focus" || $window_event = "fullscreen_mode" ]]; then
output_json=$(swaymsg -t get_outputs | jq -r '.[] | select(.focused == true)')
output_name=$(echo ${output_json} | jq -r '.name')
# Use only VRR in whitelisted outputs
if [[ ${output_vrr_whitelist[*]} =~ ${output_name} ]]; then
output_vrr_status=$(echo ${output_json} | jq -r '.adaptive_sync_status')
window_fullscreen_status=$(echo ${window_json} | jq -r '.container.fullscreen_mode')
# Only update output if nesseccary to avoid flickering
[[ $output_vrr_status = "disabled" && $window_fullscreen_status = "1" ]] && swaymsg output "${output_name}" adaptive_sync 1
[[ $output_vrr_status = "enabled" && $window_fullscreen_status = "0" ]] && swaymsg output "${output_name}" adaptive_sync 0
fi
fi
done

View file

@ -1,4 +0,0 @@
{ pkgs, ... }:
pkgs.writeShellScriptBin "wdmenu" ''
exec bmenu "$@"
''

View file

@ -1,12 +0,0 @@
{ pkgs, ... }:
let
inherit (config.my) dmenu;
available_menus = {
bmenu = "bmenu run";
rofi = "rofi -show drun -sort";
};
menu_cmd = available_menus.${dmenu};
in
pkgs.writeShellScriptBin "wlauncher" ''
exec ${menu_cmd} "$@"
''

View file

@ -1,4 +0,0 @@
{ pkgs, ... }:
pkgs.writeShellScriptBin "wlauncher" ''
exec bmenu run "$@"
''

Binary file not shown.

View file

@ -1,16 +0,0 @@
age-encryption.org/v1
-> ssh-rsa BwwxHg
iTcgtxF1IxopbtF+aw7V8IQfH7tWiMk9lE/eWlVHVjeaRvER5W6Y3xZNOFCjtbqY
VwEyV6ibfZ4GJt1jRu2icEH/AnLUJFFGQnxu/K/rtoZ3tqSIk9WCBv3aPo4oZRiU
uaaxi2gD8qo1RLyl/Ij7Djw4i/isUOO1EON5sgx1d39k6qUD4Mak0DSU4EtGdTsr
OaxDAc0kAxhxZQOUH/QlKa0HLonaFcy1LHqvttOcw3UZuZnaYfZiPlcqe3USS9cm
96aIC5cS9pHr4JFrqRYvfpla2TY5jlCB/xBGw3KjGEIQoBPXSsJZA6BCMZyp00++
tdfS2aomt9HFmb1wZDS0jWAxkVF6nXXBbolFVih+58h0nYLljtHIQ3SizRoXY459
x3JE9NReHp2OO3SlIeO03Kv8YMBvj7nSSd1C1PMpu+hJ/eCXi1WQxD6QY+40muk6
KhqE3PZ8BCY2b+VpywUF5gVH28mo3jscqAzhf2dZ3SQlzldI+hFyKPxTdAqkfUOH
--- cinb+wzjVfTkpfm1CtFIFaepwoQVCj1MquB5rAC45Ew
¾
6
ZCþHS0 7ïº ÖóýE¼X* Àqb=üOßíÛÉwu¥¤³­Pºþ¹ Ùçǖѳ/£ómvòÞ×Ë2VœÄ«
ÁŠxvç[“£µ£±”ÌA~ evdÓåÙ0¢Œni³1Ò¹Qý„"í@Ù¹§ÞÔ{KpÐ:åϵuµsÊÎBñò(X…r[ÂQVg¢Tš¤°ðœîËï@Ä*ÇõÿíB «<>.§¯žhE鲟èÐë­÷½¥Žûzlz|kã`l8´Mcch<63>îáZ`ƒ ?yeoƒ+ÈM-:/–À**ìè¦ÊcŸÎZD¡2Ñá¼é&·÷¾Ç¢ ¹£e¤ï*Hnç"Þ~+|ua(û6óËJ

View file

@ -12,11 +12,9 @@ in
"monolith-forgejo-runner-token.age".publicKeys = [ main_ssh_public_key ]; "monolith-forgejo-runner-token.age".publicKeys = [ main_ssh_public_key ];
"lelgenio-cachix.age".publicKeys = [ main_ssh_public_key ]; "lelgenio-cachix.age".publicKeys = [ main_ssh_public_key ];
"monolith-nix-serve-privkey.age".publicKeys = [ main_ssh_public_key ]; "monolith-nix-serve-privkey.age".publicKeys = [ main_ssh_public_key ];
"factorio-settings.age".publicKeys = [ main_ssh_public_key ];
"phantom-nextcloud.age".publicKeys = [ main_ssh_public_key ]; "phantom-nextcloud.age".publicKeys = [ main_ssh_public_key ];
"phantom-writefreely.age".publicKeys = [ main_ssh_public_key ]; "phantom-writefreely.age".publicKeys = [ main_ssh_public_key ];
"phantom-renawiki.age".publicKeys = [ main_ssh_public_key ]; "phantom-renawiki.age".publicKeys = [ main_ssh_public_key ];
"phantom-forgejo-mailer-password.age".publicKeys = [ main_ssh_public_key ]; "phantom-forgejo-mailer-password.age".publicKeys = [ main_ssh_public_key ];
"phantom-mastodon-mailer-password.age".publicKeys = [ main_ssh_public_key ]; "phantom-mastodon-mailer-password.age".publicKeys = [ main_ssh_public_key ];
"phantom-invidious-settings.age".publicKeys = [ main_ssh_public_key ];
} }

7
switch
View file

@ -4,9 +4,10 @@ nix fmt
git --no-pager diff git --no-pager diff
nixos-rebuild \ sudo nice ionice \
nixos-rebuild \
switch \ switch \
--use-remote-sudo \ --verbose \
--print-build-logs \ --print-build-logs \
--flake .# \ --flake .# \
"$@" $@

View file

@ -1,6 +0,0 @@
#!/bin/sh
./switch \
--option extra-substituters "http://nixcache.lelgenio.1337.cx:5000" \
--option extra-trusted-public-keys "nixcache.lelgenio.1337.cx:HZCwDaM39BOF+MLuviMQTUrz3rBWLTLV9H+GV4zcxVI=" \
"$@"

View file

@ -1,6 +1,5 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
services.blueman.enable = true;
hardware.bluetooth = { hardware.bluetooth = {
enable = true; enable = true;
settings = { settings = {

View file

@ -1,18 +0,0 @@
{
pkgs,
lib,
config,
...
}:
{
services.cachix-watch-store = {
enable = true;
cacheName = "lelgenio";
cachixTokenFile = config.age.secrets.lelgenio-cachix.path;
};
systemd.services.cachix-watch-store-agent = {
serviceConfig.TimeoutStopSec = 3;
# If we don't do this, cachix tends to timeout
serviceConfig.KillMode = lib.mkForce "control-group";
};
}

View file

@ -9,11 +9,8 @@
}: }:
{ {
imports = [ imports = [
./gamemode.nix
./cachix.nix
./media-packages.nix ./media-packages.nix
./boot.nix ./boot.nix
./thunar.nix
./nix.nix ./nix.nix
./fonts.nix ./fonts.nix
./sound.nix ./sound.nix
@ -48,15 +45,6 @@
services.geoclue2.enable = true; services.geoclue2.enable = true;
# Workaround for nm-wait-online hanging??
# Ref: https://github.com/NixOS/nixpkgs/issues/180175
systemd.services.NetworkManager-wait-online = {
serviceConfig.ExecStart = [
""
"${pkgs.networkmanager}/bin/nm-online -q"
];
};
systemd.extraConfig = '' systemd.extraConfig = ''
DefaultTimeoutStopSec=10s DefaultTimeoutStopSec=10s
''; '';

View file

@ -12,14 +12,6 @@
"--volumes" "--volumes"
]; ];
}; };
daemon.settings = {
# needed by bitbucket runner ???
log-driver = "json-file";
log-opts = {
max-size = "10m";
max-file = "3";
};
};
}; };
programs.extra-container.enable = true; programs.extra-container.enable = true;

View file

@ -1,27 +0,0 @@
{
config,
pkgs,
inputs,
...
}:
{
programs.gamemode.enable = true;
programs.gamemode.enableRenice = true;
programs.gamemode.settings = {
general = {
renice = 10;
};
# Warning: GPU optimisations have the potential to damage hardware
gpu = {
apply_gpu_optimisations = "accept-responsibility";
gpu_device = 0;
amd_performance_level = "high";
};
custom = {
start = "${pkgs.libnotify}/bin/notify-send 'GameMode started'";
end = "${pkgs.libnotify}/bin/notify-send 'GameMode ended'";
};
};
}

View file

@ -42,6 +42,6 @@
chrome-gnome-shell chrome-gnome-shell
gnomeExtensions.quick-settings-audio-devices-hider gnomeExtensions.quick-settings-audio-devices-hider
gnome-pass-search-provider gnomeExtensions.dual-shock-4-battery-percentage
]; ];
} }

View file

@ -1,97 +0,0 @@
{
lib,
pkgs,
config,
...
}:
let
inherit (config.my)
key
accent
font
theme
desktop
;
cfg = config.login-manager.greetd;
in
{
options.login-manager.greetd = {
enable = lib.mkEnableOption "Use greetd as login manager";
};
config = lib.mkIf cfg.enable {
# Enable the X11 windowing system.
services.xserver.enable = false;
# enable sway window manager
programs.sway = {
enable = true;
package = pkgs.mySway;
wrapperFeatures.gtk = true;
};
services.dbus.enable = true;
programs.wshowkeys.enable = true;
xdg.portal = {
enable = true;
wlr.enable = true;
# Always pick the first monitor, this is fine since I only ever use a single monitor
wlr.settings.screencast.chooser_type = "none";
# gtk portal needed to make gtk apps happy
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
};
services.greetd =
let
greetd_main_script = pkgs.writeShellScriptBin "main" ''
export XDG_CURRENT_DESKTOP=sway GTK_THEME="${theme.gtk_theme}" XCURSOR_THEME="${theme.cursor_theme}"
${pkgs.greetd.gtkgreet}/bin/gtkgreet -l -c ${desktop}
swaymsg exit
'';
swayConfig = pkgs.writeText "greetd-sway-config" ''
# `-l` activates layer-shell mode. Notice that `swaymsg exit` will run after gtkgreet.
exec "${greetd_main_script}/bin/main"
bindsym Mod4+shift+e exec swaynag \
-t warning \
-m 'What do you want to do?' \
-b 'Poweroff' 'systemctl poweroff' \
-b 'Reboot' 'systemctl reboot'
input "*" {
repeat_delay 200
repeat_rate 30
xkb_layout us(colemak)
xkb_numlock enabled
xkb_options lv3:lsgt_switch,grp:shifts_toggle
}
'';
in
{
enable = true;
settings = {
initial_session = {
command = desktop;
user = "lelgenio";
};
default_session = {
command = "${pkgs.sway}/bin/sway --config ${swayConfig}";
};
};
};
environment.systemPackages = with pkgs; [
sway
swaylock
swayidle
wayland
pkgs.xdg-desktop-portal
pkgs.xdg-desktop-portal-wlr
## Theme
capitaine-cursors
bibata-cursors
orchis_theme_compact
papirus_red
];
};
}

View file

@ -1,15 +0,0 @@
{ config, pkgs, ... }:
{
# Enable the X11 windowing system.
services.xserver.enable = true;
# Enable the KDE Desktop Environment.
services.xserver.displayManager.sddm.enable = true;
services.xserver.desktopManager.plasma5.enable = true;
# services.xserver.displayManager.autologin.user = "lelgenio";
programs.dconf.enable = true;
# environment.systemPackages = with pkgs;
# with gnome; [
# gnome-tweaks
# dconf-editor
# ];
}

View file

@ -13,22 +13,30 @@ in
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
down_meme
yt-dlp yt-dlp
ffmpeg ffmpeg
obs-studio obs-studio
imagemagick imagemagick
mpc-cli
helvum helvum
gimp gimp
inkscape inkscape
krita krita
kdePackages.breeze kdePackages.breeze
kdePackages.kdenlive kdePackages.kdenlive
pitivi
blender-hip blender-hip
libreoffice libreoffice
godot_4 godot_4
(pkgs.writeTextFile {
name = "krita-thumbnails";
text = ''
[Thumbnailer Entry]
TryExec=unzip
Exec=sh -c "${pkgs.unzip}/bin/unzip -p %i preview.png > %o"
MimeType=application/x-krita;
'';
destination = "/share/thumbnailers/kra.thumbnailer";
})
]; ];
}; };
} }

View file

@ -12,7 +12,7 @@ in
virtualisation.docker.enable = true; virtualisation.docker.enable = true;
services.gitlab-runner = { services.gitlab-runner = {
enable = true; enable = true;
settings.concurrent = 12; settings.concurrent = 4;
services = { services = {
# runner for building in docker via host's nix-daemon # runner for building in docker via host's nix-daemon
# nix store will be readable in runner, might be insecure # nix store will be readable in runner, might be insecure

View file

@ -1,12 +0,0 @@
{
config,
pkgs,
lib,
...
}:
{
services.nix-serve = {
enable = true;
secretKeyFile = config.age.secrets.monolith-nix-serve-privkey.path;
};
}

View file

@ -14,6 +14,18 @@ in
enable = true; enable = true;
settings.concurrent = 1; settings.concurrent = 1;
services = { services = {
# ci_test = {
# registrationConfigFile = "/srv/gitlab-runner/env/ci_test";
# dockerImage = "debian";
# dockerPrivileged = true;
# };
thoreb_builder = {
registrationConfigFile =
config.age.secrets.rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.path;
dockerImage = "debian";
dockerPrivileged = true;
};
thoreb-telemetria-nix = mkNixRunner config.age.secrets.gitlab-runner-thoreb-telemetria-registrationConfigFile.path; thoreb-telemetria-nix = mkNixRunner config.age.secrets.gitlab-runner-thoreb-telemetria-registrationConfigFile.path;
thoreb-itinerario-nix = mkNixRunner config.age.secrets.rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.path; thoreb-itinerario-nix = mkNixRunner config.age.secrets.rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.path;
}; };

View file

@ -34,4 +34,5 @@
]; ];
programs.dzgui.enable = true; programs.dzgui.enable = true;
programs.dzgui.package = inputs.dzgui-nix.packages.${pkgs.system}.default;
} }

View file

@ -1,32 +0,0 @@
{
config,
pkgs,
inputs,
...
}:
{
programs.thunar = {
enable = true;
plugins = with pkgs.xfce; [
thunar-archive-plugin
thunar-volman
];
};
# Mount, trash, and other functionalities
services.gvfs.enable = true;
# Thumbnail support for images
services.tumbler.enable = true;
environment.systemPackages = [
(pkgs.writeTextFile {
name = "thumbs";
text = ''
[Thumbnailer Entry]
TryExec=unzip
Exec=sh -c "${pkgs.unzip}/bin/unzip -p %i preview.png > %o"
MimeType=application/x-krita;
'';
destination = "/share/thumbnailers/kra.thumbnailer";
})
];
}

View file

@ -1,179 +0,0 @@
{
config,
pkgs,
lib,
...
}:
let
inherit (config.my)
key
theme
accent
font
;
inherit (theme) color;
in
{
config = {
programs.alacritty = {
enable = true;
settings = {
font = {
size = font.size.small;
normal = {
family = font.mono;
};
};
colors = {
primary = {
background = "${color.bg}";
foreground = "${color.txt}";
};
cursor = {
text = "#000000";
cursor = "${accent.color}";
};
normal = {
black = "${color.normal.black}";
red = "${color.normal.red}";
green = "${color.normal.green}";
yellow = "${color.normal.yellow}";
blue = "${color.normal.blue}";
magenta = "${color.normal.magenta}";
cyan = "${color.normal.cyan}";
white = "${color.normal.white}";
};
draw_bold_text_with_bright_colors = false;
};
window = {
opacity = theme.opacity / 100.0;
dynamic_padding = true;
};
hints = {
alphabet = key.hints;
enabled = [
{
regex =
let
mimes = "(mailto:|gemini:|gopher:|https:|http:|news:|file:|git:|ssh:|ftp:)";
# I fucking hate regex, look at this bullshit
delimiters = ''^\\u0000-\\u001F\\u007F-\\u009F<>"\\s{-}\\^`'';
# Kakoune uses these characters to represent whitespace,
# but alacritty doesn't know about them
whitespace_characters = ''¬·'';
in
"${mimes}[${delimiters}${whitespace_characters}]+";
command = "xdg-open";
post_processing = true;
mouse = {
enabled = true;
mods = "None";
};
binding = {
key = "U";
mods = "Control|Shift";
};
}
];
};
mouse = {
hide_when_typing = true;
};
keyboard.bindings = [
{
key = lib.toUpper key.up;
mode = "Vi|~Search";
action = "Up";
}
{
key = lib.toUpper key.down;
mode = "Vi|~Search";
action = "Down";
}
{
key = lib.toUpper key.left;
mode = "Vi|~Search";
action = "Left";
}
{
key = lib.toUpper key.right;
mode = "Vi|~Search";
action = "Right";
}
{
key = lib.toUpper key.insertMode;
mode = "Vi|~Search";
action = "ScrollToBottom";
}
{
key = lib.toUpper key.insertMode;
mode = "Vi|~Search";
action = "ToggleViMode";
}
{
key = lib.toUpper key.next;
mode = "Vi|~Search";
action = "SearchNext";
}
{
key = lib.toUpper key.next;
mods = "Shift";
mode = "Vi|~Search";
action = "SearchPrevious";
}
{
key = "Up";
mods = "Control|Shift";
mode = "~Alt";
action = "ScrollLineUp";
}
{
key = "Down";
mods = "Control|Shift";
mode = "~Alt";
action = "ScrollLineDown";
}
{
key = "PageUp";
mods = "Control|Shift";
mode = "~Alt";
action = "ScrollHalfPageUp";
}
{
key = "PageDown";
mods = "Control|Shift";
mode = "~Alt";
action = "ScrollHalfPageDown";
}
{
key = "N";
mods = "Control|Shift";
action = "SpawnNewInstance";
}
# {%@@ if key.layout == "colemak" @@%}
{
key = "T";
mode = "Vi|~Search";
action = "SemanticRightEnd";
}
# {%@@ endif @@%}
];
};
};
home.sessionVariables = {
TERMINAL = "alacritty";
};
# Look at this fucking bullshit:
# https://gitlab.gnome.org/GNOME/glib/-/blob/20c4fcb2a7246a2b205649eae3ebda4296217afc/gio/gdesktopappinfo.c#L2702
# Theres a fucking hard coded list of terminals!
home.packages = with pkgs; [
(pkgs.writeShellScriptBin "gnome-terminal" ''
[ "$1" = "--" ] && shift
exec terminal -e "$@"
'')
];
};
}

View file

@ -6,41 +6,6 @@
}: }:
{ {
xdg.desktopEntries = { xdg.desktopEntries = {
kak = {
name = "Kakoune";
genericName = "Text Editor";
comment = "Edit text files";
exec = "kak %F";
terminal = true;
type = "Application";
icon = "kak.desktop";
categories = [
"Utility"
"TextEditor"
];
startupNotify = true;
mimeType = [
"text/english"
"text/plain"
"text/x-makefile"
"text/x-c++hdr"
"text/x-c++src"
"text/x-chdr"
"text/x-csrc"
"text/x-java"
"text/x-moc"
"text/x-pascal"
"text/x-tcl"
"text/x-tex"
"application/x-shellscript"
"text/x-c"
"text/x-c++"
];
settings = {
Keywords = "Text;editor;";
TryExec = "kak";
};
};
down_meme = { down_meme = {
name = "DownMeme"; name = "DownMeme";
genericName = "Download memes"; genericName = "Download memes";

View file

@ -1,61 +0,0 @@
* {
all: unset; //Unsets everything so you can style everything from scratch
}
//Global Styles
.bar {
background-color: #202020;
color: #b0b4bc;
padding: 10px;
}
// Styles on classes (see eww.yuck for more information)
.sidestuff slider {
all: unset;
color: #cc5757;
}
.metric scale trough highlight {
all: unset;
background-color: #D35D6E;
color: #000000;
border-radius: 10px;
}
.metric scale trough {
all: unset;
background-color: #4e4e4e;
border-radius: 50px;
min-height: 3px;
min-width: 50px;
margin-left: 10px;
margin-right: 20px;
}
.metric scale trough highlight {
all: unset;
background-color: #D35D6E;
color: #000000;
border-radius: 10px;
}
.metric scale trough {
all: unset;
background-color: #4e4e4e;
border-radius: 50px;
min-height: 3px;
min-width: 50px;
margin-left: 10px;
margin-right: 20px;
}
.label-ram {
font-size: large;
}
.workspaces button:hover {
color: #D35D6E;
}
.workspaces button.active {
color: #D35D6E;
}

View file

@ -1,80 +0,0 @@
(defwidget bar []
(centerbox :orientation "h"
(workspaces)
(music)
(sidestuff)))
(defwidget sidestuff []
(box :class "sidestuff" :orientation "h" :space-evenly false :halign "end"
; (metric :label "🔊"
; :value volume
; :onchange "amixer -D pulse sset Master {}%")
(metric :label ""
:value {EWW_RAM.used_mem_perc}
:onchange "")
(metric :label "💾"
:value {round((1 - (EWW_DISK["/"].free / EWW_DISK["/"].total)) * 100, 0)}
:onchange "")
time))
(defwidget workspaces []
(box :class "workspaces"
:orientation "h"
:space-evenly true
:halign "start"
:spacing 10
(button :class "${active_workspace == 1 ? 'active' : '' }" :onclick "wmctrl -s 0" 1)
(button :class "${active_workspace == 2 ? 'active' : '' }" :onclick "wmctrl -s 1" 2)
(button :class "${active_workspace == 3 ? 'active' : '' }" :onclick "wmctrl -s 2" 3)
(button :class "${active_workspace == 4 ? 'active' : '' }" :onclick "wmctrl -s 3" 4)
(button :class "${active_workspace == 5 ? 'active' : '' }" :onclick "wmctrl -s 4" 5)
(button :class "${active_workspace == 6 ? 'active' : '' }" :onclick "wmctrl -s 5" 6)
(button :class "${active_workspace == 7 ? 'active' : '' }" :onclick "wmctrl -s 6" 7)
(button :class "${active_workspace == 8 ? 'active' : '' }" :onclick "wmctrl -s 7" 8)
(button :class "${active_workspace == 9 ? 'active' : '' }" :onclick "wmctrl -s 8" 9)))
(defwidget music []
(box :class "music"
:orientation "h"
:space-evenly false
:halign "center"
{music != "" ? "🎵${music}" : ""}))
(defwidget metric [label value onchange]
(box :orientation "h"
:class "metric"
:space-evenly false
(box :class "label" label)
(scale :min 0
:max 101
:active {onchange != ""}
:value value
:onchange onchange)))
(deflisten music :initial ""
"playerctl --follow metadata --format '{{ artist }} - {{ title }}' || true")
; (defpoll volume :interval "1s"
; "scripts/getvol")
(defpoll time :interval "10s"
"date '+%H:%M %b %d, %Y'")
(defpoll active_workspace :interval "10ms"
"hyprctl monitors -j | jq '.[]|.activeWorkspace.id'")
(defwindow bar
:monitor 0
:windowtype "dock"
:geometry (geometry :x "0%"
:y "0%"
:width "100%"
:height "10px"
:anchor "top center")
:reserve (struts :side "top" :distance "4%")
:exclusive true
(bar))

View file

@ -1,2 +0,0 @@
#!/bin/sh
printf "%.0f\n" $(free -m | grep Mem | awk '{print ($3/$2)*100}')

View file

@ -1,2 +0,0 @@
#!/bin/sh
amixer -D pulse sget Master | grep 'Left:' | awk -F'[][]' '{ print $2 }' | tr -d '%' | head -1

View file

@ -7,84 +7,12 @@
}: }:
let let
inherit (config.my) desktop browser; inherit (config.my) desktop browser;
bugfixedFirefox = pkgs.firefox-devedition-unwrapped // {
requireSigning = false;
allowAddonSideload = true;
};
in in
{ {
config = { config = {
programs.firefox = { programs.firefox = {
enable = true; enable = true;
package = pkgs.wrapFirefox bugfixedFirefox { package = pkgs.firefox-devedition;
nixExtensions = [
(pkgs.fetchFirefoxAddon {
name = "darkreader";
url = "https://addons.mozilla.org/firefox/downloads/file/4205543/darkreader-4.9.73.xpi";
hash = "sha256-fDmf8yVhiGu4Da0Mr6+PYpeSsLcf8e/PEmZ+BaKzjxo=";
})
(pkgs.fetchFirefoxAddon {
name = "sponsorblock";
url = "https://addons.mozilla.org/firefox/downloads/file/4202411/sponsorblock-5.4.29.xpi";
hash = "sha256-7Xqc8cyQNylMe5/dgDOx1f2QDVmz3JshDlTueu6AcSg=";
})
(pkgs.fetchFirefoxAddon {
name = "tree-style-tab";
url = "https://addons.mozilla.org/firefox/downloads/file/4197314/tree_style_tab-3.9.19.xpi";
hash = "sha256-u2f0elVPj5N/QXa+5hRJResPJAYwuT9z0s/0nwmFtVo=";
})
(pkgs.fetchFirefoxAddon {
name = "ublock-origin";
url = "https://addons.mozilla.org/firefox/downloads/file/4290466/ublock_origin-1.58.0.xpi";
hash = "sha256-RwxWmUpxdNshV4rc5ZixWKXcCXDIfFz+iJrGMr0wheo=";
})
(pkgs.fetchFirefoxAddon {
name = "user_agent_string_switcher";
url = "https://addons.mozilla.org/firefox/downloads/file/4098688/user_agent_string_switcher-0.5.0.xpi";
hash = "sha256-ncjaPIxG1PBNEv14nGNQH6ai9QL4WbKGk5oJDbY+rjM=";
})
(pkgs.fetchFirefoxAddon {
name = "i-still-dont-care-about-cookies";
url = "https://github.com/OhMyGuus/I-Still-Dont-Care-About-Cookies/releases/download/v1.1.4/istilldontcareaboutcookies-1.1.4.xpi";
hash = "sha256-yt6yRiLTuaK4K/QwgkL9gCVGsSa7ndFOHqZvKqIGZ5U=";
})
(pkgs.fetchFirefoxAddon {
name = "vimium_ff";
url = "https://addons.mozilla.org/firefox/downloads/file/4191523/vimium_ff-2.0.6.xpi";
hash = "sha256-lKLX6IWWtliRdH1Ig33rVEB4DVfbeuMw0dfUPV/mSSI=";
})
(pkgs.fetchFirefoxAddon {
name = "invidious_redirect";
url = "https://addons.mozilla.org/firefox/downloads/file/4292924/invidious_redirect_2-1.16.xpi";
hash = "sha256-ApCc+MNmW9Wd/5seV6npePQVEaszT/rhD9EB7HGiUb8=";
})
(pkgs.fetchFirefoxAddon {
name = "mastodon_simplified_federation";
url = "https://addons.mozilla.org/firefox/downloads/file/4215691/mastodon_simplified_federation-2.2.xpi";
hash = "sha256-4iU25chpjsdsMTPaa0yQOTWc9V9q1qFz6YV0lYtNjLA=";
})
(pkgs.fetchFirefoxAddon {
name = "substitoot";
url = "https://addons.mozilla.org/firefox/downloads/file/4236602/substitoot-0.7.2.0.xpi";
hash = "sha256-1auSqEjkebwRSbmAVUsYwy77dl7TQCOnqgozpoVnqgI=";
})
# Locale
(pkgs.fetchFirefoxAddon {
name = "firefox_br";
url = "https://addons.mozilla.org/firefox/downloads/file/4144369/firefox_br-115.0.20230726.201356.xpi";
hash = "sha256-8zkqfdW0lX0b62+gAJeq4FFlQ06nXGFAexpH+wg2Cr0=";
})
(pkgs.fetchFirefoxAddon {
name = "corretor";
url = "https://addons.mozilla.org/firefox/downloads/file/1176165/corretor-65.2018.12.8.xpi";
hash = "sha256-/rFQtJHdgemMkGAd+KWuWxVA/BwSIkn6sk0XZE0LrGk=";
})
];
};
profiles = { profiles = {
dev-edition-default = { dev-edition-default = {
isDefault = true; isDefault = true;
@ -132,44 +60,44 @@ in
'' ''
else else
'' ''
/* Element | chrome://browser/content/browser.xhtml */ /* Hide tabs and other items */
#navigator-toolbox {
display: grid;
grid-template-columns: 1fr 50px;
overflow: hidden;
}
/* Element | chrome://browser/content/browser.xhtml */
#nav-bar {
flex: 1;
width: 100%;
grid-column: 1 / 3;
grid-row: 1;
z-index: 0;
padding-right: 29px !important;
}
/* Element | chrome://browser/content/browser.xhtml */
.toolbar-items { .toolbar-items {
display: none; display: none;
} }
/* Element | chrome://browser/content/browser.xhtml */ /* Make the url bar occupy the entire size of the container */
#nav-bar {
#TabsToolbar { z-index: 1;
max-width: 50px; padding-right: 29px !important;
} }
/* Element | chrome://browser/content/browser.xhtml */ /* shrink the tab bar to a small size, since it's only the window close button basically */
#titlebar { #titlebar {
position: absolute;
right: 0;
top: 10px;
max-width: 50px; max-width: 50px;
grid-area: 1 / 2;
z-index: 10; z-index: 10;
} }
/* Add a nice border to the top of the window */
#nav-bar {
border-top-left-radius: 10px;
border-top-right-radius: 10px;
}
/* Make the private browser indicator look nice, over the close-window button */
#private-browsing-indicator-with-label {
position: absolute;
top: 4px;
left: 15px;
z-index: 20;
pointer-events: none;
}
#private-browsing-indicator-with-label > label {
display: none;
}
''; '';
}; };
}; };

View file

@ -18,17 +18,9 @@ in
set -U fish_features stderr-nocaret qmark-noglob regex-easyesc ampersand-nobg-in-token set -U fish_features stderr-nocaret qmark-noglob regex-easyesc ampersand-nobg-in-token
set_color red set_color red
if not test -d "$PASSWORD_STORE_DIR"
echo "Password Store not yet setup"
end
if not test -f "$HOME/.ssh/id_rsa" if not test -f "$HOME/.ssh/id_rsa"
echo "SSH keys not yet setup" echo "SSH keys not yet setup"
end end
if command -qs rustup &> /dev/null
if not command -qs rustc; or not rustc --version &> /dev/null
rustup default stable &>/dev/null &
end
end
set_color normal set_color normal
bind \cy 'commandline | wl-copy -n' bind \cy 'commandline | wl-copy -n'
@ -36,21 +28,16 @@ in
shellAliases = { shellAliases = {
rm = "trash"; rm = "trash";
tree = "eza -T"; tree = "eza -T";
kill_yourself = "shutdown now";
}; };
shellAbbrs = { shellAbbrs = {
off = "shutdown now"; off = "shutdown now";
v =
{
"helix" = "hx";
"kakoune" = "kak";
}
.${editor};
ns = "nix develop --command $SHELL"; ns = "nix develop --command $SHELL";
wcf = "wl-copy-file"; wcf = "wl-copy-file";
c = "cargo"; c = "cargo";
# system # system
sv = "sudo systemct"; sv = "sudo systemct";
suv = "systemct --user"; suv = "sudo systemct --user";
# docker abbrs # docker abbrs
d = "docker"; d = "docker";
dc = "docker-compose"; dc = "docker-compose";

View file

@ -103,29 +103,29 @@ function fish_git_prompt
_fish_prompt_warn "init" _fish_prompt_warn "init"
end end
# if we have at least one commit git rev-parse HEAD -- &>/dev/null
if git rev-parse HEAD -- &>/dev/null or return
# print a "↑" if ahead of origin
test 0 -ne (git log --oneline "$git_remote_branch"..HEAD -- | wc -l)
and set -f _git_sync_ahead '↑'
# print a "↓" if behind of origin # print a "↑" if ahead of origin
test 0 -lt (git log --oneline HEAD.."$git_remote_branch" -- | wc -l) test 0 -ne (git log --oneline "$git_remote_branch"..HEAD -- | wc -l)
and set -l _git_sync_behind '↓' and set -f _git_sync_ahead '↑'
if set -q _git_sync_ahead _git_sync_behind # print a "↓" if behind of origin
_fish_prompt_normal '⇅' test 0 -lt (git log --oneline HEAD.."$git_remote_branch" -- | wc -l)
else if set -q _git_sync_ahead and set -l _git_sync_behind '↓'
_fish_prompt_normal '↑'
else if set -q _git_sync_behind
_fish_prompt_normal '↓'
end
if test -n "$git_log_unpushed" if set -q _git_sync_ahead _git_sync_behind
and not string match -qr "$git_branch" "$git_log_unpushed" _fish_prompt_normal '⇅'
_fish_prompt_normal '↻' else if set -q _git_sync_ahead
_fish_prompt_warn $git_log_unpushed[1] _fish_prompt_normal '↑'
end else if set -q _git_sync_behind
_fish_prompt_normal '↓'
end
if test -n "$git_log_unpushed"
and not string match -qr "$git_branch" "$git_log_unpushed"
_fish_prompt_normal '↻'
_fish_prompt_warn $git_log_unpushed[1]
end end
############################################################ ############################################################

View file

@ -28,11 +28,6 @@ in
autoSquash = true; autoSquash = true;
autoStash = true; autoStash = true;
}; };
pager = {
log = "${pkgs._diffr}/bin/_diffr | ${pkgs.kak-pager}/bin/kak-pager";
show = "${pkgs._diffr}/bin/_diffr | ${pkgs.kak-pager}/bin/kak-pager";
diff = "${pkgs._diffr}/bin/_diffr | ${pkgs.kak-pager}/bin/kak-pager";
};
alias = { alias = {
graph = "log --graph --oneline --branches"; graph = "log --graph --oneline --branches";
root = "rev-parse --show-toplevel"; root = "rev-parse --show-toplevel";

View file

@ -40,6 +40,8 @@ lib.mkIf (config.my.desktop == "gnome") {
libsForQt5.qtstyleplugin-kvantum libsForQt5.qtstyleplugin-kvantum
qt6Packages.qt6ct qt6Packages.qt6ct
qt6Packages.qtstyleplugin-kvantum qt6Packages.qtstyleplugin-kvantum
draw-on-your-screen2
]; ];
services.gpg-agent.pinentryPackage = pkgs.pinentry-gnome3; services.gpg-agent.pinentryPackage = pkgs.pinentry-gnome3;

View file

@ -1,47 +0,0 @@
{
config,
pkgs,
lib,
...
}:
{
config = {
services.gpg-agent = {
enable = true;
defaultCacheTtl = 604800;
maxCacheTtl = 604800;
extraConfig = ''
allow-preset-passphrase
'';
};
systemd.user.services = {
gpg_unlock = {
Unit = {
Description = "Unlock gpg keyring";
PartOf = [ "graphical-session.target" ];
After = [ "graphical-session.target" ];
};
Service = {
ExecStart = "${pkgs._gpg-unlock}/bin/_gpg-unlock";
};
};
};
systemd.user.timers = {
gpg_unlock = {
Unit = {
Description = "Unlock gpg keyring";
PartOf = [ "graphical-session.target" ];
After = [ "graphical-session.target" ];
};
Timer = {
OnBootSec = "0";
OnUnitActiveSec = "300";
Unit = "gpg_unlock.service";
};
Install = {
WantedBy = [ "sway-session.target" ];
};
};
};
};
}

View file

@ -56,6 +56,8 @@ in
# goto mode # goto mode
g.n = "goto_line_start"; g.n = "goto_line_start";
g.o = "goto_line_end"; g.o = "goto_line_end";
# Formatting
"space".m = ":format";
}; };
keys.select = { keys.select = {
# basic movement # basic movement
@ -68,6 +70,7 @@ in
L = "extend_search_prev"; L = "extend_search_prev";
# edits # edits
s = "insert_mode"; s = "insert_mode";
S = "insert_at_line_start";
# open newline # open newline
h = "open_below"; h = "open_below";
H = "open_above"; H = "open_above";
@ -87,7 +90,7 @@ in
{ {
name = "nix"; name = "nix";
auto-format = true; auto-format = true;
formatter.command = "nixpkgs-fmt"; formatter.command = "nixfmt";
} }
{ {
name = "rust"; name = "rust";

View file

@ -8,36 +8,21 @@
}: }:
{ {
imports = [ imports = [
./waybar
./helix.nix ./helix.nix
./kakoune
./vscode ./vscode
./fish ./fish
./firefox.nix ./firefox.nix
./alacritty.nix
./git.nix ./git.nix
./ssh.nix ./ssh.nix
./gpg.nix
./rofi.nix
./mpv.nix
./mangohud.nix ./mangohud.nix
./pipewire.nix ./pipewire.nix
./mimeapps.nix ./mimeapps.nix
./desktop-entries.nix ./desktop-entries.nix
./chat.nix ./chat.nix
./syncthing.nix ./syncthing.nix
./bmenu.nix
./fzf.nix ./fzf.nix
./ranger
./lf
./pass.nix
./pqiv.nix
./zathura.nix
./man.nix ./man.nix
./mpd.nix
./sway
./gnome.nix ./gnome.nix
./thunar.nix
./xdg-dirs.nix ./xdg-dirs.nix
inputs.nix-index-database.hmModules.nix-index inputs.nix-index-database.hmModules.nix-index
../settings ../settings
@ -54,9 +39,8 @@
# Let Home Manager install and manage itself. # Let Home Manager install and manage itself.
programs.home-manager.enable = true; programs.home-manager.enable = true;
home.packages = with pkgs; [ home.packages = with pkgs; [
terminal # home-manager
pulse_sink
pulseaudio pulseaudio
## CLI ## CLI
@ -69,8 +53,6 @@
p7zip p7zip
tealdeer tealdeer
micro micro
_diffr
br # bulk rename
comma comma
@ -79,17 +61,14 @@
amdgpu_top amdgpu_top
inxi inxi
dmidecode dmidecode
ncdu
## text manipulation ## text manipulation
sd sd
ripgrep ripgrep
translate-shell translate-shell
lipsum
par par
mate.engrampa
# gnome.nautilus
## games ## games
# lutris-unwrapped # lutris-unwrapped
# steam # It's enabled in the system config # steam # It's enabled in the system config
@ -107,6 +86,7 @@
## Network ## Network
speedtest-cli speedtest-cli
nmap nmap
httpie
miniupnpc miniupnpc
deluge deluge
nicotine-plus nicotine-plus
@ -118,6 +98,7 @@
# rustup # rustup
docker-compose docker-compose
gnumake
mariadb mariadb
nodePackages.intelephense nodePackages.intelephense
@ -127,7 +108,6 @@
clang-tools # c/c++ lsp server clang-tools # c/c++ lsp server
rust-analyzer # rust analyzer rust-analyzer # rust analyzer
unstable.blade-formatter
nixfmt-rfc-style nixfmt-rfc-style
]; ];

View file

@ -1,225 +0,0 @@
{
pkgs,
lib,
color,
accent,
}:
let
colors = lib.mapAttrs (_: lib.replaceStrings [ "#" ] [ "rgb:" ]) {
accent_fg = accent.fg;
accent_color = accent.color;
bg_light = color.bg_light;
bg_dark = color.bg_dark;
nontxt = color.nontxt;
orange = color.normal.orange;
brown = color.normal.brown;
};
in
with colors;
''
crosshairs-enable
face global crosshairs_line default,${bg_dark}
face global crosshairs_column default+b
# For Code
face global value magenta
face global type yellow
face global variable blue
face global module ${brown}
face global function ${orange}
face global string green
face global keyword ${accent_color}
face global operator yellow
face global attribute cyan
face global comment ${bg_light}
face global documentation comment
face global meta +i@function
face global builtin blue
# For markup
face global title blue
face global header cyan
face global mono green
face global block magenta
face global link cyan
face global bullet cyan
face global list yellow
# builtin faces
face global Default default,default
face global PrimaryCursor ${accent_fg},${accent_color}+fg
face global PrimaryCursorEol PrimaryCursor
face global PrimarySelection default,${bg_light}+f
face global SecondaryCursor default,default+rfg
face global SecondaryCursorEol SecondaryCursor
face global SecondarySelection PrimarySelection
face global InactiveCursor ${accent_fg},${bg_light}+fg
face global MenuForeground ${accent_fg},${accent_color}
face global MenuBackground default,${bg_dark}
face global MenuInfo cyan
face global Information default,${bg_dark}
face global Error default,red+g
face global StatusLine %sh{
printf "rgb:"
head /dev/urandom |
base64 |
rg --text -o "${color.random_range}" |
head -n 6 |
sd '\n' ""
}
face global StatusLineMode StatusLine
face global StatusLineInfo StatusLine
face global StatusLineValue StatusLine
face global StatusCursor ${accent_fg},${accent_color}
face global Prompt yellow,default
try %{add-highlighter global/ show-matching}
face global MatchingChar ${accent_color},default+b
# Goodies
try %{add-highlighter global/number-lines number-lines -relative -hlcursor}
face global LineNumbers ${bg_light},default
face global LineNumberCursor default,${bg_dark}
face global LineNumbersWrapped red,default
try %{add-highlighter global/ show-whitespaces}
face global Whitespace ${nontxt},default+f
face global BufferPadding ${nontxt},default
## highlight trailing whitespace
# add-highlighter global/ regex '\h*$' 0:red,red+u
face global Reference default+bu
face global InlayHint ${bg_light}+buif
# Lsp
''
+ (lib.concatStringsSep "\n" (
lib.mapAttrsToList
(name: color: ''
face global HighlightDiagnostic${name} ${color},default+bu
face global Diagnostic${name} ${color},default+bu
face global TextDiagnostic${name} ${color},default+b
face global InlayDiagnostic${name} ${color},default+br
'')
{
Error = "red";
Warning = "yellow";
Hint = "blue";
}
))
+ ''
# Color palette
declare-option str red "red"
declare-option str mauve "magenta"
declare-option str maroon "rgb:ee99a0"
declare-option str pink "rgb:f5bde6"
declare-option str cyan "cyan"
declare-option str yellow "yellow"
declare-option str green "green"
declare-option str white "white"
declare-option str blue "blue"
declare-option str sky "rgb:91d7e3"
declare-option str lavender "rgb:b7bdf8"
declare-option str black1 "rgb:202020"
declare-option str black2 "rgb:272727"
declare-option str black3 "rgb:3a3a3a"
declare-option str orange ${orange}
declare-option str teal "rgb:8bd5ca"
declare-option str flamingo "rgb:f0c6c6"
declare-option str gray0 "rgb:606060"
declare-option str gray1 "rgb:737373"
declare-option str bright_red "%opt{red}+b"
declare-option str bright_green "%opt{green}+b"
declare-option str bright_yellow "%opt{yellow}+b"
declare-option str bright_blue "%opt{blue}+b"
declare-option str bright_cyan "%opt{cyan}+b"
declare-option str foreground %opt{white}
declare-option str background %opt{black2}
declare-option str overlay0 "rgb:878787"
declare-option str overlay1 "rgb:9a9a9a"
# Tree-sitter (<https://git.sr.ht/~hadronized/kak-tree-sitter>)
set-face global ts_attribute "%opt{cyan}"
set-face global ts_comment "%opt{overlay0}+i"
set-face global ts_conceal "%opt{mauve}+i"
set-face global ts_constant "%opt{orange}"
set-face global ts_constant_builtin_boolean "%opt{sky}"
set-face global ts_constant_character "%opt{yellow}"
set-face global ts_constant_macro "%opt{mauve}"
set-face global ts_constructor "%opt{cyan}"
set-face global ts_diff_plus "%opt{green}"
set-face global ts_diff_minus "%opt{red}"
set-face global ts_diff_delta "%opt{blue}"
set-face global ts_diff_delta_moved "%opt{mauve}"
set-face global ts_error "%opt{red}+b"
set-face global ts_function "%opt{blue}"
set-face global ts_function_builtin "%opt{blue}+i"
set-face global ts_function_macro "%opt{mauve}"
set-face global ts_hint "%opt{blue}+b"
set-face global ts_info "%opt{green}+b"
set-face global ts_keyword "%opt{mauve}"
set-face global ts_keyword_conditional "%opt{mauve}+i"
set-face global ts_keyword_control_conditional "%opt{mauve}+i"
set-face global ts_keyword_control_directive "%opt{mauve}+i"
set-face global ts_keyword_control_import "%opt{mauve}+i"
set-face global ts_keyword_directive "%opt{mauve}+i"
set-face global ts_keyword_storage "%opt{mauve}"
set-face global ts_keyword_storage_modifier "%opt{mauve}"
set-face global ts_keyword_storage_modifier_mut "%opt{mauve}"
set-face global ts_keyword_storage_modifier_ref "%opt{teal}"
set-face global ts_label "%opt{cyan}+i"
set-face global ts_markup_bold "%opt{orange}+b"
set-face global ts_markup_heading "%opt{red}"
set-face global ts_markup_heading_1 "%opt{red}"
set-face global ts_markup_heading_2 "%opt{mauve}"
set-face global ts_markup_heading_3 "%opt{green}"
set-face global ts_markup_heading_4 "%opt{yellow}"
set-face global ts_markup_heading_5 "%opt{pink}"
set-face global ts_markup_heading_6 "%opt{teal}"
set-face global ts_markup_heading_marker "%opt{orange}+b"
set-face global ts_markup_italic "%opt{pink}+i"
set-face global ts_markup_list_checked "%opt{green}"
set-face global ts_markup_list_numbered "%opt{blue}+i"
set-face global ts_markup_list_unchecked "%opt{teal}"
set-face global ts_markup_list_unnumbered "%opt{mauve}"
set-face global ts_markup_link_label "%opt{blue}"
set-face global ts_markup_link_url "%opt{teal}+u"
set-face global ts_markup_link_uri "%opt{teal}+u"
set-face global ts_markup_link_text "%opt{blue}"
set-face global ts_markup_quote "%opt{gray1}"
set-face global ts_markup_raw "%opt{green}"
set-face global ts_markup_strikethrough "%opt{gray1}+s"
set-face global ts_namespace "%opt{blue}+i"
set-face global ts_operator "%opt{sky}"
set-face global ts_property "%opt{sky}"
set-face global ts_punctuation "%opt{overlay1}"
set-face global ts_punctuation_special "%opt{sky}"
set-face global ts_special "%opt{blue}"
set-face global ts_spell "%opt{mauve}"
set-face global ts_string "%opt{green}"
set-face global ts_string_regex "%opt{orange}"
set-face global ts_string_regexp "%opt{orange}"
set-face global ts_string_escape "%opt{mauve}"
set-face global ts_string_special "%opt{blue}"
set-face global ts_string_special_path "%opt{orange}"
set-face global ts_string_special_symbol "%opt{mauve}"
set-face global ts_string_symbol "%opt{red}"
set-face global ts_tag "%opt{mauve}"
set-face global ts_tag_error "%opt{red}"
set-face global ts_text "%opt{white}"
set-face global ts_text_title "%opt{mauve}"
set-face global ts_type "%opt{yellow}"
set-face global ts_type_enum_variant "%opt{flamingo}"
set-face global ts_variable "%opt{blue}"
set-face global ts_variable_builtin "%opt{red}"
set-face global ts_variable_other_member "%opt{teal}"
set-face global ts_variable_parameter "%opt{maroon}+i"
set-face global ts_warning "%opt{orange}+b"
''

View file

@ -1,155 +0,0 @@
{
config,
pkgs,
lib,
...
}:
let
inherit (config.my)
dmenu
editor
theme
accent
;
inherit (theme) color;
inherit (pkgs) kakounePlugins;
inherit (pkgs.kakouneUtils) buildKakounePlugin;
in
{
imports = [ ./kak-tree-sitter.nix ];
config = {
programs.kakoune = {
enable = true;
plugins = with kakounePlugins; [
kak-ansi
active-window-kak
(buildKakounePlugin rec {
pname = "auto-pairs.kak";
version = "0.1";
src = pkgs.fetchFromGitHub {
owner = "alexherbo2";
repo = pname;
rev = "bfdcb8566076f653ec707f86207f83ea75173ce9";
sha256 = "sha256-MgqCuGj03ctKty2yQgQvy6qV/0s7euNwukhSjqauqW8=";
};
})
(buildKakounePlugin rec {
pname = "kakoune-mirror-colemak";
version = "0.1";
src = pkgs.fetchFromGitHub {
owner = "lelgenio";
repo = pname;
rev = "8f191172590d7615d0a56c857e9331ce69164670";
sha256 = "sha256-ERNtWOn8rq53YmByTQnwDObN7Fs5HYBwvNIyTJrj2hw=";
};
})
(buildKakounePlugin rec {
pname = "kakoune-palette";
version = "0.1";
src = pkgs.fetchFromGitHub {
owner = "delapouite";
repo = pname;
rev = "052cab5f48578679d94717ed5f62429be9865d5d";
sha256 = "sha256-fk0TL6qG3zX8cPp1xvhMw0/g9xSKKp04uyagaPq/Nd0=";
};
})
(buildKakounePlugin rec {
pname = "kak-crosshairs";
version = "0.1";
src = pkgs.fetchFromGitHub {
owner = "lelgenio";
repo = pname;
rev = "3a6bcd9b50737a9280de109e32048991a2f85f7c";
sha256 = "sha256-wZQ9tsAOqG4eW28DwJ6VcsR9gSrCGqFjbTARhvTLWTQ=";
};
})
(buildKakounePlugin rec {
pname = "kakoune-colemak-neio";
version = "0.1";
src = pkgs.fetchFromGitHub {
owner = "lelgenio";
repo = pname;
rev = "28b9aabafb8d422a4c52b2a15424056fb87c8d90";
sha256 = "sha256-d3OTjo02QFsbNqmgd28fHgSjPcdF8BJleCJGCyOFc18=";
};
})
(buildKakounePlugin rec {
pname = "kakoune-multi-file";
version = "0.1";
src = pkgs.fetchFromGitHub {
owner = "natasky";
repo = pname;
rev = "1cc6baeb14b773916eb9209469aa77b3cfa67a0a";
sha256 = "sha256-3PLxG9UtT0MMSibvTviXQIgTH3rApZ3WSbNCEH3c7HE=";
};
})
];
extraConfig =
lib.concatStringsSep "\n" (
map (lib.readFile) (
[
./filetypes.kak
./hooks.kak
./indent.kak
./keys.kak
./lsp-config.kak
./usermode.kak
./git-mode.kak
]
++ lib.optional (dmenu == "rofi") ./rofi-commands.kak
)
)
+ ''
try %{
eval %sh{ kak-tree-sitter -vvvv -dks --init $kak_session }
}
set global scrolloff 10,20
set global autoreload yes
set global startup_info_version 99999999
''
+ (import ./colors.nix {
inherit
pkgs
lib
color
accent
;
});
};
home.file = {
".config/kak-lsp/kak-lsp.toml".source = ./kak-lsp.toml;
};
home.packages = with pkgs; [
terminal
ranger
bmenu
kak-lsp
unstable.kak-tree-sitter
kak-pager
kak-man-pager
emmet-cli
nodePackages.prettier
pint-fmt
aspell
aspellDicts.en
aspellDicts.pt_BR
];
home.activation = {
update_kakoune = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
$DRY_RUN_CMD timeout 1s kak -clear &&
$DRY_RUN_CMD timeout 1s kak -l | xargs -r -n1 timeout 1s kak -e "config-source;quit" -ui dummy -c ||
$DRY_RUN_CMD true
'';
};
home.sessionVariables = lib.mkIf (editor == "kakoune") {
EDITOR = "kak";
# Some plugins(kak_ansi) like to compile stuff
CC = "cc";
};
};
}

View file

@ -1,243 +0,0 @@
try %{
require-module python
add-highlighter shared/python/code/function regex '\b([a-zA-Z_][a-zA-Z0-9_]*)\s*\(' 1:function
}
hook global WinSetOption filetype=sh %{
set buffer formatcmd 'shfmt -s -ci -i "4"'
}
hook global WinSetOption filetype=c %{
set buffer formatcmd 'clang-format'
}
hook global WinSetOption filetype=nix %{
set buffer formatcmd 'nixfmt'
}
hook global BufCreate .*\.html %{
set buffer formatcmd 'prettier --parser html'
}
hook global BufCreate .*\.component\.html %{
set buffer filetype angular
}
hook global WinSetOption filetype=angular %[
set-option buffer extra_word_chars '_' '-'
require-module html
add-highlighter buffer/angular ref html
]
hook global BufCreate .*\.php %{
set buffer formatcmd 'pint-fmt'
}
hook global BufCreate .*\.js %{
set buffer formatcmd 'prettier --parser babel'
}
hook global BufCreate .*\.scss %{
set buffer formatcmd 'prettier --parser scss'
}
hook global BufCreate .*\.vue %{
set buffer formatcmd 'prettier --parser vue'
hook buffer InsertCompletionHide {
execute-keys 'Ghs$1<ret>c'
}
}
hook global BufCreate .*\.jsonc %[ set buffer filetype jsonc ]
hook global BufCreate .*\.blade.php %[ set buffer filetype blade ]
hook global BufCreate .*\.less %[ set buffer filetype less ]
hook global BufCreate .*\.(tera|askama)\.?.* %[
require-module jinja
add-highlighter buffer/jinja ref jinja
]
hook global WinSetOption filetype=rust %[
require-module rust
add-highlighter window/rust-custom regions
require-module html
add-highlighter window/rust-custom/html region -recurse '\{' '(html|view)!\s*\{\K' '(?=\})' ref html
require-module sql
add-highlighter window/rust-custom/sql region 'r#"\K--\s*sql' '"#' group
add-highlighter window/rust-custom/sql/ fill white
add-highlighter window/rust-custom/sql/ ref sql
]
hook global WinSetOption filetype=sql %[
set buffer comment_line '--'
]
hook global WinSetOption filetype=jsonc %[
set buffer comment_line '//'
require-module json
add-highlighter buffer/jsonc regions
add-highlighter buffer/jsonc/base default-region ref json
add-highlighter buffer/jsonc/double_string region ["] ["] fill string
add-highlighter buffer/jsonc/line-comment region // $ fill comment
]
hook global WinSetOption filetype=blade %[
set buffer formatcmd 'blade-formatter \
--end-with-newline \
--indent-size "4" \
--wrap-line-length "80" \
--stdin'
set-option buffer extra_word_chars '_' '-'
hook window ModeChange pop:insert:.* -group blade-trim-indent blade-trim-indent
hook window InsertChar .* -group blade-indent blade-indent-on-char
hook window InsertChar \n -group blade-indent blade-indent-on-new-line
hook -once -always window WinSetOption filetype=.* %{ remove-hooks window blade-.+ }
require-module php
require-module javascript
add-highlighter buffer/blade regions
add-highlighter buffer/blade/base default-region group
add-highlighter buffer/blade/string region '"' '"' regions
add-highlighter buffer/blade/string/base default-region fill string
add-highlighter buffer/blade/string/expression region '\{\{(?!--)' '(?!--)\}\}' ref php
add-highlighter buffer/blade/string/raw-expression region '\{!!' '!!\}' ref php
add-highlighter buffer/blade/base/ ref html
add-highlighter buffer/blade/php region '@php' '@endphp' group
add-highlighter buffer/blade/php/ ref php
add-highlighter buffer/blade/php/ regex '@((end)?php)' 1:block
add-highlighter buffer/blade/js region '<script>' '</script>' group
add-highlighter buffer/blade/js/ ref javascript
add-highlighter buffer/blade/expression region '\{\{(?!--)' '(?!--)\}\}' ref php
add-highlighter buffer/blade/statement region -recurse '\(' '@(if|foreach|for|section|yield|include)\s*\(' '\)' ref php
add-highlighter buffer/blade/base/ regex '@(else(if)?|include|case|break)' 1:keyword
add-highlighter buffer/blade/base/ regex '@((end)?(if|isset|foreach|for|section|switch))' 1:keyword
add-highlighter buffer/blade/comment region '\{\{--' '--\}\}' fill comment
set-option buffer comment_block_begin '{{-- '
set-option buffer comment_block_end ' --}}'
map buffer user 'c' '<a-x>_: comment-block<ret><a-;>;' -docstring 'comment block'
]
try %§
define-command -hidden blade-trim-indent %{
# remove trailing white spaces
try %{ execute-keys -draft -itersel <a-x> s \h+$ <ret> d }
}
define-command -hidden blade-indent-on-char %<
evaluate-commands -draft -itersel %<
# align closer token to its opener when alone on a line
try %/ execute-keys -draft <a-h> <a-k> ^\h+[\]}]$ <ret> m s \A|.\z <ret> 1<a-&> /
>
>
define-command -hidden blade-indent-on-new-line %<
evaluate-commands -draft -itersel %<
# copy // comments or docblock * prefix and following white spaces
try %{ execute-keys -draft s [^/] <ret> k <a-x> s ^\h*\K(?://|[*][^/])\h* <ret> y gh j P }
# preserve previous line indent
try %{ execute-keys -draft <semicolon> K <a-&> }
# filter previous line
try %{ execute-keys -draft k : blade-trim-indent <ret> }
# indent after lines beginning / ending with opener token
try %_ execute-keys -draft k <a-x> <a-k> ^\h*[[{]|[[{]$ <ret> j <a-gt> _
# append " * " on lines starting a multiline /** or /* comment
try %{ execute-keys -draft k <a-x> s ^\h*/[*][* ]? <ret> j gi i <space>*<space> }
# deindent closer token(s) when after cursor
try %_ execute-keys -draft <a-x> <a-k> ^\h*[})] <ret> gh / [})] <ret> m <a-S> 1<a-&> _
>
>
§
hook global WinSetOption filetype=less %[
set buffer formatcmd 'prettier \
--tab-width "4" \
--print-width "80" \
--parser less'
set-option buffer extra_word_chars '_' '-'
set buffer comment_line '//'
set buffer comment_block_begin '/*'
set buffer comment_block_end '*/'
hook window ModeChange pop:insert:.* -group less-trim-indent less-trim-indent
hook window InsertChar \n -group less-indent less-indent-on-new-line
hook window InsertChar \} -group less-indent less-indent-on-closing-curly-brace
map buffer insert <c-k> '<esc>xs\$\d+<ret>) c'
hook -once -always window WinSetOption filetype=.* %{ remove-hooks window less-.+ }
add-highlighter buffer/less regions
add-highlighter buffer/less/code default-region group
add-highlighter buffer/less/line-comment region // $ fill comment
add-highlighter buffer/less/comment region /[*] [*]/ fill comment
add-highlighter buffer/less/double_string region ["] ["] fill string
add-highlighter buffer/less/single_string region ['] ['] fill string
add-highlighter buffer/less/code/ regex ([A-Za-z][A-Za-z0-9_-]*)\h*: 1:keyword
add-highlighter buffer/less/code/ regex ::?(\w+) 0:attribute
add-highlighter buffer/less/code/ regex !important 0:keyword
add-highlighter buffer/less/code/selector group
add-highlighter buffer/less/code/selector/ regex [A-Za-z][A-Za-z0-9_-]* 0:keyword
add-highlighter buffer/less/code/selector/ regex [*]|[#.][A-Za-z][A-Za-z0-9_-]* 0:variable
add-highlighter buffer/less/code/selector/ regex &([A-Za-z0-9_-]*) 1:variable
add-highlighter buffer/less/code/selector/ regex & 0:operator
add-highlighter buffer/less/code/selector/ regex (\.?[A-Za-z][A-Za-z0-9_-]*)\s*\( 1:function
add-highlighter buffer/less/code/ regex (\b(\d*\.)?\d+(ch|cm|em|ex|mm|pc|pt|px|rem|vh|vmax|vmin|vw|%|s|ms)?) 0:value 3:type
add-highlighter buffer/less/code/ regex (#)[0-9A-Fa-f]{3}([0-9A-Fa-f]{3}([0-9A-Fa-f]{2})?)?\b 0:value 1:operator
add-highlighter buffer/less/code/ regex (?i)\b(AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGray|DarkGrey|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGray|DarkSlateGrey|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGray|DimGrey|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gray|Grey|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGray|LightGrey|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGray|LightSlateGrey|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|RebeccaPurple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGray|SlateGrey|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b 0:value
add-highlighter buffer/less/code/ regex ([\w-_]+)\s*: 1:attribute
add-highlighter buffer/less/code/ regex @[\w\d-_]+ 0:variable
]
try %§
define-command -hidden less-trim-indent %{
# remove trailing white spaces
try %{ execute-keys -draft -itersel <a-x> s \h+$ <ret> d }
}
define-command -hidden less-indent-on-new-line %[
evaluate-commands -draft -itersel %[
# preserve previous line indent
try %[ execute-keys -draft <semicolon> K <a-&> ]
# filter previous line
try %[ execute-keys -draft k : less-trim-indent <ret> ]
# indent after lines ending with with {
try %[ execute-keys -draft k <a-x> <a-k> \{$ <ret> j <a-gt> ]
# deindent closing brace when after cursor
try %[ execute-keys -draft <a-x> <a-k> ^\h*\} <ret> gh / \} <ret> m <a-S> 1<a-&> ]
]
]
define-command -hidden less-indent-on-closing-curly-brace %[
evaluate-commands -draft -itersel %[
# align to opening curly brace when alone on a line
try %[ execute-keys -draft <a-h> <a-k> ^\h+\}$ <ret> m s \A|.\z <ret> 1<a-&> ]
]
]
§

View file

@ -1,134 +0,0 @@
try %{
# declare-user-mode surround
declare-user-mode git
}
map global user 'v' ': enter-user-mode git<ret>' -docstring 'git vcs mode'
map global user 'V' ': enter-user-mode -lock git<ret>' -docstring 'git vcs mode'
# show status
map global git 's' ': git status<ret>' -docstring 'status'
map global git 'S' '_: git show %val{selection} --<ret>' -docstring 'show'
map global git 'g' ': git-graph <ret>' -docstring 'graph all commits'
map global git 'G' ': git-graph-simpified <ret>' -docstring 'graph all branches'
map global git '<a-g>' ': git-graph-with-remotes<ret>' -docstring 'graph all branches and remotes'
map global git 'd' ': git diff %reg{%}<ret>' -docstring 'diff current'
map global git 'D' ': git diff<ret>' -docstring 'diff all'
map global git '<a-d>' ': git diff --staged<ret>' -docstring 'diff staged'
map global git 'n' ': git next-hunk <ret>' -docstring 'next git modification'
map global git 'p' ': git prev-hunk <ret>' -docstring 'previous git modification'
# make commits
map global git 'a' ': git add<ret>' -docstring 'add current'
map global git 'A' ': git add --all<ret>' -docstring 'add all'
map global git 'c' ': git commit -v<ret>' -docstring 'commit'
# discard work
map global git 'r' ': git checkout %reg{%}<ret>' -docstring 'restore current'
# deal with merges
map global git 'N' ': git-next-merge-conflict <ret>' -docstring 'next git merge conflict'
map global git 'P' ': git-prev-merge-conflict <ret>' -docstring 'previous git merge conflict'
map global git 'm' ': git-merge-head <ret>' -docstring 'merge using head'
map global git 'M' ': git-merge-new <ret>' -docstring 'merge using new'
map global git '<c-m>' ': git-merge-head-and-new <ret>' -docstring 'merge using both head and new'
map global git '<a-m>' ': git-merge-original <ret>' -docstring 'merge using original'
define-command -override git-next-merge-conflict %{
try %{
execute-keys /^<lt>{6,}.*?^<gt>{6,}.*?$<ret>
} catch %{
fail "No hunks found forward"
}
} -docstring "next git merge hunk"
define-command -override git-prev-merge-conflict %{
try %{
execute-keys <a-/>^<lt>{6,}.*?^<gt>{6,}.*?$<ret>
} catch %{
fail "No hunks found backwards"
}
} -docstring "previous git merge hunk"
define-command -override git-merge-head %{
evaluate-commands -draft %{
# delete head marker
execute-keys <a-/>^<lt>{4,}<ret>xd
try %{
# select original marker
execute-keys /^[|]{4,}<ret>
# extend to theirs marker
execute-keys ?^={4,}<ret>x
} catch %{
# select theirs marker
execute-keys /^={4,}<ret>x
}
# extend to end marker
execute-keys ?^<gt>{4,}<ret>xd
}
} -docstring "merge using head"
define-command -override git-merge-original %{
evaluate-commands -draft %{
# select head marker
execute-keys <a-/>^<lt>{4,}<ret>
# select to middle of conflict
execute-keys ?^[|]{4,}<ret>xd
# select theirs marker
execute-keys /^={4,}<ret>
# extend to end marker
execute-keys ?^<gt>{4,}<ret>xd
}
} -docstring "merge using original"
define-command -override git-merge-new %{
evaluate-commands -draft %{
# select head marker
execute-keys <a-/>^<lt>{4,}<ret>
# extend to theirs marker
execute-keys ?^={4,}\n<ret>d
# delete end marker
execute-keys /^<gt>{4,}<ret>xd
}
} -docstring "merge using new"
define-command -override git-merge-head-and-new %{
evaluate-commands -draft %{
# delete head marker
execute-keys <a-/>^<lt>{4,}<ret>xd
# select middle of conflict
execute-keys /^[|]{4,}<ret>x
# extendo to theirs marker
execute-keys ?^={4,}<ret>xd
# delete end marker
execute-keys /^<gt>{4,}<ret>xd
}
} -docstring "merge using head and new"
define-command -override git-graph %{
try %{ delete-buffer '*git-graph*' }
edit -scratch '*git-graph*'
execute-keys '<a-!> timeout 10s git graph --color=always --decorate --branches<ret>'
execute-keys 'gg'
try ansi-render
map buffer normal q ': delete-buffer!<ret>'
}
define-command -override git-graph-simpified %{
try %{ delete-buffer '*git-graph*' }
edit -scratch '*git-graph*'
execute-keys '<a-!> timeout 10s git graph --color=always --decorate --all --simplify-by-decoration<ret>'
execute-keys 'gg'
try ansi-render
map buffer normal q ': delete-buffer!<ret>'
}
define-command -override git-graph-with-remotes %{
try %{ delete-buffer '*git-graph*' }
edit -scratch '*git-graph*'
execute-keys '<a-!> timeout 10s git graph --color=always --decorate --all<ret>'
execute-keys 'gg'
try ansi-render
map buffer normal q ': delete-buffer!<ret>'
}

View file

@ -1,56 +0,0 @@
set global idle_timeout 500
enable-auto-pairs
hook global NormalIdle .* %{ evaluate-commands %sh{
hex_with_size() {
for i in 3 4 6 8; do
printf "[0-9a-f]{$i}|"
done
}
echo "$kak_selection" | grep -P "^#?($(hex_with_size))$" > /dev/null &&
echo 'palette-status'
} }
define-command -hidden -override git-try-show-diff %{
evaluate-commands -draft %sh{
test -f "$kak_buffile" || exit 0
cd $(dirname "$kak_buffile")
git rev-parse --git-dir > /dev/null &&
echo "git show-diff"
}
}
evaluate-commands %sh{
for hook in NormalIdle FocusIn FocusOut BufWritePost BufOpenFile; do
printf "hook global %s .* 'git-try-show-diff'\n" "$hook"
done
}
define-command -override diffr %{ try %{
execute-keys -draft 'ggxsdiff<ret>'
execute-keys -draft '%<a-;>J| _diffr<ret>'
ansi-render
} }
hook global BufOpenFile .* diffr
hook global BufOpenFile .* %{
modeline-parse
}
hook global BufOpenFile .*/COMMIT_EDITMSG %{
execute-keys -draft 'ge<a-!>git log -1000 --oneline<ret>'
write
}
hook global RegisterModified '"' %{ nop %sh{ {
printf %s "$kak_reg_dquote" | wl-copy -n
printf %s "$kak_reg_dquote" | xclip -i -selection clipboard
} > /dev/null 2>&1 < /dev/null & }} -group sync-clipboard
# Trim trailing whitespace
hook global BufWritePre .* %{ try %{
execute-keys -draft \%s\h+$<ret>d
} } -group remove-whitespace

View file

@ -1,33 +0,0 @@
# {{@@ header() @@}}
# _ __ _
# | |/ /__ _| | _____ _ _ _ __ ___
# | ' // _` | |/ / _ \| | | | '_ \ / _ \
# | . \ (_| | < (_) | |_| | | | | __/
# |_|\_\__,_|_|\_\___/ \__,_|_| |_|\___|
set global tabstop 4
hook global BufCreate .*\.py %{
set global indentwidth 4
}
hook global BufCreate .*\.nix %{
set global indentwidth 2
}
#################################################################
# Spaces
#################################################################
set global indentwidth 4
# use spaces insted of tabs
hook global BufCreate .* %{
hook buffer InsertChar \t %{
exec -draft -itersel h@
} -group replace-tabs-with-spaces
}
hook global WinSetOption filetype=makefile %{
remove-hooks buffer replace-tabs-with-spaces
}

View file

@ -1,155 +0,0 @@
snippet_support = false
verbosity = 2
[server]
# exit session if no requests were received during given period in seconds
# works only in unix sockets mode (-s/--session)
# set to 0 to disable
timeout = 1800 # seconds = 30 minutes
[language_server.angular]
filetypes = ["angular"]
roots = [".angular", ".git"]
command = "node"
args = [
"/home/lelgenio/.config/yarn/global/node_modules/@angular/language-server",
"--ngProbeLocations",
"/home/lelgenio/.config/yarn/global/node_modules",
"--tsProbeLocations",
"/home/lelgenio/.config/yarn/global/node_modules",
"--stdio",
]
[language_server.bash-language-server]
filetypes = ["sh"]
roots = [".git", ".hg"]
command = "bash-language-server"
args = ["start"]
[language_server.clangd]
filetypes = ["c", "cpp"]
roots = ["compile_commands.json", ".clangd", ".git", ".hg"]
command = "clangd"
[language_server.css-language-server]
filetypes = ["css"]
roots = ["package.json", ".git", ".hg"]
command = "vscode-css-languageserver"
args = ["--stdio"]
[language_server.less-language-server]
filetypes = ["less"]
roots = ["package.json", ".git", ".hg"]
command = "vscode-css-languageserver"
args = ["--stdio"]
[language_server.html-language-server]
filetypes = ["html"]
roots = ["package.json"]
command = "vscode-html-languageserver"
args = ["--stdio"]
settings_section = "_"
[language_server.html-language-server.settings._]
# quotePreference = "single"
# javascript.format.semicolons = "insert"
[language_server.typescript-language-server]
filetypes = ["javascript", "typescript"]
roots = ["package.json", "tsconfig.json", "jsconfig.json", ".git", ".hg"]
command = "typescript-language-server"
args = ["--stdio"]
settings_section = "_"
[language_server.typescript-language-server.settings._]
# quotePreference = "double"
# typescript.format.semicolons = "insert"
[language_server.json-language-server]
filetypes = ["json"]
roots = ["package.json"]
command = "vscode-json-languageserver"
args = ["--stdio"]
[language_server.nil]
filetypes = ["nix"]
command = "nil"
roots = ["flake.nix", "shell.nix", ".git"]
[language_server.nil.settings.nil]
formatting.command = [ "nixfmt" ]
[language_server.intelephense]
filetypes = ["php"]
roots = [".htaccess", "composer.json"]
command = "intelephense"
args = ["--stdio"]
settings_section = "intelephense"
[language_server.intelephense.settings.intelephense]
storagePath = "/tmp/intelephense"
format.braces = "k&r"
environment.includePaths = [
"./vendor",
"./vendor/autoload",
"./vendor/laravel/framework/",
"./vendor/laravel/framework/src/",
"./vendor/laravel/framework/src/Illuminate/"
]
files.exclude = [
"**/.git/**",
"**/.svn/**",
"**/.hg/**",
"**/.direnv/**",
"**/CVS/**",
"**/.DS_Store/**",
"**/node_modules/**",
"**/bower_components/**",
"**/resources/views/**"
]
[language_server.rust-analyzer]
filetypes = ["rust"]
roots = ["Cargo.toml"]
command = "sh"
args = [
"-c",
"""
if path=$(rustup which rust-analyzer 2>/dev/null); then
"$path"
else
rust-analyzer
fi
""",
]
[language_server.rust-analyzer.settings.rust-analyzer]
# See https://rust-analyzer.github.io/manual.html#configuration
# cargo.features = []
checkOnSave.command = "clippy"
hoverActions.enable = false # kak-lsp doesn't support this at the moment
[language_server.godot]
filetypes = ["gd", "gdscript", "gdscript3"]
roots = ["project.godot", ".git/"]
command = "nc"
args = [ "localhost", "6008"]
# Semantic tokens support
# See https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_semanticTokens
# for the default list of tokens and modifiers.
# However, many language servers implement their own values.
# Make sure to check the output of `lsp-capabilities` and each server's documentation and source code as well.
# Examples:
# - TypeScript: https://github.com/microsoft/vscode-languageserver-node/blob/main/client/src/common/semanticTokens.ts
# - Rust Analyzer: https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/syntax_highlighting.rs
[semantic_tokens]
faces = [
{face="documentation", token="comment", modifiers=["documentation"]},
{face="comment", token="comment"},
{face="function", token="function"},
{face="keyword", token="keyword"},
{face="module", token="namespace"},
{face="operator", token="operator"},
{face="string", token="string"},
{face="type", token="type"},
{face="default+d", token="variable", modifiers=["readonly"]},
{face="default+d", token="variable", modifiers=["constant"]},
{face="variable", token="variable"},
]

View file

@ -1,64 +0,0 @@
{ pkgs, lib, ... }:
let
hx-src = pkgs.helix.src;
kts-src = pkgs.unstable.kak-tree-sitter-unwrapped.src;
inherit (pkgs) fetchFromGitHub;
in
with pkgs.tree-sitter-grammars;
{
xdg.configFile."kak-tree-sitter/config.toml".text =
lib.foldlAttrs
(
acc: name: vals:
acc
+ ''
[language.${name}.grammar.source.local]
path = "${vals.parser}"
[language.${name}.grammar]
compile = "cc"
compile_args = ["-c", "-fpic", "../scanner.c", "../parser.c", "-I", ".."]
compile_flags = ["-O3"]
link = "cc"
link_args = ["-shared", "-fpic", "scanner.o", "parser.o", "-o", "typescript.so"]
link_flags = ["-O3"]
[language.${name}.queries.source.local]
path = "${vals.queries}"
[language.${name}.queries]
path = "${vals.queries}"
''
)
""
{
nix = {
parser = tree-sitter-nix + "/parser";
queries = tree-sitter-nix + "/queries";
};
scss = {
parser = tree-sitter-scss + "/parser";
queries = tree-sitter-scss + "/queries";
};
css = {
parser = tree-sitter-css + "/parser";
queries = tree-sitter-css + "/queries";
};
javascript = {
parser = tree-sitter-javascript + "/parser";
queries = tree-sitter-javascript + "/queries";
};
typescript = {
parser =
tree-sitter-typescript.overrideAttrs (old: {
src = fetchFromGitHub {
owner = "tree-sitter";
repo = "tree-sitter-typescript";
rev = "b1bf4825d9eaa0f3bdeb1e52f099533328acfbdf";
hash = "sha256-oZKit8kScXcOptmT2ckywL5JlAVe+wuwhuj6ThEI5OQ=";
};
})
+ "/parser";
queries = kts-src + "/runtime/queries/typescript";
};
};
}

View file

@ -1,20 +0,0 @@
# {{@@ header() @@}}
# _ __ _
# | |/ /__ _| | _____ _ _ _ __ ___
# | ' // _` | |/ / _ \| | | | '_ \ / _ \
# | . \ (_| | < (_) | |_| | | | | __/
# |_|\_\__,_|_|\_\___/ \__,_|_| |_|\___|
set global scrolloff 10,20
set global autoreload yes
set global startup_info_version 20200901
source "%val{config}/rc/plug.kak"
source "%val{config}/rc/keys.kak"
source "%val{config}/rc/usermode.kak"
source "%val{config}/rc/git-mode.kak"
source "%val{config}/rc/hooks.kak"
source "%val{config}/rc/filetypes.kak"
source "%val{config}/rc/indent.kak"
source "%val{config}/colors.kak"

Some files were not shown because too many files have changed in this diff Show more