Migrate config (frues-pc machine for now) from https://git.peprolinbot.com/peprolinbot/nixos-config, with improvements
Some checks failed
Update `flake.lock` / update_lockfile (push) Waiting to run
Flake check / check (push) Has been cancelled

This commit is contained in:
Pedro Rey Anca 2025-09-08 18:59:28 +02:00
parent ebd178b0a5
commit 7606f9e051
Signed by: peprolinbot
GPG key ID: 053EA6E00116533A
66 changed files with 9465 additions and 73 deletions

View file

@ -3,9 +3,10 @@
inventory.machines = {
aresix = {
deploy.targetHost = "root@[4a6:fed0:59ba:507d:baab:15f3:846d:ead4]";
tags = ["server" "headless" "spain"];
tags = ["server" "headless" "spain"];
};
frues-pc = {
tags = ["desktop" "spain" "gaming"];
};
};
@ -39,15 +40,44 @@ tags = ["server" "headless" "spain"];
roles.default.extraModules = [./users/pedro/home.nix];
};
spain-located = {
podman = {
module.name = "importer";
roles.default.tags.desktop = {};
roles.default.extraModules = ["modules/podman.nix"];
};
virtualisation = {
module.name = "importer";
roles.default.tags.desktop = {};
roles.default.extraModules = ["modules/virtualisation.nix"];
};
spain-located = {
module.name = "importer";
roles.default.tags.all = {};
roles.default.extraModules = ["modules/spain.nix"];
};
desktop-base = {
module.name = "importer";
roles.default.tags.desktop = {};
roles.default.extraModules = ["modules/desktop/base"];
};
desktop-gaming = {
module.name = "importer";
roles.default.tags.gaming = {};
roles.default.extraModules = ["modules/desktop/gaming.nix"];
};
# Docs: https://docs.clan.lol/reference/clanServices/mycelium/
mycelium = {
roles.peer.tags.all = {};
};
# Fallback: Secure connections via Tor
tor = {
roles.server.tags.all = {};
};
};
}

404
flake.lock generated
View file

@ -1,5 +1,72 @@
{
"nodes": {
"base16": {
"inputs": {
"fromYaml": "fromYaml"
},
"locked": {
"lastModified": 1746562888,
"narHash": "sha256-YgNJQyB5dQiwavdDFBMNKk1wyS77AtdgDk/VtU6wEaI=",
"owner": "SenchoPens",
"repo": "base16.nix",
"rev": "806a1777a5db2a1ef9d5d6f493ef2381047f2b89",
"type": "github"
},
"original": {
"owner": "SenchoPens",
"repo": "base16.nix",
"type": "github"
}
},
"base16-fish": {
"flake": false,
"locked": {
"lastModified": 1622559957,
"narHash": "sha256-PebymhVYbL8trDVVXxCvZgc0S5VxI7I1Hv4RMSquTpA=",
"owner": "tomyun",
"repo": "base16-fish",
"rev": "2f6dd973a9075dabccd26f1cded09508180bf5fe",
"type": "github"
},
"original": {
"owner": "tomyun",
"repo": "base16-fish",
"type": "github"
}
},
"base16-helix": {
"flake": false,
"locked": {
"lastModified": 1748408240,
"narHash": "sha256-9M2b1rMyMzJK0eusea0x3lyh3mu5nMeEDSc4RZkGm+g=",
"owner": "tinted-theming",
"repo": "base16-helix",
"rev": "6c711ab1a9db6f51e2f6887cc3345530b33e152e",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "base16-helix",
"type": "github"
}
},
"base16-vim": {
"flake": false,
"locked": {
"lastModified": 1732806396,
"narHash": "sha256-e0bpPySdJf0F68Ndanwm+KWHgQiZ0s7liLhvJSWDNsA=",
"owner": "tinted-theming",
"repo": "base16-vim",
"rev": "577fe8125d74ff456cf942c733a85d769afe58b7",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "base16-vim",
"rev": "577fe8125d74ff456cf942c733a85d769afe58b7",
"type": "github"
}
},
"clan-core": {
"inputs": {
"data-mesher": "data-mesher",
@ -14,11 +81,11 @@
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1756309234,
"narHash": "sha256-R+k5Mi7FNcXjAkn1z6lYLbjxi5Brsss5Q0Q6+GyqX5M=",
"rev": "e6819ede61182931be091705d74424d9eadeefed",
"lastModified": 1757135312,
"narHash": "sha256-fUhFuvnyQD+ZObL/p90KMMMK9HyEh2i4UqUvKmmersI=",
"rev": "1a9bbab667c5de507f7ced4f2369c8a20185408c",
"type": "tarball",
"url": "https://git.clan.lol/api/v1/repos/clan/clan-core/archive/e6819ede61182931be091705d74424d9eadeefed.tar.gz"
"url": "https://git.clan.lol/api/v1/repos/clan/clan-core/archive/1a9bbab667c5de507f7ced4f2369c8a20185408c.tar.gz"
},
"original": {
"type": "tarball",
@ -41,11 +108,11 @@
]
},
"locked": {
"lastModified": 1756091210,
"narHash": "sha256-oEUEAZnLbNHi8ti4jY8x10yWcIkYoFc5XD+2hjmOS04=",
"rev": "eb831bca21476fa8f6df26cb39e076842634700d",
"lastModified": 1756695982,
"narHash": "sha256-dyLhOSDzxZtRgi5aj/OuaZJUsuvo+8sZ9CU/qieZ15c=",
"rev": "cc8f26e7e6c2dc985526ba59b286ae5a83168cdb",
"type": "tarball",
"url": "https://git.clan.lol/api/v1/repos/clan/data-mesher/archive/eb831bca21476fa8f6df26cb39e076842634700d.tar.gz"
"url": "https://git.clan.lol/api/v1/repos/clan/data-mesher/archive/cc8f26e7e6c2dc985526ba59b286ae5a83168cdb.tar.gz"
},
"original": {
"type": "tarball",
@ -60,11 +127,11 @@
]
},
"locked": {
"lastModified": 1756115622,
"narHash": "sha256-iv8xVtmLMNLWFcDM/HcAPLRGONyTRpzL9NS09RnryRM=",
"lastModified": 1756733629,
"narHash": "sha256-dwWGlDhcO5SMIvMSTB4mjQ5Pvo2vtxvpIknhVnSz2I8=",
"owner": "nix-community",
"repo": "disko",
"rev": "bafad29f89e83b2d861b493aa23034ea16595560",
"rev": "a5c4f2ab72e3d1ab43e3e65aa421c6f2bd2e12a1",
"type": "github"
},
"original": {
@ -73,6 +140,44 @@
"type": "github"
}
},
"firefox-addons": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"dir": "pkgs/firefox-addons",
"lastModified": 1757131407,
"narHash": "sha256-AlCnmivsXeZAiDz0b0n/HsYx6ccowNATAilNxLMFgeM=",
"owner": "rycee",
"repo": "nur-expressions",
"rev": "102a040fa2e745daf670819aac53d1f6f73635af",
"type": "gitlab"
},
"original": {
"dir": "pkgs/firefox-addons",
"owner": "rycee",
"repo": "nur-expressions",
"type": "gitlab"
}
},
"firefox-gnome-theme": {
"flake": false,
"locked": {
"lastModified": 1748383148,
"narHash": "sha256-pGvD/RGuuPf/4oogsfeRaeMm6ipUIznI2QSILKjKzeA=",
"owner": "rafaelmardojai",
"repo": "firefox-gnome-theme",
"rev": "4eb2714fbed2b80e234312611a947d6cb7d70caf",
"type": "github"
},
"original": {
"owner": "rafaelmardojai",
"repo": "firefox-gnome-theme",
"type": "github"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
@ -81,11 +186,11 @@
]
},
"locked": {
"lastModified": 1754487366,
"narHash": "sha256-pHYj8gUBapuUzKV/kN/tR3Zvqc7o6gdFB9XKXIp1SQ8=",
"lastModified": 1756770412,
"narHash": "sha256-+uWLQZccFHwqpGqr2Yt5VsW/PbeJVTn9Dk6SHWhNRPw=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "af66ad14b28a127c5c0f3bbb298218fc63528a18",
"rev": "4524271976b625a4a605beefd893f270620fd751",
"type": "github"
},
"original": {
@ -95,6 +200,27 @@
}
},
"flake-parts_2": {
"inputs": {
"nixpkgs-lib": [
"stylix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1749398372,
"narHash": "sha256-tYBdgS56eXYaWVW3fsnPQ/nFlgWi/Z2Ymhyu21zVM98=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "9305fe4e5c2a6fcf5ba6a3ff155720fbe4076569",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_3": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
@ -114,7 +240,7 @@
},
"flake-utils": {
"inputs": {
"systems": "systems_3"
"systems": "systems_4"
},
"locked": {
"lastModified": 1731533236,
@ -132,12 +258,12 @@
},
"flocken": {
"inputs": {
"flake-parts": "flake-parts_2",
"flake-parts": "flake-parts_3",
"nixpkgs": [
"tg-ha-door",
"nixpkgs"
],
"systems": "systems_2"
"systems": "systems_3"
},
"locked": {
"lastModified": 1737581094,
@ -154,6 +280,39 @@
"type": "github"
}
},
"fromYaml": {
"flake": false,
"locked": {
"lastModified": 1731966426,
"narHash": "sha256-lq95WydhbUTWig/JpqiB7oViTcHFP8Lv41IGtayokA8=",
"owner": "SenchoPens",
"repo": "fromYaml",
"rev": "106af9e2f715e2d828df706c386a685698f3223b",
"type": "github"
},
"original": {
"owner": "SenchoPens",
"repo": "fromYaml",
"type": "github"
}
},
"gnome-shell": {
"flake": false,
"locked": {
"lastModified": 1744584021,
"narHash": "sha256-0RJ4mJzf+klKF4Fuoc8VN8dpQQtZnKksFmR2jhWE1Ew=",
"owner": "GNOME",
"repo": "gnome-shell",
"rev": "52c517c8f6c199a1d6f5118fae500ef69ea845ae",
"type": "github"
},
"original": {
"owner": "GNOME",
"ref": "48.1",
"repo": "gnome-shell",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@ -161,11 +320,11 @@
]
},
"locked": {
"lastModified": 1756245065,
"narHash": "sha256-aAZNbGcWrVRZgWgkQbkabSGcDVRDMgON4BipMy69gvI=",
"lastModified": 1756679287,
"narHash": "sha256-Xd1vOeY9ccDf5VtVK12yM0FS6qqvfUop8UQlxEB+gTQ=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "54b2879ce622d44415e727905925e21b8f833a98",
"rev": "07fc025fe10487dd80f2ec694f1cd790e752d0e8",
"type": "github"
},
"original": {
@ -211,11 +370,11 @@
]
},
"locked": {
"lastModified": 1755825449,
"narHash": "sha256-XkiN4NM9Xdy59h69Pc+Vg4PxkSm9EWl6u7k6D5FZ5cM=",
"lastModified": 1757130842,
"narHash": "sha256-4i7KKuXesSZGUv0cLPLfxbmF1S72Gf/3aSypgvVkwuA=",
"owner": "nix-darwin",
"repo": "nix-darwin",
"rev": "8df64f819698c1fee0c2969696f54a843b2231e8",
"rev": "15f067638e2887c58c4b6ba1bdb65a0b61dc58c5",
"type": "github"
},
"original": {
@ -239,11 +398,11 @@
},
"nixos-facter-modules": {
"locked": {
"lastModified": 1756291602,
"narHash": "sha256-FYhiArSzcx60OwoH3JBp5Ho1D5HEwmZx6WoquauDv3g=",
"lastModified": 1756491981,
"narHash": "sha256-lXyDAWPw/UngVtQfgQ8/nrubs2r+waGEYIba5UX62+k=",
"owner": "nix-community",
"repo": "nixos-facter-modules",
"rev": "5c37cee817c94f50710ab11c25de572bc3604bd5",
"rev": "c1b29520945d3e148cd96618c8a0d1f850965d8c",
"type": "github"
},
"original": {
@ -279,11 +438,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1756217674,
"narHash": "sha256-TH1SfSP523QI7kcPiNtMAEuwZR3Jdz0MCDXPs7TS8uo=",
"lastModified": 1757020766,
"narHash": "sha256-PLoSjHRa2bUbi1x9HoXgTx2AiuzNXs54c8omhadyvp0=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "4e7667a90c167f7a81d906e5a75cba4ad8bee620",
"rev": "fe83bbdde2ccdc2cb9573aa846abe8363f79a97a",
"type": "github"
},
"original": {
@ -293,11 +452,39 @@
"type": "github"
}
},
"nur": {
"inputs": {
"flake-parts": [
"stylix",
"flake-parts"
],
"nixpkgs": [
"stylix",
"nixpkgs"
],
"treefmt-nix": "treefmt-nix_2"
},
"locked": {
"lastModified": 1751320053,
"narHash": "sha256-3m6RMw0FbbaUUa01PNaMLoO7D99aBClmY5ed9V3vz+0=",
"owner": "nix-community",
"repo": "NUR",
"rev": "cbde1735782f9c2bb2c63d5e05fba171a14a4670",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "NUR",
"type": "github"
}
},
"root": {
"inputs": {
"clan-core": "clan-core",
"firefox-addons": "firefox-addons",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs_2",
"stylix": "stylix",
"tg-ha-door": "tg-ha-door"
}
},
@ -345,6 +532,41 @@
"type": "github"
}
},
"stylix": {
"inputs": {
"base16": "base16",
"base16-fish": "base16-fish",
"base16-helix": "base16-helix",
"base16-vim": "base16-vim",
"firefox-gnome-theme": "firefox-gnome-theme",
"flake-parts": "flake-parts_2",
"gnome-shell": "gnome-shell",
"nixpkgs": [
"nixpkgs"
],
"nur": "nur",
"systems": "systems_2",
"tinted-foot": "tinted-foot",
"tinted-kitty": "tinted-kitty",
"tinted-schemes": "tinted-schemes",
"tinted-tmux": "tinted-tmux",
"tinted-zed": "tinted-zed"
},
"locked": {
"lastModified": 1757174190,
"narHash": "sha256-eEU7Ku2Dtf6EXXbV1lAGFV8dd3Vlr4h2Mm3HQ+vtAow=",
"owner": "nix-community",
"repo": "stylix",
"rev": "e50ae02496b48e3687ad50a38dc0b6e833a075d2",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-25.05",
"repo": "stylix",
"type": "github"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
@ -390,6 +612,21 @@
"type": "github"
}
},
"systems_4": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"tg-ha-door": {
"inputs": {
"flocken": "flocken",
@ -412,6 +649,87 @@
"type": "github"
}
},
"tinted-foot": {
"flake": false,
"locked": {
"lastModified": 1726913040,
"narHash": "sha256-+eDZPkw7efMNUf3/Pv0EmsidqdwNJ1TaOum6k7lngDQ=",
"owner": "tinted-theming",
"repo": "tinted-foot",
"rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "tinted-foot",
"rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4",
"type": "github"
}
},
"tinted-kitty": {
"flake": false,
"locked": {
"lastModified": 1735730497,
"narHash": "sha256-4KtB+FiUzIeK/4aHCKce3V9HwRvYaxX+F1edUrfgzb8=",
"owner": "tinted-theming",
"repo": "tinted-kitty",
"rev": "de6f888497f2c6b2279361bfc790f164bfd0f3fa",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "tinted-kitty",
"type": "github"
}
},
"tinted-schemes": {
"flake": false,
"locked": {
"lastModified": 1750770351,
"narHash": "sha256-LI+BnRoFNRa2ffbe3dcuIRYAUcGklBx0+EcFxlHj0SY=",
"owner": "tinted-theming",
"repo": "schemes",
"rev": "5a775c6ffd6e6125947b393872cde95867d85a2a",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "schemes",
"type": "github"
}
},
"tinted-tmux": {
"flake": false,
"locked": {
"lastModified": 1751159871,
"narHash": "sha256-UOHBN1fgHIEzvPmdNMHaDvdRMgLmEJh2hNmDrp3d3LE=",
"owner": "tinted-theming",
"repo": "tinted-tmux",
"rev": "bded5e24407cec9d01bd47a317d15b9223a1546c",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "tinted-tmux",
"type": "github"
}
},
"tinted-zed": {
"flake": false,
"locked": {
"lastModified": 1751158968,
"narHash": "sha256-ksOyv7D3SRRtebpXxgpG4TK8gZSKFc4TIZpR+C98jX8=",
"owner": "tinted-theming",
"repo": "base16-zed",
"rev": "86a470d94204f7652b906ab0d378e4231a5b3384",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "base16-zed",
"type": "github"
}
},
"treefmt-nix": {
"inputs": {
"nixpkgs": [
@ -420,11 +738,33 @@
]
},
"locked": {
"lastModified": 1755934250,
"narHash": "sha256-CsDojnMgYsfshQw3t4zjRUkmMmUdZGthl16bXVWgRYU=",
"lastModified": 1756662192,
"narHash": "sha256-F1oFfV51AE259I85av+MAia221XwMHCOtZCMcZLK2Jk=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "74e1a52d5bd9430312f8d1b8b0354c92c17453e5",
"rev": "1aabc6c05ccbcbf4a635fb7a90400e44282f61c4",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
},
"treefmt-nix_2": {
"inputs": {
"nixpkgs": [
"stylix",
"nur",
"nixpkgs"
]
},
"locked": {
"lastModified": 1733222881,
"narHash": "sha256-JIPcz1PrpXUCbaccEnrcUS8jjEb/1vJbZz5KkobyFdM=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "49717b5af6f80172275d47a418c9719a31a78b53",
"type": "github"
},
"original": {

View file

@ -13,6 +13,16 @@
url = "github:peprolinbot/tg-ha-door";
inputs.nixpkgs.follows = "nixpkgs";
};
stylix = {
url = "github:nix-community/stylix/release-25.05";
inputs.nixpkgs.follows = "nixpkgs";
};
firefox-addons = {
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {
@ -44,5 +54,7 @@
packages = [clan-core.packages.${system}.clan-cli];
};
});
clan = clan.config;
};
}

View file

@ -1,7 +1,42 @@
{
{...}: {
imports = [
./disks.nix
../../modules/desktop/hyprland.nix
];
# New machine!
hm-pedro.de = "hyprland";
programs.hyprland.autoLogin.username = "pedro";
boot.loader = {
grub = {
efiSupport = true;
device = "nodev";
useOSProber = true;
};
efi = {
canTouchEfiVariables = true;
efiSysMountPoint = "/boot/efi";
};
};
# It is an open-source implementation of Nvidias Moonlight game streaming application
services.sunshine = {
enable = true;
autoStart = true;
capSysAdmin = true;
openFirewall = true;
};
home-manager.users.pedro.wayland.windowManager.hyprland.settings = {
monitor = [
"DP-2, 1920x1080@60, 0x0, 1"
"DP-1, 2560x1440@165, 1920x0, 1.333333"
"HDMI-A-1, 1920x1080@75, 3840x0, 1"
];
exec-once = [
"uwsm app -- ckb-next -b"
];
};
hardware.ckb-next.enable = true;
}

View file

@ -0,0 +1,29 @@
{
fileSystems."/" = {
device = "/dev/disk/by-uuid/120da0bc-6419-42f0-b47f-11aa2e1a7058";
fsType = "ext4";
};
boot.initrd.luks.devices."sda6_crypt".device = "/dev/disk/by-uuid/5fd8e7a0-88be-4779-a52b-01b8888219a6";
fileSystems."/home" = {
device = "/dev/disk/by-uuid/7cf15f3c-bf94-470e-96a4-ef537ea934cd";
fsType = "ext4";
};
boot.initrd.luks.devices."sdb2_crypt".device = "/dev/disk/by-uuid/0deeb53b-3885-4a4f-be6d-28a48b6af052";
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/9b01cae4-e5cd-4059-bf31-af746216fbef";
fsType = "ext4";
};
fileSystems."/boot/efi" = {
device = "/dev/disk/by-uuid/A606-4C72";
fsType = "vfat";
};
swapDevices = [
{device = "/dev/disk/by-uuid/98cf8cbb-8d39-45af-8143-326d24b65960";}
];
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,12 @@
{...}: {
imports = [
./hardware.nix
./networking.nix
./nix.nix
./pipewire.nix
./programs.nix
./security.nix
./services.nix
./stylix.nix
];
}

View file

@ -0,0 +1,7 @@
{pkgs, ...}: {
hardware.flipperzero.enable = true; # Installs and setups everything Flipper Zero
hardware.bluetooth.enable = true;
hardware.sane.enable = true;
}

View file

@ -0,0 +1,21 @@
{pkgs, ...}: {
networking = {
networkmanager.enable = true;
nameservers = ["1.1.1.1"];
firewall = {
enable = true;
### https://nixos.wiki/wiki/WireGuard#Setting_up_WireGuard_with_NetworkManager
checkReversePath = "loose";
};
};
environment.systemPackages = with pkgs; [
networkmanagerapplet
wireguard-tools
openconnect
networkmanager-openconnect
];
}

View file

@ -0,0 +1,11 @@
{lib, ...}: {
nix.settings = {
trusted-users = ["pedro"];
};
nixpkgs.config.allowUnfreePredicate = pkg:
builtins.elem (lib.getName pkg) [
"steam"
"steam-unwrapped"
];
}

View file

@ -0,0 +1,12 @@
{pkgs, ...}: {
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
# lowLatency.enable = true;
};
environment.systemPackages = with pkgs; [
pulseaudioFull
];
}

View file

@ -0,0 +1,6 @@
{...}: {
programs.nix-ld.enable = true;
programs.adb.enable = true;
programs.kdeconnect.enable = true;
}

View file

@ -0,0 +1,10 @@
{pkgs, ...}: {
security.rtkit.enable = true;
security.polkit.enable = true;
security.sudo = {
enable = true;
package = pkgs.sudo.override {withInsults = true;}; # I'm spanish and I love cursing
};
security.pam.services.hyprlock = {};
}

View file

@ -0,0 +1,20 @@
{pkgs, ...}: {
services = {
gvfs.enable = true;
gnome.gnome-keyring.enable = true;
dbus.enable = true;
flatpak.enable = true;
printing.enable = true;
avahi = {
enable = true;
nssmdns4 = true;
openFirewall = true;
};
blueman.enable = true;
};
environment.systemPackages = [pkgs.libsecret];
}

View file

@ -0,0 +1,16 @@
{
inputs,
pkgs,
...
}: {
imports = [inputs.stylix.nixosModules.stylix];
stylix = {
enable = true;
homeManagerIntegration.autoImport = false; # Handled in each user's HM config
base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml";
targets = {
console.enable = false;
grub.enable = false;
};
};
}

View file

@ -0,0 +1,11 @@
{...}: {
programs.steam = {
enable = true;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = false;
};
programs.gamemode.enable = true;
services.joycond.enable = true;
}

View file

@ -0,0 +1,44 @@
{
pkgs,
lib,
config,
...
}: {
imports = [./regreet.nix];
options = {
programs.hyprland.autoLogin.username = lib.mkOption {
type = lib.types.nullOr lib.types.str;
default = null;
example = "john";
description = "User for Hyprland auto login with ReGreet. Disabled by default";
};
};
config = {
programs.hyprland = {
enable = true;
withUWSM = true;
};
xdg.portal = {
enable = true;
wlr.enable = true;
xdgOpenUsePortal = true;
extraPortals = [
pkgs.xdg-desktop-portal-hyprland
pkgs.xdg-desktop-portal-gtk
];
};
services.greetd.settings.initial_session = let
username = config.programs.hyprland.autoLogin.username;
in
lib.mkIf (!isNull username) {
command = "uwsm start hyprland-uwsm.desktop";
user = username;
};
environment.sessionVariables.XKB_DEFAULT_LAYOUT = "es";
};
}

View file

@ -0,0 +1,12 @@
{pkgs, ...}: {
programs.regreet = {
enable = true;
settings = {
background = {
path = pkgs.nixos-artwork.wallpapers.simple-dark-gray-bottom.gnomeFilePath;
fit = "Cover";
};
};
cageArgs = ["-s" "-m" "last"]; # Only show on the last monitor
};
}

View file

@ -1,15 +0,0 @@
{ ... }:
{
# Can be imported into machines to enable GNOME and GDM.
#
# Copy this into a machine's configuration:
# `machines/<name>/configuration.nix`
# ```nix
# imports = [
# ../../modules/gnome.nix
# ];
# ```
services.displayManager.gdm.enable = true;
services.desktopManager.gnome.enable = true;
}

13
modules/podman.nix Normal file
View file

@ -0,0 +1,13 @@
{pkgs, ...}: {
environment.systemPackages = with pkgs; [
podman-compose
];
virtualisation.podman = {
enable = true;
# Create a `docker` alias for podman, to use it as a drop-in replacement
dockerCompat = true;
# Required for containers under podman-compose to be able to talk to each other.
defaultNetwork.settings.dns_enabled = true;
};
}

View file

@ -0,0 +1,28 @@
{pkgs, ...}: {
# Install necessary packages
environment.systemPackages = with pkgs; [
virt-manager
virt-viewer
spice
spice-gtk
spice-protocol
win-virtio
win-spice
adwaita-icon-theme
];
# Manage the virtualisation services
virtualisation = {
libvirtd = {
enable = true;
qemu = {
swtpm.enable = true;
ovmf.enable = true;
ovmf.packages = [pkgs.OVMFFull.fd];
};
};
spiceUSBRedirection.enable = true;
};
services.spice-vdagentd.enable = true;
}

View file

@ -1,11 +0,0 @@
# This are some NixOS options this user requires
{pkgs, ...}: {
users.users.pedro = {
shell = pkgs.zsh;
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJji4h4bgzgmp7YoRX/8ePN0TcCYRfI2wlrEeZkBQ/y2 personal@peprolinbot.com"
];
};
programs.zsh.enable = true;
}

View file

@ -0,0 +1,10 @@
{...}: {
imports = [(import ./librewolf.nix)];
xdg.mimeApps.defaultApplications = {
"text/html" = ["librewolf.desktop"];
"text/xml" = ["librewolf.desktop"];
"x-scheme-handler/http" = ["librewolf.desktop"];
"x-scheme-handler/https" = ["librewolf.desktop"];
};
}

View file

@ -0,0 +1,19 @@
{
selectedFilterLists = [
"user-filters"
"ublock-filters"
"ublock-badware"
"ublock-privacy"
"ublock-quick-fixes"
"ublock-unbreak"
"easylist"
"easyprivacy"
"LegitimateURLShortener"
"adguard-spyware-url"
"urlhaus-1"
"curben-phishing"
"plowe-0"
"fanboy-cookiemonster"
"ublock-cookies-easylist"
];
}

View file

@ -0,0 +1,128 @@
{
pkgs,
inputs,
lib,
...
}: {
programs.librewolf = {
enable = true;
settings = {
"webgl.disabled" = false;
"privacy.resistFingerprinting" = true;
"privacy.clearOnShutdown.history" = false;
"privacy.clearOnShutdown.cookies" = false;
"network.cookie.lifetimePolicy" = 0;
"identity.fxaccounts.enabled" = true;
};
profiles.pedro = {
search = {
force = true;
default = "FruesX";
privateDefault = "FruesX";
order = ["FruesX" "ddg" "google"];
engines = {
"FruesX" = {
urls = [{template = "https://searx.peprolinbot.com/search?q={searchTerms}";}];
icon = "https://searx.peprolinbot.com/favicon.ico";
};
};
};
containersForce = true;
containers = {
Personal = {
color = "blue";
icon = "fingerprint";
id = 1;
};
University = {
color = "pink";
icon = "briefcase";
id = 2;
};
Shopping = {
color = "orange";
icon = "cart";
id = 3;
};
Banking = {
color = "green";
icon = "dollar";
id = 4;
};
Private = {
color = "purple";
icon = "chill";
id = 5;
};
};
extensions = {
force = true;
packages = with inputs.firefox-addons.packages.${pkgs.system}; [
ublock-origin # Included in Librewolf
bitwarden
skip-redirect
libredirect
multi-account-containers
tridactyl
];
settings = {
"uBlock0@raymondhill.net".settings = import ./extensions/ublock-origin.nix;
};
};
bookmarks = {};
settings = {
webgl.disabled = false;
privacy.resistFingerprinting = true;
privacy.clearOnShutdown = {
history = false;
cookies = false;
};
network.cookie.lifetimePolicy = 0;
identity.fxaccounts.enabled = true;
# Sync settings
services.sync.engine = {
bookmarks = true;
history = true;
tabs = true;
addresses = false;
creditcards = false;
passwords = false;
prefs = false;
addons = false;
};
browser.urlbar.autoFill = false;
# Layout
browser.uiCustomization.state = builtins.toJSON {
currentVersion = 20;
newElementCount = 5;
dirtyAreaCache = ["nav-bar" "PersonalToolbar" "toolbar-menubar" "TabsToolbar" "widget-overflow-fixed-list"];
placements = {
PersonalToolbar = ["personal-bookmarks"];
TabsToolbar = ["tabbrowser-tabs" "new-tab-button" "alltabs-button"];
nav-bar = [
"back-button"
"forward-button"
"stop-reload-button"
"urlbar-container"
"downloads-button"
"ublock0_raymondhill_net-browser-action" # uBlock
"_446900e4-71c2-419f-a6a7-df9c091e268b_-browser-action" # Bitwarden
"7esoorv3_alefvanoon_anonaddy_me-browser-action" # LibRedirect
"_testpilot-containers-browser-action" # Multi-account containers
"unified-extensions-button" # Button with the rest of extensions
];
toolbar-menubar = ["menubar-items"];
unified-extensions-area = [];
widget-overflow-fixed-list = [];
};
seen = ["developer-button" "ublock0_raymondhill_net-browser-action" "_446900e4-71c2-419f-a6a7-df9c091e268b_-browser-action" "_testpilot-containers-browser-action"];
};
};
};
};
}

View file

@ -1,3 +1,37 @@
{...}: {
imports = [(import ./zsh.nix)]; # shell
{osConfig, ...}: {
imports =
[
./programs
./distrobox.nix
./git.nix
./gpg.nix
./packages.nix
./services.nix
./stylix.nix
./zsh.nix
]
++ (
if osConfig.hm-pedro.de != "none"
then [
./browsers
./gtk.nix
./kitty.nix
./libreoffice.nix
./nemo.nix
./qt.nix
./spotify.nix
./vscodium.nix
]
else []
)
++ (
if osConfig.hm-pedro.de == "hyprland"
then [
./hyprland
./scripts
./waybar
./mako.nix
]
else []
);
}

View file

@ -0,0 +1,37 @@
{
osConfig,
pkgs,
...
}: let
hasDE = osConfig.hm-pedro.de != "none";
in {
programs.distrobox = {
enable = true;
enableSystemdUnit = true;
containers = {
debian13 = {
image = "debian:13";
entry = false;
additional_packages = "git";
init_hooks = [
"ln -sf /usr/bin/distrobox-host-exec /usr/local/bin/docker"
"ln -sf /usr/bin/distrobox-host-exec /usr/local/bin/docker-compose"
];
};
kali = {
image = "docker.io/kalilinux/kali-rolling:latest";
entry = false;
init_hooks = [
"ln -sf /usr/bin/distrobox-host-exec /usr/local/bin/docker"
"ln -sf /usr/bin/distrobox-host-exec /usr/local/bin/docker-compose"
];
};
};
};
home.packages = with pkgs;
if hasDE
then [boxbuddy]
else [];
}

View file

@ -0,0 +1,20 @@
{pkgs, ...}: {
programs.git = {
enable = true;
userName = "Pedro Rey Anca";
userEmail = "personal@peprolinbot.com";
signing = {
signByDefault = true;
key = null; # Let GnuPG decide what signing key to use depending on commits author.
};
extraConfig = {
init.defaultBranch = "main";
credential.helper = "store";
};
};
# home.packages = [ pkgs.gh pkgs.git-lfs ];
}

View file

@ -0,0 +1,25 @@
{
pkgs,
osConfig,
...
}: {
programs.gpg = {
enable = true;
settings = {
keyserver = "hkps://keys.openpgp.org";
};
};
services.gpg-agent = {
enable = true;
enableSshSupport = true;
pinentry = {
package =
if osConfig.hm-pedro.de == "none"
then pkgs.pinentry-curses
else pkgs.pinentry-gnome3;
program = "pinentry-gnome3";
};
sshKeys = ["D2A3680589B81F2B07DA6CFE21DF848F1AF4E9D3"];
};
}

View file

@ -0,0 +1,11 @@
{
pkgs,
config,
...
}: {
fonts.fontconfig.enable = true;
gtk = {
enable = true;
};
}

View file

@ -0,0 +1,11 @@
{...}: {
imports = [
./hyprland.nix
./hyprlock.nix
./hypridle.nix
./variables.nix
./utils.nix
];
xdg.configFile."hypr/default_wallpaper.png".source = ./default_wallpaper.png;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 MiB

View file

@ -0,0 +1,23 @@
{...}: {
services.hypridle = {
enable = true;
settings = {
general = {
lock_cmd = "pidof hyprlock || hyprlock"; # avoid starting multiple hyprlock instances.
before_sleep_cmd = "loginctl lock-session"; # lock before suspend.
after_sleep_cmd = "hyprctl dispatch dpms on"; # to avoid having to press a key twice to turn on the display.
};
listener = [
{
timeout = 300; # 5 min
on-timeout = "hyprctl dispatch dpms off"; # screen off when timeout has passed
on-resume = "hyprctl dispatch dpms on"; # screen on when activity is detected after timeout has fired.
}
{
timeout = 330; # 5.5 min
on-timeout = "loginctl lock-session"; # lock screen when timeout has passed
}
];
};
};
}

View file

@ -0,0 +1,389 @@
{pkgs, ...}: {
wayland.windowManager.hyprland = {
enable = true;
xwayland = {
enable = true;
};
systemd.enable = false;
plugins = [
pkgs.hyprlandPlugins.hyprgrass
];
settings = let
app_menu = "${pkgs.fuzzel}/bin/fuzzel";
in {
# Autostart
exec-once = [
"uwsm app -- nm-applet"
"uwsm app -- ${pkgs.wl-clip-persist}/bin/persist --clipboard regular"
"uwsm app -- bash -c 'if [ ! -f ~/.config/hypr/wallpaper.png ]; then wall-change ~/.config/hypr/default_wallpaper.png; fi'"
"uwsm app -- ${pkgs.swaybg}/bin/swaybg -m fill -i ~/.config/hypr/wallpaper.png &"
"uwsm app -- ${pkgs.poweralertd}/bin/poweralertd"
"uwsm app -- waybar"
"uwsm app -- element-desktop --hidden"
];
input = {
kb_layout = "es,us";
kb_options = "grp:alt_caps_toggle";
numlock_by_default = true;
follow_mouse = 1;
sensitivity = 0;
touchpad = {
natural_scroll = true;
};
};
general = {
"$mainMod" = "SUPER";
layout = "dwindle";
gaps_in = 0;
gaps_out = 0;
border_size = 2;
no_border_on_floating = false;
};
misc = {
disable_autoreload = true;
disable_hyprland_logo = true;
always_follow_on_dnd = true;
layers_hog_keyboard_focus = true;
animate_manual_resizes = false;
enable_swallow = true;
focus_on_activate = true;
};
dwindle = {
force_split = 0;
special_scale_factor = 1.0;
split_width_multiplier = 1.0;
use_active_for_splits = true;
pseudotile = true;
preserve_split = true;
};
master = {
new_status = "master";
special_scale_factor = 1;
};
decoration = {
rounding = 0;
blur = {
enabled = true;
size = 1;
passes = 1;
brightness = 1;
contrast = 1.400;
ignore_opacity = true;
noise = 0;
new_optimizations = true;
xray = false;
};
shadow = {
enabled = true;
ignore_window = true;
offset = "0 2";
range = 20;
render_power = 3;
};
};
animations = {
enabled = true;
bezier = [
"fluent_decel, 0, 0.2, 0.4, 1"
"easeOutCirc, 0, 0.55, 0.45, 1"
"easeOutCubic, 0.33, 1, 0.68, 1"
"easeinoutsine, 0.37, 0, 0.63, 1"
];
animation = [
# Windows
"windowsIn, 1, 3, easeOutCubic, popin 30%" # window open
"windowsOut, 1, 3, fluent_decel, popin 70%" # window close.
"windowsMove, 1, 2, easeinoutsine, slide" # everything in between, moving, dragging, resizing.
# Fade
"fadeIn, 1, 3, easeOutCubic" # fade in (open) -> layers and windows
"fadeOut, 1, 2, easeOutCubic" # fade out (close) -> layers and windows
"fadeSwitch, 0, 1, easeOutCirc" # fade on changing activewindow and its opacity
"fadeShadow, 1, 10, easeOutCirc" # fade on changing activewindow for shadows
"fadeDim, 1, 4, fluent_decel" # the easing of the dimming of inactive windows
"border, 1, 2.7, easeOutCirc" # for animating the border's color switch speed
"borderangle, 1, 30, fluent_decel, once" # for animating the border's gradient angle - styles: once (default), loop
"workspaces, 1, 4, easeOutCubic, fade" # styles: slide, slidevert, fade, slidefade, slidefadevert
];
};
bind =
[
# show keybinds list
"$mainMod, F1, exec, show-keybinds"
# keybindings
"$mainMod, Return, exec, uwsm app -- kitty"
"ALT, Return, exec, uwsm app -- kitty --title float_kitty"
"$mainMod SHIFT, Return, exec, uwsm app -- kitty --start-as=fullscreen -o 'font_size=16'"
"$mainMod, B, exec, uwsm app -- librewolf"
"$mainMod, N, exec, uwsm app -- makoctl mode -t do-not-disturb"
"$mainMod SHIFT, N, exec, uwsm app -- swaync-client -d"
"$mainMod SHIFT, Q, killactive,"
"$mainMod, F, fullscreen, 0"
"$mainMod SHIFT, F, fullscreen, 1"
"$mainMod, Space, togglefloating,"
"$mainMod, D, exec, uwsm app -- ${app_menu}"
"$mainMod SHIFT, E, exec, uwsm app -- ${pkgs.bemoji}/bin/bemoji -n"
"$mainMod, M, exec, uwsm app -- element-desktop"
"$mainMod, Y, exec, uwsm app -- kitty spotify_player"
"$mainMod, X, exec, uwsm app -- rofi-rbw"
"$mainMod, Escape, exec, uwsm app -- loginctl lock-session"
"$mainMod SHIFT, Escape, exec, uwsm app -- shutdown-script"
"$mainMod, P, pseudo,"
"$mainMod SHIFT, P, togglesplit,"
"$mainMod, E, exec, uwsm app -- nemo"
"$mainMod SHIFT, B, exec, uwsm app -- pkill -SIGUSR1 .waybar-wrapped"
"$mainMod, C ,exec, uwsm app -- ${pkgs.hyprpicker}/bin/hyprpicker -a"
"$mainMod, W,exec, uwsm app -- wallpaper-picker"
# screenshot
"$mainMod, Print, exec, uwsm app -- screenshot-menu"
",Print, exec, uwsm app -- ${pkgs.grimblast}/bin/grimblast --notify --freeze copy area"
]
++ (
# workspaces
# binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
builtins.concatLists (
builtins.genList (
x: let
ws = let
c = (x + 1) / 10;
in
builtins.toString (x + 1 - (c * 10));
in [
"$mainMod, ${ws}, workspace, ${toString (x + 1)}"
"$mainMod SHIFT, ${ws}, movetoworkspacesilent, ${toString (x + 1)}"
]
)
10
)
)
++ [
"$mainMod CTRL, c, workspace, emptym"
"$mainMod SHIFT, c, movetoworkspace, emptym"
"$mainMod, S, togglespecialworkspace,"
"$mainMod SHIFT, S, movetoworkspacesilent, special"
]
++ (
# Window focus, movement and control
builtins.concatLists (
let
keys = ["H" "L" "K" "J"];
directions = ["l" "r" "u" "d"];
resize = toString 80; # Change this to change how much a window resizes each keypress
resize_list = ["-${resize} 0" "${resize} 0" "0 -${resize}" "0 ${resize}"];
in
builtins.genList (
x: let
k = builtins.elemAt keys x;
d = builtins.elemAt directions x;
r = builtins.elemAt resize_list x;
in [
"$mainMod, ${k}, movefocus, ${d}"
"$mainMod SHIFT, ${k}, movewindow, ${d}"
"$mainMod CTRL, ${k}, resizeactive, ${r}"
"$mainMod ALT, ${k}, moveactive, ${r}"
]
)
4
)
)
++ [
"$mainMod, mouse_down, workspace, e-1"
"$mainMod, mouse_up, workspace, e+1"
# laptop brigthness
",XF86MonBrightnessUp, exec, brightnessctl set 5%+"
",XF86MonBrightnessDown, exec, brightnessctl set 5%-"
"$mainMod, XF86MonBrightnessUp, exec, brightnessctl set 100%+"
"$mainMod, XF86MonBrightnessDown, exec, brightnessctl set 100%-"
# clipboard manager
"$mainMod, V, exec, cliphist list | fuzzel --dmenu --prompt '📋 ' | cliphist decode | wl-copy"
];
# Bindings that work when locked
bindl = [
# media and volume controls
",XF86AudioRaiseVolume,exec, wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 5%+ && wp-vol"
",XF86AudioLowerVolume,exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- && wp-vol"
",XF86AudioMute,exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
",XF86AudioPlay,exec, playerctl play-pause"
",XF86AudioNext,exec, playerctl next"
",XF86AudioPrev,exec, playerctl previous"
",XF86AudioStop, exec, playerctl stop"
];
# mouse binding
bindm = [
"$mainMod, mouse:272, movewindow"
"$mainMod, mouse:273, resizewindow"
];
# windowrule
windowrule = [
"float,class:vimiv"
"center,class:vimiv"
"float,class:mpv"
"center,class:mpv"
"size 1200 725,class:mpv"
"float,title:^(float_kitty)$"
"center,title:^(float_kitty)$"
"size 950 600,title:^(float_kitty)$"
"tile, class:neovide"
"idleinhibit focus,class:mpv"
"float,class:udiskie"
"float,title:^(Volume Control)$"
"float,title:^(Firefox Sharing Indicator)$"
"move 0 0,title:^(Firefox Sharing Indicator)$"
"size 700 450,title:^(Volume Control)$"
"move 40 55%,title:^(Volume Control)$"
"float, title:^(Picture-in-Picture)$"
"opacity 1.0 override 1.0 override, title:^(Picture-in-Picture)$"
"pin, title:^(Picture-in-Picture)$"
"opacity 1.0 override 1.0 override, class:(Aseprite)"
"opacity 1.0 override 1.0 override, class:(Unity)"
"idleinhibit focus, class:^(mpv)$"
"idleinhibit fullscreen, class:^(firefox)$"
"float,class:^(zenity)$"
"center,class:^(zenity)$"
"size 850 500,class:^(zenity)$"
"float,class:^(pavucontrol)$"
"float,class:^(.sameboy-wrapped)$"
"float,class:^(file_progress)$"
"float,class:^(confirm)$"
"float,class:^(dialog)$"
"float,class:^(download)$"
"float,class:^(notification)$"
"float,class:^(error)$"
"float,class:^(confirmreset)$"
"float,title:^(Open File)$"
"float,title:^(branchdialog)$"
"float,title:^(Confirm to replace files)$"
"float,title:^(File Operation Progress)$"
"opacity 0.0 override,class:^(xwaylandvideobridge)$"
"noanim,class:^(xwaylandvideobridge)$"
"noinitialfocus,class:^(xwaylandvideobridge)$"
"maxsize 1 1,class:^(xwaylandvideobridge)$"
"noblur,class:^(xwaylandvideobridge)$"
];
monitor = [
",preferred,auto,1"
];
xwayland = {
force_zero_scaling = true;
};
gestures = {
workspace_swipe = true;
workspace_swipe_direction_lock = false;
};
ecosystem = {
no_update_news = true;
no_donation_nag = true;
};
plugin = {
touch_gestures = {
# The default sensitivity is probably too low on tablet screens,
# I recommend turning it up to 4.0
sensitivity = 5.0;
# must be >= 3
workspace_swipe_fingers = 3;
# switching workspaces by swiping from an edge, this is separate from workspace_swipe_fingers
# and can be used at the same time
# possible values: l, r, u, or d
# to disable it set it to anything else
workspace_swipe_edge = "no";
# in milliseconds
long_press_delay = 400;
# resize windows by long-pressing on window borders and gaps.
# If general:resize_on_border is enabled, general:extend_border_grab_area is used for floating
# windows
resize_on_border_long_press = true;
# in pixels, the distance from the edge that is considered an edge
edge_margin = 20;
# emulates touchpad swipes when swiping in a direction that does not trigger workspace swipe.
# ONLY triggers when finger count is equal to workspace_swipe_fingers
#
# might be removed in the future in favor of event hooks
emulate_touchpad_swipe = false;
hyprgrass-bind = [
# swipe left from right edge
", edge:r:l, exec, playerctl next"
# swipe right from left edge
", edge:l:r, exec, playerctl previous"
# swipe up from bottom edge
", edge:d:u, exec, pkill -SIGUSR2 wvkbd" # Show wvkbd
# swipe down to bottom edge
", edge:u:d, exec, pkill -SIGUSR1 wvkbd" # Hide wvkbd
# tap with 3 fingers
", tap:4, exec, pkill -SIGRTMIN wvkbd" # Toggles wvkbd
# swipe up from left edge
", edge:l:u, exec, pamixer -i 4"
# swipe down from left edge
", edge:l:d, exec, pamixer -d 4"
# swipe up with 3 fingers
", swipe:3:u, exec, ${pkgs.nwg-drawer}/bin/nwg-drawer"
# swipe down with 3 fingers
", swipe:3:d, killactive"
# swipe diagonally left and down with 3 fingers
", swipe:3:ld, exec, uwsm app -- librewolf"
# swipe diagonally right and down with 3 fingers
", swipe:3:rd, exec, uwsm app -- xournalpp"
# tap with 3 fingers
", tap:3, exec, playerctl play-pause"
];
# longpress can trigger mouse binds:
hyprgrass-bindm = [
", longpress:2, movewindow"
", longpress:3, resizewindow"
];
experimental = {
# send proper cancel events to windows instead of hacky touch_up events,
# NOT recommended as it crashed a few times, once it's stabilized I'll make it the default
send_cancel = 0;
};
};
};
};
};
}

View file

@ -0,0 +1,73 @@
{config, ...}: {
programs.hyprlock = {
enable = true;
settings = let
colors = with config.lib.stylix.colors; {
text = base05;
accent = base0E;
warning = base0A;
};
in {
general = {
hide_cursor = true;
};
background = {
path = "~/.config/hypr/wallpaper.png";
blur_passes = 2;
};
label = [
# Time
{
text = "cmd[update:30000] echo \"<b><big> $(date +\"%R\") </big></b>\"";
color = "rgb(${colors.text})";
font_size = 110;
shadow_passes = 3;
shadow_size = 3;
position = "0, -100";
halign = "center";
valign = "top";
}
# Date
{
text = "cmd[update:43200000] echo \"$(date +\"%A, %d %B %Y\")\"";
color = "rgb(${colors.text})";
font_size = 18;
position = "0, -300";
halign = "center";
valign = "top";
}
];
# User Avatar
image = {
path = "~/.face.png";
size = 125;
border_color = "rgb(${colors.accent})";
position = "0, -450";
halign = "center";
valign = "center";
};
input-field = {
size = "300, 60";
outline_thickness = 4;
dots_size = 0.2;
dots_spacing = 0.4;
dots_center = true;
fade_on_empty = false;
placeholder_text = "<span foreground=\"##${colors.text}\"><i>󰌾 Logged in as </i><span foreground=\"##${colors.accent}\">$USER</span></span>";
hide_input = false;
fail_text = "<i>$FAIL <b>($ATTEMPTS)</b></i>";
capslock_color = "rgb(${colors.warning})";
position = "0, -100";
halign = "center";
valign = "center";
};
};
};
}

View file

@ -0,0 +1,49 @@
{pkgs, ...}: {
services.hyprpolkitagent.enable = true;
programs.fuzzel = {
enable = true;
settings = {
main = {
use-bold = true;
line-height = 25;
fields = "name,generic,comment,categories,filename,keywords";
terminal = "kitty";
prompt = "'🔍 '";
layer = "top";
lines = 10;
width = 35;
horizontal-pad = 25;
inner-pad = 5;
dpi-aware = false;
};
border = {
radius = 15;
width = 3;
};
};
};
services.cliphist = {
enable = true;
allowImages = true;
};
home.packages = [
(pkgs.writeShellApplication
{
# From https://github.com/emersion/mako/wiki/Volume-change-notification#1-create-the-notifier-script
name = "wp-vol";
runtimeInputs = with pkgs; [wireplumber gawk bc];
text = ''
# Get the volume level and convert it to a percentage
volume=$(wpctl get-volume @DEFAULT_AUDIO_SINK@)
volume=$(echo "$volume" | awk '{print $2}')
volume=$(echo "( $volume * 100 ) / 1" | bc)
notify-send -t 1000 -a 'wp-vol' -h "int:value:$volume" "Volume: ''${volume}%"
'';
})
];
}

View file

@ -0,0 +1,31 @@
{lib, ...}: let
variables = {
NIXOS_OZONE_WL = 1;
ELECTRON_OZONE_PLATFORM_HINT = "auto";
__GL_GSYNC_ALLOWED = 0;
__GL_VRR_ALLOWED = 0;
_JAVA_AWT_WM_NONEREPARENTING = 1;
DISABLE_QT5_COMPAT = 0;
GDK_BACKEND = "wayland,x11,*";
ANKI_WAYLAND = 1;
DIRENV_LOG_FORMAT = "";
WLR_DRM_NO_ATOMIC = 1;
QT_AUTO_SCREEN_SCALE_FACTOR = 1;
QT_WAYLAND_DISABLE_WINDOWDECORATION = 1;
QT_QPA_PLATFORM = "wayland;xcb";
MOZ_ENABLE_WAYLAND = 1;
MOZ_USE_XINPUT2 = 1;
WLR_BACKEND = "vulkan";
SDL_VIDEODRIVER = "wayland";
CLUTTER_BACKEND = "wayland";
};
in {
home.sessionVariables = variables;
xdg.configFile."uwsm/env".text = builtins.concatStringsSep "\n" (
lib.attrsets.mapAttrsToList (
name: value: "export ${name}=\"${builtins.toString value}\""
)
variables
);
}

View file

@ -0,0 +1,34 @@
{pkgs, ...}: {
programs.kitty = {
enable = true;
shellIntegration.enableZshIntegration = true;
settings = {
confirm_os_window_close = 0;
window_padding_width = 10;
scrollback_lines = 10000;
enable_audio_bell = false;
mouse_hide_wait = 60;
## Tabs
tab_title_template = "{index}";
active_tab_font_style = "normal";
inactive_tab_font_style = "normal";
tab_bar_style = "powerline";
tab_powerline_style = "round";
active_tab_foreground = "#1e1e2e";
active_tab_background = "#cba6f7";
inactive_tab_foreground = "#bac2de";
inactive_tab_background = "#313244";
};
keybindings = {
## Tabs
"alt+1" = "goto_tab 1";
"alt+2" = "goto_tab 2";
"alt+3" = "goto_tab 3";
"alt+4" = "goto_tab 4";
};
};
}

View file

@ -0,0 +1,9 @@
{pkgs, ...}: {
home.packages = with pkgs; [
libreoffice
hunspell
hunspellDicts.en_US
hunspellDicts.en_GB-ise
hunspellDicts.es_ES
];
}

View file

@ -0,0 +1,31 @@
{...}: {
services.mako = {
enable = true;
settings = {
default-timeout = 5000;
"mode=do-not-disturb" = {
invisible = 1;
};
# From https://github.com/emersion/mako/wiki/Volume-change-notification
"app-name=wp-vol" = {
layer = "overlay";
history = 0;
anchor = "top-center";
# Group all volume notifications together
group-by = "app-name";
# Hide the group-index
format = "<b>%s</b>\\n%b";
};
"app-name=volume group-index=0" = {
# Only show last notification
invisible = 0;
};
"app-name=volume grouped=false" = {
# Force initial volume notification to be visible
invisible = 0;
};
};
};
}

View file

@ -0,0 +1,13 @@
{pkgs, ...}: {
home.packages = with pkgs; [nemo-with-extensions];
xdg.mimeApps.defaultApplications = {
"inode/directory" = ["nemo.desktop"];
"application/x-gnome-saved-search" = ["nemo.desktop"];
};
dconf.settings = {
"org/cinnamon/desktop/applications/terminal" = {
exec = "kitty";
};
};
}

View file

@ -0,0 +1,91 @@
{
osConfig,
pkgs,
...
}: let
hasDE = osConfig.hm-pedro.de != "none";
in {
xdg.mimeApps.enable = hasDE;
xdg.mimeApps.defaultApplications =
{
"application/pdf" = ["okularApplication_pdf.desktop" "org.gnome.Evince.desktop"];
"text/plain" = ["org.gnome.TextEditor.desktop"];
}
// builtins.listToAttrs (map (key: {
name = "image/${key}";
value = ["vimiv.desktop"];
}) ["png" "jpeg" "webp" "bmp" "gif"])
// builtins.listToAttrs (map (key: {
name = "video/${key}";
value = ["mpv.desktop"];
}) ["mp4" "x-matroska" "webm"]);
home.packages = with pkgs; ([
# CLI utils
bitwarden-cli
file # Show file information
gtrash # rm replacement, put deleted files in system trash
imagemagick
lazygit # Simple terminal UI for git commands
jq # command-line JSON processor
nitch # neofetch-like util
tdf # cli pdf viewer
todo # cli todo list
yazi # terminal file manager
yt-dlp
wtype # xdotool type for wayland
caligula # TUI for disk imaging
ffmpeg
killall
man-pages # extra man pages
openssl
pamixer # pulseaudio command line mixer
playerctl # controller for media players
wl-clipboard # clipboard utils for wayland (wl-copy, wl-paste)
unzip
wget
usbutils
gotify-cli
]
++ (
if hasDE
then [
#GUI Utils
zenity # Create GTK dialog boxes from CLI
file-roller # Archive manager
wdisplays # Configuring displays in Wayland compositors
pavucontrol # pulseaudio volume controle (GUI)
# GUI Apps
evince # gnome pdf viewer
freetube # YouTube client
thunderbird
vlc
mpv # video player
xournalpp # For notes and pdf editing
qbittorrent # torrent client
speedcrunch # Fast power user calculator
simple-scan
orca-slicer
kdePackages.okular # KDE's pdf viewer/editor (supports digital signing)
inkscape
kdePackages.kleopatra # GPG GUI
gimp
gnome-text-editor
gparted # partition manager
vimiv-qt # Image viewer, vim-like
webcord
# Wine stuff
winetricks
wineWowPackages.wayland
bottles
# VPN
wireguard-tools
openconnect
networkmanager-openconnect
]
else []
));
}

View file

@ -0,0 +1,11 @@
{...}: {
programs.bat.enable = true;
programs.btop.enable = true;
programs.direnv = {
enable = true;
enableZshIntegration = true;
nix-direnv.enable = true;
};
}

View file

@ -0,0 +1,9 @@
{osConfig, ...}: {
imports =
[./cli.nix]
++ (
if osConfig.hm-pedro.de != "none"
then [./gui.nix]
else []
);
}

View file

@ -0,0 +1,5 @@
{...}: {
programs.cava.enable = true; # Not GUI, but only wanted in machines with GUI
programs.element-desktop.enable = true;
}

View file

@ -0,0 +1,22 @@
{
pkgs,
config,
...
}: let
qtctConf = ''
[Appearance]
style=kvantum
icon_theme=${config.stylix.iconTheme.${config.stylix.polarity}}
[Fonts]
general="${config.stylix.fonts.sansSerif.name},${builtins.toString config.stylix.fonts.sizes.applications},-1,5,50,0,0,0,0,0,Regular"
fixed="${config.stylix.fonts.monospace.name},${builtins.toString config.stylix.fonts.sizes.applications},-1,5,50,0,0,0,0,0,Regular"
'';
in {
qt = {
enable = true;
};
xdg.configFile."qt5ct/qt5ct.conf".text = qtctConf;
xdg.configFile."qt6ct/qt6ct.conf".text = qtctConf;
}

View file

@ -0,0 +1,70 @@
{pkgs, ...}: {
home.packages =
[
(pkgs.writeShellApplication {
name = "ddcmonitorctl";
runtimeInputs = with pkgs; [ddcutil];
text = builtins.readFile ./scripts/ddcmonitorctl.sh;
})
]
++ (let
wall-change = pkgs.writeShellApplication {
name = "wall-change";
runtimeInputs = with pkgs; [swaybg imagemagick];
text = builtins.readFile ./scripts/wall-change.sh;
};
setbg-apotd = pkgs.writeShellApplication {
name = "setbg-apotd";
runtimeInputs = [pkgs.curl pkgs.gnugrep pkgs.gnused wall-change];
text = builtins.readFile ./scripts/setbg-apotd.sh;
};
setbg-bpotd = pkgs.writeShellApplication {
name = "setbg-bpotd";
runtimeInputs = with pkgs; [pkgs.curl pkgs.jq wall-change];
text = builtins.readFile ./scripts/setbg-bpotd.sh;
};
wallpaper-picker = pkgs.writeShellApplication {
name = "wallpaper-picker";
runtimeInputs = [pkgs.fuzzel setbg-apotd setbg-bpotd wall-change];
text = builtins.readFile ./scripts/wallpaper-picker.sh;
};
in [
wall-change
setbg-apotd
setbg-bpotd
wallpaper-picker
])
++ [
(pkgs.writeShellApplication {
name = "runbg";
text = builtins.readFile ./scripts/runbg.sh;
})
(pkgs.writeShellApplication {
name = "toggle_blur";
text = builtins.readFile ./scripts/toggle_blur.sh;
})
(pkgs.writeShellApplication {
name = "toggle_oppacity";
text = builtins.readFile ./scripts/toggle_oppacity.sh;
})
(pkgs.writeShellApplication {
name = "shutdown-script";
runtimeInputs = with pkgs; [fuzzel];
text = builtins.readFile ./scripts/shutdown-script.sh;
})
(pkgs.writeShellApplication {
name = "show-keybinds";
runtimeInputs = with pkgs; [fuzzel gnugrep];
text = builtins.readFile ./scripts/show-keybinds.sh;
})
(pkgs.writeShellApplication {
name = "screenshot-menu";
runtimeInputs = with pkgs; [fuzzel grimblast swappy];
text = builtins.readFile ./scripts/screenshot-menu.sh;
})
];
}

View file

@ -0,0 +1,14 @@
if [ "$1" == "on" ]; then
state_opt=1
elif [ "$1" == "off" ]; then
state_opt=4
else
echo "First argument must be either 'on' or 'off'"
exit 1
fi
monitor_count=$(bash -c "ddcutil detect | grep Display | wc -l")
seq "$monitor_count" | xargs -n 1 ddcutil setvcp d6 $state_opt -d

View file

@ -0,0 +1,14 @@
[ $# -eq 0 ] && { # $# is number of args
echo "$(basename "$0"): missing command" >&2
exit 1
}
prog="$(which "$1")" # see below
[ -z "$prog" ] && {
echo "$(basename "$0"): unknown command: $1" >&2
exit 1
}
shift # remove $1, now $prog, from args
tty -s && exec </dev/null # if stdin is a terminal, redirect from null
tty -s <&1 && exec >/dev/null # if stdout is a terminal, redirect to null
tty -s <&2 && exec 2>&1 # stderr to stdout (which might not be null)
"$prog" "$@" & # $@ is all args

View file

@ -0,0 +1,114 @@
#### Options
option_1="󰹑 Capture"
option_2="󰁫 Timer capture"
option_capture_1="󰍺 All Screen"
option_capture_2="󰍹 Capture Active Screen"
option_capture_3="󱣴 Capture Area/Window/Application"
option_time_1="5s"
option_time_2="10s"
option_time_3="20s"
option_time_4="30s"
option_time_5="60s"
####
#### Initial menu to decide wether a timer is wanted
want_timer_cmd() {
echo -e "$option_1\n$option_2" | fuzzel --dmenu -p 'Screenshot: '
}
####
#### Choose Timer seconds
timer_cmd() {
echo -e "$option_time_1\n$option_time_2\n$option_time_3\n$option_time_4\n$option_time_5" | fuzzel --dmenu -p 'Choose timer: '
}
timer_menu() {
selected_timer="$(timer_cmd)"
if [[ "$selected_timer" == "$option_time_1" ]]; then
countdown=5
elif [[ "$selected_timer" == "$option_time_2" ]]; then
countdown=10
elif [[ "$selected_timer" == "$option_time_3" ]]; then
countdown=20
elif [[ "$selected_timer" == "$option_time_4" ]]; then
countdown=30
elif [[ "$selected_timer" == "$option_time_5" ]]; then
countdown=60
fi
}
####
#### Chose Screenshot Type
type_screenshot_cmd() {
echo -e "$option_capture_1\n$option_capture_2\n$option_capture_3" | fuzzel --dmenu -p 'Type of screenshot: '
}
type_screenshot_menu() {
selected_type_screenshot="$(type_screenshot_cmd)"
if [[ "$selected_type_screenshot" == "$option_capture_1" ]]; then
option_type_screenshot=screen
elif [[ "$selected_type_screenshot" == "$option_capture_2" ]]; then
option_type_screenshot=output
elif [[ "$selected_type_screenshot" == "$option_capture_3" ]]; then
option_type_screenshot=area
fi
}
####
### Run the timer
timer() {
# Countdown notifications must start at 10 seconds so they aren't annoying
if [[ $countdown -gt 10 ]]; then
notify-send -t 1000 "Taking Screenshot in ${countdown} seconds"
sleep $((countdown - 10))
countdown=10
fi
while [[ $countdown -ne 0 ]]; do
notify-send -t 900 "Taking Screenshot in ${countdown}"
countdown=$((countdown - 1))
sleep 1
done
}
####
#### Main logic
chosen="$(want_timer_cmd)"
if [ -z "$chosen" ]; then
exit
fi
type_screenshot_menu
if [ -z "$selected_type_screenshot" ]; then
exit
fi
if [[ $option_2 == *$chosen* ]]; then
timer_menu
if [ -z "$selected_timer" ]; then
exit
fi
timer
else
sleep 0.7 # So fuzzel has time to fade-out
fi
GRIMBLAST_EDITOR="swappy -f " grimblast --notify edit "$option_type_screenshot"
####

View file

@ -0,0 +1,32 @@
## Based on https://github.com/sgsax/apod-desktop/blob/master/apod
# base URL for the APOD website
BASE_URL=https://apod.nasa.gov/apod/
# API endpoint which returns the Picture Of The Day data
PAGE_URL="$BASE_URL/astropix.html"
IMG_FILE=/tmp/apotd.jpg
echo Getting APOD page...
if ! page_data=$(curl -s $PAGE_URL); then
echo "Unable to retrieve page";
exit 1;
fi
# extract the image url from the astropix page
echo Getting image url...
imgurl=$(echo "$page_data" | grep -i "img src" | sed -e 's/.*<img src="\(.*\)".*/\1/i')
echo "Image url is $imgurl"
# get that image file
echo "Getting image at ${BASE_URL}${imgurl}"
if ! curl "${BASE_URL}${imgurl}" -o $IMG_FILE; then
echo "Unable to retrieve image"
exit 2
fi
#set wallpaper using swaybg
wall-change "$IMG_FILE"

View file

@ -0,0 +1,29 @@
# base URL for Bing
BASE_URL=https://bing.com
# API endpoint which returns the Picture Of The Day data
ENDPOINT="$BASE_URL/HPImageArchive.aspx?format=js&idx=0&n=1&mkt=en-US"
IMG_FILE=/tmp/bpotd.jpg
echo Querying the API...
if ! api_data=$(curl "$ENDPOINT"); then
echo "Unable to contact the API";
exit 1;
fi
# extract the image url from the astropix page
echo Getting image url...
imgurl=$(echo "$api_data" | jq -r .images[0].url)
echo "Image url is $imgurl"
# get that image file
echo "Getting image at ${BASE_URL}${imgurl}"
if ! curl "${BASE_URL}${imgurl}" -o $IMG_FILE; then
echo "Unable to retrieve image"
exit 2
fi
#set wallpaper using swaybg
wall-change "$IMG_FILE"

View file

@ -0,0 +1,4 @@
config_file=~/.config/hypr/hyprland.conf
keybinds=$(grep -oP '(?<=bind=).*' $config_file)
keybinds=$(echo "$keybinds" | sed 's/,\([^,]*\)$/ = \1/' | sed 's/, exec//g' | sed 's/^,//g')
fuzzel --width 75 --dmenu <<< "$keybinds"

View file

@ -0,0 +1,13 @@
respond="$(echo -e "󰐥 Shutdown\n󰜉 Restart\n󰜺 Cancel" | fuzzel --dmenu --lines=3 --width=15 --prompt='Choose action: ')"
if [ "$respond" = '󰐥 Shutdown' ]
then
echo "shutdown"
shutdown now
elif [ "$respond" = '󰜉 Restart' ]
then
echo "restart"
reboot
else
notify-send "Shutdown cancelled"
fi

View file

@ -0,0 +1,5 @@
if hyprctl getoption decoration:blur:enabled | grep "int: 1" >/dev/null ; then
hyprctl keyword decoration:blur:enabled false >/dev/null
else
hyprctl keyword decoration:blur:enabled true >/dev/null
fi

View file

@ -0,0 +1,7 @@
if hyprctl getoption decoration:active_opacity | grep "float: 1" >/dev/null ; then
hyprctl keyword decoration:active_opacity 0.90 >/dev/null
hyprctl keyword decoration:inactive_opacity 0.90 >/dev/null
else
hyprctl keyword decoration:active_opacity 1 >/dev/null
hyprctl keyword decoration:inactive_opacity 1 >/dev/null
fi

View file

@ -0,0 +1,9 @@
PIDS=$(pgrep -f "swaybg")
swaybg -m fill -i "$1" &
if [ -n "$PIDS" ]; then
echo "$PIDS" | xargs kill
fi
magick "$1" ~/.config/hypr/wallpaper.png

View file

@ -0,0 +1,14 @@
bpotd_entry="⚙️ Bing's Picture Of The Day"
apotd_entry="⚙️ NASA's Astronomy Picture Of The Day"
wallpapers_folder=$HOME/Pictures/Wallpapers/
wallpaper_name=$(echo -e "$bpotd_entry\n$apotd_entry" | { cat; find "$wallpapers_folder" -type f | sed "s|$wallpapers_folder||"; } | fuzzel --dmenu)
if [ "$wallpaper_name" == "$bpotd_entry" ]; then
setbg-bpotd
elif [ "$wallpaper_name" == "$apotd_entry" ]; then
setbg-apotd
elif [[ -f $wallpapers_folder/$wallpaper_name ]]; then
wall-change "$wallpapers_folder/$wallpaper_name"
else
exit 1
fi

View file

@ -0,0 +1,13 @@
{osConfig, ...}: let
hasDE = osConfig.hm-pedro.de != "none";
in {
services.nextcloud-client = {
enable = hasDE;
startInBackground = true;
};
services.kdeconnect = {
enable = hasDE;
indicator = true;
};
}

View file

@ -0,0 +1,6 @@
{pkgs, ...}: {
home.packages = with pkgs; [
spotify-player
sptlrx
];
}

View file

@ -0,0 +1,53 @@
{
inputs,
config,
pkgs,
...
}: {
imports = [inputs.stylix.homeModules.stylix];
stylix = {
enable = true;
autoEnable = true;
base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml";
polarity = "dark";
targets = {
librewolf.profileNames = ["pedro"];
};
fonts = {
monospace = {
package = pkgs.nerd-fonts.jetbrains-mono;
name = "JetBrainsMono Nerd Font";
};
serif = config.stylix.fonts.monospace;
sansSerif = config.stylix.fonts.monospace;
emoji = config.stylix.fonts.monospace;
};
cursor = {
package = pkgs.catppuccin-cursors.mochaDark;
name = "Catppuccin Mocha Dark";
size = 22;
};
iconTheme = {
enable = true;
package = pkgs.catppuccin-papirus-folders.override {
flavor = "mocha";
accent = "lavender";
};
light = "Papirus-Light";
dark = "Papirus-Dark";
};
opacity = {
applications = 0.65;
desktop = 1.0;
popups = 0.8;
terminal = 0.55;
};
};
}

View file

@ -0,0 +1,91 @@
{pkgs, ...}: {
home.packages = with pkgs; [cmake black alejandra]; # The CMake extension needs it
programs.vscode = {
enable = true;
package = pkgs.vscodium;
profiles.default = {
extensions = with pkgs.vscode-extensions; [
# nix language
bbenoist.nix
# nix-shell suport
arrterian.nix-env-selector
# nix formatting
kamadorueda.alejandra
# python
ms-python.python
ms-python.black-formatter
# OCaml
ocamllabs.ocaml-platform
# CMake
ms-vscode.cmake-tools
# TOML
tamasfe.even-better-toml
# Theming
catppuccin.catppuccin-vsc-icons
];
userSettings = {
"update.mode" = "none";
"extensions.autoUpdate" = false; # This stuff fixes vscode freaking out when theres an update
"window.titleBarStyle" = "custom"; # needed otherwise vscode crashes, see https://github.com/NixOS/nixpkgs/issues/246509
"window.menuBarVisibility" = "toggle";
"vsicons.dontShowNewVersionMessage" = true;
"explorer.confirmDragAndDrop" = true;
"editor.fontLigatures" = true;
"editor.minimap.enabled" = true;
"workbench.startupEditor" = "none";
"editor.formatOnSave" = true;
"editor.formatOnType" = true;
"editor.formatOnPaste" = true;
"workbench.layoutControl.type" = "menu";
"workbench.editor.limit.enabled" = true;
"workbench.editor.limit.value" = 10;
"workbench.editor.limit.perEditorGroup" = true;
"workbench.editor.showTabs" = "multiple";
"files.autoSave" = "onWindowChange";
"explorer.openEditors.visible" = 0;
"breadcrumbs.enabled" = false;
"editor.renderControlCharacters" = false;
"workbench.activityBar.location" = "default";
"workbench.statusBar.visible" = false;
"editor.scrollbar.verticalScrollbarSize" = 4;
"editor.scrollbar.horizontalScrollbarSize" = 4;
"editor.scrollbar.vertical" = "auto";
"editor.scrollbar.horizontal" = "auto";
"workbench.layoutControl.enabled" = false;
"editor.mouseWheelZoom" = true;
"C_Cpp.autocompleteAddParentheses" = true;
"C_Cpp.formatting" = "clangFormat";
"C_Cpp.intelliSenseCacheSize" = 2048;
"C_Cpp.intelliSenseMemoryLimit" = 2048;
"C_Cpp.default.browse.path" = [
''''${workspaceFolder}/**''
];
"C_Cpp.default.cStandard" = "gnu99";
"C_Cpp.inlayHints.parameterNames.hideLeadingUnderscores" = false;
"C_Cpp.intelliSenseUpdateDelay" = 500;
"C_Cpp.workspaceParsingPriority" = "medium";
"C_Cpp.clang_format_sortIncludes" = true;
"C_Cpp.doxygen.generatedStyle" = "/**";
};
# Keybindings
keybindings = [
{
key = "ctrl+q";
command = "editor.action.commentLine";
when = "editorTextFocus && !editorReadonly";
}
{
key = "ctrl+s";
command = "workbench.action.files.saveFiles";
}
];
};
};
}

View file

@ -0,0 +1,10 @@
{...}: {
imports = [
./settings.nix
./style.nix
];
programs.waybar = {
enable = true;
};
}

View file

@ -0,0 +1,157 @@
{host, ...}: {
programs.waybar.settings.mainBar = {
position = "top";
layer = "top";
# height= 15;
margin-top = 0;
margin-bottom = 5;
margin-left = 0;
margin-right = 0;
modules-left = [
"custom/launcher"
"custom/playerctl#backward"
"custom/playerctl#play"
"custom/playerctl#forward"
];
modules-center = [
"hyprland/workspaces"
];
modules-right = [
"tray"
"cpu"
"memory"
"disk"
"pulseaudio"
"battery"
"idle_inhibitor"
"network"
"clock"
];
clock = {
format = " {:%H:%M}";
tooltip = true;
tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
format-alt = " {:%d/%m}";
};
"hyprland/workspaces" = {
active-only = false;
all-outputs = false;
disable-scroll = false;
on-scroll-up = "hyprctl dispatch workspace e-1";
on-scroll-down = "hyprctl dispatch workspace e+1";
format = "{name}";
on-click = "activate";
format-icons = {
urgent = "";
active = "";
default = "";
sort-by-number = true;
};
};
"custom/playerctl#backward" = {
format = "󰙣 ";
on-click = "playerctl previous";
on-scroll-up = "playerctl volume .05+";
on-scroll-down = "playerctl volume .05-";
tooltip = false;
};
"custom/playerctl#play" = {
format = "{icon}";
return-type = "json";
exec = "playerctl -a metadata --format '{\"text\": \"{{artist}} - {{markup_escape(title)}}\", \"tooltip\": \"{{playerName}} : {{markup_escape(title)}}\", \"alt\": \"{{status}}\", \"class\": \"{{status}}\"}' -F";
on-click = "playerctl play-pause";
on-scroll-up = "playerctl volume .05+";
on-scroll-down = "playerctl volume .05-";
format-icons = {
Playing = "<span>󰏥 </span>";
Paused = "<span> </span>";
Stopped = "<span> </span>";
};
};
"custom/playerctl#forward" = {
format = "󰙡 ";
on-click = "playerctl next";
on-scroll-up = "playerctl volume .05+";
on-scroll-down = "playerctl volume .05-";
tooltip = false;
};
memory = {
format = " {}%";
format-alt = " {used} GiB"; # 
interval = 2;
};
cpu = {
format = " {usage}%";
format-alt = " {avg_frequency} GHz";
interval = 2;
};
disk = {
# path = "/";
format = "󰋊 {percentage_used}%";
interval = 60;
};
network = {
format-wifi = " {signalStrength}%";
format-ethernet = "󰀂 ";
tooltip-format = "Connected to {essid} {ifname} via {gwaddr}";
format-linked = "{ifname} (No IP)";
format-disconnected = "󰖪 ";
};
tray = {
icon-size = 20;
spacing = 8;
};
pulseaudio = {
format = "{icon} {volume}%";
format-muted = " ";
format-icons = {
default = [" "];
};
scroll-step = 5;
on-click = "pamixer -t";
on-click-right = "pavucontrol";
};
battery = {
format = "{icon} {capacity}%";
format-icons = [" " " " " " " " " "];
format-charging = " {capacity}%";
format-full = " {capacity}%";
format-warning = " {capacity}%";
interval = 5;
states = {
warning = 20;
};
format-time = "{H}h{M}m";
tooltip = true;
tooltip-format = "{time}";
};
idle_inhibitor = {
format = "{icon}";
format-icons = {
activated = " ";
deactivated = " ";
};
timeout = 30;
};
"custom/launcher" = {
format = "";
on-click = "pkill fuzzel || fuzzel";
on-click-right = "pkill fuzzel || wallpaper-picker";
tooltip = false;
};
};
}

View file

@ -0,0 +1,155 @@
{
lib,
config,
...
}: {
stylix.targets.waybar.addCss = false;
programs.waybar.style = ''
* {
border: none;
border-radius: 0;
min-height: 0;
}
window#waybar {
background: none;
}
.module {
background: @base00;
color: @base05;
margin: 5px 0px;
min-height: 0;
font-weight: bold;
}
tooltip {
background: @base02;
color: @base05;
border-radius: 4px;
}
tooltip label {
color: @base05;
}
#workspaces {
margin: 5px 5px;
padding: 8px 12px;
border-radius: 12px 12px 24px 24px;
}
#workspaces button {
padding: 0px 5px;
margin: 0px 3px;
border-radius: 15px;
color: @base00;
background-color: @base0D;
min-width: 15px;
transition: all 0.2s ease-in-out;
}
#workspaces button.visible {
background-color: @base0F;
}
#workspaces button.active {
background-color: @base0E;
min-width: 35px;
}
#workspaces button:hover {
background-color: @base07;
min-width: 35px;
}
#cpu {
border-radius: 10px 0px 0px 24px;
padding-left: 15px;
padding-right: 9px;
margin-left: 7px;
}
#memory {
border-radius: 0;
padding-left: 9px;
padding-right: 9px;
}
#disk {
border-radius: 0px 24px 10px 0px;
padding-left: 9px;
padding-right: 15px;
}
#tray {
border-radius: 10px 24px 10px 24px;
padding: 0 20px;
margin-left: 7px;
}
#pulseaudio {
border-radius: 10px 0px 0px 24px;
padding-left: 15px;
padding-right: 9px;
margin-left: 7px;
}
#battery {
border-radius: 0;
padding-left: 9px;
padding-right: 9px;
}
#idle_inhibitor {
border-radius: 0;
padding-left: 9px;
padding-right: 9px;
}
#network {
border-radius: 0px 24px 10px 0px;
padding-left: 9px;
padding-right: 15px;
}
#clock {
border-radius: 0px 0px 0px 40px;
padding: 10px 10px 15px 25px;
margin: 0px;
margin-left: 7px;
font-size: 16px;
}
#custom-launcher {
color: @base0D;
border-radius: 0px 0px 40px 0px;
margin: 0px;
padding: 0px 30px 0px 10px;
font-size: 28px;
}
#custom-playerctl.backward, #custom-playerctl.play, #custom-playerctl.forward {
font-size: 22px;
}
#custom-playerctl.backward:hover, #custom-playerctl.play:hover, #custom-playerctl.forward:hover{
color: @base05;
}
#custom-playerctl.backward {
color: @base0E;
border-radius: 24px 0px 0px 10px;
padding-left: 16px;
margin-left: 7px;
}
#custom-playerctl.play {
color: @base0D;
padding: 0 5px;
}
#custom-playerctl.forward {
color: @base0E;
border-radius: 0px 10px 24px 0px;
padding-right: 12px;
margin-right: 7px
}
'';
}

View file

@ -1,11 +1,36 @@
{self, ...}: {
imports = [self.inputs.home-manager.nixosModules.default ./configuration.nix];
{
inputs,
lib,
pkgs,
...
}: {
imports = [inputs.home-manager.nixosModules.default];
home-manager.users.pedro = {
imports = [
./home-configuration
];
options = {
hm-pedro.de = lib.mkOption {
default = "none";
type = lib.types.enum ["none" "hyprland"];
};
};
config = {
home-manager = {
backupFileExtension = "hmbkp";
extraSpecialArgs = {inherit inputs;};
users.pedro = {
imports = [./home-configuration];
home.stateVersion = "25.05";
home.stateVersion = "25.05";
};
};
programs.zsh.enable = true; # To use as user's default shell below
users.users.pedro = {
shell = pkgs.zsh;
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJji4h4bgzgmp7YoRX/8ePN0TcCYRfI2wlrEeZkBQ/y2 personal@peprolinbot.com"
];
};
programs.dconf.enable = true; # Doesn't work on headless installs without dconf (?)
};
}