it finally happened

This commit is contained in:
atagen 2023-04-19 16:41:56 +10:00
parent 2ea78bdd47
commit 56d55e1659
190 changed files with 843 additions and 9368 deletions

584
flake.lock generated Normal file
View file

@ -0,0 +1,584 @@
{
"nodes": {
"crane": {
"flake": false,
"locked": {
"lastModified": 1670900067,
"narHash": "sha256-VXVa+KBfukhmWizaiGiHRVX/fuk66P8dgSFfkVN4/MY=",
"owner": "ipetkov",
"repo": "crane",
"rev": "59b31b41a589c0a65e4a1f86b0e5eac68081468b",
"type": "github"
},
"original": {
"owner": "ipetkov",
"repo": "crane",
"type": "github"
}
},
"declarative-cachix": {
"locked": {
"lastModified": 1670437766,
"narHash": "sha256-OINAikZrqLN0MsTAP4tNHoezXjIOZ/tkbu/C/KCEgmU=",
"owner": "jonascarpay",
"repo": "declarative-cachix",
"rev": "abe4d70e5d9a225a7ecf98086b089cc04202f2e3",
"type": "github"
},
"original": {
"owner": "jonascarpay",
"repo": "declarative-cachix",
"type": "github"
}
},
"dream2nix": {
"inputs": {
"all-cabal-json": [
"helix",
"nci"
],
"crane": "crane",
"devshell": [
"helix",
"nci"
],
"drv-parts": "drv-parts",
"flake-compat": "flake-compat_2",
"flake-parts": [
"helix",
"nci",
"parts"
],
"flake-utils-pre-commit": [
"helix",
"nci"
],
"ghc-utils": [
"helix",
"nci"
],
"gomod2nix": [
"helix",
"nci"
],
"mach-nix": [
"helix",
"nci"
],
"nix-pypi-fetcher": [
"helix",
"nci"
],
"nixpkgs": [
"helix",
"nci",
"nixpkgs"
],
"nixpkgsV1": "nixpkgsV1",
"poetry2nix": [
"helix",
"nci"
],
"pre-commit-hooks": [
"helix",
"nci"
],
"pruned-racket-catalog": [
"helix",
"nci"
]
},
"locked": {
"lastModified": 1680258209,
"narHash": "sha256-lEo50RXI/17/a9aCIun8Hz62ZJ5JM5RGeTgclIP+Lgc=",
"owner": "nix-community",
"repo": "dream2nix",
"rev": "6f512b5a220fdb26bd3c659f7b55e4f052ec8b35",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "dream2nix",
"type": "github"
}
},
"drv-parts": {
"inputs": {
"flake-compat": [
"helix",
"nci",
"dream2nix",
"flake-compat"
],
"flake-parts": [
"helix",
"nci",
"dream2nix",
"flake-parts"
],
"nixpkgs": [
"helix",
"nci",
"dream2nix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1680172861,
"narHash": "sha256-QMyI338xRxaHFDlCXdLCtgelGQX2PdlagZALky4ZXJ8=",
"owner": "davhau",
"repo": "drv-parts",
"rev": "ced8a52f62b0a94244713df2225c05c85b416110",
"type": "github"
},
"original": {
"owner": "davhau",
"repo": "drv-parts",
"type": "github"
}
},
"eww": {
"inputs": {
"flake-compat": "flake-compat",
"nixpkgs": [
"nixpkgs"
],
"rust-overlay": [
"rust-overlay"
]
},
"locked": {
"lastModified": 1679829035,
"narHash": "sha256-7zN4FWGFpHo3SCe/c5ximxbQyikY8nUBgp+QHUkGsFQ=",
"owner": "elkowar",
"repo": "eww",
"rev": "e76206817de1cb86ec431dcff7d4b04c8b7d36fc",
"type": "github"
},
"original": {
"owner": "elkowar",
"repo": "eww",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1650374568,
"narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "b4a34015c698c7793d592d66adbab377907a2be8",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1673956053,
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1680392223,
"narHash": "sha256-n3g7QFr85lDODKt250rkZj2IFS3i4/8HBU2yKHO3tqw=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "dcc36e45d054d7bb554c9cdab69093debd91a0b5",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"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_2": {
"locked": {
"lastModified": 1659877975,
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"helix": {
"inputs": {
"nci": "nci",
"nixpkgs": [
"nixpkgs"
],
"parts": [
"flake-parts"
],
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1681679220,
"narHash": "sha256-3LOLVHommFXYjqtEhmCpB9vX0OraHyE/m06ikDPjqBY=",
"owner": "helix-editor",
"repo": "helix",
"rev": "1b016a89d546fb84d3c737d7c4bacb9e26c8b893",
"type": "github"
},
"original": {
"owner": "helix-editor",
"repo": "helix",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1681688069,
"narHash": "sha256-1w6zBfwxwMbyewUyqzSnZs8nwNqj6ZBVcP0rkCueyIo=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "68eaf4b577cfa8024fb910a1ce7d60385044f798",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"hyprland": {
"inputs": {
"hyprland-protocols": "hyprland-protocols",
"nixpkgs": "nixpkgs",
"wlroots": "wlroots",
"xdph": "xdph"
},
"locked": {
"lastModified": 1681677208,
"narHash": "sha256-R9b2/SZfkxuv54YDo4FUp65wgLREQ4gfYxfJ9mSMTno=",
"owner": "hyprwm",
"repo": "Hyprland",
"rev": "c62ab1bee72cc4bda16a0574a8c9de7d71da314a",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "Hyprland",
"type": "github"
}
},
"hyprland-protocols": {
"inputs": {
"nixpkgs": [
"hyprland",
"nixpkgs"
]
},
"locked": {
"lastModified": 1681065697,
"narHash": "sha256-QPzwwlGKX95tl6ZEshboZbEwwAXww6lNLdVYd6T9Mrc=",
"owner": "hyprwm",
"repo": "hyprland-protocols",
"rev": "4d29e48433270a2af06b8bc711ca1fe5109746cd",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprland-protocols",
"type": "github"
}
},
"mk-naked-shell": {
"flake": false,
"locked": {
"lastModified": 1676572903,
"narHash": "sha256-oQoDHHUTxNVSURfkFcYLuAK+btjs30T4rbEUtCUyKy8=",
"owner": "yusdacra",
"repo": "mk-naked-shell",
"rev": "aeca9f8aa592f5e8f71f407d081cb26fd30c5a57",
"type": "github"
},
"original": {
"owner": "yusdacra",
"repo": "mk-naked-shell",
"type": "github"
}
},
"nci": {
"inputs": {
"dream2nix": "dream2nix",
"mk-naked-shell": "mk-naked-shell",
"nixpkgs": [
"helix",
"nixpkgs"
],
"parts": "parts",
"rust-overlay": [
"helix",
"rust-overlay"
]
},
"locked": {
"lastModified": 1680329418,
"narHash": "sha256-+KN0eQLSZvL1J0kDO8/fxv0UCHTyZCADLmpIfeeiSGo=",
"owner": "yusdacra",
"repo": "nix-cargo-integration",
"rev": "98c1d2ff5155f0fee5d290f6b982cb990839d540",
"type": "github"
},
"original": {
"owner": "yusdacra",
"repo": "nix-cargo-integration",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1681557730,
"narHash": "sha256-j2E3639kS3Qop2jQPyqWCdenZNaqIdxfoTvAHnGuAGI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "85b081528b937df4bfcaee80c3541b58f397df8b",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgsV1": {
"locked": {
"lastModified": 1678500271,
"narHash": "sha256-tRBLElf6f02HJGG0ZR7znMNFv/Uf7b2fFInpTHiHaSE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "5eb98948b66de29f899c7fe27ae112a47964baf8",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-22.11",
"type": "indirect"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1681648924,
"narHash": "sha256-pzi3HISK8+7mpEtv08Yr80wswyHKsz+RP1CROG1Qf6s=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "f294325aed382b66c7a188482101b0f336d1d7db",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nur": {
"locked": {
"lastModified": 1681877316,
"narHash": "sha256-BaAkjNeD0MSTI1fRmnN3xOstXfjB3UiuzMNZLJpYgng=",
"owner": "nix-community",
"repo": "NUR",
"rev": "8a625f2ab530f40c6fe50a33ccb760a85d772c70",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "NUR",
"type": "github"
}
},
"parts": {
"inputs": {
"nixpkgs-lib": [
"helix",
"nci",
"nixpkgs"
]
},
"locked": {
"lastModified": 1679737941,
"narHash": "sha256-srSD9CwsVPnUMsIZ7Kt/UegkKUEBcTyU1Rev7mO45S0=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "3502ee99d6dade045bdeaf7b0cd8ec703484c25c",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"root": {
"inputs": {
"declarative-cachix": "declarative-cachix",
"eww": "eww",
"flake-parts": "flake-parts",
"flake-utils": "flake-utils",
"helix": "helix",
"home-manager": "home-manager",
"hyprland": "hyprland",
"nixpkgs": "nixpkgs_2",
"nur": "nur",
"rust-overlay": "rust-overlay_2"
}
},
"rust-overlay": {
"inputs": {
"flake-utils": "flake-utils_2",
"nixpkgs": [
"helix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1680315536,
"narHash": "sha256-0AsBuKssJMbcRcw4HJQwJsUHhZxR5+gaf6xPQayhR44=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "5c8c151bdd639074a0051325c16df1a64ee23497",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"rust-overlay_2": {
"inputs": {
"flake-utils": [
"flake-utils"
],
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1681611682,
"narHash": "sha256-gT4wfOdVyxtB3NV5U914uAOqzFYMdNK8ObPmtqHxlUg=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "18cdcb7b4017f266117a4d164f9d71c0535ef5ec",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"wlroots": {
"flake": false,
"locked": {
"host": "gitlab.freedesktop.org",
"lastModified": 1680810405,
"narHash": "sha256-LmI/4Yp/pOOoI4RxLRx9I90NBsiqdRLVOfbATKlgpkg=",
"owner": "wlroots",
"repo": "wlroots",
"rev": "7abda952d0000b72d240fe1d41457b9288f0b6e5",
"type": "gitlab"
},
"original": {
"host": "gitlab.freedesktop.org",
"owner": "wlroots",
"repo": "wlroots",
"type": "gitlab"
}
},
"xdph": {
"inputs": {
"hyprland-protocols": [
"hyprland",
"hyprland-protocols"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
]
},
"locked": {
"lastModified": 1681127512,
"narHash": "sha256-vklOOhBj5W8fii6yN4L2WY5ZeifBmsq3+mJ2wC1Pk9U=",
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"rev": "04f579377a32781ce57c9cf4ba2a5bcb7f53fa97",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

View file

@ -6,21 +6,23 @@
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-parts = {
url = "github:hercues-ci/flake-parts";
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
# eww = {
# url = "github:elkowar/eww";
# inputs.nixpkgs.follows = "nixpkgs";
# inputs.rust-overlay.follows = "rust-overlay";
# };
nur.url = "github:/nix-community/NUR";
eww = {
url = "github:elkowar/eww";
inputs.nixpkgs.follows = "nixpkgs";
inputs.rust-overlay.follows = "rust-overlay";
};
# rust-overlay = {
# url = "github:oxalica/rust-overlay";
# inputs.nixpkgs.follows = "nixpkgs";
# inputs.flake-utils.follows = "flake-utils";
# };
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
};
flake-utils.url = "github:numtide/flake-utils";
@ -37,12 +39,14 @@
hyprland.url = "github:hyprwm/Hyprland";
declarative-cachix.url = "github:jonascarpay/declarative-cachix";
};
outputs = { self, nixpkgs, home-manager, eww, helix, hyprland, ... }@inputs:
outputs = { self, nixpkgs, home-manager, nur, eww, helix, hyprland, ... }@inputs:
let
inherit (self) outputs:
inherit (self) outputs;
forAllSystems = nixpkgs.lib.genAttrs [
"x86_64-linux"
];
@ -51,37 +55,39 @@
rec {
# custom packages
syspkgs = forAllSystems (system:
packages = forAllSystems (system:
let pkgs = nixpkgs.legacyPackages.${system};
in import ./syspkgs { inherit pkgs; }
in import ./pkgs { inherit pkgs; }
);
homepkgs = forAllSystems (system:
let pkgs = nixpkgs.legacyPackages.${system};
in import ./homepkgs { inherit pkgs; }
);
# homepkgs = forAllSystems (system:
# let pkgs = nixpkgs.legacyPackages.${system};
# in import ./homepkgs { inherit pkgs; }
# );
# any overlays or modules we use
# overlays = import ./overlays { inherit inputs; };
overlays = import ./overlay.nix { inherit inputs; };
# nixosModules = import ./modules/nixos;
# homeModules = import ./modules/home;
nixosConfigurations = {
"quiver" = nixpkgs.lib.nixosSystem {
# pkgs = nixpkgs.legacyPackages.x86_64-linux;
system = "x86_64-linux";
specialArgs = { inherit inputs outputs; };
modules = [
./system/configuration.nix
./system/quiver.nix
];
};
"adrift" = nixpkgs.lib.nixosSystem {
# pkgs = nixpkgs.legacyPackages.x86_64-linux;
system = "x86_64-linux";
specialArgs = { inherit inputs outputs; };
modules = [
./system/configuration.nix
./system/adrift.nix
]
];
};
};
@ -92,7 +98,7 @@
pkgs = nixpkgs.legacyPackages.x86_64-linux;
extraSpecialArgs = { inherit inputs outputs; };
modules = [
./home/home.nix
nur.nixosModules.nur
./home/bolt.nix
];
};
@ -101,13 +107,13 @@
pkgs = nixpkgs.legacyPackages.x86_64-linux;
extraSpecialArgs = { inherit inputs outputs; };
modules = [
./home/home.nix
nur.nixosModules.nur
./home/plank.nix
];
};
};
};
}

View file

@ -1,6 +0,0 @@
{ inputs, outputs, lib, config, pkgs, ... }: {
home = {
username = "bolt";
homeDirectory = "/home/bolt";
};
}

View file

@ -1,284 +0,0 @@
{ inputs, outputs, lib, config, pkgs, ... }:
let
wlogout_style_base = dots/wlogout/style.css;
wlogout_style = pkgs.runCommandLocal "wlogout_style_base" {wlogpath = lib.strings.escape ["/"] "${pkgs.wlogout}";} ''
cp ${wlogout_style_base} $out
sed -i "s/\/usr\/share\/wlogout/$wlogpath\/share\/wlogout/g" $out
sed -i "s/\/etc\/wlogout/$wlogpath\/etc\/wlogout/g" $out
'';
in
{
imports = [
inputs.hyprland.homeManagerModules.default
./programs/eww/default.nix
];
nixpkgs = {
config = {
allowUnfree = true;
allowUnfreePredicate = (_: true);
};
};
home.stateVersion = "22.11";
home.packages = with pkgs; [
thunderbird
clementine
inkscape
btop
bat
joshuto
ripgrep
fd
lazygit
fzf
zoxide
zellij
glib # for gsettings
fuzzel
grim
slurp
swaybg
wlogout
wf-recorder
libnotify
xorg.xrdb
swayidle
swaynotificationcenter
# swayosd
waylock
playerctl
kdeconnect
syncthing
keepassxc
direnv
mpv
meslo-lgs-nf
libsForQt5.qtstyleplugin-kvantum
gtk-engine-murrine
];
services.syncthing = {
enable = true;
};
wayland.windowManager.hyprland = {
enable = true;
systemdIntegration = true;
nvidiaPatches = true;
xwayland = {
enable = true;
hidpi = false;
};
recommendedEnvironment = true;
extraConfig = builtins.readFile dots/hyprland/hyprland.conf;
};
programs.eww-hyprland = {
enable = true;
colors = builtins.readFile dots/eww/colors.scss;
};
systemd.user.startServices = "sd-switch";
systemd.user.services."hyprland-system76" = {
Unit = {
Description = "the hyprland process scheduler hook";
Requires = [ "dbus.service" ];
};
Install = {
WantedBy = [ "graphical-session.target" "default.target" ];
};
Service = {
ExecStart = ''${pkgs.hyprland-s76}/bin/hyprland-system76-scheduler-hook.sh'';
};
};
xresources.extraConfig = builtins.readFile ./dots/Xresources;
xdg.enable = true;
xdg.configFile = builtins.mapAttrs (name: value: { enable=true; text=builtins.readFile value; })
{
"wlogout/layout" = dots/wlogout/layout;
"wlogout/style.css" = wlogout_style;
"swaync/config.json" = dots/swaync/config.json;
"swaync/configSchema.json" = dots/swaync/configSchema.json;
"swaync/style.css" = dots/swaync/style.css;
"fuzzel/fuzzel.ini" = dots/fuzzel/fuzzel.ini;
};
xdg.systemDirs.data = [
"${pkgs.gtk3}/share/gsettings-schemas/${pkgs.gtk3.name}"
"${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}"
];
home.sessionVariables = {
GTK_THEME = "Sweet-Dark";
};
gtk = {
enable = true;
theme = {
package = pkgs.sweet;
name = "Sweet-Dark";
};
iconTheme = {
package = pkgs.papirus-icon-theme;
name = "Papirus-Dark";
};
};
programs.direnv = {
enable = true;
nix-direnv = {
enable = true;
};
};
programs.firefox =
{
enable = true;
profiles.default = {
id = 0;
name = "Default";
settings = {
"browser.startup.homepage" = "about:blank";
};
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
vimium-c
darkreader
localcdn
ublock-origin
plasma-integration
keepassxc-browser
user-agent-string-switcher
];
};
};
programs.helix.enable = true;
programs.helix.settings = {
theme = "gruvbox_dark_hard";
editor.lsp.display-messages = true;
};
programs.kitty = {
enable = true;
font = {
name = "Ellograph CF";
size = 10;
};
settings = {
foreground = "#d3dae3";
background = "#060604";
cursor = "#d3dae3";
selection_foreground = "#fdbc4b";
selection_background = "#1e2233";
color0 = "#2f343f";
color1 = "#ed244e";
color2 = "#27ae60";
color3 = "#f67400";
color4 = "#2980b9";
color5 = "#c50ed2";
color6 = "#3daee9";
color7 = "#a1a9b1";
color8 = "#1e2233";
color9 = "#da4453";
color10 = "#71f79f";
color11 = "#fdbc4b";
color12 = "#1d99f3";
color13 = "#9b59b6";
color14 = "#5294e2";
color15 = "#656a73";
};
};
programs.git = {
enable = true;
userName = "atagen";
userEmail = "atagen@boss.co";
extraConfig = {
credential.helper = "keepassxc";
};
};
programs.fzf = {
enable = true;
enableZshIntegration = true;
};
programs.zsh = {
enable = true;
enableAutosuggestions = true;
enableCompletion = true;
enableSyntaxHighlighting = true;
enableVteIntegration = true;
autocd = true;
defaultKeymap = "viins";
initExtra = builtins.readFile ./dots/zsh;
plugins = [
{
name = "powerlevel10k";
src = pkgs.zsh-powerlevel10k;
file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme";
}
{
name = "zsh-vi-mode";
src = pkgs.zsh-vi-mode;
file = "share/zsh-vi-mode/zsh-vi-mode.zsh";
}
{
name = "zsh-autopair";
src = pkgs.zsh-autopair;
file = "share/zsh-autopair/zsh-autopair.zsh";
}
{
name = "zsh-completions";
src = pkgs.zsh-completions;
file = "share/zsh-completions/zsh-completions.zsh";
}
{
name = "zsh-command-time";
src = pkgs.zsh-command-time;
file = "share/zsh-completions/zsh-command-time.zsh";
}
{
name = "zsh-autocomplete";
src = pkgs.zsh-autocomplete;
file = "share/zsh-autocomplete/zsh-autocomplete.zsh";
}
{
name = "zsh-fast-syntax-highlighting";
src = pkgs.zsh-fast-syntax-highlighting;
file = "share/zsh-fast-syntax-highlighting/zsh-fast-syntax-highlighting.zsh";
}
{
name = "zsh-nix-shell";
src = pkgs.zsh-nix-shell;
file = "share/zsh-nix-shell/zsh-nix-shell.zsh";
}
{
name = "any-nix-shell";
src = pkgs.any-nix-shell;
file = "share/any-nix-shell/any-nix-shell.zsh";
}
{
name = "nix-zsh-completions";
src = pkgs.nix-zsh-completions;
file = "share/nix-zsh-completions/nix-zsh-completions.zsh";
}
];
};
}

View file

@ -1,21 +0,0 @@
MIT License
Copyright (c) 2020-2021 Mihai Fufezan
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View file

@ -1,74 +0,0 @@
<h1 align="center">fufexan/dotfiles</h1>
# 🗒 About
In-house baked configs for Home-Manager and NixOS. Borrowed bits sprinkled on
top. Using [flakes](https://nixos.wiki/wiki/Flakes) and
[flake-parts](https://github.com/hercules-ci/flake-parts).
See an overview of the flake outputs by running
`nix flake show github:fufexan/dotfiles`.
## 🗃️ Contents
- [modules](modules): NixOS common configs
- [hosts](hosts): host-specific configuration
- [home](home): my [Home Manager](https://github.com/nix-community/home-manager) config
- [lib](lib): helper functions
- [pkgs](pkgs): package definitions
# 📦 Exported packages
Run packages directly with:
```console
nix run github:fufexan/dotfiles#packageName
```
Or install from the `packages` output. For example:
```nix
# flake.nix
{
inputs.fufexan-dotfiles.url = "github:fufexan/dotfiles";
# Override my nixpkgs, binary cache will have less hits
inputs.fufexan-dotfiles.inputs.nixpkgs.follows = "nixpkgs";
}
# configuration.nix
{pkgs, inputs, ...}: {
environment.systemPackages = [
inputs.fufexan-dotfiles.packages."x86_64-linux".packageName
];
}
```
## 💻 Desktop preview
<a href="https://drive.google.com/file/d/1W-bwn3UwbMxReiiNqMmq38noa7Xw0Gj1/preview">
<img src="https://user-images.githubusercontent.com/36706276/216402032-ff32fcad-ca21-49d3-9c29-6ff0d2d8b1d8.png" alt="Desktop Preview">
</a>
*Hint: click to go to a video showcase*
# 💾 Resources
Other configurations from where I learned and copied:
- [colemickens/nixcfg](https://github.com/colemickens/nixcfg)
- [flake-utils-plus](https://github.com/gytis-ivaskevicius/flake-utils-plus)
- [gytis-ivaskevicius/nixfiles](https://github.com/gytis-ivaskevicius/nixfiles)
- [Mic92/dotfiles](https://github.com/Mic92/dotfiles)
- [NobbZ/nixos-config](https://github.com/NobbZ/nixos-config)
- [privatevoid-net/privatevoid-infrastructure](https://github.com/privatevoid-net/privatevoid-infrastructure)
- [RicArch97/nixos-config](https://github.com/RicArch97/nixos-config)
- [viperML/dotfiles](https://github.com/viperML/dotfiles)
# 👥 People
These are the people whom I've taken inspiration from while writing these
configs. There surely are more but I tend to forget. Regardless, I am thankful
to all of them.
DieracDelta - gytis-ivaskevicius - hlissner - keksbg - Kranzes -
matthewcroughan - max-privatevoid - Misterio77 - NobbZ - OPNA2608 -
pnotequalnp - RicArch97 - tadeokondrak - viperML - Xe - yusdacra

View file

@ -1,788 +0,0 @@
{
"nodes": {
"agenix": {
"inputs": {
"darwin": "darwin",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1677969766,
"narHash": "sha256-AIp/ZYZMNLDZR/H7iiAlaGpu4lcXsVt9JQpBlf43HRY=",
"owner": "ryantm",
"repo": "agenix",
"rev": "03b51fe8e459a946c4b88dcfb6446e45efb2c24e",
"type": "github"
},
"original": {
"owner": "ryantm",
"repo": "agenix",
"type": "github"
}
},
"crane": {
"flake": false,
"locked": {
"lastModified": 1670900067,
"narHash": "sha256-VXVa+KBfukhmWizaiGiHRVX/fuk66P8dgSFfkVN4/MY=",
"owner": "ipetkov",
"repo": "crane",
"rev": "59b31b41a589c0a65e4a1f86b0e5eac68081468b",
"type": "github"
},
"original": {
"owner": "ipetkov",
"repo": "crane",
"type": "github"
}
},
"darwin": {
"inputs": {
"nixpkgs": [
"agenix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1673295039,
"narHash": "sha256-AsdYgE8/GPwcelGgrntlijMg4t3hLFJFCRF3tL5WVjA=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "87b9d090ad39b25b2400029c64825fc2a8868943",
"type": "github"
},
"original": {
"owner": "lnl7",
"ref": "master",
"repo": "nix-darwin",
"type": "github"
}
},
"devshell": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1678957337,
"narHash": "sha256-Gw4nVbuKRdTwPngeOZQOzH/IFowmz4LryMPDiJN/ah4=",
"owner": "numtide",
"repo": "devshell",
"rev": "3e0e60ab37cd0bf7ab59888f5c32499d851edb47",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "devshell",
"type": "github"
}
},
"dream2nix": {
"inputs": {
"alejandra": [
"helix",
"nci"
],
"all-cabal-json": [
"helix",
"nci"
],
"crane": "crane",
"devshell": [
"helix",
"nci"
],
"flake-parts": [
"helix",
"nci",
"parts"
],
"flake-utils-pre-commit": [
"helix",
"nci"
],
"ghc-utils": [
"helix",
"nci"
],
"gomod2nix": [
"helix",
"nci"
],
"mach-nix": [
"helix",
"nci"
],
"nix-pypi-fetcher": [
"helix",
"nci"
],
"nixpkgs": [
"helix",
"nci",
"nixpkgs"
],
"poetry2nix": [
"helix",
"nci"
],
"pre-commit-hooks": [
"helix",
"nci"
],
"pruned-racket-catalog": [
"helix",
"nci"
]
},
"locked": {
"lastModified": 1677289985,
"narHash": "sha256-lUp06cTTlWubeBGMZqPl9jODM99LpWMcwxRiscFAUJg=",
"owner": "nix-community",
"repo": "dream2nix",
"rev": "28b973a8d4c30cc1cbb3377ea2023a76bc3fb889",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "dream2nix",
"type": "github"
}
},
"eww": {
"inputs": {
"flake-compat": "flake-compat",
"nixpkgs": [
"nixpkgs"
],
"rust-overlay": [
"rust-overlay"
]
},
"locked": {
"lastModified": 1678303550,
"narHash": "sha256-JlpoMXL+QIO0DUIyAcGRJte2G/jF/rSeO/zze5W7S/s=",
"owner": "elkowar",
"repo": "eww",
"rev": "45154bbf5962cad9c4e6c76f75d57dd8d740d307",
"type": "github"
},
"original": {
"owner": "elkowar",
"repo": "eww",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1650374568,
"narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "b4a34015c698c7793d592d66adbab377907a2be8",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1673956053,
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1678379998,
"narHash": "sha256-TZdfNqftHhDuIFwBcN9MUThx5sQXCTeZk9je5byPKRw=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "c13d60b89adea3dc20704c045ec4d50dd964d447",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-utils": {
"locked": {
"lastModified": 1642700792,
"narHash": "sha256-XqHrk7hFb+zBvRg6Ghl+AZDq03ov6OshJLiSWOoX5es=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "846b2ae0fc4cc943637d3d1def4454213e203cba",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"locked": {
"lastModified": 1659877975,
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"fu": {
"locked": {
"lastModified": 1678901627,
"narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"helix": {
"inputs": {
"nci": "nci",
"nixpkgs": "nixpkgs",
"parts": [
"flake-parts"
],
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1678544833,
"narHash": "sha256-aLs6qjiViaxryP2XMjKPzrJGYfIQsGTbNWfbySfivmY=",
"owner": "SoraTenshi",
"repo": "helix",
"rev": "80782f4f3cd557617d09b0d8f42dbce780552630",
"type": "github"
},
"original": {
"owner": "SoraTenshi",
"ref": "daily-driver",
"repo": "helix",
"type": "github"
}
},
"hm": {
"inputs": {
"nixpkgs": [
"nixpkgs"
],
"utils": "utils"
},
"locked": {
"lastModified": 1679067095,
"narHash": "sha256-G2dJQURL/CCi+8RP6jNJG8VqgtzEMCA+6mNodd3VR6E=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "3239e0b40f242f47bf6c0c37b2fd35ab3e76e370",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"hyprland": {
"inputs": {
"hyprland-protocols": "hyprland-protocols",
"nixpkgs": "nixpkgs_2",
"wlroots": "wlroots",
"xdph": "xdph"
},
"locked": {
"lastModified": 1679166084,
"narHash": "sha256-yr+alTr1eGjEKpMiD06FTTMP6vaoNwYEZT6mW6dQ5rM=",
"owner": "hyprwm",
"repo": "Hyprland",
"rev": "06244555915339967864292dd0b83cd9732516d8",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "Hyprland",
"type": "github"
}
},
"hyprland-contrib": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1679036674,
"narHash": "sha256-2s3Hfq56jL8ePyc3+calPT34FNMK2zksqwPhIxAq20o=",
"owner": "hyprwm",
"repo": "contrib",
"rev": "1af47a008e850c595aeddc83bb3f04fd81935caa",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "contrib",
"type": "github"
}
},
"hyprland-protocols": {
"inputs": {
"nixpkgs": [
"hyprland",
"nixpkgs"
]
},
"locked": {
"lastModified": 1671839510,
"narHash": "sha256-+PY1qqJfmZzzROgcIY4I7AkCwpnC+qBIYk2eFoA9RWc=",
"owner": "hyprwm",
"repo": "hyprland-protocols",
"rev": "b8f55e02a328c47ed373133c52483bbfa20a1b75",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprland-protocols",
"type": "github"
}
},
"kmonad": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"dir": "nix",
"lastModified": 1673185501,
"narHash": "sha256-uEtWPpl9nH7QqochHo1z+giPga1zXR1Ko3dOXHIapFY=",
"owner": "kmonad",
"repo": "kmonad",
"rev": "3413f1be996142c8ef4f36e246776a6df7175979",
"type": "github"
},
"original": {
"dir": "nix",
"owner": "kmonad",
"repo": "kmonad",
"type": "github"
}
},
"lowdown-src": {
"flake": false,
"locked": {
"lastModified": 1633514407,
"narHash": "sha256-Dw32tiMjdK9t3ETl5fzGrutQTzh2rufgZV4A/BbxuD4=",
"owner": "kristapsdz",
"repo": "lowdown",
"rev": "d2c2b44ff6c27b936ec27358a2653caaef8f73b8",
"type": "github"
},
"original": {
"owner": "kristapsdz",
"repo": "lowdown",
"type": "github"
}
},
"mk-naked-shell": {
"flake": false,
"locked": {
"lastModified": 1676572903,
"narHash": "sha256-oQoDHHUTxNVSURfkFcYLuAK+btjs30T4rbEUtCUyKy8=",
"owner": "yusdacra",
"repo": "mk-naked-shell",
"rev": "aeca9f8aa592f5e8f71f407d081cb26fd30c5a57",
"type": "github"
},
"original": {
"owner": "yusdacra",
"repo": "mk-naked-shell",
"type": "github"
}
},
"nci": {
"inputs": {
"dream2nix": "dream2nix",
"mk-naked-shell": "mk-naked-shell",
"nixpkgs": [
"helix",
"nixpkgs"
],
"parts": "parts",
"rust-overlay": [
"helix",
"rust-overlay"
]
},
"locked": {
"lastModified": 1677297103,
"narHash": "sha256-ArlJIbp9NGV9yvhZdV0SOUFfRlI/kHeKoCk30NbSiLc=",
"owner": "yusdacra",
"repo": "nix-cargo-integration",
"rev": "a79272a2cb0942392bb3a5bf9a3ec6bc568795b2",
"type": "github"
},
"original": {
"owner": "yusdacra",
"repo": "nix-cargo-integration",
"type": "github"
}
},
"nix-gaming": {
"inputs": {
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1678324469,
"narHash": "sha256-FWI0+K1zdfzOq8BbgGhRvy+qp2J4KauGL1geAc19PRQ=",
"owner": "fufexan",
"repo": "nix-gaming",
"rev": "18fac9dd032d0bb1d4c660b3257fa00df7f0145d",
"type": "github"
},
"original": {
"owner": "fufexan",
"repo": "nix-gaming",
"type": "github"
}
},
"nix-super": {
"inputs": {
"lowdown-src": "lowdown-src",
"nixpkgs": "nixpkgs_4",
"nixpkgs-regression": "nixpkgs-regression"
},
"locked": {
"lastModified": 1677536397,
"narHash": "sha256-pKp+dmOJc3/9R3dBP30u2zXOyCuF5dVzgFlS1upSwZk=",
"owner": "privatevoid-net",
"repo": "nix-super",
"rev": "8eb40776e51819038fbb8a087d9885842451a333",
"type": "github"
},
"original": {
"owner": "privatevoid-net",
"repo": "nix-super",
"type": "github"
}
},
"nix-xilinx": {
"inputs": {
"flake-compat": "flake-compat_2",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1678957299,
"narHash": "sha256-myDk5QC9Q5FESSJl5N3Nf67w+dwq2KpvcguTwodKGqo=",
"owner": "doronbehar",
"repo": "nix-xilinx",
"rev": "e1533146984dd11bdefd6042c282cd123aca8d71",
"type": "gitlab"
},
"original": {
"owner": "doronbehar",
"repo": "nix-xilinx",
"type": "gitlab"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1677063315,
"narHash": "sha256-qiB4ajTeAOVnVSAwCNEEkoybrAlA+cpeiBxLobHndE8=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "988cc958c57ce4350ec248d2d53087777f9e1949",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-regression": {
"locked": {
"lastModified": 1643052045,
"narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1677676435,
"narHash": "sha256-6FxdcmQr5JeZqsQvfinIMr0XcTyTuR7EXX0H3ANShpQ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "a08d6979dd7c82c4cef0dcc6ac45ab16051c1169",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1677995890,
"narHash": "sha256-eOnCn0o3I6LP48fAi8xWFcn49V2rL7oX5jCtJTeN1LI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "a1240f6b4a0bcc84fc48008b396a140d9f3638f6",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 1670461440,
"narHash": "sha256-jy1LB8HOMKGJEGXgzFRLDU1CBGL0/LlkolgnqIsF0D8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "04a75b2eecc0acf6239acf9dd04485ff8d14f425",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-22.11-small",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_5": {
"locked": {
"lastModified": 1678898370,
"narHash": "sha256-xTICr1j+uat5hk9FyuPOFGxpWHdJRibwZC+ATi0RbtE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ac718d02867a84b42522a0ece52d841188208f2c",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"parts": {
"inputs": {
"nixpkgs-lib": [
"helix",
"nci",
"nixpkgs"
]
},
"locked": {
"lastModified": 1675933616,
"narHash": "sha256-/rczJkJHtx16IFxMmAWu5nNYcSXNg1YYXTHoGjLrLUA=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "47478a4a003e745402acf63be7f9a092d51b83d7",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"root": {
"inputs": {
"agenix": "agenix",
"devshell": "devshell",
"eww": "eww",
"flake-parts": "flake-parts",
"fu": "fu",
"helix": "helix",
"hm": "hm",
"hyprland": "hyprland",
"hyprland-contrib": "hyprland-contrib",
"kmonad": "kmonad",
"nix-gaming": "nix-gaming",
"nix-super": "nix-super",
"nix-xilinx": "nix-xilinx",
"nixpkgs": "nixpkgs_5",
"rust-overlay": "rust-overlay_2",
"spicetify-nix": "spicetify-nix"
}
},
"rust-overlay": {
"inputs": {
"flake-utils": "flake-utils_2",
"nixpkgs": [
"helix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1677292251,
"narHash": "sha256-D+6q5Z2MQn3UFJtqsM5/AvVHi3NXKZTIMZt1JGq/spA=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "34cdbf6ad480ce13a6a526f57d8b9e609f3d65dc",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"rust-overlay_2": {
"inputs": {
"flake-utils": [
"fu"
],
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1679106165,
"narHash": "sha256-03Opt2yu4E/AIFjvlgib0/nhMn6B4B/t/nvwS2bzOGw=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "7313c06ac334d6262ddfe30a38b3abc3da6bd565",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"spicetify-nix": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1675736383,
"narHash": "sha256-fjQmN3pYGstBNHCFdmPzDf1/Dt04v3b7+/w4cQ4gkKo=",
"owner": "the-argus",
"repo": "spicetify-nix",
"rev": "ec85c2a2f5d1035142b8e383cc77b68bb0b9ebc8",
"type": "github"
},
"original": {
"owner": "the-argus",
"repo": "spicetify-nix",
"type": "github"
}
},
"utils": {
"locked": {
"lastModified": 1676283394,
"narHash": "sha256-XX2f9c3iySLCw54rJ/CZs+ZK6IQy7GXNY4nSOyu2QG4=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "3db36a8b464d0c4532ba1c7dda728f4576d6d073",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"wlroots": {
"flake": false,
"locked": {
"host": "gitlab.freedesktop.org",
"lastModified": 1677789111,
"narHash": "sha256-dWrk+Q3bLdtFe5rkyaAKWCQJCeE/KFNllcu1DvBC38c=",
"owner": "wlroots",
"repo": "wlroots",
"rev": "5ae17de23f5fd9bb252a698f3771c840280e2c05",
"type": "gitlab"
},
"original": {
"host": "gitlab.freedesktop.org",
"owner": "wlroots",
"repo": "wlroots",
"type": "gitlab"
}
},
"xdph": {
"inputs": {
"hyprland-protocols": [
"hyprland",
"hyprland-protocols"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
]
},
"locked": {
"lastModified": 1673116118,
"narHash": "sha256-eR0yDSkR2XYMesfdRWJs25kAdXET2mbNNHu5t+KUcKA=",
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"rev": "d479c846531fd0e1d2357c9588b8310a2b859ef2",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

View file

@ -1,111 +0,0 @@
{
description = "fufexan's NixOS and Home-Manager flake";
outputs = inputs:
inputs.flake-parts.lib.mkFlake {inherit inputs;} {
systems = ["x86_64-linux"];
imports = [
./home/profiles
./hosts
./modules
./pkgs
./lib
{config._module.args._inputs = inputs // {inherit (inputs) self;};}
];
perSystem = {
config,
inputs',
pkgs,
system,
...
}: {
imports = [
{
_module.args.pkgs = inputs.self.legacyPackages.${system};
}
];
devShells.default = inputs'.devshell.legacyPackages.mkShell {
packages = [
pkgs.alejandra
pkgs.git
config.packages.repl
];
name = "dots";
};
formatter = pkgs.alejandra;
};
};
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-parts = {
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
agenix = {
url = "github:ryantm/agenix";
inputs.nixpkgs.follows = "nixpkgs";
};
devshell = {
url = "github:numtide/devshell";
inputs.nixpkgs.follows = "nixpkgs";
};
eww = {
url = "github:elkowar/eww";
inputs.nixpkgs.follows = "nixpkgs";
inputs.rust-overlay.follows = "rust-overlay";
};
fu.url = "github:numtide/flake-utils";
helix = {
url = "github:SoraTenshi/helix/daily-driver";
inputs.parts.follows = "flake-parts";
};
hm = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
hyprland.url = "github:hyprwm/Hyprland";
hyprland-contrib = {
url = "github:hyprwm/contrib";
inputs.nixpkgs.follows = "nixpkgs";
};
kmonad = {
url = "github:kmonad/kmonad?dir=nix";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-gaming.url = "github:fufexan/nix-gaming";
nix-super.url = "github:privatevoid-net/nix-super";
nix-xilinx = {
url = "gitlab:doronbehar/nix-xilinx";
inputs.nixpkgs.follows = "nixpkgs";
};
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "fu";
};
spicetify-nix = {
url = "github:the-argus/spicetify-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
}

View file

@ -1,15 +0,0 @@
# Home config
Home-Manager configurations for different hosts.
Name | Description
--------------- | -----------
`default.nix` | Home-Manager specific configuration
`editors` | Helix & Neovim
`programs` | Programs
`shell` | Zsh, Nix options, etc.
`terminals` | Terminal configs
`wayland` | Wayland-specific options, including Sway and Waybar configs
`profiles` is a special dir where `homeConfigurations` are set up. They're
basically the entrypoints of the configs.

View file

@ -1,18 +0,0 @@
{
home = {
username = "mihai";
homeDirectory = "/home/mihai";
stateVersion = "20.09";
extraOutputsToInstall = ["doc" "devdoc"];
};
# disable manuals as nmd fails to build often
manual = {
html.enable = false;
json.enable = false;
manpages.enable = false;
};
# let HM manage itself when in standalone mode
programs.home-manager.enable = true;
}

View file

@ -1,44 +0,0 @@
{
inputs,
pkgs,
...
} @ args: {
home.packages = [pkgs.shellcheck];
programs.helix = {
enable = true;
package = inputs.helix.packages.${pkgs.hostPlatform.system}.default;
languages = import ./languages.nix args;
settings = {
theme = "catppuccin_mocha";
editor = {
true-color = true;
color-modes = true;
cursorline = true;
cursor-shape = {
insert = "bar";
normal = "block";
select = "underline";
};
indent-guides = {
render = true;
rainbow-option = "dim";
};
rainbow-brackets = true;
statusline.center = ["position-percentage"];
whitespace.characters = {
newline = "";
tab = "";
};
};
keys.normal.space.u = {
f = ":format"; # format using LSP formatter
w = ":set whitespace.render all";
W = ":set whitespace.render none";
};
};
};
}

View file

@ -1,47 +0,0 @@
{pkgs, ...}:
with pkgs; [
{
name = "bash";
language-server = {
command = "${nodePackages.bash-language-server}/bin/bash-language-server";
args = ["start"];
};
auto-format = true;
formatter = {
command = "${shfmt}/bin/shfmt";
args = ["-i" "2" "-"];
};
}
{
name = "cpp";
language-server = {
command = "${clang-tools}/bin/clangd";
clangd.fallbackFlags = ["-std=c++2b"];
};
}
{
name = "nix";
language-server = {command = lib.getExe nil;};
config.nil.formatting.command = ["alejandra" "-q"];
}
{
name = "clojure";
scope = "source.clojure";
injection-regex = "(clojure|clj|edn|boot|yuck)";
file-types = ["clj" "cljs" "cljc" "clje" "cljr" "cljx" "edn" "boot" "yuck"];
roots = ["project.clj" "build.boot" "deps.edn" "shadow-cljs.edn"];
comment-token = ";";
language-server = {command = "clojure-lsp";};
indent = {
tab-width = 2;
unit = " ";
};
}
{
name = "css";
language-server = {
command = "${nodePackages.vscode-css-languageserver-bin}/bin/css-languageserver";
args = ["--stdio"];
};
}
]

View file

@ -1,14 +0,0 @@
vim.opt.expandtab = true
vim.opt.hidden = true
vim.opt.incsearch = true
vim.opt.mouse = "a"
vim.opt.number = true
vim.opt.shiftwidth = 2
vim.opt.splitbelow = true
vim.opt.splitright = true
vim.opt.signcolumn = "yes:3"
vim.opt.tabstop = 2
vim.opt.timeoutlen = 0
vim.wo.wrap = false
vim.opt.exrc = true
vim.cmd("syntax on")

View file

@ -1,28 +0,0 @@
local lspc = require'lspconfig'
lspc.nil_ls.setup{}
lspc.clangd.setup{}
local buf_map = function(bufnr, mode, lhs, rhs, opts)
vim.api.nvim_buf_set_keymap(bufnr, mode, lhs, rhs, opts or {
silent = true,
})
end
lspc.tsserver.setup({
on_attach = function(client, bufnr)
client.resolved_capabilities.document_formatting = false
client.resolved_capabilities.document_range_formatting = false
local ts_utils = require("nvim-lsp-ts-utils")
ts_utils.setup({})
ts_utils.setup_client(client)
buf_map(bufnr, "n", "gs", ":TSLspOrganize<CR>")
buf_map(bufnr, "n", "gi", ":TSLspRenameFile<CR>")
buf_map(bufnr, "n", "go", ":TSLspImportAll<CR>")
on_attach(client, bufnr)
end,
})

View file

@ -1,73 +0,0 @@
local has_words_before = function()
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
end
local feedkey = function(key, mode)
vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes(key, true, true, true), mode, true)
end
local cmp = require("cmp")
local lspkind = require("lspkind")
cmp.setup({
sources = {
{ name = "nvim_lsp" },
{ name = "cmp_tabnine" },
{ name = "treesitter" },
{ name = "buffer" },
{ name = "path" },
{ name = "vsnip" },
-- { name = "copilot" },
},
snippet = {
expand = function(args)
vim.fn["vsnip#anonymous"](args.body)
end,
},
formatting = {
format = lspkind.cmp_format({
with_text = true,
menu = {
buffer = "[Buf]",
nvim_lsp = "[LSP]",
nvim_lua = "[Lua]",
latex_symbols = "[Latex]",
treesitter = "[TS]",
cmp_tabnine = "[TN]",
vsnip = "[Snip]",
},
}),
},
mapping = {
["<CR>"] = cmp.mapping.confirm({ select = true }),
["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
elseif vim.fn["vsnip#available"](1) == 1 then
feedkey("<Plug>(vsnip-expand-or-jump)", "")
elseif has_words_before() then
cmp.complete()
else
fallback()
end
end, {
"i",
"s",
}),
["<S-Tab>"] = cmp.mapping(function()
if cmp.visible() then
cmp.select_prev_item()
elseif vim.fn["vsnip#jumpable"](-1) == 1 then
feedkey("<Plug>(vsnip-jump-prev)", "")
end
end, {
"i",
"s",
}),
},
})

View file

@ -1,20 +0,0 @@
-- set colorscheme
vim.cmd 'set termguicolors'
vim.g.catppuccin_flavour = "mocha"
require("catppuccin").setup()
vim.cmd [[colorscheme catppuccin]]
-- enable colorizer
require'colorizer'.setup()
-- set sign
vim.cmd 'sign define DiagnosticSignError text= linehl= texthl=DiagnosticSignError numhl='
vim.cmd 'sign define DiagnosticSignHint text= linehl= texthl=DiagnosticSignHint numhl='
vim.cmd 'sign define DiagnosticSignInfo text= linehl= texthl=DiagnosticSignInfo numhl='
vim.cmd 'sign define DiagnosticSignWarn text= linehl= texthl=DiagnosticSignWarn numhl='
-- set lightline theme to horizon
vim.g.lightline = { colorscheme = "catppuccin" }

View file

@ -1,14 +0,0 @@
require'nvim-treesitter.configs'.setup {
textobjects = {
select = {
enable = true,
keymaps = {
-- You can use the capture groups defined in textobjects.scm
["af"] = "@function.outer",
["if"] = "@function.inner",
["ac"] = "@class.outer",
["ic"] = "@class.inner",
},
},
},
}

View file

@ -1,30 +0,0 @@
require("nvim-treesitter.configs").setup({
highlight = {
enable = true,
disable = {},
},
rainbow = {
enable = true,
extended_mode = true,
},
autotag = {
enable = true,
},
context_commentstring = {
enable = true,
},
incremental_selection = {
enable = true,
keymaps = {
init_selection = "gnn",
node_incremental = "grn",
scope_incremental = "grc",
node_decremental = "grm",
},
},
})
-- breaks highlight
-- vim.cmd([[set foldmethod=expr]])
-- vim.cmd([[set foldlevel=10]])
-- vim.cmd([[set foldexpr=nvim_treesitter#foldexpr()]])

View file

@ -1,29 +0,0 @@
-- telescope
require('telescope').load_extension('fzy_native')
-- null-ls
local nb = require('null-ls').builtins
require('null-ls').setup({
sources = {
nb.formatting.alejandra,
nb.code_actions.statix,
nb.diagnostics.cppcheck,
nb.diagnostics.deadnix,
nb.diagnostics.statix,
nb.diagnostics.eslint,
nb.completion.spell,
},
})
require("gitsigns").setup()
-- autopairs
require('nvim-autopairs').setup{}
-- copy to system clipboard
vim.api.nvim_set_keymap( 'v', '<Leader>y', '"+y', {noremap = true})
vim.api.nvim_set_keymap( 'n', '<Leader>y', ':%+y<CR>', {noremap = true})
-- paste from system clipboard
vim.api.nvim_set_keymap( 'n', '<Leader>p', '"+p', {noremap = true})

View file

@ -1,39 +0,0 @@
vim.g.mapleader = " "
local wk = require("which-key")
wk.setup({})
wk.register({
["<leader>"] = {
b = { "<cmd>Telescope buffers<cr>", "Buffers" },
["/"] = { "<cmd>Telescope live_grep<cr>", "Live Grep" },
f = { "<cmd>Telescope find_files<cr>", "Find File" },
g = {
name = "Git / VCS",
i = { "<cmd>lua require('telescope').extensions.gh.issues()<cr>", "Github Issues" },
p = { "<cmd>lua require('telescope').extensions.gh.pull_request()<cr>", "Github PRs" },
b = { "<cmd>ToggleBlameLine<cr>", "Toggle BlameLine" },
c = { "<cmd>Neogit commit<cr>", "Commit" },
s = { "<cmd>Neogit kind=split<cr>", "Staging" },
},
a = { "<cmd>lua require('telescope.builtin').lsp_code_actions()<cr>", "Code Actions" },
d = { "<cmd>lua require('telescope.builtin').lsp_document_diagnostics()<cr>", "LSP Diagnostics" },
k = { "<cmd>lua vim.lsp.buf.signature_help()<cr>", "Signature Help" },
l = {
name = "LSP",
f = { "<cmd>lua vim.lsp.buf.formatting_sync()<cr>", "Format file"},
q = { "<cmd>lua vim.lsp.diagnostic.set_loclist()<cr>", "Set Loclist" },
e = { "<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<cr>", "Show Line Diagnostics" },
},
p = { "\"+p", "Paste from clipboard" },
P = { "\"+P", "Paste from clipboard before cursor" },
y = { "\"+y", "Yank to clipboard" },
},
g = {
l = { "$", "Line end" },
h = { "0", "Line start" },
s = { "^", "First non-blank in line" },
e = { "G", "Bottom" },
},
})

View file

@ -1,62 +0,0 @@
{pkgs, ...}: {
programs.neovim = {
enable = true;
vimAlias = true;
viAlias = true;
vimdiffAlias = true;
plugins = with pkgs.vimPlugins; [
catppuccin-nvim
cmp-buffer
cmp-nvim-lsp
cmp-path
cmp-spell
cmp-treesitter
cmp-vsnip
friendly-snippets
gitsigns-nvim
lightline-vim
lspkind-nvim
neogit
null-ls-nvim
nvim-autopairs
nvim-cmp
nvim-colorizer-lua
nvim-lspconfig
nvim-tree-lua
nvim-ts-rainbow
(nvim-treesitter.withPlugins (_: pkgs.tree-sitter.allGrammars))
plenary-nvim
telescope-fzy-native-nvim
telescope-nvim
vim-floaterm
vim-sneak
vim-vsnip
which-key-nvim
];
extraPackages = with pkgs; [gcc ripgrep fd];
extraConfig = let
luaRequire = module:
builtins.readFile (builtins.toString
./config
+ "/${module}.lua");
luaConfig = builtins.concatStringsSep "\n" (map luaRequire [
"init"
"lspconfig"
"nvim-cmp"
"theming"
"treesitter"
"treesitter-textobjects"
"utils"
"which-key"
]);
in ''
lua << 
${luaConfig}

'';
};
}

View file

@ -1,44 +0,0 @@
{
inputs,
withSystem,
module_args,
...
}: let
sharedModules = [
../.
../shell
module_args
];
homeImports = {
"mihai@io" =
[
./io
inputs.spicetify-nix.homeManagerModule
inputs.hyprland.homeManagerModules.default
]
++ sharedModules;
server = sharedModules ++ [./server];
};
inherit (inputs.hm.lib) homeManagerConfiguration;
in {
imports = [
{_module.args = {inherit homeImports;};}
];
flake = {
homeConfigurations = withSystem "x86_64-linux" ({pkgs, ...}: {
"mihai@io" = homeManagerConfiguration {
modules = homeImports."mihai@io" ++ module_args;
inherit pkgs;
};
server = homeManagerConfiguration {
modules = homeImports.server ++ module_args;
inherit pkgs;
};
});
homeManagerModules.eww-hyprland = import ./programs/eww;
};
}

View file

@ -1,73 +0,0 @@
{
imports = [
../../editors/helix
../../editors/neovim
../../programs
../../programs/games.nix
../../programs/dunst.nix
../../wayland
../../terminals/alacritty.nix
../../terminals/wezterm.nix
];
services = {
kanshi = {
# use 1.6 scaling: 2560 : 1.6 = 1600, exact division. good for offsets
# restart eww every time because it won't expand/contract automatically
enable = true;
profiles = {
undocked = {
outputs = [
{
criteria = "eDP-1";
position = "0,0";
}
];
};
docked-all = {
outputs = [
{
criteria = "eDP-1";
position = "1366,0";
}
{
criteria = "DP-1";
position = "0,0";
}
{
criteria = "DP-2";
position = "1600,0";
}
];
};
docked1 = {
outputs = [
{
criteria = "eDP-1";
position = "1366,0";
}
{
criteria = "DP-1";
position = "0,0";
}
];
};
docked2 = {
outputs = [
{
criteria = "eDP-1";
position = "1366,0";
}
{
criteria = "DP-2";
position = "0,0";
}
];
};
};
systemdTarget = "graphical-session.target";
};
};
}

View file

@ -1,3 +0,0 @@
{
programs.helix.enable = true;
}

View file

@ -1,13 +0,0 @@
{pkgs, ...}: {
# use Cinny Matrix client
# create systemd service that serves it on localhost:9999
systemd.user.services.cinny = {
Unit.Description = "Cinny Service";
Service = {
Type = "simple";
ExecStart = "${pkgs.darkhttpd}/bin/darkhttpd ${pkgs.cinny} --addr 127.0.0.1 --port 9999";
TimeoutStopSec = 5;
};
Install.WantedBy = ["default.target"];
};
}

View file

@ -1,57 +0,0 @@
{
pkgs,
config,
...
}: {
imports = [
../shell/nix.nix
./cinny.nix
./files
./media.nix
./git.nix
./gtk.nix
./packages.nix
./qt.nix
./spicetify.nix
./xdg.nix
./zathura.nix
];
programs = {
chromium = {
enable = true;
commandLineArgs = ["--enable-features=TouchpadOverscrollHistoryNavigation"];
extensions = [
{id = "cjpalhdlnbpafiamejdnhcphjbkeiagm";}
{id = "bkkmolkhemgaeaeggcmfbghljjjoofoh";}
];
};
firefox = {
enable = true;
profiles.mihai = {};
};
gpg = {
enable = true;
homedir = "${config.xdg.dataHome}/gnupg";
};
password-store = {
enable = true;
package = pkgs.pass.withExtensions (exts: [exts.pass-otp]);
settings.PASSWORD_STORE_DIR = "${config.xdg.dataHome}/password-store";
};
};
services = {
gpg-agent = {
enable = true;
enableSshSupport = true;
pinentryFlavor = "gnome3";
sshKeys = ["73D1C4271E8C508E1E55259660C94BE828B07738"];
};
syncthing.enable = true;
};
}

View file

@ -1,58 +0,0 @@
{
pkgs,
default,
...
}: {
# notification daemon
services.dunst = {
enable = true;
iconTheme = {
name = "Papirus-Dark";
package = pkgs.papirus-icon-theme;
};
settings = {
global = {
alignment = "center";
corner_radius = 16;
follow = "mouse";
font = "Roboto 10";
format = "<b>%s</b>\\n%b";
frame_width = 1;
offset = "5x5";
horizontal_padding = 8;
icon_position = "left";
indicate_hidden = "yes";
markup = "yes";
max_icon_size = 64;
mouse_left_click = "do_action";
mouse_middle_click = "close_all";
mouse_right_click = "close_current";
padding = 8;
plain_text = "no";
separator_color = "auto";
separator_height = 1;
show_indicators = false;
shrink = "no";
word_wrap = "yes";
};
fullscreen_delay_everything = {fullscreen = "delay";};
urgency_critical = {
background = default.xcolors.bg;
foreground = default.xcolors.fg;
frame_color = default.xcolors.red;
};
urgency_low = {
background = default.xcolors.bg;
foreground = default.xcolors.fg;
frame_color = default.xcolors.blue;
};
urgency_normal = {
background = default.xcolors.bg;
foreground = default.xcolors.fg;
frame_color = default.xcolors.green;
};
};
};
}

View file

@ -1,7 +0,0 @@
width=40%
height=30%
show=drun
prompt=Search
allow_images=true
allow_markup=true
insensitive=true

View file

@ -1,25 +0,0 @@
# youtube-dl config file
# use .netrc for logins
-n
# ignore errors (unavailable videos, etc)
-i
# don't overwrite
-w
# make an archive of downloaded videos and only download unlisted items, then list them
# useful for music playlists you update often
--download-archive ~/Music/untagged/ignore.these
# convert all downloads to 192kbps mp3
-x
--audio-format mp3 #opus
--audio-quality 192K
# embed thumbnail into audio
#--embed-thumbnail
# save all music in the following folder and format
-o '~/Music/untagged/%(artist)s - %(title)s.%(ext)s'

View file

@ -1,34 +0,0 @@
{
pkgs,
lib,
config,
...
}:
# manage files in ~
{
imports = [
./nix-index-update-db.nix
./wlogout.nix
./wofi-style.nix
];
home.file.".config" = {
source = ./config;
recursive = true;
};
xdg.configFile = {
"btop/themes/catppuccin_mocha.theme".source = pkgs.fetchurl {
url = "https://raw.githubusercontent.com/catppuccin/btop/main/catppuccin_mocha.theme";
hash = "sha256-MGK5ECB5sXiHdi2A3Y4s/Sx7nSRQ+KLyZjEKElRPKf0=";
};
"xilinx/nix.sh" = {
executable = true;
text = ''
INSTALL_DIR=$HOME/Documents/code/xilinx/tools/Xilinx
VERSION=2022.2
'';
};
};
}

View file

@ -1,35 +0,0 @@
{
pkgs,
lib,
...
}: {
# set up nix-index
systemd.user.timers.nix-index-db-update = {
Timer = {
OnCalendar = "weekly";
Persistent = true;
RandomizedDelaySec = 0;
};
};
systemd.user.services.nix-index-db-update = {
Unit = {
Description = "nix-index database update";
PartOf = ["multi-user.target"];
};
Service = let
script = pkgs.writeShellScript "nix-index-update-db" ''
export filename="index-x86_64-$(uname | tr A-Z a-z)"
mkdir -p ~/.cache/nix-index
cd ~/.cache/nix-index
# -N will only download a new version if there is an update.
wget -N https://github.com/Mic92/nix-index-database/releases/latest/download/$filename
ln -f $filename files
'';
in {
Environment = "PATH=/run/wrappers/bin:${lib.makeBinPath [pkgs.wget pkgs.coreutils]}";
ExecStart = "${script}";
};
Install.WantedBy = ["multi-user.target"];
};
}

View file

@ -1,57 +0,0 @@
{
default,
pkgs,
...
}: let
w = pkgs.wlogout;
in {
xdg.configFile."wlogout/style.css".text = ''
* {
background-image: none;
font-family: "Jost *", Roboto, sans-serif;
}
window {
background-color: rgba(12, 12, 12, 0.9);
}
button {
background: unset;
border-radius: 16px;
border: 1px solid #28283d;
color: ${default.xcolors.text};
margin: 1rem;
background-repeat: no-repeat;
background-position: center;
background-size: 25%;
}
button:focus, button:active, button:hover {
background-color: ${default.xcolors.blue};
color: ${default.xcolors.base};
outline-style: none;
}
#lock {
background-image: image(url("${w}/share/wlogout/icons/lock.png"), url("${w}/local/share/wlogout/icons/lock.png"));
}
#logout {
background-image: image(url("${w}/share/wlogout/icons/logout.png"), url("${w}/local/share/wlogout/icons/logout.png"));
}
#suspend {
background-image: image(url("${w}/share/wlogout/icons/suspend.png"), url("${w}/local/share/wlogout/icons/suspend.png"));
}
#hibernate {
background-image: image(url("${w}/share/wlogout/icons/hibernate.png"), url("${w}/local/share/wlogout/icons/hibernate.png"));
}
#shutdown {
background-image: image(url("${w}/share/wlogout/icons/shutdown.png"), url("${w}/local/share/wlogout/icons/shutdown.png"));
}
#reboot {
background-image: image(url("${w}/share/wlogout/icons/reboot.png"), url("${w}/local/share/wlogout/icons/reboot.png"));
}
'';
}

View file

@ -1,46 +0,0 @@
{default, ...}: {
xdg.configFile."wofi/style.css".text = ''
window { background: unset; }
flowboxchild { outline-width: 0; }
#outer-box {
background: ${default.xcolors.base};
border: 1px solid ${default.xcolors.border};
border-radius: 24px;
box-shadow: 0 2px 3px ${default.xcolors.crust};
margin: 5px 5px 10px;
padding: 5px 5px 10px;
}
#input {
background-color: ${default.xcolors.crust};
border: none;
border-radius: 16px;
color: ${default.xcolors.text};
margin: 5px;
}
#inner-box {
background-color: ${default.xcolors.base};
border: none;
border-radius: 16px;
margin: 5px;
}
#scroll {
border: none;
margin: 0px;
}
#text {
color: ${default.xcolors.text};
margin: 5px;
}
#entry { border-radius: 16px; }
#entry:selected {
background-color: ${default.xcolors.surface0};
}
'';
}

View file

@ -1,12 +0,0 @@
{
pkgs,
inputs,
...
}:
# games
{
home.packages = with pkgs; [
inputs.nix-gaming.packages.${pkgs.hostPlatform.system}.osu-lazer-bin
gamescope
];
}

View file

@ -1,52 +0,0 @@
{
pkgs,
default,
...
}: {
home.packages = [pkgs.gh];
programs.git = {
enable = true;
delta = {
enable = true;
options.map-styles = "bold purple => syntax ${default.xcolors.mauve}, bold cyan => syntax ${default.xcolors.blue}";
};
extraConfig = {
diff.colorMoved = "default";
merge.conflictstyle = "diff3";
};
aliases = {
a = "add";
b = "branch";
c = "commit";
ca = "commit --amend";
cm = "commit -m";
co = "checkout";
d = "diff";
ds = "diff --staged";
p = "push";
pf = "push --force-with-lease";
pl = "pull";
l = "log";
r = "rebase";
s = "status --short";
ss = "status";
forgor = "commit --amend --no-edit";
graph = "log --all --decorate --graph --oneline";
oops = "checkout --";
};
ignores = ["*~" "*.swp" "*result*" ".direnv" "node_modules"];
signing = {
key = "5899325F2F120900";
signByDefault = true;
};
userEmail = "fufexan@protonmail.com";
userName = "Mihai Fufezan";
};
}

View file

@ -1,38 +0,0 @@
{
pkgs,
config,
...
}: {
home.pointerCursor = {
package = pkgs.bibata-cursors;
name = "Bibata-Modern-Classic";
size = 24;
gtk.enable = true;
x11.enable = true;
};
gtk = {
enable = true;
font = {
name = "Roboto";
package = pkgs.roboto;
};
gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
iconTheme = {
name = "Papirus-Dark";
package = pkgs.papirus-icon-theme;
};
theme = {
name = "Catppuccin-Mocha-Compact-Mauve-Dark";
package = pkgs.catppuccin-gtk.override {
accents = ["mauve"];
size = "compact";
variant = "mocha";
};
};
};
}

View file

@ -1,55 +0,0 @@
{
pkgs,
config,
...
}:
# media - control and enjoy audio/video
{
imports = [
./spicetify.nix
];
home.packages = with pkgs; [
# audio control
pavucontrol
playerctl
pulsemixer
# images
imv
spotify-tui
];
programs = {
mpv = {
enable = true;
defaultProfiles = ["gpu-hq"];
scripts = [pkgs.mpvScripts.mpris];
};
obs-studio.enable = true;
};
services = {
playerctld.enable = true;
spotifyd = {
enable = true;
package = pkgs.spotifyd.override {withMpris = true;};
settings.global = {
autoplay = true;
backend = "pulseaudio";
bitrate = 320;
cache_path = "${config.xdg.cacheHome}/spotifyd";
device_type = "computer";
initial_volume = "100";
password_cmd = "tail -1 /run/agenix/spotify";
use_mpris = true;
username_cmd = "head -1 /run/agenix/spotify";
volume_normalisation = false;
};
};
udiskie.enable = true;
};
}

View file

@ -1,33 +0,0 @@
{
pkgs,
inputs,
...
}: {
home.packages = with pkgs; [
# archives
zip
unzip
unrar
# office
libreoffice
# messaging
tdesktop
# school stuff
inputs.nix-xilinx.packages.${pkgs.hostPlatform.system}.vivado
jetbrains.idea-community
# torrents
transmission-remote-gtk
# misc
libnotify
xdg-utils
# productivity
obsidian
xournalpp
];
}

View file

@ -1,18 +0,0 @@
{pkgs, ...}:
# Qt theming with Kvantum
{
home.packages = with pkgs; [
libsForQt5.qtstyleplugin-kvantum
(catppuccin-kvantum.override {
accent = "Mauve";
variant = "Mocha";
})
];
home.sessionVariables = {
QT_STYLE_OVERRIDE = "kvantum";
};
xdg.configFile."Kvantum/kvantum.kvconfig".source = (pkgs.formats.ini {}).generate "kvantum.kvconfig" {
General.Theme = "Catppuccin-Mocha-Mauve";
};
}

View file

@ -1,24 +0,0 @@
{
pkgs,
inputs,
...
}: {
# themable spotify
programs.spicetify = let
spicePkgs = inputs.spicetify-nix.packages.${pkgs.hostPlatform.system}.default;
in {
enable = true;
spotifyPackage = inputs.self.packages.${pkgs.hostPlatform.system}.spotify;
theme = spicePkgs.themes.catppuccin-mocha;
colorScheme = "flamingo";
enabledExtensions = with spicePkgs.extensions; [
fullAppDisplay
hidePodcasts
shuffle
];
};
}

View file

@ -1,47 +0,0 @@
{config, ...}: let
browser = ["firefox.desktop"];
# XDG MIME types
associations = {
"application/x-extension-htm" = browser;
"application/x-extension-html" = browser;
"application/x-extension-shtml" = browser;
"application/x-extension-xht" = browser;
"application/x-extension-xhtml" = browser;
"application/xhtml+xml" = browser;
"text/html" = browser;
"x-scheme-handler/about" = browser;
"x-scheme-handler/chrome" = ["chromium-browser.desktop"];
"x-scheme-handler/ftp" = browser;
"x-scheme-handler/http" = browser;
"x-scheme-handler/https" = browser;
"x-scheme-handler/unknown" = browser;
"audio/*" = ["mpv.desktop"];
"video/*" = ["mpv.dekstop"];
"image/*" = ["imv.desktop"];
"application/json" = browser;
"application/pdf" = ["org.pwmt.zathura.desktop.desktop"];
"x-scheme-handler/discord" = ["discordcanary.desktop"];
"x-scheme-handler/spotify" = ["spotify.desktop"];
"x-scheme-handler/tg" = ["telegramdesktop.desktop"];
};
in {
xdg = {
enable = true;
cacheHome = config.home.homeDirectory + "/.local/cache";
mimeApps = {
enable = true;
defaultApplications = associations;
};
userDirs = {
enable = true;
createDirectories = true;
extraConfig = {
XDG_SCREENSHOTS_DIR = "${config.xdg.userDirs.pictures}/Screenshots";
};
};
};
}

View file

@ -1,27 +0,0 @@
{pkgs, ...}: {
programs.zathura = {
enable = true;
options = {
recolor-lightcolor = "rgba(0,0,0,0)";
default-bg = "rgba(0,0,0,0.7)";
font = "Lexend 12";
selection-notification = true;
selection-clipboard = "clipboard";
adjust-open = "best-fit";
pages-per-row = "1";
scroll-page-aware = "true";
scroll-full-overlap = "0.01";
scroll-step = "100";
zoom-min = "10";
};
extraConfig = "include catppuccin-mocha";
};
xdg.configFile."zathura/catppuccin-mocha".source = pkgs.fetchurl {
url = "https://raw.githubusercontent.com/catppuccin/zathura/main/src/catppuccin-mocha";
hash = "sha256-/HXecio3My2eXTpY7JoYiN9mnXsps4PAThDPs4OCsAk=";
};
}

View file

@ -1,49 +0,0 @@
{pkgs, ...}: {
home.packages = with pkgs; [
# archives
zip
unzip
unrar
# utils
file
du-dust
duf
fd
ripgrep
# file managers
joshuto
ranger
];
programs = {
bat = {
enable = true;
config = {
pager = "less -FR";
theme = "Catppuccin-mocha";
};
themes = {
Catppuccin-mocha = builtins.readFile (pkgs.fetchurl {
url = "https://raw.githubusercontent.com/catppuccin/bat/main/Catppuccin-mocha.tmTheme";
hash = "sha256-qMQNJGZImmjrqzy7IiEkY5IhvPAMZpq0W6skLLsng/w=";
});
};
};
btop.enable = true;
exa.enable = true;
ssh.enable = true;
skim = {
enable = true;
enableZshIntegration = true;
defaultCommand = "rg --files --hidden";
changeDirWidgetOptions = [
"--preview 'exa --icons --git --color always -T -L 3 {} | head -200'"
"--exact"
];
};
};
}

View file

@ -1,28 +0,0 @@
{config, ...}: let
d = config.xdg.dataHome;
c = config.xdg.configHome;
cache = config.xdg.cacheHome;
in {
imports = [
./cli.nix
./nushell
./starship.nix
./transient-services.nix
./zsh.nix
];
# add environment variables
home.sessionVariables = {
# clean up ~
LESSHISTFILE = cache + "/less/history";
LESSKEY = c + "/less/lesskey";
WINEPREFIX = d + "/wine";
XAUTHORITY = "$XDG_RUNTIME_DIR/Xauthority";
# enable scrolling in git diff
DELTA_PAGER = "less -R";
EDITOR = "hx";
MANPAGER = "sh -c 'col -bx | bat -l man -p'";
};
}

View file

@ -1,21 +0,0 @@
{
pkgs,
inputs,
...
}:
# nix tooling
{
home.packages = with pkgs; [
alejandra
deadnix
nix-index
statix
inputs.self.packages.${pkgs.hostPlatform.system}.repl
];
programs.direnv = {
enable = true;
nix-direnv.enable = true;
enableZshIntegration = true;
};
}

View file

@ -1,514 +0,0 @@
# Nushell Config File
module completions {
# Custom completions for external commands (those outside of Nushell)
# Each completions has two parts: the form of the external command, including its flags and parameters
# and a helper command that knows how to complete values for those flags and parameters
#
# This is a simplified version of completions for git branches and git remotes
def "nu-complete git branches" [] {
^git branch | lines | each { |line| $line | str replace '[\*\+] ' '' | str trim }
}
def "nu-complete git remotes" [] {
^git remote | lines | each { |line| $line | str trim }
}
# Download objects and refs from another repository
export extern "git fetch" [
repository?: string@"nu-complete git remotes" # name of the repository to fetch
branch?: string@"nu-complete git branches" # name of the branch to fetch
--all # Fetch all remotes
--append(-a) # Append ref names and object names to .git/FETCH_HEAD
--atomic # Use an atomic transaction to update local refs.
--depth: int # Limit fetching to n commits from the tip
--deepen: int # Limit fetching to n commits from the current shallow boundary
--shallow-since: string # Deepen or shorten the history by date
--shallow-exclude: string # Deepen or shorten the history by branch/tag
--unshallow # Fetch all available history
--update-shallow # Update .git/shallow to accept new refs
--negotiation-tip: string # Specify which commit/glob to report while fetching
--negotiate-only # Do not fetch, only print common ancestors
--dry-run # Show what would be done
--write-fetch-head # Write fetched refs in FETCH_HEAD (default)
--no-write-fetch-head # Do not write FETCH_HEAD
--force(-f) # Always update the local branch
--keep(-k) # Keep dowloaded pack
--multiple # Allow several arguments to be specified
--auto-maintenance # Run 'git maintenance run --auto' at the end (default)
--no-auto-maintenance # Don't run 'git maintenance' at the end
--auto-gc # Run 'git maintenance run --auto' at the end (default)
--no-auto-gc # Don't run 'git maintenance' at the end
--write-commit-graph # Write a commit-graph after fetching
--no-write-commit-graph # Don't write a commit-graph after fetching
--prefetch # Place all refs into the refs/prefetch/ namespace
--prune(-p) # Remove obsolete remote-tracking references
--prune-tags(-P) # Remove any local tags that do not exist on the remote
--no-tags(-n) # Disable automatic tag following
--refmap: string # Use this refspec to map the refs to remote-tracking branches
--tags(-t) # Fetch all tags
--recurse-submodules: string # Fetch new commits of populated submodules (yes/on-demand/no)
--jobs(-j): int # Number of parallel children
--no-recurse-submodules # Disable recursive fetching of submodules
--set-upstream # Add upstream (tracking) reference
--submodule-prefix: string # Prepend to paths printed in informative messages
--upload-pack: string # Non-default path for remote command
--quiet(-q) # Silence internally used git commands
--verbose(-v) # Be verbose
--progress # Report progress on stderr
--server-option(-o): string # Pass options for the server to handle
--show-forced-updates # Check if a branch is force-updated
--no-show-forced-updates # Don't check if a branch is force-updated
-4 # Use IPv4 addresses, ignore IPv6 addresses
-6 # Use IPv6 addresses, ignore IPv4 addresses
--help # Display this help message
]
# Check out git branches and files
export extern "git checkout" [
...targets: string@"nu-complete git branches" # name of the branch or files to checkout
--conflict: string # conflict style (merge or diff3)
--detach(-d) # detach HEAD at named commit
--force(-f) # force checkout (throw away local modifications)
--guess # second guess 'git checkout <no-such-branch>' (default)
--ignore-other-worktrees # do not check if another worktree is holding the given ref
--ignore-skip-worktree-bits # do not limit pathspecs to sparse entries only
--merge(-m) # perform a 3-way merge with the new branch
--orphan: string # new unparented branch
--ours(-2) # checkout our version for unmerged files
--overlay # use overlay mode (default)
--overwrite-ignore # update ignored files (default)
--patch(-p) # select hunks interactively
--pathspec-from-file: string # read pathspec from file
--progress # force progress reporting
--quiet(-q) # suppress progress reporting
--recurse-submodules: string # control recursive updating of submodules
--theirs(-3) # checkout their version for unmerged files
--track(-t) # set upstream info for new branch
-b: string # create and checkout a new branch
-B: string # create/reset and checkout a branch
-l # create reflog for new branch
--help # Display this help message
]
# Push changes
export extern "git push" [
remote?: string@"nu-complete git remotes", # the name of the remote
...refs: string@"nu-complete git branches" # the branch / refspec
--all # push all refs
--atomic # request atomic transaction on remote side
--delete(-d) # delete refs
--dry-run(-n) # dry run
--exec: string # receive pack program
--follow-tags # push missing but relevant tags
--force-with-lease # require old value of ref to be at this value
--force(-f) # force updates
--ipv4(-4) # use IPv4 addresses only
--ipv6(-6) # use IPv6 addresses only
--mirror # mirror all refs
--no-verify # bypass pre-push hook
--porcelain # machine-readable output
--progress # force progress reporting
--prune # prune locally removed refs
--push-option(-o): string # option to transmit
--quiet(-q) # be more quiet
--receive-pack: string # receive pack program
--recurse-submodules: string # control recursive pushing of submodules
--repo: string # repository
--set-upstream(-u) # set upstream for git pull/status
--signed: string # GPG sign the push
--tags # push tags (can't be used with --all or --mirror)
--thin # use thin pack
--verbose(-v) # be more verbose
--help # Display this help message
]
}
# Get just the extern definitions without the custom completion commands
use completions *
# for more information on themes see
# https://www.nushell.sh/book/coloring_and_theming.html
let dark_theme = {
# color for nushell primitives
separator: white
leading_trailing_space_bg: { attr: n } # no fg, no bg, attr none effectively turns this off
header: green_bold
empty: blue
bool: white
int: white
filesize: white
duration: white
date: white
range: white
float: white
string: white
nothing: white
binary: white
cellpath: white
row_index: green_bold
record: white
list: white
block: white
hints: dark_gray
# shapes are used to change the cli syntax highlighting
shape_garbage: { fg: "#FFFFFF" bg: "#FF0000" attr: b}
shape_binary: purple_bold
shape_bool: light_cyan
shape_int: purple_bold
shape_float: purple_bold
shape_range: yellow_bold
shape_internalcall: cyan_bold
shape_external: cyan
shape_externalarg: green_bold
shape_literal: blue
shape_operator: yellow
shape_signature: green_bold
shape_string: green
shape_string_interpolation: cyan_bold
shape_datetime: cyan_bold
shape_list: cyan_bold
shape_table: blue_bold
shape_record: cyan_bold
shape_block: blue_bold
shape_filepath: cyan
shape_globpattern: cyan_bold
shape_variable: purple
shape_flag: blue_bold
shape_custom: green
shape_nothing: light_cyan
}
let light_theme = {
# color for nushell primitives
separator: dark_gray
leading_trailing_space_bg: { attr: n } # no fg, no bg, attr none effectively turns this off
header: green_bold
empty: blue
bool: dark_gray
int: dark_gray
filesize: dark_gray
duration: dark_gray
date: dark_gray
range: dark_gray
float: dark_gray
string: dark_gray
nothing: dark_gray
binary: dark_gray
cellpath: dark_gray
row_index: green_bold
record: white
list: white
block: white
hints: dark_gray
# shapes are used to change the cli syntax highlighting
shape_garbage: { fg: "#FFFFFF" bg: "#FF0000" attr: b}
shape_binary: purple_bold
shape_bool: light_cyan
shape_int: purple_bold
shape_float: purple_bold
shape_range: yellow_bold
shape_internalcall: cyan_bold
shape_external: cyan
shape_externalarg: green_bold
shape_literal: blue
shape_operator: yellow
shape_signature: green_bold
shape_string: green
shape_string_interpolation: cyan_bold
shape_datetime: cyan_bold
shape_list: cyan_bold
shape_table: blue_bold
shape_record: cyan_bold
shape_block: blue_bold
shape_filepath: cyan
shape_globpattern: cyan_bold
shape_variable: purple
shape_flag: blue_bold
shape_custom: green
shape_nothing: light_cyan
}
# External completer example
# let carapace_completer = {|spans|
# carapace $spans.0 nushell $spans | from json
# }
# The default config record. This is where much of your global configuration is setup.
let-env config = {
external_completer: $nothing # check 'carapace_completer' above to as example
filesize_metric: false # true => (KB, MB, GB), false => (KiB, MiB, GiB)
table_mode: rounded # basic, compact, compact_double, light, thin, with_love, rounded, reinforced, heavy, none, other
use_ls_colors: true
rm_always_trash: false
color_config: $dark_theme # if you want a light theme, replace `$dark_theme` to `$light_theme`
use_grid_icons: true
footer_mode: "25" # always, never, number_of_rows, auto
quick_completions: true # set this to false to prevent auto-selecting completions when only one remains
partial_completions: true # set this to false to prevent partial filling of the prompt
completion_algorithm: "prefix" # prefix, fuzzy
float_precision: 2
# buffer_editor: "emacs" # command that will be used to edit the current line buffer with ctrl+o, if unset fallback to $env.EDITOR and $env.VISUAL
use_ansi_coloring: true
filesize_format: "auto" # b, kb, kib, mb, mib, gb, gib, tb, tib, pb, pib, eb, eib, zb, zib, auto
edit_mode: emacs # emacs, vi
max_history_size: 10000 # Session has to be reloaded for this to take effect
sync_history_on_enter: true # Enable to share the history between multiple sessions, else you have to close the session to persist history to file
history_file_format: "plaintext" # "sqlite" or "plaintext"
shell_integration: true # enables terminal markers and a workaround to arrow keys stop working issue
table_index_mode: always # "always" show indexes, "never" show indexes, "auto" = show indexes when a table has "index" column
cd_with_abbreviations: false # set to true to allow you to do things like cd s/o/f and nushell expand it to cd some/other/folder
case_sensitive_completions: false # set to true to enable case-sensitive completions
enable_external_completion: true # set to false to prevent nushell looking into $env.PATH to find more suggestions, `false` recommended for WSL users as this look up my be very slow
max_external_completion_results: 100 # setting it lower can improve completion performance at the cost of omitting some options
# A strategy of managing table view in case of limited space.
table_trim: {
methodology: wrapping, # truncating
# A strategy which will be used by 'wrapping' methodology
wrapping_try_keep_words: true,
# A suffix which will be used with 'truncating' methodology
# truncating_suffix: "..."
}
show_banner: false # true or false to enable or disable the banner
show_clickable_links_in_ls: true # true or false to enable or disable clickable links in the ls listing. your terminal has to support links.
hooks: {
pre_prompt: [{
$nothing # replace with source code to run before the prompt is shown
}]
pre_execution: [{
$nothing # replace with source code to run before the repl input is run
}]
env_change: {
PWD: [{|before, after|
$nothing # replace with source code to run if the PWD environment is different since the last repl input
}]
}
}
menus: [
# Configuration for default nushell menus
# Note the lack of souce parameter
{
name: completion_menu
only_buffer_difference: false
marker: "| "
type: {
layout: columnar
columns: 4
col_width: 20 # Optional value. If missing all the screen width is used to calculate column width
col_padding: 2
}
style: {
text: green
selected_text: green_reverse
description_text: yellow
}
}
{
name: history_menu
only_buffer_difference: true
marker: "? "
type: {
layout: list
page_size: 10
}
style: {
text: green
selected_text: green_reverse
description_text: yellow
}
}
{
name: help_menu
only_buffer_difference: true
marker: "? "
type: {
layout: description
columns: 4
col_width: 20 # Optional value. If missing all the screen width is used to calculate column width
col_padding: 2
selection_rows: 4
description_rows: 10
}
style: {
text: green
selected_text: green_reverse
description_text: yellow
}
}
# Example of extra menus created using a nushell source
# Use the source field to create a list of records that populates
# the menu
{
name: commands_menu
only_buffer_difference: false
marker: "# "
type: {
layout: columnar
columns: 4
col_width: 20
col_padding: 2
}
style: {
text: green
selected_text: green_reverse
description_text: yellow
}
source: { |buffer, position|
$nu.scope.commands
| where command =~ $buffer
| each { |it| {value: $it.command description: $it.usage} }
}
}
{
name: vars_menu
only_buffer_difference: true
marker: "# "
type: {
layout: list
page_size: 10
}
style: {
text: green
selected_text: green_reverse
description_text: yellow
}
source: { |buffer, position|
$nu.scope.vars
| where name =~ $buffer
| sort-by name
| each { |it| {value: $it.name description: $it.type} }
}
}
{
name: commands_with_description
only_buffer_difference: true
marker: "# "
type: {
layout: description
columns: 4
col_width: 20
col_padding: 2
selection_rows: 4
description_rows: 10
}
style: {
text: green
selected_text: green_reverse
description_text: yellow
}
source: { |buffer, position|
$nu.scope.commands
| where command =~ $buffer
| each { |it| {value: $it.command description: $it.usage} }
}
}
]
keybindings: [
{
name: completion_menu
modifier: none
keycode: tab
mode: emacs # Options: emacs vi_normal vi_insert
event: {
until: [
{ send: menu name: completion_menu }
{ send: menunext }
]
}
}
{
name: completion_previous
modifier: shift
keycode: backtab
mode: [emacs, vi_normal, vi_insert] # Note: You can add the same keybinding to all modes by using a list
event: { send: menuprevious }
}
{
name: history_menu
modifier: control
keycode: char_r
mode: emacs
event: { send: menu name: history_menu }
}
{
name: next_page
modifier: control
keycode: char_x
mode: emacs
event: { send: menupagenext }
}
{
name: undo_or_previous_page
modifier: control
keycode: char_z
mode: emacs
event: {
until: [
{ send: menupageprevious }
{ edit: undo }
]
}
}
{
name: yank
modifier: control
keycode: char_y
mode: emacs
event: {
until: [
{edit: pastecutbufferafter}
]
}
}
{
name: unix-line-discard
modifier: control
keycode: char_u
mode: [emacs, vi_normal, vi_insert]
event: {
until: [
{edit: cutfromlinestart}
]
}
}
{
name: kill-line
modifier: control
keycode: char_k
mode: [emacs, vi_normal, vi_insert]
event: {
until: [
{edit: cuttolineend}
]
}
}
# Keybindings used to trigger the user defined menus
{
name: commands_menu
modifier: control
keycode: char_t
mode: [emacs, vi_normal, vi_insert]
event: { send: menu name: commands_menu }
}
{
name: vars_menu
modifier: alt
keycode: char_o
mode: [emacs, vi_normal, vi_insert]
event: { send: menu name: vars_menu }
}
{
name: commands_with_description
modifier: control
keycode: char_s
mode: [emacs, vi_normal, vi_insert]
event: { send: menu name: commands_with_description }
}
]
}
source ~/.cache/starship/init.nu

View file

@ -1,7 +0,0 @@
{
programs.nushell = {
enable = true;
configFile.source = ./config.nu;
envFile.source = ./env.nu;
};
}

View file

@ -1,36 +0,0 @@
# Nushell Environment Config File
# Specifies how environment variables are:
# - converted from a string to a value on Nushell startup (from_string)
# - converted from a value back to a string when running external commands (to_string)
# Note: The conversions happen *after* config.nu is loaded
let-env ENV_CONVERSIONS = {
"PATH": {
from_string: { |s| $s | split row (char esep) | path expand -n }
to_string: { |v| $v | path expand -n | str join (char esep) }
}
"Path": {
from_string: { |s| $s | split row (char esep) | path expand -n }
to_string: { |v| $v | path expand -n | str join (char esep) }
}
}
# Directories to search for scripts when calling source or use
#
# By default, <nushell-config-dir>/scripts is added
let-env NU_LIB_DIRS = [
($nu.config-path | path dirname | path join 'scripts')
]
# Directories to search for plugin binaries when calling register
#
# By default, <nushell-config-dir>/plugins is added
let-env NU_PLUGIN_DIRS = [
($nu.config-path | path dirname | path join 'plugins')
]
# To add entries to PATH (on Windows you might use Path), you can use the following pattern:
# let-env PATH = ($env.PATH | split row (char esep) | prepend '/some/path')
mkdir ~/.cache/starship
starship init nu | sed "s/size -c/size/" | save ~/.cache/starship/init.nu

View file

@ -1,13 +0,0 @@
{config, ...}: {
home.sessionVariables.STARSHIP_CACHE = "${config.xdg.cacheHome}/starship";
programs.starship = {
enable = true;
settings = {
character = {
success_symbol = "[](bold green)";
error_symbol = "[](bold red)";
};
};
};
}

View file

@ -1,30 +0,0 @@
{
pkgs,
config,
lib,
...
}: let
apply-hm-env = pkgs.writeShellScript "apply-hm-env" ''
${lib.optionalString (config.home.sessionPath != []) ''
export PATH=${builtins.concatStringsSep ":" config.home.sessionPath}:$PATH
''}
${builtins.concatStringsSep "\n" (lib.mapAttrsToList (k: v: ''
export ${k}=${toString v}
'')
config.home.sessionVariables)}
${config.home.sessionVariablesExtra}
exec "$@"
'';
# runs processes as systemd transient services
run-as-service = pkgs.writeShellScriptBin "run-as-service" ''
exec ${pkgs.systemd}/bin/systemd-run \
--slice=app-manual.slice \
--property=ExitType=cgroup \
--user \
--wait \
bash -lc "exec ${apply-hm-env} $@"
'';
in {
home.packages = [run-as-service];
}

View file

@ -1,76 +0,0 @@
{
config,
pkgs,
lib,
...
}: {
programs.zsh = {
enable = true;
enableAutosuggestions = true;
autocd = true;
dirHashes = {
dl = "$HOME/Downloads";
docs = "$HOME/Documents";
code = "$HOME/Documents/code";
dots = "$HOME/Documents/code/dotfiles";
pics = "$HOME/Pictures";
vids = "$HOME/Videos";
nixpkgs = "$HOME/Documents/code/git/nixpkgs";
};
dotDir = ".config/zsh";
history = {
expireDuplicatesFirst = true;
path = "${config.xdg.dataHome}/zsh_history";
};
initExtra = ''
# search history based on what's typed in the prompt
autoload -U history-search-end
zle -N history-beginning-search-backward-end history-search-end
zle -N history-beginning-search-forward-end history-search-end
bindkey "^[OA" history-beginning-search-backward-end
bindkey "^[OB" history-beginning-search-forward-end
# case insensitive tab completion
zstyle ':completion:*' completer _complete _ignored _approximate
zstyle ':completion:*' list-colors '\'
zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}'
zstyle ':completion:*' menu select
zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s
zstyle ':completion:*' verbose true
_comp_options+=(globdots)
${lib.optionalString config.services.gpg-agent.enable ''
gnupg_path=$(ls $XDG_RUNTIME_DIR/gnupg)
export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/gnupg/$gnupg_path/S.gpg-agent.ssh"
''}
${lib.optionalString config.programs.kitty.enable ''
if test -n "$KITTY_INSTALLATION_DIR"; then
export KITTY_SHELL_INTEGRATION="enabled"
autoload -Uz -- "$KITTY_INSTALLATION_DIR"/shell-integration/zsh/kitty-integration
kitty-integration
unfunction kitty-integration
fi
''}
# run programs that are not in PATH with comma
command_not_found_handler() {
${pkgs.comma}/bin/comma "$@"
}
'';
shellAliases = {
grep = "grep --color";
ip = "ip --color";
l = "exa -l";
la = "exa -la";
md = "mkdir -p";
us = "systemctl --user";
rs = "sudo systemctl";
};
shellGlobalAliases = {exa = "exa --icons --git";};
};
}

View file

@ -1,52 +0,0 @@
{default, ...}:
# terminals
let
inherit (default.terminal) font size opacity;
inherit (default) xcolors;
in {
programs.alacritty = {
enable = true;
settings = {
window = {
decorations = "none";
dynamic_padding = true;
padding = {
x = 5;
y = 5;
};
startup_mode = "Maximized";
};
scrolling.history = 10000;
font = {
normal.family = font;
bold.family = font;
italic.family = font;
inherit size;
};
draw_bold_text_with_bright_colors = true;
colors = rec {
primary = {
background = xcolors.crust;
foreground = xcolors.fg;
};
normal = {
inherit (xcolors) red green yellow blue;
black = xcolors.mantle;
magenta = xcolors.mauve;
cyan = xcolors.sky;
white = xcolors.text;
};
bright =
normal
// {
black = xcolors.base;
white = xcolors.rosewater;
};
};
window.opacity = opacity;
};
};
}

View file

@ -1,54 +0,0 @@
{default, ...}: let
inherit (default) xcolors;
in {
programs.kitty = {
enable = true;
font = {
inherit (default.terminal) size;
name = default.terminal.font;
};
settings = {
scrollback_lines = 10000;
placement_strategy = "center";
allow_remote_control = "yes";
enable_audio_bell = "no";
visual_bell_duration = "0.1";
visual_bell_color = xcolors.rosewater;
copy_on_select = "clipboard";
selection_foreground = "none";
selection_background = "none";
# colors
background_opacity = toString default.terminal.opacity;
foreground = xcolors.fg;
background = xcolors.crust;
# black
color0 = xcolors.mantle;
color8 = xcolors.base;
# red
color1 = xcolors.red;
color9 = xcolors.red;
# green
color2 = xcolors.green;
color10 = xcolors.green;
# yellow
color3 = xcolors.yellow;
color11 = xcolors.yellow;
# blue
color4 = xcolors.blue;
color12 = xcolors.blue;
# magenta
color5 = xcolors.pink;
color13 = xcolors.pink;
# cyan
color6 = xcolors.sky;
color14 = xcolors.sky;
# white
color7 = xcolors.text;
color15 = xcolors.rosewater;
};
};
}

View file

@ -1,28 +0,0 @@
{default, ...}: {
programs.wezterm = {
enable = true;
extraConfig = ''
local wezterm = require "wezterm"
return {
font = wezterm.font_with_fallback({ "${default.terminal.font}", }, {
weight = "Regular",
}),
font_size = ${toString default.terminal.size},
color_scheme = "Catppuccin Mocha",
window_background_opacity = ${toString default.terminal.opacity},
enable_scroll_bar = false,
enable_tab_bar = false,
scrollback_lines = 10000,
window_padding = {
left = 10,
right = 10,
top = 10,
bottom = 10,
},
check_for_updates = false,
default_cursor_style = "SteadyBar",
}
'';
};
}

View file

@ -1,68 +0,0 @@
{
pkgs,
lib,
inputs,
...
}:
# Wayland config
let
# use OCR and copy to clipboard
ocrScript = let
inherit (pkgs) grim libnotify slurp tesseract5 wl-clipboard;
_ = lib.getExe;
in
pkgs.writeShellScriptBin "wl-ocr" ''
${_ grim} -g "$(${_ slurp})" -t ppm - | ${_ tesseract5} - - | ${wl-clipboard}/bin/wl-copy
${_ libnotify} "$(${wl-clipboard}/bin/wl-paste)"
'';
in {
imports = [
../programs/eww
./hyprland
./sway.nix
./swaybg.nix
./swayidle.nix
./swaylock.nix
];
programs.eww-hyprland = {
enable = true;
package = inputs.eww.packages.${pkgs.hostPlatform.system}.eww-wayland;
};
home.packages = with pkgs; [
# screenshot
grim
slurp
# idle/lock
swaybg
swaylock-effects
# utils
ocrScript
wf-recorder
wl-clipboard
wlogout
wlr-randr
wofi
];
# make stuff work on wayland
home.sessionVariables = {
QT_QPA_PLATFORM = "wayland";
SDL_VIDEODRIVER = "wayland";
XDG_SESSION_TYPE = "wayland";
};
programs.obs-studio.plugins = with pkgs.obs-studio-plugins; [wlrobs];
# fake a tray to let apps start
# https://github.com/nix-community/home-manager/issues/2064
systemd.user.targets.tray = {
Unit = {
Description = "Home Manager System Tray";
Requires = ["graphical-session-pre.target"];
};
};
}

View file

@ -1,248 +0,0 @@
{
config,
pkgs,
default,
...
}: let
inherit (default) colors;
pointer = config.home.pointerCursor;
homeDir = config.home.homeDirectory;
emoji = "${pkgs.wofi-emoji}/bin/wofi-emoji";
launcher = "wofi";
in {
wayland.windowManager.hyprland.extraConfig = ''
$mod = SUPER
env = _JAVA_AWT_WM_NONREPARENTING,1
env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1
# scale apps
env = GDK_SCALE,2
exec-once = xprop -root -f _XWAYLAND_GLOBAL_OUTPUT_SCALE 32c -set _XWAYLAND_GLOBAL_OUTPUT_SCALE 2
# set cursor for HL itself
exec-once = hyprctl setcursor ${pointer.name} ${toString pointer.size}
exec-once = systemctl --user start clight
exec-once = eww open bar
misc {
# disable auto polling for config file changes
disable_autoreload = true
focus_on_activate = true
# disable dragging animation
animate_mouse_windowdragging = false
}
# touchpad gestures
gestures {
workspace_swipe = true
workspace_swipe_forever = true
}
input {
kb_layout = ro
# focus change on cursor move
follow_mouse = 1
accel_profile = flat
touchpad {
scroll_factor = 0.3
}
}
device:MSFT0001:00 04F3:31EB Touchpad {
accel_profile = adaptive
natural_scroll = true
sensitivity = 0.1
}
general {
gaps_in = 5
gaps_out = 5
border_size = 2
col.active_border = rgb(${colors.blue}) rgb(${colors.mauve}) 270deg
col.inactive_border = rgb(${colors.crust}) rgb(${colors.lavender}) 270deg
# group borders
col.group_border_active = rgb(${colors.pink})
col.group_border = rgb(${colors.surface0})
}
decoration {
rounding = 16
blur = true
blur_size = 3
blur_passes = 3
blur_new_optimizations = true
drop_shadow = true
shadow_ignore_window = true
shadow_offset = 0 5
shadow_range = 50
shadow_render_power = 3
col.shadow = rgba(00000099)
}
animations {
enabled = true
animation = border, 1, 2, default
animation = fade, 1, 4, default
animation = windows, 1, 3, default, popin 80%
animation = workspaces, 1, 2, default, slide
}
dwindle {
# keep floating dimentions while tiling
pseudotile = true
preserve_split = true
}
# only allow shadows for floating windows
windowrulev2 = noshadow, floating:0
# telegram media viewer
windowrulev2 = float, title:^(Media viewer)$
# make Firefox PiP window floating and sticky
windowrulev2 = float, title:^(Picture-in-Picture)$
windowrulev2 = pin, title:^(Picture-in-Picture)$
# throw sharing indicators away
windowrulev2 = workspace special silent, title:^(Firefox Sharing Indicator)$
windowrulev2 = workspace special silent, title:^(.*is sharing (your screen|a window)\.)$
# start spotify tiled in ws9
windowrulev2 = tile, class:^(Spotify)$
windowrulev2 = workspace 9 silent, class:^(Spotify)$
# start Discord/WebCord in ws2
windowrulev2 = workspace 2, title:^(.*(Disc|WebC)ord.*)$
# idle inhibit while watching videos
windowrulev2 = idleinhibit focus, class:^(mpv|.+exe)$
windowrulev2 = idleinhibit focus, class:^(firefox)$, title:^(.*YouTube.*)$
windowrulev2 = idleinhibit fullscreen, class:^(firefox)$
windowrulev2 = dimaround, class:^(gcr-prompter)$
# fix xwayland apps
windowrulev2 = rounding 0, xwayland:1, floating:1
windowrulev2 = center, class:^(.*jetbrains.*)$, title:^(Confirm Exit|Open Project|win424|win201|splash)$
windowrulev2 = size 640 400, class:^(.*jetbrains.*)$, title:^(splash)$
layerrule = blur, ^(gtk-layer-shell)$
layerrule = ignorezero, ^(gtk-layer-shell)$
# mouse movements
bindm = $mod, mouse:272, movewindow
bindm = $mod, mouse:273, resizewindow
bindm = $mod ALT, mouse:272, resizewindow
# compositor commands
bind = $mod SHIFT, E, exec, pkill Hyprland
bind = $mod, Q, killactive,
bind = $mod, F, fullscreen,
bind = $mod, G, togglegroup,
bind = $mod SHIFT, N, changegroupactive, f
bind = $mod SHIFT, P, changegroupactive, b
bind = $mod, R, togglesplit,
bind = $mod, T, togglefloating,
bind = $mod, P, pseudo,
bind = $mod ALT, ,resizeactive,
# toggle "monocle" (no_gaps_when_only)
$kw = dwindle:no_gaps_when_only
bind = $mod, M, exec, hyprctl keyword $kw $(($(hyprctl getoption $kw -j | jaq -r '.int') ^ 1))
# utility
# launcher
bindr = $mod, SUPER_L, exec, pkill .${launcher}-wrapped || run-as-service ${launcher}
# terminal
bind = $mod, Return, exec, run-as-service ${default.terminal.name}
# logout menu
bind = $mod, Escape, exec, wlogout -p layer-shell
# lock screen
bind = $mod, L, exec, loginctl lock-session
# emoji picker
bind = $mod, E, exec, ${emoji}
# select area to perform OCR on
bind = $mod, O, exec, run-as-service wl-ocr
# move focus
bind = $mod, left, movefocus, l
bind = $mod, right, movefocus, r
bind = $mod, up, movefocus, u
bind = $mod, down, movefocus, d
# window resize
bind = $mod, S, submap, resize
submap = resize
binde = , right, resizeactive, 10 0
binde = , left, resizeactive, -10 0
binde = , up, resizeactive, 0 -10
binde = , down, resizeactive, 0 10
bind = , escape, submap, reset
submap = reset
# media controls
bindl = , XF86AudioPlay, exec, playerctl play-pause
bindl = , XF86AudioPrev, exec, playerctl previous
bindl = , XF86AudioNext, exec, playerctl next
# volume
bindle = , XF86AudioRaiseVolume, exec, wpctl set-volume -l "1.0" @DEFAULT_AUDIO_SINK@ 6%+
binde = , XF86AudioRaiseVolume, exec, ${homeDir}/.config/eww/scripts/volume osd
bindle = , XF86AudioLowerVolume, exec, wpctl set-volume -l "1.0" @DEFAULT_AUDIO_SINK@ 6%-
binde = , XF86AudioLowerVolume, exec, ${homeDir}/.config/eww/scripts/volume osd
bindl = , XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
bind = , XF86AudioMute, exec, ${homeDir}/.config/eww/scripts/volume osd
bindl = , XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
# backlight
bindle = , XF86MonBrightnessUp, exec, light -A 5
binde = , XF86MonBrightnessUp, exec, ${homeDir}/.config/eww/scripts/brightness osd
bindle = , XF86MonBrightnessDown, exec, light -U 5
binde = , XF86MonBrightnessDown, exec, ${homeDir}/.config/eww/scripts/brightness osd
# screenshot
# stop animations while screenshotting; makes black border go away
$screenshotarea = hyprctl keyword animation "fadeOut,0,0,default"; grimblast --notify copysave area; hyprctl keyword animation "fadeOut,1,4,default"
bind = , Print, exec, $screenshotarea
bind = $mod SHIFT, R, exec, $screenshotarea
bind = CTRL, Print, exec, grimblast --notify --cursor copysave output
bind = $mod SHIFT CTRL, R, exec, grimblast --notify --cursor copysave output
bind = ALT, Print, exec, grimblast --notify --cursor copysave screen
bind = $mod SHIFT ALT, R, exec, grimblast --notify --cursor copysave screen
# workspaces
# binds mod + [shift +] {1..10} to [move to] ws {1..10}
${builtins.concatStringsSep "\n" (builtins.genList (
x: let
ws = let
c = (x + 1) / 10;
in
builtins.toString (x + 1 - (c * 10));
in ''
bind = $mod, ${ws}, workspace, ${toString (x + 1)}
bind = $mod SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}
''
)
10)}
# special workspace
bind = $mod SHIFT, grave, movetoworkspace, special
bind = $mod, grave, togglespecialworkspace, eDP-1
# cycle workspaces
bind = $mod, bracketleft, workspace, m-1
bind = $mod, bracketright, workspace, m+1
# cycle monitors
bind = $mod SHIFT, braceleft, focusmonitor, l
bind = $mod SHIFT, braceright, focusmonitor, r
'';
}

View file

@ -1,20 +0,0 @@
{
inputs,
lib,
pkgs,
...
}: {
imports = [./config.nix];
home.packages = with pkgs; [
jaq
xorg.xprop
inputs.hyprland-contrib.packages.${pkgs.hostPlatform.system}.grimblast
];
# start swayidle as part of hyprland, not sway
systemd.user.services.swayidle.Install.WantedBy = lib.mkForce ["hyprland-session.target"];
# enable hyprland
wayland.windowManager.hyprland.enable = true;
}

View file

@ -1,74 +0,0 @@
{
config,
pkgs,
lib,
inputs,
default,
...
}: {
wayland.windowManager.sway = {
enable = true;
package = inputs.self.packages.${pkgs.hostPlatform.system}.sway-hidpi;
config = {
keybindings = let
m = config.wayland.windowManager.sway.config.modifier;
in
lib.mkOptionDefault {
"${m}+Return" = "exec ${default.terminal.name}";
"${m}+q" = "kill";
"${m}+space" = "exec wofi";
"${m}+t" = "floating toggle";
# screenshots
"Print" = "grim -g \"$(slurp)\" - | wl-copy -t image/png";
"${m}+Shift+r" = "grim -g \"$(slurp)\" - | wl-copy -t image/png";
"Alt+Print" = "grim - | wl-copy -t image/png";
"${m}+Alt+Shift+r" = "grim - | wl-copy -t image/png";
};
keycodebindings = {
"--locked --no-repeat 121" = "exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; # mute
"--locked 122" = "exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 6%-"; # vol-
"--locked 123" = "exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 6%+"; # vol+
"--locked 171" = "exec playerctl next"; # next song
"--locked --no-repeat 172" = "exec playerctl play-pause"; # play/pause
"--locked 173" = "exec playerctl previous"; # prev song
"--locked --no-repeat 198" = "exec wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"; # mic mute
"--locked 232" = "exec light -U 5"; # brightness-
"--locked 233" = "exec light -A 5"; # brightness+
};
menu = "wofi";
terminal = default.terminal.name;
modifier = "Mod4";
bars = [];
gaps = {
smartBorders = "on";
outer = 5;
inner = 5;
};
startup = [{command = "dbus-update-activation-environment --systemd WAYLAND_DISPLAY DISPLAY";}];
input = {
"type:pointer" = {
accel_profile = "flat";
pointer_accel = "0";
};
"type:touchpad" = {
middle_emulation = "enabled";
natural_scroll = "enabled";
tap = "enabled";
};
};
output."*".bg = "~/.config/wallpaper.png fill";
};
extraConfig = ''
exec ${pkgs.xorg.xprop}/bin/xprop -root -f _XWAYLAND_GLOBAL_OUTPUT_SCALE 32c -set _XWAYLAND_GLOBAL_OUTPUT_SCALE 2
'';
wrapperFeatures.gtk = true;
};
}

View file

@ -1,18 +0,0 @@
{
pkgs,
lib,
default,
...
}: {
systemd.user.services.swaybg = {
Unit = {
Description = "Wayland wallpaper daemon";
PartOf = ["graphical-session.target"];
};
Service = {
ExecStart = "${lib.getExe pkgs.swaybg} -i ${default.wallpaper} -m fill";
Restart = "on-failure";
};
Install.WantedBy = ["graphical-session.target"];
};
}

View file

@ -1,34 +0,0 @@
{pkgs, ...}: let
suspendScript = pkgs.writeShellScript "suspend-script" ''
${pkgs.pipewire}/bin/pw-cli i all | ${pkgs.ripgrep}/bin/rg running
# only suspend if audio isn't running
if [ $? == 1 ]; then
${pkgs.systemd}/bin/systemctl suspend
fi
'';
in {
# screen idle
services.swayidle = {
enable = true;
events = [
{
event = "before-sleep";
command = "${pkgs.systemd}/bin/loginctl lock-session";
}
{
event = "lock";
command = "${pkgs.swaylock-effects}/bin/swaylock -fF";
}
];
timeouts = [
{
timeout = 310;
command = "${pkgs.systemd}/bin/loginctl lock-session";
}
{
timeout = 310;
command = suspendScript.outPath;
}
];
};
}

View file

@ -1,31 +0,0 @@
{default, ...}: {
programs.swaylock.settings = let
inherit (default) xcolors;
in {
clock = true;
font = "Jost *";
image = default.wallpaper;
indicator = true;
bs-hl-color = xcolors.red;
key-hl-color = xcolors.text;
separator-color = xcolors.base;
text-color = xcolors.base;
inside-color = xcolors.mauve;
line-color = xcolors.mauve;
ring-color = xcolors.base;
inside-clear-color = xcolors.yellow;
line-clear-color = xcolors.yellow;
ring-clear-color = xcolors.base;
inside-ver-color = xcolors.lavender;
line-ver-color = xcolors.lavender;
ring-ver-color = xcolors.base;
inside-wrong-color = xcolors.red;
line-wrong-color = xcolors.red;
ring-wrong-color = xcolors.base;
};
}

View file

@ -1,340 +0,0 @@
{
pkgs,
default,
...
}: let
inherit (default) xrgbaColors;
in {
home.packages = [pkgs.wayfire];
xdg.configFile."wayfire.ini".text = ''
[alpha]
min_value = 0.100000
modifier = <alt> <super>
[animate]
close_animation = fade
open_animation = zoom
startup_duration = 300
duration = 300
enabled_for = type equals "toplevel" | (type equals "x-or" & focusable equals true))
fade_duration = 400
fade_enabled_for = type equals "overlay"
[autostart]
0_environment = dbus-update-activation-environment --systemd WAYLAND_DISPLAY DISPLAY XAUTHORITY
1_hm = systemctl --user start graphical-session.target
2_eww = eww daemon
autostart_wf_shell = false
background = swaybg -i ~/.config/wallpaper.png
idle = swayidle -w \
timeout 360 'swaylock' \
before-sleep 'swaylock'
panel = eww open bar
[blur]
blur_by_default = type is "toplevel"
bokeh_degrade = 1
bokeh_iterations = 5
bokeh_offset = 5.000000
box_degrade = 1
box_iterations = 2
box_offset = 1.000000
gaussian_degrade = 1
gaussian_iterations = 2
gaussian_offset = 1.000000
kawase_degrade = 3
kawase_iterations = 3
kawase_offset = 1.000000
method = kawase
saturation = 1.000000
#toggle = <super> KEY_B
[command]
binding_launcher = <super> KEY_SPACE
binding_lock = <super> KEY_L
binding_logout = <super> KEY_ESC
binding_mute = KEY_MUTE
binding_mic_mute = KEY_F20
binding_next = KEY_NEXTSONG
binding_pause = KEY_PLAYPAUSE
binding_prev = KEY_PREVIOUSSONG
binding_screenshot = KEY_PRINT | <super> <shift> KEY_R
binding_screenshot_interactive = <ctrl> KEY_PRINT | <super> <shift> <ctrl> KEY_R
binding_terminal = <super> KEY_ENTER
command_launcher = wofi --show=drun -I
command_light_down = light -U 5
command_light_up = light -A 5
command_lock = swaylock
command_logout = wlogout -p layer-shell
command_mute = wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
command_mic_mute = wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
command_next = playerctl next
command_pause = playerctl play-pause
command_prev = playerctl previous
command_screenshot = screenshot area
command_screenshot_interactive = screenshot monitor
command_terminal = ${default.terminal.name}
command_volume_down = pulsemixer --change-volume -6
command_volume_up = pulsemixer --change-volume +6
repeatable_binding_light_down = KEY_BRIGHTNESSDOWN
repeatable_binding_light_up = KEY_BRIGHTNESSUP
repeatable_binding_volume_down = KEY_VOLUMEDOWN
repeatable_binding_volume_up = KEY_VOLUMEUP
[core]
background_color = #${xrgbaColors.base00}
close_top_view = <super> KEY_Q | <alt> KEY_F4
focus_button_with_modifiers = false
focus_buttons = BTN_LEFT | BTN_MIDDLE | BTN_RIGHT
focus_buttons_passthrough = true
plugins = autostart \
blur \
command \
decoration \
expo \
fast-switcher \
idle \
matcher \
move \
oswitch \
place \
resize \
simple-tile \
vswipe \
window-rules \
wrot \
zoom
vheight = 3
vwidth = 3
xwayland = true
[cube]
activate = <alt> <ctrl> BTN_LEFT
background = #${xrgbaColors.base00}
background_mode = simple
cubemap_image =
deform = 0
initial_animation = 350
light = true
rotate_left = <alt> <ctrl> KEY_LEFT
rotate_right = <alt> <ctrl> KEY_RIGHT
skydome_mirror = true
skydome_texture =
speed_spin_horiz = 0.020000
speed_spin_vert = 0.020000
speed_zoom = 0.070000
zoom = 0.100000
[decoration]
active_color = #${xrgbaColors.base00}
border_size = 0
button_order = minimize maximize close
font = Roboto
ignore_views = none
inactive_color = #${xrgbaColors.base04}
title_height = 20
[expo]
background = #${xrgbaColors.base00}
duration = 50
offset = 10
select_workspace_1 = KEY_1
select_workspace_2 = KEY_2
select_workspace_3 = KEY_3
select_workspace_4 = KEY_4
select_workspace_5 = KEY_5
select_workspace_6 = KEY_6
select_workspace_7 = KEY_7
select_workspace_8 = KEY_8
select_workspace_9 = KEY_9
toggle = <super>
[extra-gestures]
close_fingers = 5
move_delay = 500
move_fingers = 3
[fast-switcher]
activate = <alt> KEY_ESC
activate_backward = <alt> <shift> KEY_ESC
[fisheye]
radius = 450.000000
toggle = <ctrl> <super> KEY_F
zoom = 7.000000
[grid]
duration = 300
restore = <super> KEY_DOWN | <super> KEY_KP0
slot_b = <super> KEY_KP2
slot_bl = <super> KEY_KP1
slot_br = <super> KEY_KP3
slot_c = <super> KEY_UP | <super> KEY_KP5
slot_l = <super> KEY_LEFT | <super> KEY_KP4
slot_r = <super> KEY_RIGHT | <super> KEY_KP6
slot_t = <super> KEY_KP8
slot_tl = <super> KEY_KP7
slot_tr = <super> KEY_KP9
type = crossfade
[idle]
cube_max_zoom = 1.500000
cube_rotate_speed = 1.000000
cube_zoom_speed = 1000
disable_on_fullscreen = true
dpms_timeout = 300
screensaver_timeout = -1
toggle = none
[input]
click_method = default
cursor_size = 24
cursor_theme = "Bibata-Modern-Classic"
disable_touchpad_while_mouse = false
disable_touchpad_while_typing = false
gesture_sensitivity = 1.000000
middle_emulation = false
modifier_binding_timeout = 400
mouse_accel_profile = flat
natural_scroll = true
touchpad_scroll_speed = 0.3
xkb_layout = ro
xkb_rules = evdev
[invert]
preserve_hue = false
toggle = <super> KEY_I
[move]
activate = <super> BTN_LEFT
enable_snap = true
enable_snap_off = true
join_views = false
quarter_snap_threshold = 50
snap_off_threshold = 10
snap_threshold = 10
workspace_switch_after = -1
[oswitch]
next_output = <super> KEY_O
next_output_with_win = <shift> <super> KEY_O
[output]
mode = auto
position = auto
scale = 1.000000
transform = normal
[place]
mode = center
[preserve-output]
last_output_focus_timeout = 10000
[resize]
activate = <super> BTN_RIGHT
[scale]
allow_zoom = false
bg_color = #${xrgbaColors.base00}
duration = 750
inactive_alpha = 0.750000
interact = false
middle_click_close = false
spacing = 50
text_color = #${xrgbaColors.base00}
title_font_size = 14
title_overlay = all
title_position = center
toggle = <super> KEY_P
toggle_all =
[switcher]
next_view = <alt> KEY_TAB
prev_view = <alt> <shift> KEY_TAB
speed = 500
view_thumbnail_scale = 1.000000
[vswipe]
background = #${xrgbaColors.base00}
duration = 180
enable_smooth_transition = true
enable_vertical = true
fingers = 3
gap = 32.000000
speed_cap = 0.500000
speed_factor = 500.000000
#threshold = 0.250000
[vswitch]
background = #${xrgbaColors.base00}
binding_down = <ctrl> <super> KEY_DOWN
binding_left = <ctrl> <super> KEY_LEFT
binding_right = <ctrl> <super> KEY_RIGHT
binding_up = <ctrl> <super> KEY_UP
binding_win_down = <ctrl> <shift> <super> KEY_DOWN
binding_win_left = <ctrl> <shift> <super> KEY_LEFT
binding_win_right = <ctrl> <shift> <super> KEY_RIGHT
binding_win_up = <ctrl> <shift> <super> KEY_UP
duration = 300
gap = 20
wraparound = false
[window-rules]
[wm-actions]
minimize = none
toggle_always_on_top = none
toggle_fullscreen = <super> KEY_F
toggle_maximize = none
toggle_showdesktop = none
toggle_sticky = none
[wobbly]
friction = 3.000000
grid_resolution = 6
spring_k = 8.000000
[workarounds]
all_dialogs_modal = true
app_id_mode = stock
dynamic_repaint_delay = false
[wrot]
activate = <ctrl> <super> BTN_RIGHT
activate-3d = <shift> <super> BTN_RIGHT
invert = false
reset = <ctrl> <super> KEY_R
reset-one = <super> KEY_R
reset_radius = 25.000000
sensitivity = 24
[zoom]
modifier = <super>
smoothing_duration = 300
speed = 0.010000
[simple-tile]
button_move = <super> BTN_LEFT
button_resize = <super> BTN_RIGHT
inner_gap_size = 2
keep_fullscreen_on_adjacent = true
key_focus_above = <super> KEY_K
key_focus_below = <super> KEY_J
key_focus_left = <super> KEY_H
key_focus_right = <super> KEY_L
key_toggle = <super> KEY_T
tile_by_default = type is "toplevel"
#wm-actions.toggle_always_on_top
'';
}

View file

@ -1,9 +0,0 @@
# Hosts config
Name | Description
------------ | -----------
`io` | Lenovo laptop, main machine
`kiiro` | Previous main machine, retired and rarely used server now
All the hosts have a shared config in `modules/minimal.nix`.
Host specific configs are stored inside the specific host dir.

View file

@ -1,38 +0,0 @@
{
inputs,
withSystem,
sharedModules,
desktopModules,
homeImports,
...
}: {
flake.nixosConfigurations = withSystem "x86_64-linux" ({system, ...}: {
io = inputs.nixpkgs.lib.nixosSystem {
inherit system;
modules =
[
./io
../modules/greetd.nix
../modules/desktop.nix
../modules/gamemode.nix
../modules/howdy
../modules/linux-enable-ir-emitter.nix
{home-manager.users.mihai.imports = homeImports."mihai@io";}
]
++ sharedModules
++ desktopModules;
};
kiiro = inputs.nixpkgs.lib.nixosSystem {
inherit system;
modules =
[
./kiiro
{home-manager.users.mihai.imports = homeImports.server;}
]
++ sharedModules;
};
});
}

View file

@ -1,162 +0,0 @@
{
config,
pkgs,
inputs,
...
} @ args: {
imports = [./hardware-configuration.nix];
age.secrets.spotify = {
file = "${inputs.self}/secrets/spotify.age";
owner = "mihai";
group = "users";
};
boot = {
initrd = {
systemd.enable = true;
supportedFilesystems = ["ext4"];
};
# load modules on boot
kernelModules = ["acpi_call" "amdgpu" "amd_pstate"];
# use latest kernel
kernelPackages = pkgs.linuxPackages_xanmod_latest;
# Panel Self Refresh
kernelParams = ["amdgpu.dcfeaturemask=0x8" "initcall_blacklist=acpi_cpufreq_init" "amd_pstate=passive" "amd_pstate.shared_mem=1"];
loader = {
# systemd-boot on UEFI
efi.canTouchEfiVariables = true;
systemd-boot.enable = true;
};
plymouth = {
enable = true;
themePackages = [inputs.self.packages.${pkgs.hostPlatform.system}.catppuccin-plymouth];
# theme = "catppuccin-mocha";
# font = "${pkgs.noto-fonts}/share/fonts/truetype/noto/NotoSans-Light.ttf";
};
};
environment.systemPackages = [config.boot.kernelPackages.cpupower];
hardware = {
bluetooth = {
enable = true;
# battery info support
package = pkgs.bluez5-experimental;
settings = {
# make Xbox Series X controller work
General = {
Class = "0x000100";
ControllerMode = "bredr";
FastConnectable = true;
JustWorksRepairing = "always";
Privacy = "device";
Experimental = true;
};
};
};
cpu.amd.updateMicrocode = true;
enableRedistributableFirmware = true;
opentabletdriver.enable = true;
video.hidpi.enable = true;
xpadneo.enable = true;
};
networking = {
hostName = "io";
firewall = {
allowedTCPPorts = [42355];
allowedUDPPorts = [5353];
};
};
programs = {
# enable hyprland and required options
hyprland.enable = true;
# backlight control
light.enable = true;
steam.enable = true;
};
security.tpm2 = {
enable = true;
abrmd.enable = true;
};
services = {
# for SSD/NVME
fstrim.enable = true;
howdy = {
enable = true;
package = inputs.self.packages.${pkgs.system}.howdy;
settings = {
core.no_confirmation = true;
video.device_path = "/dev/video2";
video.dark_threshold = 90;
};
};
linux-enable-ir-emitter.enable = true;
kmonad.keyboards = {
io = {
name = "io";
device = "/dev/input/by-path/platform-i8042-serio-0-event-kbd";
defcfg = {
enable = true;
fallthrough = true;
allowCommands = false;
};
config = builtins.readFile "${inputs.self}/modules/main.kbd";
};
};
# see https://github.com/fufexan/nix-gaming/#pipewire-low-latency
pipewire.lowLatency.enable = true;
printing.enable = true;
# configure mice
ratbagd.enable = true;
# power saving
tlp = {
enable = true;
settings = {
PCIE_ASPM_ON_BAT = "powersupersave";
CPU_SCALING_GOVERNOR_ON_AC = "performance";
CPU_SCALING_GOVERNOR_ON_BAT = "conservative";
NMI_WATCHDOG = 0;
};
};
udev.extraRules = let
inherit (import ./plugged.nix args) plugged unplugged;
in ''
# add my android device to adbusers
SUBSYSTEM=="usb", ATTR{idVendor}=="22d9", MODE="0666", GROUP="adbusers"
# start/stop services on power (un)plug
SUBSYSTEM=="power_supply", ATTR{online}=="1", RUN+="${plugged}"
SUBSYSTEM=="power_supply", ATTR{online}=="0", RUN+="${unplugged}"
'';
# add hyprland to display manager sessions
xserver.displayManager.sessionPackages = [inputs.hyprland.packages.${pkgs.hostPlatform.system}.default];
};
# https://github.com/NixOS/nixpkgs/issues/114222
systemd.user.services.telephony_client.enable = false;
}

View file

@ -1,35 +0,0 @@
# 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,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "usb_storage" "sd_mod"];
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = [];
fileSystems."/" = {
device = "/dev/disk/by-label/nixos";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-label/boot";
fsType = "vfat";
};
swapDevices = [];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
# high-resolution display
hardware.video.hidpi.enable = lib.mkDefault true;
}

View file

@ -1,24 +0,0 @@
{
pkgs,
lib,
inputs,
...
}: let
programs = lib.makeBinPath [inputs.hyprland.packages.${pkgs.hostPlatform.system}.default];
in {
unplugged = pkgs.writeShellScript "unplugged" ''
export PATH=$PATH:${programs}
export HYPRLAND_INSTANCE_SIGNATURE=$(ls -w1 /tmp/hypr | tail -1)
systemctl --user --machine=1000@ stop easyeffects syncthing
hyprctl --batch 'keyword decoration:drop_shadow 0 ; keyword animations:enabled 0'
'';
plugged = pkgs.writeShellScript "plugged" ''
export PATH=$PATH:${programs}
export HYPRLAND_INSTANCE_SIGNATURE=$(ls -w1 /tmp/hypr | tail -1)
systemctl --user --machine=1000@ start easyeffects syncthing
hyprctl --batch 'keyword decoration:drop_shadow 1 ; keyword animations:enabled 1'
'';
}

View file

@ -1,31 +0,0 @@
# biggest homeserver
{lib, ...}: {
imports = [
./hardware-configuration.nix
./services.nix
];
# used by tailscale for exit node
boot.kernel.sysctl = {
"net.ipv4.ip_forward" = 1;
"net.ipv6.conf.all.forwarding" = 1;
};
# bootloader
boot.loader = {
efi.canTouchEfiVariables = true;
systemd-boot.enable = true;
};
hardware = {
cpu.intel.updateMicrocode = true;
enableRedistributableFirmware = true;
};
networking.hostName = "kiiro";
services.btrfs.autoScrub.enable = true;
system.stateVersion = lib.mkForce "21.11";
}

View file

@ -1,30 +0,0 @@
# 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.
{modulesPath, ...}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = ["ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod"];
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-intel"];
boot.extraModulePackages = [];
fileSystems."/" = {
device = "/dev/disk/by-uuid/a2fc0125-f3e6-4984-9eff-9010c154cb7b";
fsType = "btrfs";
options = ["subvol=root"];
};
fileSystems."/persist" = {
device = "/dev/disk/by-uuid/a2fc0125-f3e6-4984-9eff-9010c154cb7b";
fsType = "btrfs";
options = ["subvol=persist"];
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/7B5A-471E";
fsType = "vfat";
};
}

View file

@ -1,67 +0,0 @@
# server services
{
security.acme.defaults = {
email = "fufexan@protonmail.com";
server = "https://acme-staging-v02.api.letsencrypt.org/directory";
};
services.minecraft-server = {
enable = false;
eula = true;
jvmOpts = ''
-Xmx6G -Xms1G -XX:+UseG1GC
-XX:+CMSClassUnloadingEnabled -XX:ParallelGCThreads=2
'';
openFirewall = true;
};
services.nginx = {
enable = false;
recommendedGzipSettings = true;
recommendedOptimisation = true;
recommendedProxySettings = true;
recommendedTlsSettings = true;
sslCiphers = "AES256+EECDH:AES256+EDH:!aNULL";
virtualHosts = {
"jellyfin.fufexan.net" = {
forceSSL = true;
enableACME = true;
locations."= /".return = "302 https://$host/web";
locations."/" = {
proxyPass = "http://127.0.0.1:8096";
extraConfig = "proxy_buffering off";
};
locations."= /web/".proxyPass = "http://127.0.0.1:8096/web/index.html";
locations."/socket" = {
proxyPass = "http://127.0.0.1:8096";
proxyWebsockets = true;
extraConfig = ''
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
'';
};
};
};
};
networking.firewall.allowedTCPPorts = [80 139 443 445 5357 8384 8443];
networking.firewall.allowedUDPPorts = [137 138 3702];
services.syncthing = {
enable = true;
group = "users";
guiAddress = ":8384";
openDefaultPorts = true;
declarative = {};
};
services.transmission = {
openFirewall = true;
settings.rpc-bind-address = "0.0.0.0";
settings.rpc-whitelist-enables = false;
};
}

View file

@ -1,9 +0,0 @@
# Lib
Various functions I use throughout the config:
Name | Description
------------- | -----------
`colors.nix` | Functions for dealing with colors. Used for `default`.
`default.nix` | Module for flake-parts
`repl.nix` | Cool Nix REPL wrapper

View file

@ -1,67 +0,0 @@
lib:
with lib; rec {
# color-related functions
# convert rrggbb hex to #rrggbb
x = c: "#${c}";
# convert rrggbb hex to rgba(r, g, b, a) css
rgba = c: let
r = toString (hexToDec (__substring 0 2 c));
g = toString (hexToDec (__substring 2 2 c));
b = toString (hexToDec (__substring 4 2 c));
res = "rgba(${r}, ${g}, ${b}, .5)";
in
res;
# general stuff
# functions copied from https://gist.github.com/corpix/f761c82c9d6fdbc1b3846b37e1020e11
# convert a hex value to an integer
hexToDec = v: let
hexToInt = {
"0" = 0;
"1" = 1;
"2" = 2;
"3" = 3;
"4" = 4;
"5" = 5;
"6" = 6;
"7" = 7;
"8" = 8;
"9" = 9;
"a" = 10;
"b" = 11;
"c" = 12;
"d" = 13;
"e" = 14;
"f" = 15;
"A" = 10;
"B" = 11;
"C" = 12;
"D" = 13;
"E" = 14;
"F" = 15;
};
chars = stringToCharacters v;
charsLen = length chars;
in
foldl
(a: v: a + v)
0
(imap0
(k: v: hexToInt."${v}" * (pow 16 (charsLen - k - 1)))
chars);
pow = let
pow' = base: exponent: value:
# FIXME: It will silently overflow on values > 2**62 :(
# The value will become negative or zero in this case
if exponent == 0
then 1
else if exponent <= 1
then value
else (pow' base (exponent - 1) (value * base));
in
base: exponent: pow' base exponent base;
}

View file

@ -1,41 +0,0 @@
{inputs, ...}:
# personal lib
let
inherit (inputs.nixpkgs) lib;
colorlib = import ./colors.nix lib;
default = import ./theme {inherit colorlib lib;};
in {
imports = [
{_module.args = {inherit default;};}
];
perSystem = {system, ...}: {
legacyPackages = import inputs.nixpkgs {
inherit system;
config.allowUnfree = true;
config.overlays = [
(
_: prev: {
steam = prev.steam.override {
extraPkgs = pkgs:
with pkgs; [
keyutils
libkrb5
libpng
libpulseaudio
libvorbis
stdenv.cc.cc.lib
xorg.libXcursor
xorg.libXi
xorg.libXinerama
xorg.libXScrnSaver
];
extraProfile = "export GDK_SCALE=2";
};
}
)
];
};
};
}

View file

@ -1,49 +0,0 @@
{
flakePath ? null,
hostnamePath ? "/etc/hostname",
registryPath ? /etc/nix/registry.json,
}: let
inherit (builtins) getFlake head match currentSystem readFile pathExists filter fromJSON;
selfFlake =
if pathExists registryPath
then filter (it: it.from.id == "self") (fromJSON (readFile registryPath)).flakes
else [];
flakePath' =
toString
(
if flakePath != null
then flakePath
else if selfFlake != []
then (head selfFlake).to.path
else "/etc/nixos"
);
flake =
if pathExists flakePath'
then getFlake flakePath'
else {};
hostname =
if pathExists hostnamePath
then head (match "([a-zA-Z0-9\\-]+)\n" (readFile hostnamePath))
else "";
nixpkgsFromInputsPath = flake.inputs.nixpkgs.outPath or "";
nixpkgs =
flake.pkgs.${currentSystem}.nixpkgs
or (
if nixpkgsFromInputsPath != ""
then import nixpkgsFromInputsPath {}
else {}
);
nixpkgsOutput = removeAttrs (nixpkgs // nixpkgs.lib or {}) ["options" "config"];
in
{inherit flake;}
// flake
// builtins
// (flake.nixosConfigurations or {})
// flake.nixosConfigurations.${hostname} or {}
// nixpkgsOutput
// {getFlake = path: getFlake (toString path);}

View file

@ -1,37 +0,0 @@
rec {
rosewater = "f5e0dc";
flamingo = "f2cdcd";
pink = "f5c2e7";
mauve = "cba6f7";
red = "f38ba8";
maroon = "eba0ac";
peach = "fab387";
yellow = "f9e2af";
green = "a6e3a1";
teal = "94e2d5";
sky = "89dceb";
sapphire = "74c7ec";
blue = "89b4fa";
lavender = "b4befe";
text = "cdd6f4";
subtext1 = "bac2de";
subtext0 = "a6adc8";
overlay2 = "9399b2";
overlay1 = "7f849c";
overlay0 = "6c7086";
surface2 = "585b70";
surface1 = "45475a";
surface0 = "313244";
base = "1e1e2e";
mantle = "181825";
crust = "11111b";
fg = text;
bg = base;
bg1 = surface0;
border = "28283d";
shadow = crust;
}

View file

@ -1,25 +0,0 @@
{
colorlib,
lib,
}: rec {
colors = import ./colors.nix;
# #RRGGBB
xcolors = lib.mapAttrs (_: colorlib.x) colors;
# rgba(,,,) colors (css)
rgbaColors = lib.mapAttrs (_: colorlib.rgba) colors;
browser = "firefox";
terminal = {
font = "JetBrainsMono Nerd Font";
name = "wezterm";
opacity = 0.9;
size = 11;
};
wallpaper = builtins.fetchurl rec {
name = "wallpaper-${sha256}.png";
url = "https://images.unsplash.com/photo-1567095716798-1d95d8f4c479?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8";
sha256 = "1x9y9rzqb9mpxc5lmgvc7jxqdyn3j7ryv16vn5lx6qrhpwp24kym";
};
}

View file

@ -1,15 +0,0 @@
# Modules
As of now, there are multiple modules included:
Name | Description
-------------- | -----------
`default.nix` | Flake-parts module
Desktop | Config aimed at desktop usage
Gamemode | Gamemode settings
Gnome | GNOME config
Greetd | Greetd + GTKGreet config
Minimal | Shared configuration
Nix | Nix-related options
Security | Tweaks for a more secure system, borrowed from [hlissner](https://github.com/hlissner/dotfiles/blob/master/modules/security.nix)
Xserver | Xorg config

View file

@ -1,47 +0,0 @@
{
_inputs,
inputs,
default,
...
}: let
module_args = {
_module.args = {
inputs = _inputs;
inherit default;
};
};
in {
imports = [
{
_module.args = {
inherit module_args;
sharedModules = [
{home-manager.useGlobalPkgs = true;}
{disabledModules = ["security/pam.nix"];}
inputs.agenix.nixosModules.default
inputs.hm.nixosModule
./minimal.nix
./pam.nix
module_args
./nix.nix
./security.nix
];
desktopModules = with inputs; [
hyprland.nixosModules.default
kmonad.nixosModules.default
nix-gaming.nixosModules.default
];
};
}
];
flake.nixosModules = {
desktop = import ./desktop.nix;
gamemode = import ./gamemode.nix;
greetd = import ./greetd.nix;
minimal = import ./minimal.nix;
nix = import ./nix.nix;
};
}

View file

@ -1,153 +0,0 @@
{
config,
pkgs,
inputs,
...
}: {
fonts = {
fonts = with pkgs; [
# icon fonts
material-symbols
# normal fonts
jost
lexend
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
roboto
# nerdfonts
(nerdfonts.override {fonts = ["FiraCode" "JetBrainsMono"];})
];
# use fonts specified by user rather than default ones
enableDefaultFonts = false;
# user defined fonts
# the reason there's Noto Color Emoji everywhere is to override DejaVu's
# B&W emojis that would sometimes show instead of some Color emojis
fontconfig.defaultFonts = {
serif = ["Noto Serif" "Noto Color Emoji"];
sansSerif = ["Noto Sans" "Noto Color Emoji"];
monospace = ["JetBrainsMono Nerd Font" "Noto Color Emoji"];
emoji = ["Noto Color Emoji"];
};
};
# use Wayland where possible (electron)
environment.variables.NIXOS_OZONE_WL = "1";
# enable location service
location.provider = "geoclue2";
networking = {
firewall = {
# for Rocket League
allowedTCPPortRanges = [
{
from = 27015;
to = 27030;
}
{
from = 27036;
to = 27037;
}
];
allowedUDPPorts = [4380 27036 34197];
allowedUDPPortRanges = [
{
from = 7000;
to = 9000;
}
{
from = 27000;
to = 27031;
}
];
# Spotify track sync with other devices
allowedTCPPorts = [57621];
};
};
nix = {
# package = inputs.nix-super.packages.${pkgs.hostPlatform.system}.nix;
settings = {
substituters = [
"https://nix-gaming.cachix.org"
"https://hyprland.cachix.org"
"https://cache.privatevoid.net"
];
trusted-public-keys = [
"nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4="
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
"cache.privatevoid.net:SErQ8bvNWANeAvtsOESUwVYr2VJynfuc9JRwlzTTkVg="
];
};
};
# make HM-managed GTK stuff work
programs.dconf.enable = true;
services = {
# use Ambient Light Sensors for auto brightness adjustment
clight = {
enable = true;
settings = {
verbose = true;
dpms.timeouts = [900 300];
dimmer.timeouts = [870 270];
screen.disabled = true;
};
};
# provide location
geoclue2.enable = true;
# keyboard remapping
kmonad = {
enable = true;
package = inputs.kmonad.packages.${pkgs.hostPlatform.system}.default;
keyboards = {
one2mini = {
device = "/dev/input/by-id/usb-Ducky_Ducky_One2_Mini_RGB_DK-V1.17-190813-event-kbd";
defcfg = {
enable = true;
fallthrough = true;
allowCommands = false;
};
config = builtins.readFile "${inputs.self}/modules/main.kbd";
};
};
};
pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
jack.enable = true;
pulse.enable = true;
};
# battery info & stuff
upower.enable = true;
# needed for GNOME services outside of GNOME Desktop
dbus.packages = [pkgs.gcr];
udev.packages = with pkgs; [gnome.gnome-settings-daemon];
};
security = {
# allow wayland lockers to unlock the screen
pam.services.swaylock.text = "auth include login";
# userland niceness
rtkit.enable = true;
};
xdg.portal = {
enable = true;
extraPortals = [pkgs.xdg-desktop-portal-gtk];
};
}

View file

@ -1,34 +0,0 @@
{
config,
pkgs,
lib,
...
}: let
programs = lib.makeBinPath [config.programs.hyprland.package];
startscript = pkgs.writeShellScript "gamemode-start" ''
export PATH=$PATH:${programs}
export HYPRLAND_INSTANCE_SIGNATURE=$(ls -1 /tmp/hypr | tail -1)
hyprctl --batch 'keyword decoration:blur 0 ; keyword animations:enabled 0 ; keyword misc:no_vfr 1'
'';
endscript = pkgs.writeShellScript "gamemode-end" ''
export PATH=$PATH:${programs}
export HYPRLAND_INSTANCE_SIGNATURE=$(ls -1 /tmp/hypr | tail -1)
hyprctl --batch 'keyword decoration:blur 1 ; keyword animations:enabled 1 ; keyword misc:no_vfr 0'
'';
in {
programs.gamemode = {
enable = true;
settings = {
general = {
softrealtime = "auto";
renice = 15;
};
custom = {
start = startscript.outPath;
end = endscript.outPath;
};
};
};
}

View file

@ -1,44 +0,0 @@
{
lib,
pkgs,
...
}:
# GNOME 41 config
{
environment.systemPackages = with pkgs.gnomeExtensions; [
appindicator
gsconnect
ideapad-mode
vitals
pkgs.gnome.gnome-tweaks
];
# we're using pipewire instead
hardware.pulseaudio.enable = lib.mkForce false;
networking = {
# for GSConnect
firewall = {
allowedTCPPortRanges = [
{
from = 1714;
to = 1764;
}
];
allowedUDPPortRanges = [
{
from = 1714;
to = 1764;
}
];
};
};
services.gnome.games.enable = true;
services.power-profiles-daemon.enable = lib.mkForce false;
services.xserver = {
desktopManager.gnome = {
enable = true;
};
};
}

View file

@ -1,63 +0,0 @@
{
lib,
pkgs,
config,
inputs,
default,
...
}:
# greetd display manager
let
greetdSwayConfig = pkgs.writeText "greetd-sway-config" ''
exec "dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP"
input "type:touchpad" {
tap enabled
}
seat seat0 xcursor_theme Bibata-Modern-Classic 24
xwayland disable
bindsym XF86MonBrightnessUp exec light -A 5
bindsym XF86MonBrightnessDown exec light -U 5
bindsym Print exec ${lib.getExe pkgs.grim} /tmp/regreet.png
bindsym Mod4+shift+e exec swaynag \
-t warning \
-m 'What do you want to do?' \
-b 'Poweroff' 'systemctl poweroff' \
-b 'Reboot' 'systemctl reboot'
exec "${lib.getExe config.programs.regreet.package} -l debug; swaymsg exit"
'';
in {
imports = [./regreet.nix];
environment.systemPackages = with pkgs; [
# theme packages
(catppuccin-gtk.override {
accents = ["mauve"];
size = "compact";
variant = "mocha";
})
bibata-cursors
papirus-icon-theme
];
programs.regreet = {
enable = true;
package = inputs.self.packages.${pkgs.hostPlatform.system}.regreet;
settings = {
background = default.wallpaper;
background_fit = "Cover";
GTK = {
cursor_theme_name = "Bibata-Modern-Classic";
font_name = "Jost * 12";
icon_theme_name = "Papirus-Dark";
theme_name = "Catppuccin-Mocha-Compact-Mauve-Dark";
};
};
};
services.greetd.settings.default_session.command = "${inputs.self.packages.${pkgs.hostPlatform.system}.sway-hidpi}/bin/sway --config ${greetdSwayConfig}";
# unlock GPG keyring on login
security.pam.services.greetd.gnupg.enable = true;
}

View file

@ -1,45 +0,0 @@
{
core = {
detection_notice = false;
timeout_notice = true;
no_confirmation = false;
suppress_unknown = false;
abort_if_ssh = true;
abort_if_lid_closed = true;
disabled = false;
use_cnn = false;
workaround = "off";
};
video = {
certainty = 3.5;
timeout = 4;
device_path = "/dev/video2";
warn_no_device = true;
max_height = 320;
frame_width = -1;
frame_height = -1;
dark_threshold = 60;
recording_plugin = "opencv";
device_format = "v4l2";
force_mjpeg = false;
exposure = -1;
rotate = 0;
};
snapshots = {
save_failed = false;
save_successful = false;
};
rubberstamps = {
enabled = false;
stamp_rules = "nod 5s failsafe min_distance=12";
};
debug = {
end_report = false;
verbose_stamps = false;
gtk_stdout = false;
};
}

View file

@ -1,45 +0,0 @@
{
config,
lib,
pkgs,
...
}:
with lib; let
cfg = config.services.howdy;
settingsType = pkgs.formats.ini {};
in {
options = {
services.howdy = {
enable =
mkEnableOption (mdDoc "")
// {
description = mdDoc ''
Howdy and PAM module for face recognition. See
`services.linux-enable-ir-emitter` for enabling the IR emitter support.
'';
};
package = mkPackageOptionMD pkgs "howdy" {};
settings = mkOption {
inherit (settingsType) type;
default = import ./config.nix;
description = mdDoc ''
Howdy configuration file. Refer to
<https://github.com/boltgolt/howdy/blob/beta/howdy/src/config.ini>
for options.
'';
};
};
};
config = mkMerge [
(mkIf cfg.enable {
environment.systemPackages = [cfg.package];
environment.etc."howdy/config.ini".source = settingsType.generate "howdy-config.ini" cfg.settings;
})
{
services.howdy.settings = mapAttrsRecursive (name: mkDefault) (import ./config.nix);
}
];
}

View file

@ -1,64 +0,0 @@
{
config,
lib,
inputs,
pkgs,
...
}:
with lib; let
cfg = config.services.linux-enable-ir-emitter;
in {
options = {
services.linux-enable-ir-emitter = {
enable = mkEnableOption {
description = ''
Linux Enable IR Emitter.
'';
};
package = mkOption {
type = types.package;
default = pkgs.linux-enable-ir-emitter or inputs.self.packages.${pkgs.system}.linux-enable-ir-emitter;
defaultText = "pkgs.linux-enable-ir-emitter";
description = ''
Package to use for the Linux Enable IR Emitter service.
'';
};
device = mkOption {
type = types.lines;
default = "video2";
defaultText = "video2";
description = ''
Emitter device to depend on. Find this with the command
{command}`realpath /dev/v4l/by-path/<generated-driver-name>`.
'';
};
};
};
config = mkIf cfg.enable {
environment.systemPackages = [cfg.package];
systemd.services.linux-enable-ir-emitter = let
targets = [
"multi-user.target"
"suspend.target"
"hybrid-sleep.target"
"hibernate.target"
"suspend-then-hibernate.target"
];
in {
description = "Enable the infrared emitter.";
script = "${lib.getExe cfg.package} run";
wantedBy = targets;
after = targets ++ ["dev-${cfg.device}.device"];
};
systemd.tmpfiles.rules = [
"d /var/lib/linux-enable-ir-emitter 0755 root root - -"
];
environment.etc."linux-enable-ir-emitter".source = "/var/lib/linux-enable-ir-emitter";
};
}

View file

@ -1,49 +0,0 @@
(defsrc
grv 1 2 3 4 5 6 7 8 9 0 - = bspc
tab q w e r t y u i o p [ ] \
caps a s d f g h j k l ; ' ret
lsft z x c v b n m , . / rsft
lctl lmet lalt spc ralt rmet cmp rctl
)
(deflayer colemak
grv 1 2 3 4 5 6 7 8 9 0 - = bspc
tab q w f p b j l u y ; [ ] \
@esc a r s t g m n e i o ' ret
lsft x c d v z k h , . / rsft
@lay lmet lalt @spc ralt rmet cmp rctl
)
(deflayer qwerty
grv 1 2 3 4 5 6 7 8 9 0 - = bspc
tab q w e r t y u i o p [ ] \
@cps a s d f g h j k l ; ' ret
lsft z x c v b n m , . / rsft
lctl lmet lalt spc ralt rmet cmp rctl
)
(deflayer layouts
_ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _
caps _ _ _ @cmk _ _ @qwe _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _
)
(deflayer symbols
_ f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 del
_ _ _ _ _ _ ins _ up _ pgup home prnt _
_ _ _ _ _ _ _ left down rght pgdn end _
_ _ _ _ _ _ _ mute vold volu _ _
pp _ prev _ next _ _ _
)
(defalias
lay (layer-toggle layouts)
cmk (layer-switch colemak)
qwe (layer-switch qwerty)
sym (layer-toggle symbols)
esc (tap-next-release esc lctl)
spc (tap-next-release spc @sym)
cps (tap-next-release caps @lay)
)

View file

@ -1,97 +0,0 @@
{
pkgs,
config,
lib,
inputs,
...
}:
# configuration shared by all hosts
{
# enable zsh autocompletion for system packages (systemd, etc)
environment.pathsToLink = ["/share/zsh"];
i18n = {
defaultLocale = "en_US.UTF-8";
# saves space
supportedLocales = ["en_US.UTF-8/UTF-8" "ja_JP.UTF-8/UTF-8" "ro_RO.UTF-8/UTF-8"];
};
# graphics drivers / HW accel
hardware.opengl.enable = true;
networking = {
# required to connect to Tailscale exit nodes
firewall.checkReversePath = "loose";
networkmanager = {
enable = true;
dns = "systemd-resolved";
wifi.powersave = true;
};
};
# pickup pkgs from flake export
nixpkgs.pkgs = inputs.self.legacyPackages.${config.nixpkgs.system};
# enable programs
programs = {
less.enable = true;
zsh = {
enable = true;
autosuggestions.enable = true;
syntaxHighlighting = {
enable = true;
patterns = {"rm -rf *" = "fg=white,bg=red";};
styles = {"alias" = "fg=magenta";};
highlighters = ["main" "brackets" "pattern"];
};
};
};
# don't ask for password for wheel group
security.sudo.wheelNeedsPassword = false;
services = {
# network discovery, mDNS
avahi = {
enable = true;
nssmdns = true;
publish.enable = true;
publish.domain = true;
publish.userServices = true;
};
openssh = {
enable = true;
settings.UseDns = true;
};
# DNS resolver
resolved.enable = true;
# inter-machine VPN
tailscale.enable = true;
};
# don't touch this
system.stateVersion = lib.mkDefault "20.09";
# Don't wait for network startup
# https://old.reddit.com/r/NixOS/comments/vdz86j/how_to_remove_boot_dependency_on_network_for_a
systemd = {
targets.network-online.wantedBy = pkgs.lib.mkForce []; # Normally ["multi-user.target"]
services.NetworkManager-wait-online.wantedBy = pkgs.lib.mkForce []; # Normally ["network-online.target"]
};
time.timeZone = lib.mkDefault "Europe/Bucharest";
users.users.mihai = {
isNormalUser = true;
shell = pkgs.zsh;
extraGroups = ["adbusers" "input" "libvirtd" "networkmanager" "plugdev" "transmission" "video" "wheel"];
};
# compresses half the ram for use as swap
zramSwap.enable = true;
}

View file

@ -1,71 +0,0 @@
{
config,
pkgs,
inputs,
lib,
...
}: {
# we need git for flakes
environment.systemPackages = [pkgs.git];
nix = {
# extra builders to offload work onto
# don't set a machine as a builder to itself (throws warnings)
buildMachines = lib.filter (x: x.hostName != config.networking.hostName) [
{
system = "aarch64-linux";
sshUser = "root";
sshKey = "/etc/ssh/ssh_host_ed25519_key";
maxJobs = 4;
hostName = "arm-server";
supportedFeatures = ["nixos-test" "benchmark" "kvm" "big-parallel"];
}
{
system = "x86_64-linux";
sshUser = "root";
sshKey = "/root/.ssh/id_ed25519";
maxJobs = 8;
hostName = "io";
supportedFeatures = ["nixos-test" "benchmark" "kvm" "big-parallel"];
}
];
distributedBuilds = true;
# auto garbage collect
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d";
};
# pin the registry to avoid downloading and evaling a new nixpkgs version every time
registry = lib.mapAttrs (_: v: {flake = v;}) inputs;
# set the path for channels compat
nixPath = lib.mapAttrsToList (key: _: "${key}=flake:${key}") config.nix.registry;
settings = {
auto-optimise-store = true;
builders-use-substitutes = true;
experimental-features = ["nix-command" "flakes"];
flake-registry = "/etc/nix/registry.json";
# for direnv GC roots
keep-derivations = true;
keep-outputs = true;
substituters = [
"https://nix-community.cachix.org"
"https://helix.cachix.org"
"https://fufexan.cachix.org"
];
trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"helix.cachix.org-1:ejp9KQpR1FBI2onstMQ34yogDm4OgU2ru6lIwPvuCVs="
"fufexan.cachix.org-1:LwCDjCJNJQf5XD2BV+yamQIMZfcKWR9ISIFy5curUsY="
];
trusted-users = ["root" "@wheel"];
};
};
}

File diff suppressed because it is too large Load diff

View file

@ -1,73 +0,0 @@
{
lib,
pkgs,
config,
...
}: let
cfg = config.programs.regreet;
settingsFormat = pkgs.formats.toml {};
in {
options.programs.regreet = {
enable =
lib.mkEnableOption null
// {
description = lib.mdDoc ''
Enable ReGreet, a clean and customizable greeter for greetd.
To use ReGreet, {option}`services.greetd` has to be enabled and
{option}`services.greetd.settings.default_session` should contain the
appropriate configuration to launch
{option}`config.programs.regreet.package`. For examples, see the
[ReGreet Readme](https://github.com/rharish101/ReGreet#set-as-default-session).
'';
};
package = lib.mkPackageOptionMD pkgs ["greetd" "regreet"] {};
settings = lib.mkOption {
type = lib.types.either lib.types.path settingsFormat.type;
default = {};
description = lib.mdDoc ''
ReGreet configuration file. Refer
<https://github.com/rharish101/ReGreet/blob/main/regreet.sample.toml>
for options.
'';
};
extraCss = lib.mkOption {
type = lib.types.either lib.types.path lib.types.lines;
default = "";
description = lib.mdDoc ''
Extra CSS rules to apply on top of the GTK theme. Refer to
[GTK CSS Properties](https://docs.gtk.org/gtk4/css-properties.html) for
modifiable properties.
'';
};
};
config = lib.mkIf cfg.enable {
services.greetd = {
enable = lib.mkDefault true;
settings.default_session.command = lib.mkDefault "${lib.getExe pkgs.cage} -s -- ${lib.getExe cfg.package}";
};
environment.etc = {
"greetd/regreet.css" =
if lib.isPath cfg.extraCss
then {source = cfg.extraCss;}
else {text = cfg.extraCss;};
"greetd/regreet.toml".source =
if lib.isPath cfg.settings
then cfg.settings
else settingsFormat.generate "regreet.toml" cfg.settings;
};
systemd.tmpfiles.rules = let
user = config.services.greetd.settings.default_session.user;
in [
"d /var/log/regreet 0755 greeter ${user} - -"
"d /var/cache/regreet 0755 greeter ${user} - -"
];
};
}

View file

@ -1,50 +0,0 @@
# security tweaks borrowed from @hlissner
{
boot.kernel.sysctl = {
# The Magic SysRq key is a key combo that allows users connected to the
# system console of a Linux kernel to perform some low-level commands.
# Disable it, since we don't need it, and is a potential security concern.
"kernel.sysrq" = 0;
## TCP hardening
# Prevent bogus ICMP errors from filling up logs.
"net.ipv4.icmp_ignore_bogus_error_responses" = 1;
# Reverse path filtering causes the kernel to do source validation of
# packets received from all interfaces. This can mitigate IP spoofing.
"net.ipv4.conf.default.rp_filter" = 1;
"net.ipv4.conf.all.rp_filter" = 1;
# Do not accept IP source route packets (we're not a router)
"net.ipv4.conf.all.accept_source_route" = 0;
"net.ipv6.conf.all.accept_source_route" = 0;
# Don't send ICMP redirects (again, we're on a router)
"net.ipv4.conf.all.send_redirects" = 0;
"net.ipv4.conf.default.send_redirects" = 0;
# Refuse ICMP redirects (MITM mitigations)
"net.ipv4.conf.all.accept_redirects" = 0;
"net.ipv4.conf.default.accept_redirects" = 0;
"net.ipv4.conf.all.secure_redirects" = 0;
"net.ipv4.conf.default.secure_redirects" = 0;
"net.ipv6.conf.all.accept_redirects" = 0;
"net.ipv6.conf.default.accept_redirects" = 0;
# Protects against SYN flood attacks
"net.ipv4.tcp_syncookies" = 1;
# Incomplete protection again TIME-WAIT assassination
"net.ipv4.tcp_rfc1337" = 1;
## TCP optimization
# TCP Fast Open is a TCP extension that reduces network latency by packing
# data in the senders initial TCP SYN. Setting 3 = enable TCP Fast Open for
# both incoming and outgoing connections:
"net.ipv4.tcp_fastopen" = 3;
# Bufferbloat mitigations + slight improvement in throughput & latency
"net.ipv4.tcp_congestion_control" = "bbr";
"net.core.default_qdisc" = "cake";
};
boot.kernelModules = ["tcp_bbr"];
# So we don't have to do this later...
security.acme = {
acceptTerms = true;
defaults.email = "fufexan@proton.me";
};
}

View file

@ -1,16 +0,0 @@
{
services.xserver = {
enable = true;
displayManager.gdm.enable = true;
libinput = {
enable = true;
# disable mouse acceleration
mouse.accelProfile = "flat";
mouse.accelSpeed = "0";
mouse.middleEmulation = false;
# touchpad settings
touchpad.naturalScrolling = true;
};
};
}

View file

@ -1,17 +0,0 @@
# Packages & Overlays
Here are all of the packages I couldn't find anywhere and packaged by myself,
or overrides that I use throughout the configuration.
Name | Description
---- | -----------
DiscordCanary | DiscordCanary + OpenASAR
[GDB-Frontend](https://github.com/rohanrhu/gdb-frontend) | Easy, flexible and extensible GUI debugger
iso | My system config built as an ISO
`patches` | Various patches used in my system
Repl | Cool Nix Repl that auto-loads the system flake or the current dir flake
[SpotifyWM](https://github.com/dasJ/spotifywm) | Spotify preloader that sets WM_NAME on start
Spotify Wrapped WM | Spotify wrapped with SpotifyWM
[Sway-hidpi](https://github.com/swaywm/sway) | Sway with XWayland HiDPI patches
[Technic](https://www.technicpack.net) | Technic Launcher derivation
[Waveform](https://www.tracktion.com/welcome/waveform-free) | DAW from Tracktion that works on Linux

View file

@ -1,36 +0,0 @@
{
lib,
stdenvNoCC,
fetchFromGitHub,
}:
stdenvNoCC.mkDerivation {
pname = "catppuccin-plymouth";
version = "unstable-2022-12-10";
src = fetchFromGitHub {
owner = "catppuccin";
repo = "plymouth";
rev = "d4105cf336599653783c34c4a2d6ca8c93f9281c";
hash = "sha256-quBSH8hx3gD7y1JNWAKQdTk3CmO4t1kVo4cOGbeWlNE=";
};
dontConfigure = true;
dontBuild = true;
installPhase = ''
runHook preInstall
mkdir -p $out/share/plymouth
cp -r themes $out/share/plymouth/
runHook postInstall
'';
meta = {
description = "Soothing pastel theme for Plymouth";
homepage = "https://github.com/catppuccin/plymouth";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [fufexan];
platforms = lib.platforms.linux;
};
}

View file

@ -1,13 +0,0 @@
{
_inputs,
self,
...
}: {
systems = ["x86_64-linux"];
flake.overlays.default = import ./overlays.nix _inputs;
perSystem = {pkgs, ...}: {
packages = self.overlays.default null pkgs;
};
}

View file

@ -1,59 +0,0 @@
{
lib,
pkgs,
inputs,
...
}:
with pkgs; let
binaryName = "DiscordCanary";
disableBreakingUpdates =
runCommand "disable-breaking-updates.py"
{
pythonInterpreter = "${python3.interpreter}";
configDirName = lib.toLower binaryName;
} ''
mkdir -p $out/bin
cp "${inputs.nixpkgs}/pkgs/applications/networking/instant-messengers/discord/disable-breaking-updates.py" $out/bin/disable-breaking-updates.py
substituteAllInPlace $out/bin/disable-breaking-updates.py
chmod +x $out/bin/disable-breaking-updates.py
'';
in
(discord-canary.override {
nss = pkgs.nss_latest;
withOpenASAR = true;
})
.overrideAttrs (old: rec {
libPath = old.libPath + ":${libglvnd}/lib";
installPhase = ''
runHook preInstall
mkdir -p $out/{bin,opt/${binaryName},share/pixmaps,share/icons/hicolor/256x256/apps}
mv * $out/opt/${binaryName}
chmod +x $out/opt/${binaryName}/${binaryName}
patchelf --set-interpreter ${stdenv.cc.bintools.dynamicLinker} \
$out/opt/${binaryName}/${binaryName}
wrapProgramShell $out/opt/${binaryName}/${binaryName} \
"''${gappsWrapperArgs[@]}" \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform=wayland --enable-features=WaylandWindowDecorations}}" \
--prefix XDG_DATA_DIRS : "${gtk3}/share/gsettings-schemas/${gtk3.name}/" \
--prefix LD_LIBRARY_PATH : ${libPath}:$out/opt/${binaryName} \
--run "${lib.getExe disableBreakingUpdates}"
ln -s $out/opt/${binaryName}/${binaryName} $out/bin/
# Without || true the install would fail on case-insensitive filesystems
ln -s $out/opt/${binaryName}/${binaryName} $out/bin/${
lib.strings.toLower binaryName
} || true
ln -s $out/opt/${binaryName}/discord.png $out/share/pixmaps/${old.pname}.png
ln -s $out/opt/${binaryName}/discord.png $out/share/icons/hicolor/256x256/apps/${old.pname}.png
ln -s "${old.desktopItem}/share/applications" $out/share/
runHook postInstall
'';
})

View file

@ -1,54 +0,0 @@
{
lib,
bash,
stdenv,
fetchFromGitHub,
python3,
gdb,
tmux,
}:
stdenv.mkDerivation rec {
pname = "gdb-frontend";
version = "0.10.3-beta";
src = fetchFromGitHub {
repo = pname;
owner = "rohanrhu";
rev = "v${version}";
sha256 = "sha256-+l1SguRKnLDqT4rgXcod9xhiCOJZEKdZlOZfTNzP7fk=";
};
buildInputs = [gdb python3 tmux];
propagatedUserEnvPkgs = [gdb python3 tmux];
dontConfigure = true;
dontBuild = true;
installPhase = ''
mkdir -p $out/bin
cp -r . $out
echo "${python3}/bin/python $out/run.py \"\$@\"" > $out/bin/gdbfrontend
chmod +x $out/bin/gdbfrontend
'';
postPatch = ''
substituteInPlace "run.py" \
--replace "/bin/bash" "${bash}/bin/bash"
substituteInPlace "gdbfrontend-window" \
--replace "/bin/bash" "${bash}/bin/bash"
substituteInPlace "build_gdb.sh" \
--replace "/bin/bash\n" "${bash}/bin/bash\n"
substituteInPlace "url_modules/api/shell.py" \
--replace "/bin/bash" "${bash}/bin/bash"
substituteInPlace "commands/gdbfrontend" \
--replace "/bin/bash" "${bash}/bin/bash"
'';
meta = with lib; {
description = "GDBFrontend is an easy, flexible and extensionable gui debugger";
homepage = "https://github.com/rohanrhu/gdb-frontend";
mainProgram = "gdbfrontend";
platforms = platforms.linux;
maintainers = with maintainers; [fufexan];
};
}

View file

@ -1,86 +0,0 @@
{
stdenv,
lib,
bzip2,
fetchFromGitHub,
fetchurl,
fmt,
gettext,
inih,
installShellFiles,
libevdev,
meson,
ninja,
pam,
pkg-config,
python3,
} @ args: let
data = import ./sources.nix args;
in
stdenv.mkDerivation {
pname = "howdy";
version = "unstable-2023-02-28";
inherit (data) src;
# fix paths
patches = [./howdy.patch];
postPatch = let
howdypath = "${placeholder "out"}/lib/security/howdy";
in ''
substituteInPlace howdy/src/cli/add.py --replace "@PATH@" "${howdypath}"
substituteInPlace howdy/src/cli/config.py --replace '/bin/nano' 'nano'
substituteInPlace howdy/src/cli/test.py --replace "@PATH@" "${howdypath}"
substituteInPlace howdy/src/pam/main.cc \
--replace "python3" "${data.py}/bin/python" \
--replace "/lib/security/howdy/compare.py" "${howdypath}/compare.py"
substituteInPlace howdy/src/compare.py \
--replace "/lib/security/howdy" "${howdypath}" \
--replace "@PATH@" "${howdypath}"
'';
nativeBuildInputs = [bzip2 installShellFiles meson ninja pkg-config];
buildInputs = [data.py fmt gettext inih libevdev pam];
# build howdy_pam
preConfigure = ''
cd howdy/src/pam
export DESTDIR=$out
'';
postInstall = let
libDir = "$out/lib/security/howdy";
inherit (lib) mapAttrsToList concatStrings;
in ''
# done with howdy_pam, go back to source root
cd ../../../..
mkdir -p $out/share/licenses/howdy
install -Dm644 LICENSE $out/share/licenses/howdy/LICENSE
rm -rf howdy/src/pam
mkdir -p ${libDir}
cp -r howdy/src/* ${libDir}
rm -rf ${libDir}/pam-config ${libDir}/dlib-data/*
${concatStrings (mapAttrsToList (n: v: ''
bzip2 -dc ${v} > ${libDir}/dlib-data/${n}
'')
data.data)}
mkdir -p $out/bin
ln -s ${libDir}/cli.py $out/bin/howdy
mkdir -p "$out/share/bash-completion/completions"
installShellCompletion --bash howdy/src/autocomplete/howdy
'';
meta = {
description = "Windows Hello style facial authentication for Linux";
homepage = "https://github.com/boltgolt/howdy";
license = lib.licenses.mit;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [fufexan];
};
}

View file

@ -1,155 +0,0 @@
diff --git a/howdy/src/cli/add.py b/howdy/src/cli/add.py
index 8951e31..4f793d7 100644
--- a/howdy/src/cli/add.py
+++ b/howdy/src/cli/add.py
@@ -30,9 +30,9 @@ import cv2
config_path = "/etc/howdy"
# Test if at lest 1 of the data files is there and abort if it's not
-if not os.path.isfile(config_path + "/dlib-data/shape_predictor_5_face_landmarks.dat"):
+if not os.path.isfile("@PATH@/dlib-data/shape_predictor_5_face_landmarks.dat"):
print(_("Data files have not been downloaded, please run the following commands:"))
- print("\n\tcd " + config_path + "/dlib-data")
+ print("\n\tcd " + "@PATH@/dlib-data")
print("\tsudo ./install.sh\n")
sys.exit(1)
@@ -42,23 +42,23 @@ config.read(config_path + "/config.ini")
use_cnn = config.getboolean("core", "use_cnn", fallback=False)
if use_cnn:
- face_detector = dlib.cnn_face_detection_model_v1(config_path + "/dlib-data/mmod_human_face_detector.dat")
+ face_detector = dlib.cnn_face_detection_model_v1("@PATH@/dlib-data/mmod_human_face_detector.dat")
else:
face_detector = dlib.get_frontal_face_detector()
-pose_predictor = dlib.shape_predictor(config_path + "/dlib-data/shape_predictor_5_face_landmarks.dat")
-face_encoder = dlib.face_recognition_model_v1(config_path + "/dlib-data/dlib_face_recognition_resnet_model_v1.dat")
+pose_predictor = dlib.shape_predictor("@PATH@/dlib-data/shape_predictor_5_face_landmarks.dat")
+face_encoder = dlib.face_recognition_model_v1("@PATH@/dlib-data/dlib_face_recognition_resnet_model_v1.dat")
user = builtins.howdy_user
# The permanent file to store the encoded model in
-enc_file = config_path + "/models/" + user + ".dat"
+enc_file = "/var/lib/howdy/models/" + user + ".dat"
# Known encodings
encodings = []
# Make the ./models folder if it doesn't already exist
-if not os.path.exists(config_path + "/models"):
+if not os.path.exists("/var/lib/howdy/models"):
print(_("No face model folder found, creating one"))
- os.makedirs(config_path + "/models")
+ os.makedirs("/var/lib/howdy/models")
# To try read a premade encodings file if it exists
try:
diff --git a/howdy/src/cli/clear.py b/howdy/src/cli/clear.py
index 6fa5f3e..fc7676c 100644
--- a/howdy/src/cli/clear.py
+++ b/howdy/src/cli/clear.py
@@ -8,7 +8,7 @@ import builtins
from i18n import _
# Get the full path to this file
-path = "/etc/howdy/models"
+path = "/var/lib/howdy/models"
# Get the passed user
user = builtins.howdy_user
diff --git a/howdy/src/cli/list.py b/howdy/src/cli/list.py
index 3532e9f..b9e2a31 100644
--- a/howdy/src/cli/list.py
+++ b/howdy/src/cli/list.py
@@ -10,7 +10,7 @@ import builtins
from i18n import _
# Get the absolute path and the username
-path = "/etc/howdy"
+path = "/var/lib/howdy"
user = builtins.howdy_user
# Check if the models file has been created yet
diff --git a/howdy/src/cli/remove.py b/howdy/src/cli/remove.py
index 6321e0b..7c13d79 100644
--- a/howdy/src/cli/remove.py
+++ b/howdy/src/cli/remove.py
@@ -9,7 +9,7 @@ import builtins
from i18n import _
# Get the absolute path and the username
-path = "/etc/howdy"
+path = "/var/lib/howdy"
user = builtins.howdy_user
# Check if enough arguments have been passed
diff --git a/howdy/src/cli/test.py b/howdy/src/cli/test.py
index d54929a..fa45500 100644
--- a/howdy/src/cli/test.py
+++ b/howdy/src/cli/test.py
@@ -59,20 +59,20 @@ use_cnn = config.getboolean('core', 'use_cnn', fallback=False)
if use_cnn:
face_detector = dlib.cnn_face_detection_model_v1(
- path + "/dlib-data/mmod_human_face_detector.dat"
+ "@PATH@/dlib-data/mmod_human_face_detector.dat"
)
else:
face_detector = dlib.get_frontal_face_detector()
-pose_predictor = dlib.shape_predictor(path + "/dlib-data/shape_predictor_5_face_landmarks.dat")
-face_encoder = dlib.face_recognition_model_v1(path + "/dlib-data/dlib_face_recognition_resnet_model_v1.dat")
+pose_predictor = dlib.shape_predictor("@PATH@/dlib-data/shape_predictor_5_face_landmarks.dat")
+face_encoder = dlib.face_recognition_model_v1("@PATH@/dlib-data/dlib_face_recognition_resnet_model_v1.dat")
encodings = []
models = None
try:
user = builtins.howdy_user
- models = json.load(open(path + "/models/" + user + ".dat"))
+ models = json.load(open("/var/lib/howdy/models/" + user + ".dat"))
for model in models:
encodings += model["data"]
diff --git a/howdy/src/compare.py b/howdy/src/compare.py
index be19464..86a8d8f 100644
--- a/howdy/src/compare.py
+++ b/howdy/src/compare.py
@@ -48,22 +48,22 @@ def init_detector(lock):
global face_detector, pose_predictor, face_encoder
# Test if at lest 1 of the data files is there and abort if it's not
- if not os.path.isfile(PATH + "/dlib-data/shape_predictor_5_face_landmarks.dat"):
+ if not os.path.isfile("@PATH@/dlib-data/shape_predictor_5_face_landmarks.dat"):
print(_("Data files have not been downloaded, please run the following commands:"))
- print("\n\tcd " + PATH + "/dlib-data")
+ print("\n\tcd " + "@PATH@/dlib-data")
print("\tsudo ./install.sh\n")
lock.release()
exit(1)
# Use the CNN detector if enabled
if use_cnn:
- face_detector = dlib.cnn_face_detection_model_v1(PATH + "/dlib-data/mmod_human_face_detector.dat")
+ face_detector = dlib.cnn_face_detection_model_v1("@PATH@/dlib-data/mmod_human_face_detector.dat")
else:
face_detector = dlib.get_frontal_face_detector()
# Start the others regardless
- pose_predictor = dlib.shape_predictor(PATH + "/dlib-data/shape_predictor_5_face_landmarks.dat")
- face_encoder = dlib.face_recognition_model_v1(PATH + "/dlib-data/dlib_face_recognition_resnet_model_v1.dat")
+ pose_predictor = dlib.shape_predictor("@PATH@/dlib-data/shape_predictor_5_face_landmarks.dat")
+ face_encoder = dlib.face_recognition_model_v1("@PATH@/dlib-data/dlib_face_recognition_resnet_model_v1.dat")
# Note the time it took to initialize detectors
timings["ll"] = time.time() - timings["ll"]
@@ -129,7 +129,7 @@ face_encoder = None
# Try to load the face model from the models folder
try:
- models = json.load(open(PATH + "/models/" + user + ".dat"))
+ models = json.load(open("/var/lib/howdy/models/" + user + ".dat"))
for model in models:
encodings += model["data"]

View file

@ -1,33 +0,0 @@
{
fetchurl,
fetchFromGitHub,
python3,
...
}: {
data = {
"dlib_face_recognition_resnet_model_v1.dat" = fetchurl {
url = "https://github.com/davisking/dlib-models/raw/master/dlib_face_recognition_resnet_model_v1.dat.bz2";
sha256 = "0fjm265l1fz5zdzx5n5yphl0v0vfajyw50ffamc4cd74848gdcdb";
};
"mmod_human_face_detector.dat" = fetchurl {
url = "https://github.com/davisking/dlib-models/raw/master/mmod_human_face_detector.dat.bz2";
sha256 = "117wv582nsn585am2n9mg5q830qnn8skjr1yxgaiihcjy109x7nv";
};
"shape_predictor_5_face_landmarks.dat" = fetchurl {
url = "https://github.com/davisking/dlib-models/raw/master/shape_predictor_5_face_landmarks.dat.bz2";
sha256 = "0wm4bbwnja7ik7r28pv00qrl3i1h6811zkgnjfvzv7jwpyz7ny3f";
};
};
src = fetchFromGitHub {
owner = "fufexan";
repo = "howdy";
rev = "dceebf0f194e55429baaf9696ed5ae38ab9ddf92";
hash = "sha256-6C8AqB83pJ5LMq+0JdsrMfkGNxxn1uv8jfoCe8BAGeY=";
};
py = python3.withPackages (p: [
p.face_recognition
(p.opencv4.override {enableGtk3 = true;})
]);
}

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