This commit is contained in:
2025-08-29 15:25:40 +02:00
parent 26440bfeee
commit f3821f0dfa
201 changed files with 2461 additions and 1546 deletions

View File

@@ -1,23 +1,37 @@
{
description = "cnix nix";
outputs = inputs:
inputs.flake-parts.lib.mkFlake {inherit inputs;} {
systems = ["x86_64-linux" "aarch64-linux"];
outputs =
inputs:
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
systems = [
"x86_64-linux"
"aarch64-linux"
];
imports = [
./users
./hosts
./modules
./pkgs
./fmt-hooks.nix
];
perSystem = {pkgs, ...}: {
devShells = import ./nix/shell {
inherit pkgs inputs;
perSystem =
{ config, pkgs, ... }:
{
devShells.default = pkgs.mkShell {
packages = [
pkgs.git
config.packages.repl
];
name = "dots";
env.DIRENV_LOG_FORMAT = "";
shellHook = ''
${config.pre-commit.installationScript}
'';
};
};
formatter = pkgs.alejandra;
};
};
inputs = {

View File

@@ -1,4 +1,5 @@
{inputs, ...}: {
{ inputs, ... }:
{
imports = [
inputs.git-hooks.flakeModule
inputs.treefmt-nix.flakeModule
@@ -6,7 +7,7 @@
perSystem = {
pre-commit.settings = {
excludes = ["flake.lock"];
excludes = [ "flake.lock" ];
hooks.treefmt.enable = true;
};

View File

@@ -3,9 +3,11 @@
config,
pkgs,
...
}: let
}:
let
ifTheyExist = groups: builtins.filter (group: builtins.hasAttr group config.users.groups) groups;
in {
in
{
users.users.cnst = {
isNormalUser = true;
shell = pkgs.fish;

View File

@@ -6,8 +6,9 @@
lib,
modulesPath,
...
}: {
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
}:
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot = {
initrd = {
availableKernelModules = [
@@ -18,11 +19,11 @@
"usb_storage"
"sd_mod"
];
kernelModules = ["amdgpu"];
kernelModules = [ "amdgpu" ];
};
kernelModules = ["kvm-amd"];
extraModulePackages = [];
kernelModules = [ "kvm-amd" ];
extraModulePackages = [ ];
};
fileSystems."/" = {
@@ -30,12 +31,16 @@
fsType = "ext4";
};
boot.initrd.luks.devices."luks-e75ac560-748f-4071-bbe7-479678400be3".device = "/dev/disk/by-uuid/e75ac560-748f-4071-bbe7-479678400be3";
boot.initrd.luks.devices."luks-e75ac560-748f-4071-bbe7-479678400be3".device =
"/dev/disk/by-uuid/e75ac560-748f-4071-bbe7-479678400be3";
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/7E84-D168";
fsType = "vfat";
options = ["fmask=0022" "dmask=0022"];
options = [
"fmask=0022"
"dmask=0022"
];
};
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking

View File

@@ -3,7 +3,7 @@
boot = {
kernel = {
variant = "latest";
hardware = ["amd"];
hardware = [ "amd" ];
};
loader = {
default = {
@@ -20,7 +20,7 @@
};
graphics = {
enable = true;
vendors = ["amd"];
vendors = [ "amd" ];
};
logitech = {
enable = false;
@@ -29,7 +29,11 @@
enable = true;
interfaces = {
"wlp6s0" = {
allowedTCPPorts = [22 80 443];
allowedTCPPorts = [
22
80
443
];
};
};
};

View File

@@ -4,97 +4,112 @@
homeImports,
self,
...
}: {
flake.nixosConfigurations = let
# custom paths
userConfig = "${self}/home";
systemConfig = "${self}/system";
hostConfig = "${self}/hosts";
}:
{
flake.nixosConfigurations =
let
# custom paths
userConfig = "${self}/home";
systemConfig = "${self}/system";
hostConfig = "${self}/hosts";
cnstConfig = "${self}/users/cnst";
toothpickConfig = "${self}/users/toothpick";
cnstConfig = "${self}/users/cnst";
toothpickConfig = "${self}/users/toothpick";
umodPath = "${self}/modules/home";
smodPath = "${self}/modules/system";
umodPath = "${self}/modules/home";
smodPath = "${self}/modules/system";
# shorten paths
inherit (inputs.nixpkgs.lib) nixosSystem;
# shorten paths
inherit (inputs.nixpkgs.lib) nixosSystem;
# get these into the module system
specialArgs = {inherit inputs self userConfig systemConfig hostConfig cnstConfig toothpickConfig umodPath smodPath;};
in {
kima = nixosSystem {
inherit specialArgs;
modules = [
./kima
"${self}/nix"
{
home-manager = {
users.cnst.imports = homeImports."cnst@kima";
extraSpecialArgs = specialArgs;
};
}
self.nixosModules.nixos
self.nixosModules.settings
inputs.chaotic.nixosModules.default
inputs.agenix.nixosModules.default
];
# get these into the module system
specialArgs = {
inherit
inputs
self
userConfig
systemConfig
hostConfig
cnstConfig
toothpickConfig
umodPath
smodPath
;
};
in
{
kima = nixosSystem {
inherit specialArgs;
modules = [
./kima
"${self}/nix"
{
home-manager = {
users.cnst.imports = homeImports."cnst@kima";
extraSpecialArgs = specialArgs;
};
}
self.nixosModules.nixos
self.nixosModules.settings
inputs.chaotic.nixosModules.default
inputs.agenix.nixosModules.default
];
};
bunk = nixosSystem {
inherit specialArgs;
modules = [
./bunk
"${self}/nix"
{
home-manager = {
users.cnst.imports = homeImports."cnst@bunk";
extraSpecialArgs = specialArgs;
};
}
self.nixosModules.nixos
self.nixosModules.settings
inputs.chaotic.nixosModules.default
inputs.agenix.nixosModules.default
];
};
sobotka = nixosSystem {
inherit specialArgs;
modules = [
./sobotka
"${self}/nix"
self.nixosModules.nixos
self.nixosModules.settings
self.nixosModules.server
inputs.agenix.nixosModules.default
];
};
ziggy = nixosSystem {
inherit specialArgs;
modules = [
./ziggy
"${self}/nix"
self.nixosModules.nixos
self.nixosModules.settings
self.nixosModules.server
inputs.agenix.nixosModules.default
];
};
toothpc = nixosSystem {
inherit specialArgs;
modules = [
./toothpc
"${self}/nix"
{
home-manager = {
users.toothpick.imports = homeImports."toothpick@toothpc";
extraSpecialArgs = specialArgs;
};
}
self.nixosModules.nixos
self.nixosModules.settings
inputs.chaotic.nixosModules.default
inputs.agenix.nixosModules.default
];
};
};
bunk = nixosSystem {
inherit specialArgs;
modules = [
./bunk
"${self}/nix"
{
home-manager = {
users.cnst.imports = homeImports."cnst@bunk";
extraSpecialArgs = specialArgs;
};
}
self.nixosModules.nixos
self.nixosModules.settings
inputs.chaotic.nixosModules.default
inputs.agenix.nixosModules.default
];
};
sobotka = nixosSystem {
inherit specialArgs;
modules = [
./sobotka
"${self}/nix"
self.nixosModules.nixos
self.nixosModules.settings
self.nixosModules.server
inputs.agenix.nixosModules.default
];
};
ziggy = nixosSystem {
inherit specialArgs;
modules = [
./ziggy
"${self}/nix"
self.nixosModules.nixos
self.nixosModules.settings
self.nixosModules.server
inputs.agenix.nixosModules.default
];
};
toothpc = nixosSystem {
inherit specialArgs;
modules = [
./toothpc
"${self}/nix"
{
home-manager = {
users.toothpick.imports = homeImports."toothpick@toothpc";
extraSpecialArgs = specialArgs;
};
}
self.nixosModules.nixos
self.nixosModules.settings
inputs.chaotic.nixosModules.default
inputs.agenix.nixosModules.default
];
};
};
}

View File

@@ -3,9 +3,11 @@
config,
pkgs,
...
}: let
}:
let
ifTheyExist = groups: builtins.filter (group: builtins.hasAttr group config.users.groups) groups;
in {
in
{
users.users.cnst = {
isNormalUser = true;
shell = pkgs.fish;

View File

@@ -7,20 +7,31 @@
pkgs,
modulesPath,
...
}: {
}:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod"];
boot.initrd.kernelModules = ["amdgpu"];
boot.kernelModules = ["kvm-amd" "i2c-dev"];
boot.extraModulePackages = [];
boot.initrd.availableKernelModules = [
"nvme"
"xhci_pci"
"ahci"
"usb_storage"
"usbhid"
"sd_mod"
];
boot.initrd.kernelModules = [ "amdgpu" ];
boot.kernelModules = [
"kvm-amd"
"i2c-dev"
];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "/dev/disk/by-uuid/90eafb57-0f89-4c2a-b417-4e0f2fba5f47";
fsType = "btrfs";
options = ["subvol=root"];
options = [ "subvol=root" ];
};
boot.initrd.luks.devices."enc".device = "/dev/disk/by-uuid/36144799-13f2-4166-9bfe-b29c3df435ab";
@@ -28,35 +39,38 @@
fileSystems."/home" = {
device = "/dev/disk/by-uuid/90eafb57-0f89-4c2a-b417-4e0f2fba5f47";
fsType = "btrfs";
options = ["subvol=home"];
options = [ "subvol=home" ];
};
fileSystems."/nix" = {
device = "/dev/disk/by-uuid/90eafb57-0f89-4c2a-b417-4e0f2fba5f47";
fsType = "btrfs";
options = ["subvol=nix"];
options = [ "subvol=nix" ];
};
fileSystems."/persist" = {
device = "/dev/disk/by-uuid/90eafb57-0f89-4c2a-b417-4e0f2fba5f47";
fsType = "btrfs";
options = ["subvol=persist"];
options = [ "subvol=persist" ];
};
fileSystems."/var/log" = {
device = "/dev/disk/by-uuid/90eafb57-0f89-4c2a-b417-4e0f2fba5f47";
fsType = "btrfs";
options = ["subvol=log"];
options = [ "subvol=log" ];
neededForBoot = true;
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/1D4A-3121";
fsType = "vfat";
options = ["fmask=0022" "dmask=0022"];
options = [
"fmask=0022"
"dmask=0022"
];
};
swapDevices = [{device = "/dev/disk/by-uuid/91e16a5f-6a1c-4c7d-aa61-5823068fdaf0";}];
swapDevices = [ { device = "/dev/disk/by-uuid/91e16a5f-6a1c-4c7d-aa61-5823068fdaf0"; } ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's

View File

@@ -3,8 +3,8 @@
boot = {
kernel = {
variant = "latest";
hardware = ["amd"];
extraKernelParams = ["amdgpu.dcdebugmask=0x10"];
hardware = [ "amd" ];
extraKernelParams = [ "amdgpu.dcdebugmask=0x10" ];
};
loader = {
default = {
@@ -21,7 +21,7 @@
};
graphics = {
enable = true;
vendors = ["amd"];
vendors = [ "amd" ];
};
logitech = {
enable = true;
@@ -30,7 +30,11 @@
enable = true;
interfaces = {
"eno1" = {
allowedTCPPorts = [22 80 443];
allowedTCPPorts = [
22
80
443
];
};
};
};

View File

@@ -3,9 +3,11 @@
config,
pkgs,
...
}: let
}:
let
ifTheyExist = groups: builtins.filter (group: builtins.hasAttr group config.users.groups) groups;
in {
in
{
users.users.cnst = {
isNormalUser = true;
shell = pkgs.fish;
@@ -49,7 +51,8 @@ in {
./server.nix
];
boot.initrd.luks.devices."luks-47b35d4b-467a-4637-a5f9-45177da62897".device = "/dev/disk/by-uuid/47b35d4b-467a-4637-a5f9-45177da62897";
boot.initrd.luks.devices."luks-47b35d4b-467a-4637-a5f9-45177da62897".device =
"/dev/disk/by-uuid/47b35d4b-467a-4637-a5f9-45177da62897";
networking = {
hostName = "sobotka";

View File

@@ -7,31 +7,43 @@
pkgs,
modulesPath,
...
}: {
}:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod"];
boot.initrd.kernelModules = ["amdgpu"];
boot.kernelModules = [];
boot.extraModulePackages = [];
boot.initrd.availableKernelModules = [
"nvme"
"xhci_pci"
"ahci"
"usbhid"
"usb_storage"
"sd_mod"
];
boot.initrd.kernelModules = [ "amdgpu" ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "/dev/disk/by-uuid/a0a3595f-e61c-475c-8f4e-bfbb05582c20";
fsType = "ext4";
};
boot.initrd.luks.devices."luks-4f289fde-55ed-4b05-a6ee-d396db2a887b".device = "/dev/disk/by-uuid/4f289fde-55ed-4b05-a6ee-d396db2a887b";
boot.initrd.luks.devices."luks-4f289fde-55ed-4b05-a6ee-d396db2a887b".device =
"/dev/disk/by-uuid/4f289fde-55ed-4b05-a6ee-d396db2a887b";
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/E03E-5458";
fsType = "vfat";
options = ["fmask=0077" "dmask=0077"];
options = [
"fmask=0077"
"dmask=0077"
];
};
swapDevices = [
{device = "/dev/disk/by-uuid/704e09db-c7dd-462b-9560-47bbf845905d";}
{ device = "/dev/disk/by-uuid/704e09db-c7dd-462b-9560-47bbf845905d"; }
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking

View File

@@ -3,8 +3,8 @@
boot = {
kernel = {
variant = "latest";
hardware = ["amd"];
extraKernelParams = [];
hardware = [ "amd" ];
extraKernelParams = [ ];
};
loader = {
default = {
@@ -21,7 +21,10 @@
};
graphics = {
enable = true;
vendors = ["intel" "amd"];
vendors = [
"intel"
"amd"
];
};
logitech = {
enable = false;
@@ -30,8 +33,16 @@
enable = true;
interfaces = {
"enp6s0" = {
allowedTCPPorts = [22 80 443 8090];
allowedUDPPorts = [58846 6881];
allowedTCPPorts = [
22
80
443
8090
];
allowedUDPPorts = [
58846
6881
];
};
};
};

View File

@@ -1,4 +1,5 @@
{config, ...}: {
{ config, ... }:
{
server = {
enable = true;
email = "adam@cnst.dev";

View File

@@ -3,9 +3,11 @@
config,
pkgs,
...
}: let
}:
let
ifTheyExist = groups: builtins.filter (group: builtins.hasAttr group config.users.groups) groups;
in {
in
{
users.users.toothpick = {
isNormalUser = true;
shell = pkgs.zsh;

View File

@@ -7,8 +7,9 @@
pkgs,
modulesPath,
...
}: {
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
}:
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot = {
initrd = {
@@ -20,14 +21,14 @@
"usb_storage"
"sd_mod"
];
kernelModules = [];
kernelModules = [ ];
};
kernelModules = [];
kernelModules = [ ];
kernelParams = [
"intel_pstate=active"
"nvidia_drm.modeset=1"
];
extraModulePackages = [];
extraModulePackages = [ ];
};
fileSystems."/" = {
@@ -35,15 +36,19 @@
fsType = "ext4";
};
boot.initrd.luks.devices."luks-81dcb5e4-7adb-44ee-99df-69e366f8b735".device = "/dev/disk/by-uuid/81dcb5e4-7adb-44ee-99df-69e366f8b735";
boot.initrd.luks.devices."luks-81dcb5e4-7adb-44ee-99df-69e366f8b735".device =
"/dev/disk/by-uuid/81dcb5e4-7adb-44ee-99df-69e366f8b735";
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/CA19-5F2A";
fsType = "vfat";
options = ["fmask=0022" "dmask=0022"];
options = [
"fmask=0022"
"dmask=0022"
];
};
swapDevices = [];
swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's

View File

@@ -3,7 +3,7 @@
boot = {
kernel = {
variant = "latest";
hardware = ["nvidia"];
hardware = [ "nvidia" ];
};
loader = {
default = {
@@ -20,7 +20,7 @@
};
graphics = {
enable = true;
vendors = ["nvidia"];
vendors = [ "nvidia" ];
nvidia = {
package = "latest";
open = true;
@@ -33,7 +33,11 @@
enable = true;
interfaces = {
"enp4s0" = {
allowedTCPPorts = [22 80 443];
allowedTCPPorts = [
22
80
443
];
};
};
};
@@ -189,7 +193,7 @@
enable = true;
};
xserver = {
videoDrivers = ["nvidia"];
videoDrivers = [ "nvidia" ];
xkbLayout = "se";
};
zram = {

View File

@@ -3,9 +3,11 @@
config,
pkgs,
...
}: let
}:
let
ifTheyExist = groups: builtins.filter (group: builtins.hasAttr group config.users.groups) groups;
in {
in
{
users.users.cnst = {
isNormalUser = true;
shell = pkgs.fish;

View File

@@ -7,22 +7,23 @@
pkgs,
modulesPath,
...
}: {
}:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = ["usbhid"];
boot.initrd.kernelModules = [];
boot.kernelModules = [];
boot.extraModulePackages = [];
boot.initrd.availableKernelModules = [ "usbhid" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888";
fsType = "ext4";
};
swapDevices = [{device = "/swapfile";}];
swapDevices = [ { device = "/swapfile"; } ];
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
}

View File

@@ -3,8 +3,8 @@
boot = {
kernel = {
variant = "latest";
hardware = [];
extraKernelParams = [];
hardware = [ ];
extraKernelParams = [ ];
};
loader = {
default = {
@@ -21,7 +21,7 @@
};
graphics = {
enable = false;
vendors = [];
vendors = [ ];
};
logitech = {
enable = false;
@@ -30,8 +30,16 @@
enable = true;
interfaces = {
"enu1u1" = {
allowedTCPPorts = [22 80 443 8090];
allowedUDPPorts = [58846 6881];
allowedTCPPorts = [
22
80
443
8090
];
allowedUDPPorts = [
58846
6881
];
};
};
};

View File

@@ -1,4 +1,5 @@
{config, ...}: {
{ config, ... }:
{
server = {
enable = true;
email = "adam@cnst.dev";

58
lib/repl/default.nix Normal file
View File

@@ -0,0 +1,58 @@
# yanked from @fufexan
{
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

@@ -4,10 +4,12 @@
osConfig,
lib,
...
}: let
}:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.home.programs.aerc;
in {
in
{
options = {
home.programs.aerc.enable = mkEnableOption "Enables aerc";
};

View File

@@ -4,11 +4,13 @@
pkgs,
inputs,
...
}: let
}:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.home.programs.ags;
in {
imports = [inputs.ags.homeManagerModules.default];
in
{
imports = [ inputs.ags.homeManagerModules.default ];
options = {
home.programs.ags.enable = mkEnableOption "Enables ags";
};

View File

@@ -2,10 +2,12 @@
config,
lib,
...
}: let
}:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.home.programs.alacritty;
in {
in
{
options = {
home.programs.alacritty.enable = mkEnableOption "Enables firefox";
};

View File

@@ -3,10 +3,12 @@
config,
lib,
...
}: let
}:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.home.programs.anyrun;
in {
in
{
imports = [
inputs.anyrun.homeManagerModules.default
];

View File

@@ -2,10 +2,12 @@
config,
lib,
...
}: let
}:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.home.programs.bash;
in {
in
{
options = {
home.programs.bash.enable = mkEnableOption "Enables bash";
};

View File

@@ -3,10 +3,12 @@
config,
lib,
...
}: let
}:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.home.programs.chromium;
in {
in
{
options = {
home.programs.chromium.enable = mkEnableOption "Enables chromium";
};

View File

@@ -3,8 +3,14 @@
config,
lib,
...
}: let
inherit (lib) mkIf mkOption mkEnableOption types;
}:
let
inherit (lib)
mkIf
mkOption
mkEnableOption
types
;
# Workaround for https://github.com/GooseMod/OpenAsar/issues/202
# Needlessly complicated, but it's dynamic! :D
variantMapping = {
@@ -18,24 +24,32 @@
};
canary = {
dir = "discordcanary";
package = pkgs.discord-canary.override {withOpenASAR = true;};
package = pkgs.discord-canary.override { withOpenASAR = true; };
};
vesktop = {
dir = "vesktop";
package = pkgs.vesktop;
};
};
getVariantConfig = variant:
if builtins.hasAttr variant variantMapping
then variantMapping.${variant}
else throw "Unknown package variant: ${variant}";
getVariantConfig =
variant:
if builtins.hasAttr variant variantMapping then
variantMapping.${variant}
else
throw "Unknown package variant: ${variant}";
cfg = config.home.programs.discord;
in {
in
{
options = {
home.programs.discord = {
enable = mkEnableOption "Enables discord";
variant = mkOption {
type = types.enum ["stable" "ptb" "canary" "vesktop"];
type = types.enum [
"stable"
"ptb"
"canary"
"vesktop"
];
default = "stable";
description = "Preferred package version to use";
};
@@ -44,13 +58,11 @@ in {
config = mkIf cfg.enable {
home = {
sessionVariables.DISCORD_USER_DATA_DIR = "$HOME/.config/${(getVariantConfig cfg.variant).dir}";
packages = [(getVariantConfig cfg.variant).package];
packages = [ (getVariantConfig cfg.variant).package ];
};
xdg.configFile = mkIf (cfg.variant == "vesktop") {
"vesktop/themes/base16.css".text =
/*
css
*/
# css
''
/**
* @name Material Gruvbox

View File

@@ -2,10 +2,12 @@
config,
lib,
...
}: let
}:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.home.programs.eza;
in {
in
{
options = {
home.programs.eza.enable = mkEnableOption "Enables eza";
};

View File

@@ -4,10 +4,12 @@
config,
lib,
...
}: let
}:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.home.programs.firefox;
in {
in
{
imports = [
# inputs.nur.hmModules.nur
];
@@ -24,9 +26,12 @@ in {
force = true;
default = "ddg";
privateDefault = "ddg";
order = ["ddg" "google"];
order = [
"ddg"
"google"
];
};
bookmarks = {};
bookmarks = { };
# extensions = with config.nur.repos.rycee.firefox-addons; [
# ublock-origin
# sponsorblock

View File

@@ -3,12 +3,14 @@
lib,
pkgs,
...
}: let
}:
let
inherit (lib) mkIf mkEnableOption;
inherit (lib.meta) getExe;
inherit (pkgs) eza bat;
cfg = config.home.programs.fish;
in {
in
{
options = {
home.programs.fish.enable = mkEnableOption "Enables fish home configuration";
};
@@ -59,17 +61,13 @@ in {
up-or-search = lib.readFile ./up-or-search.fish;
# Check stuff in PATH
nix-inspect =
/*
fish
*/
# fish
''
set -s PATH | grep "PATH\[.*/nix/store" | cut -d '|' -f2 | grep -v -e "-man" -e "-terminfo" | perl -pe 's:^/nix/store/\w{32}-([^/]*)/bin$:\1:' | sort | uniq
'';
};
interactiveShellInit =
/*
fish
*/
# fish
''
# Open command buffer in vim when alt+e is pressed
bind \ee edit_command_buffer

View File

@@ -2,10 +2,12 @@
config,
lib,
...
}: let
}:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.home.programs.floorp;
in {
in
{
options = {
home.programs.floorp.enable = mkEnableOption "Enables floorp browser";
};

View File

@@ -3,10 +3,12 @@
config,
lib,
...
}: let
}:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.home.programs.foot;
in {
in
{
options = {
home.programs.foot.enable = mkEnableOption "Enables foot programs";
};

View File

@@ -4,11 +4,13 @@
pkgs,
osConfig,
...
}: let
}:
let
inherit (lib) mkIf mkEnableOption mkMerge;
cfg = config.home.programs.fuzzel;
host = osConfig.networking.hostName;
in {
in
{
options = {
home.programs.fuzzel.enable = mkEnableOption "Enables fuzzel";
};

View File

@@ -4,11 +4,18 @@
osConfig,
pkgs,
...
}: let
inherit (lib) mkIf mkEnableOption mkMerge getExe;
}:
let
inherit (lib)
mkIf
mkEnableOption
mkMerge
getExe
;
cfg = config.home.programs.ghostty;
host = osConfig.networking.hostName;
in {
in
{
options = {
home.programs.ghostty.enable = mkEnableOption "Enables ghostty";
};

View File

@@ -4,15 +4,17 @@
lib,
osConfig,
...
}: let
}:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.home.programs.git;
in {
in
{
options = {
home.programs.git.enable = mkEnableOption "Enables git";
};
config = mkIf cfg.enable {
home.packages = [pkgs.gh];
home.packages = [ pkgs.gh ];
programs.git = {
enable = true;
userName = osConfig.settings.accounts.username;
@@ -31,7 +33,8 @@ in {
};
gpg = {
# format = lib.mkDefault "ssh";
ssh.allowedSignersFile = config.home.homeDirectory + "/" + config.xdg.configFile."git/allowed_signers".target;
ssh.allowedSignersFile =
config.home.homeDirectory + "/" + config.xdg.configFile."git/allowed_signers".target;
};
commit = {
verbose = true;

View File

@@ -4,10 +4,12 @@
lib,
config,
...
}: let
}:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.home.programs.helix;
in {
in
{
imports = [
./languages.nix
./gruvbox.nix
@@ -46,7 +48,12 @@ in {
display-messages = true;
display-inlay-hints = true;
};
gutters = ["diagnostics" "line-numbers" "spacer" "diff"];
gutters = [
"diagnostics"
"line-numbers"
"spacer"
"diff"
];
statusline = {
separator = "/";
left = [
@@ -57,7 +64,7 @@ in {
"spinner"
"diagnostics"
];
center = ["file-name"];
center = [ "file-name" ];
right = [
"file-encoding"
"file-line-ending"
@@ -78,62 +85,103 @@ in {
};
};
keys = let
spaceMode = {
space = "file_picker";
n = "global_search";
f = ":format";
c = "toggle_comments";
t = {
d = "goto_type_definition";
i = "goto_implementation";
r = "goto_reference";
t = "goto_definition";
w = "trim_selections";
keys =
let
spaceMode = {
space = "file_picker";
n = "global_search";
f = ":format";
c = "toggle_comments";
t = {
d = "goto_type_definition";
i = "goto_implementation";
r = "goto_reference";
t = "goto_definition";
w = "trim_selections";
};
x = ":buffer-close";
w = ":w";
q = ":q";
y = "yank";
p = "paste_after";
P = "paste_before";
R = "replace_with_yanked";
};
x = ":buffer-close";
w = ":w";
q = ":q";
y = "yank";
p = "paste_after";
P = "paste_before";
R = "replace_with_yanked";
};
in {
normal = {
d = {
d = ["extend_to_line_bounds" "yank_main_selection_to_clipboard" "delete_selection"];
s = ["surround_delete"];
in
{
normal = {
d = {
d = [
"extend_to_line_bounds"
"yank_main_selection_to_clipboard"
"delete_selection"
];
s = [ "surround_delete" ];
};
x = "delete_selection";
y = {
y = [
"extend_to_line_bounds"
"yank_main_selection_to_clipboard"
"normal_mode"
"collapse_selection"
];
d = ":yank-diagnostic";
};
Y = [
"extend_to_line_end"
"yank_main_selection_to_clipboard"
"collapse_selection"
];
P = [
"paste_clipboard_before"
"collapse_selection"
];
p = [
"paste_clipboard_after"
"collapse_selection"
];
C-a = "select_all";
del = "delete_selection";
space = spaceMode;
};
x = "delete_selection";
y = {
y = ["extend_to_line_bounds" "yank_main_selection_to_clipboard" "normal_mode" "collapse_selection"];
d = ":yank-diagnostic";
insert = {
C-v = "paste_clipboard_after";
C-c = "yank_to_clipboard";
C-x = "completion";
del = "delete_selection";
esc = [
"collapse_selection"
"normal_mode"
];
};
select = {
space = spaceMode;
d = [
"yank_main_selection_to_clipboard"
"delete_selection"
];
x = [
"yank_main_selection_to_clipboard"
"delete_selection"
];
y = [
"yank_main_selection_to_clipboard"
"normal_mode"
"flip_selections"
"collapse_selection"
];
Y = [
"extend_to_line_bounds"
"yank_main_selection_to_clipboard"
"goto_line_start"
"collapse_selection"
"normal_mode"
];
p = [ "replace_selections_with_clipboard" ];
P = [ "paste_clipboard_before" ];
};
Y = ["extend_to_line_end" "yank_main_selection_to_clipboard" "collapse_selection"];
P = ["paste_clipboard_before" "collapse_selection"];
p = ["paste_clipboard_after" "collapse_selection"];
C-a = "select_all";
del = "delete_selection";
space = spaceMode;
};
insert = {
C-v = "paste_clipboard_after";
C-c = "yank_to_clipboard";
C-x = "completion";
del = "delete_selection";
esc = ["collapse_selection" "normal_mode"];
};
select = {
space = spaceMode;
d = ["yank_main_selection_to_clipboard" "delete_selection"];
x = ["yank_main_selection_to_clipboard" "delete_selection"];
y = ["yank_main_selection_to_clipboard" "normal_mode" "flip_selections" "collapse_selection"];
Y = ["extend_to_line_bounds" "yank_main_selection_to_clipboard" "goto_line_start" "collapse_selection" "normal_mode"];
p = ["replace_selections_with_clipboard"];
P = ["paste_clipboard_before"];
};
};
};
};
};

View File

@@ -1,201 +1,225 @@
{
programs.helix.themes = {
gruvbox_custom = let
bg0 = "#32302f";
bg1 = "#3c3836";
bg2 = "#3c3836";
bg3 = "#504945";
bg4 = "#504945";
fg0 = "#d4be98";
red = "#ea6962";
orange = "#e78a4e";
yellow = "#d8a657";
bg_visual_yellow = "#574833";
green = "#a9b665";
aqua = "#89b482";
blue = "#7daea3";
purple = "#d3869b";
grey0 = "#7c6f64";
grey2 = "#a89984";
in {
"type" = yellow;
"constant" = purple;
"constant.numeric" = purple;
"constant.character.escape" = orange;
"string" = green;
"string.regexp" = blue;
"comment" = grey0;
"variable" = fg0;
"variable.builtin" = blue;
"variable.parameter" = fg0;
"variable.other.member" = fg0;
"label" = aqua;
"punctuation" = grey2;
"punctuation.delimiter" = grey2;
"punctuation.bracket" = fg0;
"keyword" = red;
"keyword.directive" = aqua;
"operator" = orange;
"function" = green;
"function.builtin" = blue;
"function.macro" = aqua;
"tag" = yellow;
"namespace" = aqua;
"attribute" = aqua;
"constructor" = yellow;
"module" = blue;
"special" = orange;
"markup.heading.marker" = grey2;
"markup.heading.1" = {
fg = red;
modifiers = ["bold"];
};
"markup.heading.2" = {
fg = orange;
modifiers = ["bold"];
};
"markup.heading.3" = {
fg = yellow;
modifiers = ["bold"];
};
"markup.heading.4" = {
fg = green;
modifiers = ["bold"];
};
"markup.heading.5" = {
fg = blue;
modifiers = ["bold"];
};
"markup.heading.6" = {
fg = fg0;
modifiers = ["bold"];
};
"markup.list" = red;
"markup.bold" = {modifiers = ["bold"];};
"markup.italic" = {modifiers = ["italic"];};
"markup.link.url" = {
fg = blue;
modifiers = ["underlined"];
};
"markup.link.text" = purple;
"markup.quote" = grey2;
"markup.raw" = green;
gruvbox_custom =
let
bg0 = "#32302f";
bg1 = "#3c3836";
bg2 = "#3c3836";
bg3 = "#504945";
bg4 = "#504945";
fg0 = "#d4be98";
red = "#ea6962";
orange = "#e78a4e";
yellow = "#d8a657";
bg_visual_yellow = "#574833";
green = "#a9b665";
aqua = "#89b482";
blue = "#7daea3";
purple = "#d3869b";
grey0 = "#7c6f64";
grey2 = "#a89984";
in
{
"type" = yellow;
"constant" = purple;
"constant.numeric" = purple;
"constant.character.escape" = orange;
"string" = green;
"string.regexp" = blue;
"comment" = grey0;
"variable" = fg0;
"variable.builtin" = blue;
"variable.parameter" = fg0;
"variable.other.member" = fg0;
"label" = aqua;
"punctuation" = grey2;
"punctuation.delimiter" = grey2;
"punctuation.bracket" = fg0;
"keyword" = red;
"keyword.directive" = aqua;
"operator" = orange;
"function" = green;
"function.builtin" = blue;
"function.macro" = aqua;
"tag" = yellow;
"namespace" = aqua;
"attribute" = aqua;
"constructor" = yellow;
"module" = blue;
"special" = orange;
"markup.heading.marker" = grey2;
"markup.heading.1" = {
fg = red;
modifiers = [ "bold" ];
};
"markup.heading.2" = {
fg = orange;
modifiers = [ "bold" ];
};
"markup.heading.3" = {
fg = yellow;
modifiers = [ "bold" ];
};
"markup.heading.4" = {
fg = green;
modifiers = [ "bold" ];
};
"markup.heading.5" = {
fg = blue;
modifiers = [ "bold" ];
};
"markup.heading.6" = {
fg = fg0;
modifiers = [ "bold" ];
};
"markup.list" = red;
"markup.bold" = {
modifiers = [ "bold" ];
};
"markup.italic" = {
modifiers = [ "italic" ];
};
"markup.link.url" = {
fg = blue;
modifiers = [ "underlined" ];
};
"markup.link.text" = purple;
"markup.quote" = grey2;
"markup.raw" = green;
"diff.plus" = green;
"diff.delta" = orange;
"diff.minus" = red;
"diff.plus" = green;
"diff.delta" = orange;
"diff.minus" = red;
"ui.background" = {bg = bg0;};
"ui.background.separator" = grey0;
"ui.cursor" = {
fg = bg0;
bg = fg0;
};
"ui.cursor.match" = {
fg = orange;
bg = bg_visual_yellow;
};
"ui.cursor.insert" = {
fg = bg0;
bg = grey2;
};
"ui.cursor.select" = {
fg = bg0;
bg = blue;
};
"ui.cursorline.primary" = {bg = bg1;};
"ui.cursorline.secondary" = {bg = bg1;};
"ui.selection" = {bg = bg3;};
"ui.linenr" = grey0;
"ui.linenr.selected" = fg0;
"ui.statusline" = {
fg = fg0;
bg = bg3;
};
"ui.statusline.inactive" = {
fg = grey0;
bg = bg1;
};
"ui.statusline.normal" = {
fg = bg0;
bg = fg0;
modifiers = ["bold"];
};
"ui.statusline.insert" = {
fg = bg0;
bg = yellow;
modifiers = ["bold"];
};
"ui.statusline.select" = {
fg = bg0;
bg = blue;
modifiers = ["bold"];
};
"ui.bufferline" = {
fg = grey0;
bg = bg1;
};
"ui.bufferline.active" = {
fg = fg0;
bg = bg3;
modifiers = ["bold"];
};
"ui.popup" = {
fg = grey2;
bg = bg2;
};
"ui.window" = {
fg = grey0;
bg = bg0;
};
"ui.help" = {
fg = fg0;
bg = bg2;
};
"ui.text" = fg0;
"ui.text.focus" = fg0;
"ui.menu" = {
fg = fg0;
bg = bg3;
};
"ui.menu.selected" = {
fg = bg0;
bg = blue;
modifiers = ["bold"];
};
"ui.virtual.whitespace" = {fg = bg4;};
"ui.virtual.indent-guide" = {fg = bg4;};
"ui.virtual.ruler" = {bg = bg3;};
"ui.background" = {
bg = bg0;
};
"ui.background.separator" = grey0;
"ui.cursor" = {
fg = bg0;
bg = fg0;
};
"ui.cursor.match" = {
fg = orange;
bg = bg_visual_yellow;
};
"ui.cursor.insert" = {
fg = bg0;
bg = grey2;
};
"ui.cursor.select" = {
fg = bg0;
bg = blue;
};
"ui.cursorline.primary" = {
bg = bg1;
};
"ui.cursorline.secondary" = {
bg = bg1;
};
"ui.selection" = {
bg = bg3;
};
"ui.linenr" = grey0;
"ui.linenr.selected" = fg0;
"ui.statusline" = {
fg = fg0;
bg = bg3;
};
"ui.statusline.inactive" = {
fg = grey0;
bg = bg1;
};
"ui.statusline.normal" = {
fg = bg0;
bg = fg0;
modifiers = [ "bold" ];
};
"ui.statusline.insert" = {
fg = bg0;
bg = yellow;
modifiers = [ "bold" ];
};
"ui.statusline.select" = {
fg = bg0;
bg = blue;
modifiers = [ "bold" ];
};
"ui.bufferline" = {
fg = grey0;
bg = bg1;
};
"ui.bufferline.active" = {
fg = fg0;
bg = bg3;
modifiers = [ "bold" ];
};
"ui.popup" = {
fg = grey2;
bg = bg2;
};
"ui.window" = {
fg = grey0;
bg = bg0;
};
"ui.help" = {
fg = fg0;
bg = bg2;
};
"ui.text" = fg0;
"ui.text.focus" = fg0;
"ui.menu" = {
fg = fg0;
bg = bg3;
};
"ui.menu.selected" = {
fg = bg0;
bg = blue;
modifiers = [ "bold" ];
};
"ui.virtual.whitespace" = {
fg = bg4;
};
"ui.virtual.indent-guide" = {
fg = bg4;
};
"ui.virtual.ruler" = {
bg = bg3;
};
"hint" = blue;
"info" = aqua;
"warning" = yellow;
"error" = red;
"diagnostic" = {underline = {style = "curl";};};
"diagnostic.hint" = {
underline = {
color = blue;
style = "dotted";
"hint" = blue;
"info" = aqua;
"warning" = yellow;
"error" = red;
"diagnostic" = {
underline = {
style = "curl";
};
};
"diagnostic.hint" = {
underline = {
color = blue;
style = "dotted";
};
};
"diagnostic.info" = {
underline = {
color = aqua;
style = "dotted";
};
};
"diagnostic.warning" = {
underline = {
color = yellow;
style = "curl";
};
};
"diagnostic.error" = {
underline = {
color = red;
style = "curl";
};
};
};
"diagnostic.info" = {
underline = {
color = aqua;
style = "dotted";
};
};
"diagnostic.warning" = {
underline = {
color = yellow;
style = "curl";
};
};
"diagnostic.error" = {
underline = {
color = red;
style = "curl";
};
};
};
};
}

View File

@@ -2,31 +2,48 @@
pkgs,
lib,
...
}: {
}:
{
programs.helix.languages = {
language = let
deno = lang: {
command = lib.getExe pkgs.deno;
args = ["fmt" "-" "--ext" lang];
};
language =
let
deno = lang: {
command = lib.getExe pkgs.deno;
args = [
"fmt"
"-"
"--ext"
lang
];
};
prettier = lang: {
command = "prettier";
args = ["--parser" lang];
};
prettierLangs = map (e: {
name = e;
formatter = prettier e;
});
langs = ["css" "scss" "html"];
in
prettier = lang: {
command = "prettier";
args = [
"--parser"
lang
];
};
prettierLangs = map (e: {
name = e;
formatter = prettier e;
});
langs = [
"css"
"scss"
"html"
];
in
[
{
name = "bash";
auto-format = true;
formatter = {
command = lib.getExe pkgs.shfmt;
args = ["-i" "2"];
args = [
"-i"
"2"
];
};
}
{
@@ -36,7 +53,17 @@
{
name = "clojure";
injection-regex = "(clojure|clj|edn|boot|yuck)";
file-types = ["clj" "cljs" "cljc" "clje" "cljr" "cljx" "edn" "boot" "yuck"];
file-types = [
"clj"
"cljs"
"cljc"
"clje"
"cljr"
"cljx"
"edn"
"boot"
"yuck"
];
}
# {
# name = "cmake";
@@ -50,7 +77,7 @@
{
name = "lua";
auto-format = true;
language-servers = ["lua-language-server"];
language-servers = [ "lua-language-server" ];
formatter = {
command = lib.getExe pkgs.stylua;
};
@@ -66,7 +93,7 @@
}
{
name = "common-lisp";
file-types = ["kbd"];
file-types = [ "kbd" ];
auto-format = true;
}
{
@@ -77,10 +104,10 @@
{
name = "nix";
auto-format = true;
language-servers = ["nil"];
language-servers = [ "nil" ];
formatter = {
command = "${pkgs.nixfmt}/bin/nixfmt";
args = ["-q"];
args = [ "-q" ];
};
}
# {
@@ -94,7 +121,7 @@
{
name = "qml";
auto-format = true;
language-servers = ["qmlls"];
language-servers = [ "qmlls" ];
}
# {
# name = "typescript";
@@ -112,13 +139,13 @@
{
name = "css";
auto-format = true;
language-servers = ["vscode-css-language-server"];
language-servers = [ "vscode-css-language-server" ];
}
{
name = "rust";
auto-format = true;
file-types = ["rs"];
language-servers = ["rust-analyzer"];
file-types = [ "rs" ];
language-servers = [ "rust-analyzer" ];
formatter = {
command = lib.getExe pkgs.rustfmt;
};
@@ -129,17 +156,17 @@
language-server = {
phpactor = {
command = lib.getExe pkgs.phpactor;
args = ["language-server"];
args = [ "language-server" ];
};
bash-language-server = {
command = lib.getExe pkgs.bash-language-server;
args = ["start"];
args = [ "start" ];
};
clangd = {
command = "${pkgs.clang-tools}/bin/clangd";
clangd.fallbackFlags = ["-std=c++2b"];
clangd.fallbackFlags = [ "-std=c++2b" ];
};
# cmake-language-server = {
@@ -152,7 +179,7 @@
deno-lsp = {
command = lib.getExe pkgs.deno;
args = ["lsp"];
args = [ "lsp" ];
environment.NO_COLOR = "1";
config.deno = {
enable = true;
@@ -160,7 +187,9 @@
unstable = true;
suggest = {
completeFunctionCalls = false;
imports = {hosts."https://deno.land" = true;};
imports = {
hosts."https://deno.land" = true;
};
};
inlayHints = {
enumMemberValues.enabled = true;
@@ -180,7 +209,7 @@
qmlls = {
command = "${pkgs.qt6.qtdeclarative}/bin/qmlls";
args = ["-E"];
args = [ "-E" ];
};
# pyright = {
@@ -197,36 +226,38 @@
typescript-language-server = {
command = lib.getExe pkgs.nodePackages.typescript-language-server;
args = ["--stdio"];
config = let
inlayHints = {
includeInlayEnumMemberValueHints = true;
includeInlayFunctionLikeReturnTypeHints = true;
includeInlayFunctionParameterTypeHints = true;
includeInlayParameterNameHints = "all";
includeInlayParameterNameHintsWhenArgumentMatchesName = true;
includeInlayPropertyDeclarationTypeHints = true;
includeInlayVariableTypeHints = true;
};
in {
typescript-language-server.source = {
addMissingImports.ts = true;
fixAll.ts = true;
organizeImports.ts = true;
removeUnusedImports.ts = true;
sortImports.ts = true;
};
args = [ "--stdio" ];
config =
let
inlayHints = {
includeInlayEnumMemberValueHints = true;
includeInlayFunctionLikeReturnTypeHints = true;
includeInlayFunctionParameterTypeHints = true;
includeInlayParameterNameHints = "all";
includeInlayParameterNameHintsWhenArgumentMatchesName = true;
includeInlayPropertyDeclarationTypeHints = true;
includeInlayVariableTypeHints = true;
};
in
{
typescript-language-server.source = {
addMissingImports.ts = true;
fixAll.ts = true;
organizeImports.ts = true;
removeUnusedImports.ts = true;
sortImports.ts = true;
};
typescript = {inherit inlayHints;};
javascript = {inherit inlayHints;};
typescript = { inherit inlayHints; };
javascript = { inherit inlayHints; };
hostInfo = "helix";
};
hostInfo = "helix";
};
};
vscode-css-language-server = {
command = "${pkgs.vscode-langservers-extracted}/bin/vscode-css-language-server";
args = ["--stdio"];
args = [ "--stdio" ];
config = {
provideFormatter = true;
css.validate.enable = true;

View File

@@ -5,13 +5,15 @@
lib,
osConfig,
...
}: let
}:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.home.programs.hyprlock;
hyprlockFlake = inputs.hyprlock.packages.${pkgs.system}.hyprlock;
# hyprlockPkg = pkgs.hyprlock;
in {
in
{
options = {
home.programs.hyprlock.enable = mkEnableOption "Enables hyprlock";
};

View File

@@ -2,10 +2,12 @@
config,
lib,
...
}: let
}:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.home.programs.jujutsu;
in {
in
{
options = {
home.programs.jujutsu.enable = mkEnableOption "Enables jujutsu";
};
@@ -25,13 +27,15 @@ in {
];
pager = "less -FRX";
};
signing = let
gitCfg = config.programs.git.extraConfig;
in {
backend = "ssh";
sign-all = true;
key = gitCfg.signing.key;
};
signing =
let
gitCfg = config.programs.git.extraConfig;
in
{
backend = "ssh";
sign-all = true;
key = gitCfg.signing.key;
};
templates = {
draft_commit_description = ''
concat(

View File

@@ -2,10 +2,12 @@
config,
lib,
...
}: let
}:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.home.programs.kitty;
in {
in
{
options = {
home.programs.kitty.enable = mkEnableOption "Enables kitty programs";
};

View File

@@ -3,10 +3,12 @@
config,
lib,
...
}: let
}:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.home.programs.lutris;
in {
in
{
options = {
home.programs.lutris.enable = mkEnableOption "Enables lutris";
};

View File

@@ -2,10 +2,12 @@
config,
lib,
...
}: let
}:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.home.programs.mangohud;
in {
in
{
options = {
home.programs.mangohud.enable = mkEnableOption "Enables mangohud";
};

View File

@@ -3,18 +3,20 @@
lib,
pkgs,
...
}: let
}:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.home.programs.mpv;
in {
in
{
options = {
home.programs.mpv.enable = mkEnableOption "Enables mpv";
};
config = mkIf cfg.enable {
programs.mpv = {
enable = true;
defaultProfiles = ["gpu-hq"];
scripts = [pkgs.mpvScripts.mpris];
defaultProfiles = [ "gpu-hq" ];
scripts = [ pkgs.mpvScripts.mpris ];
};
};
}

View File

@@ -3,10 +3,12 @@
config,
lib,
...
}: let
}:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.home.programs.neovim;
in {
in
{
imports = [
./plugins
./lsp.nix
@@ -22,9 +24,7 @@ in {
programs.neovim = {
enable = true;
extraLuaConfig =
/*
lua
*/
# lua
''
-- Use system clipboard
vim.opt.clipboard = "unnamedplus"

View File

@@ -2,9 +2,7 @@
config = {
programs.neovim = {
extraLuaConfig =
/*
lua
*/
# lua
''
-- Key mappings for various commands and navigation
vim.api.nvim_set_keymap("n", "<C-j>", "<C-e>", { noremap = true })

View File

@@ -1,4 +1,5 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
programs.neovim.plugins = with pkgs.vimPlugins; [
# LSP and completions for injected langs
otter-nvim
@@ -8,9 +9,7 @@
plugin = nvim-lspconfig;
type = "lua";
config =
/*
lua
*/
# lua
''
local lspconfig = require("lspconfig")
@@ -56,9 +55,7 @@
plugin = ltex_extra-nvim;
type = "lua";
config =
/*
lua
*/
# lua
''
local ltex_extra = require("ltex_extra")
add_lsp(lspconfig.ltex, {
@@ -84,9 +81,7 @@
plugin = cmp-git;
type = "lua";
config =
/*
lua
*/
# lua
''
require("cmp_git").setup({})
'';
@@ -97,9 +92,7 @@
plugin = nvim-cmp;
type = "lua";
config =
/*
lua
*/
# lua
''
local cmp = require("cmp")

View File

@@ -1,12 +1,11 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
programs.neovim.plugins = with pkgs.vimPlugins; [
{
plugin = alpha-nvim;
type = "lua";
config =
/*
lua
*/
# lua
''
local alpha = require("alpha")
local dashboard = require("alpha.themes.dashboard")

View File

@@ -1,12 +1,11 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
programs.neovim.plugins = with pkgs.vimPlugins; [
{
plugin = nvim-autopairs;
type = "lua";
config =
/*
lua
*/
# lua
''
require("nvim-autopairs").setup({})
'';

View File

@@ -1,12 +1,11 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
programs.neovim.plugins = with pkgs.vimPlugins; [
{
plugin = nvim-bqf;
type = "lua";
config =
/*
lua
*/
# lua
''
require("bqf").setup({})
'';

View File

@@ -1,12 +1,11 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
programs.neovim.plugins = with pkgs.vimPlugins; [
{
plugin = bufferline-nvim;
type = "lua";
config =
/*
lua
*/
# lua
''
require("bufferline").setup({})
'';

View File

@@ -1,12 +1,11 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
programs.neovim.plugins = with pkgs.vimPlugins; [
{
plugin = nvim-colorizer-lua;
type = "lua";
config =
/*
lua
*/
# lua
''
require("colorizer").setup({})
'';

View File

@@ -1,12 +1,11 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
programs.neovim.plugins = with pkgs.vimPlugins; [
{
plugin = comment-nvim;
type = "lua";
config =
/*
lua
*/
# lua
''
require("Comment").setup({
opleader = {

View File

@@ -1,12 +1,11 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
programs.neovim.plugins = with pkgs.vimPlugins; [
{
plugin = conform-nvim;
type = "lua";
config =
/*
lua
*/
# lua
''
require("conform").setup({
default_format_opts = {

View File

@@ -1,12 +1,11 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
programs.neovim.plugins = with pkgs.vimPlugins; [
{
plugin = copilot-lua;
type = "lua";
config =
/*
lua
*/
# lua
''
require("copilot").setup({
panel = {

View File

@@ -1,4 +1,5 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
programs.neovim.plugins = with pkgs.vimPlugins; [
vim-illuminate
];

View File

@@ -1,12 +1,11 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
programs.neovim.plugins = with pkgs.vimPlugins; [
{
plugin = fidget-nvim;
type = "lua";
config =
/*
lua
*/
# lua
''
require("fidget").setup({
progress = {

View File

@@ -1,12 +1,11 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
programs.neovim.plugins = with pkgs.vimPlugins; [
{
plugin = vim-fugitive;
type = "viml";
config =
/*
vim
*/
# vim
''
nmap <space>G :Git<CR>
'';

View File

@@ -1,12 +1,11 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
programs.neovim.plugins = with pkgs.vimPlugins; [
{
plugin = gitsigns-nvim;
type = "lua";
config =
/*
lua
*/
# lua
''
require("gitsigns").setup({
signs = {

View File

@@ -1,12 +1,11 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
programs.neovim.plugins = with pkgs.vimPlugins; [
{
plugin = lualine-nvim;
type = "lua";
config =
/*
lua
*/
# lua
''
require("lualine").setup({
options = {

View File

@@ -1,4 +1,5 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
programs.neovim = {
plugins = with pkgs.vimPlugins; [
none-ls-nvim
@@ -6,9 +7,7 @@
nvim-treesitter.withAllGrammars
];
extraConfig =
/*
lua
*/
# lua
''
-- Require necessary plugins
require("plenary")

View File

@@ -1,12 +1,11 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
programs.neovim.plugins = with pkgs.vimPlugins; [
{
plugin = oil-nvim;
type = "lua";
config =
/*
lua
*/
# lua
''
require("oil").setup({
buf_options = {

View File

@@ -1,12 +1,11 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
programs.neovim.plugins = with pkgs.vimPlugins; [
{
plugin = plenary-nvim;
type = "lua";
config =
/*
lua
*/
# lua
''
require("plenary").setup({})
'';

View File

@@ -1,12 +1,11 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
programs.neovim.plugins = with pkgs.vimPlugins; [
{
plugin = range-highlight-nvim;
type = "lua";
config =
/*
lua
*/
# lua
''
require("range-highlight").setup({})
'';

View File

@@ -1,12 +1,11 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
programs.neovim.plugins = with pkgs.vimPlugins; [
{
plugin = nvim-treesitter.withAllGrammars;
type = "lua";
config =
/*
lua
*/
# lua
''
require("nvim-treesitter.configs").setup({
highlight = {

View File

@@ -1,12 +1,11 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
programs.neovim.plugins = with pkgs.vimPlugins; [
{
plugin = nvim-web-devicons;
type = "lua";
config =
/*
lua
*/
# lua
''
require("nvim-web-devicons").setup({})
'';

View File

@@ -1,12 +1,11 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
programs.neovim.plugins = with pkgs.vimPlugins; [
{
plugin = which-key-nvim;
type = "lua";
config =
/*
lua
*/
# lua
''
require("which-key").setup({})
'';

View File

@@ -3,21 +3,22 @@
config,
lib,
...
}: {
}:
{
programs.neovim = {
extraConfig =
lib.mkAfter # vim
''
function! SetCustomKeywords()
syn match Todo /TODO/
syn match Done /DONE/
syn match Start /START/
syn match End /END/
endfunction
autocmd Syntax * call SetCustomKeywords()
'';
''
function! SetCustomKeywords()
syn match Todo /TODO/
syn match Done /DONE/
syn match Start /START/
syn match End /END/
endfunction
autocmd Syntax * call SetCustomKeywords()
'';
plugins = with pkgs.vimPlugins; [
rust-vim
dart-vim-plugin
@@ -34,15 +35,11 @@
{
plugin = vimtex;
config = let
viewMethod =
if config.programs.zathura.enable
then "zathura"
else "general";
in
/*
vim
*/
config =
let
viewMethod = if config.programs.zathura.enable then "zathura" else "general";
in
# vim
''
let g:vimtex_view_method = '${viewMethod}'
"Don't open automatically

View File

@@ -5,10 +5,12 @@
pkgs,
inputs,
...
}: let
}:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.home.programs.nvf;
in {
in
{
options = {
home.programs.nvf.enable = mkEnableOption "Enables nvf (neovim)";
};

View File

@@ -3,10 +3,12 @@
config,
lib,
...
}: let
}:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.home.programs.nwg-bar;
in {
in
{
options = {
home.programs.nwg-bar.enable = mkEnableOption "Enables nwg-bar";
};

View File

@@ -3,10 +3,18 @@
config,
lib,
...
}: let
inherit (lib) mkIf mkEnableOption mkOption types mkMerge;
}:
let
inherit (lib)
mkIf
mkEnableOption
mkOption
types
mkMerge
;
cfg = config.home.programs.pkgs;
in {
in
{
options = {
home.programs.pkgs = {
enable = mkEnableOption "Enables miscellaneous utility apps";
@@ -41,14 +49,15 @@ in {
programs = {
btop = {
enable = true;
package = pkgs.btop.override {rocmSupport = true;};
package = pkgs.btop.override { rocmSupport = true; };
settings = {
color_theme = "gruvbox_material_dark";
};
};
};
home.packages = with pkgs;
home.packages =
with pkgs;
mkMerge [
[
cmatrix
@@ -98,13 +107,13 @@ in {
])
(mkIf cfg.laptop.enable [
])
])
(mkIf cfg.server.enable [
])
])
(mkIf cfg.dev.enable [
])
])
];
};
}

View File

@@ -3,10 +3,12 @@
config,
lib,
...
}: let
}:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.home.programs.rofi;
in {
in
{
options = {
home.programs.rofi.enable = mkEnableOption "Enables firefox";
};

View File

@@ -2,10 +2,12 @@
config,
lib,
...
}: let
}:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.home.programs.ssh;
in {
in
{
options = {
home.programs.ssh.enable = mkEnableOption "Enables ssh";
};

View File

@@ -4,12 +4,20 @@
lib,
config,
...
}: let
inherit (lib) mkIf mkEnableOption concatStringsSep head filter getExe;
}:
let
inherit (lib)
mkIf
mkEnableOption
concatStringsSep
head
filter
getExe
;
cfg = config.home.programs.steam;
steam-with-pkgs = pkgs.steam.override {
extraPkgs = pkgs:
with pkgs; [
extraPkgs =
pkgs: with pkgs; [
xorg.libXcursor
xorg.libXi
xorg.libXinerama
@@ -25,32 +33,34 @@
};
monitor = head (filter (m: m.primary) config.monitors);
steam-session = let
gamescope = concatStringsSep " " [
(getExe pkgs.gamescope)
"--output-width ${toString monitor.width}"
"--output-height ${toString monitor.height}"
"--framerate-limit ${toString monitor.refreshRate}"
"--prefer-output ${monitor.name}"
# "--adaptive-sync"
"--expose-wayland"
"--hdr-enabled"
"--steam"
];
steam = concatStringsSep " " [
"steam"
"steam://open/bigpicture"
];
in
steam-session =
let
gamescope = concatStringsSep " " [
(getExe pkgs.gamescope)
"--output-width ${toString monitor.width}"
"--output-height ${toString monitor.height}"
"--framerate-limit ${toString monitor.refreshRate}"
"--prefer-output ${monitor.name}"
# "--adaptive-sync"
"--expose-wayland"
"--hdr-enabled"
"--steam"
];
steam = concatStringsSep " " [
"steam"
"steam://open/bigpicture"
];
in
pkgs.writeTextDir "share/wayland-sessions/steam-sesson.desktop" # ini
''
[Desktop Entry]
Name=Steam Session
Exec=${gamescope} -- ${steam}
Type=Application
'';
in {
''
[Desktop Entry]
Name=Steam Session
Exec=${gamescope} -- ${steam}
Type=Application
'';
in
{
options = {
home.programs.steam.enable = mkEnableOption "Enables steam";
};

View File

@@ -4,10 +4,12 @@
lib,
pkgs,
...
}: let
}:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.home.programs.tuirun;
in {
in
{
imports = [
inputs.tuirun.homeManagerModules.default
];

View File

@@ -3,10 +3,12 @@
lib,
pkgs,
...
}: let
}:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.home.programs.vscode;
in {
in
{
options = {
home.programs.vscode.enable = mkEnableOption "Enables vscode";
};

View File

@@ -3,19 +3,21 @@
config,
lib,
...
}: let
}:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.home.programs.waybar;
# uwsm = lib.getExe pkgs.uwsm;
waybar = lib.getExe pkgs.waybar;
waybarAssets = pkgs.runCommand "waybar-config-assets" {} ''
waybarAssets = pkgs.runCommand "waybar-config-assets" { } ''
mkdir -p $out/assets
cp ${./assets/button.svg} $out/assets/button.svg
cp ${./config/style.css} $out/style.css
cp ${./config/config.jsonc} $out/config.jsonc
'';
in {
in
{
options = {
home.programs.waybar.enable = mkEnableOption "Enables waybar";
};
@@ -23,7 +25,7 @@ in {
systemd.user.services.waybar = {
Unit = {
Description = "Highly customizable Wayland bar for Sway and Wlroots based compositors.";
After = ["graphical-session.target"];
After = [ "graphical-session.target" ];
};
Service = {
Type = "exec";
@@ -32,7 +34,7 @@ in {
Slice = "app-graphical.slice";
};
Install = {
WantedBy = ["graphical-session.target"];
WantedBy = [ "graphical-session.target" ];
};
};
};

View File

@@ -4,13 +4,15 @@
lib,
inputs,
...
}: let
}:
let
enable_wayland = "true";
# weztermPkg = pkgs.wezterm;
weztermFlake = inputs.wezterm.packages.${pkgs.system}.default;
inherit (lib) mkIf mkEnableOption;
cfg = config.home.programs.wezterm;
in {
in
{
options = {
home.programs.wezterm.enable = mkEnableOption "Enables wezterm programs";
};
@@ -19,9 +21,7 @@ in {
enable = true;
package = weztermFlake;
extraConfig =
/*
lua
*/
# lua
''
local wezterm = require 'wezterm'

View File

@@ -3,10 +3,12 @@
config,
lib,
...
}: let
}:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.home.programs.yazi;
in {
in
{
imports = [
./theme
];
@@ -25,7 +27,11 @@ in {
settings = {
manager = {
layout = [1 4 3];
layout = [
1
4
3
];
sort_by = "alphabetical";
sort_sensitive = true;
sort_reverse = false;

View File

@@ -1,8 +1,14 @@
{
programs.yazi.theme.help = {
on = {fg = "#fe8019";};
exec = {fg = "#83a598";};
desc = {fg = "#928374";};
on = {
fg = "#fe8019";
};
exec = {
fg = "#83a598";
};
desc = {
fg = "#928374";
};
hovered = {
bg = "#504945";
bold = true;

View File

@@ -1,8 +1,12 @@
{
programs.yazi.theme.input = {
border = {fg = "#bdae93";};
title = {};
value = {};
selected = {reversed = true;};
border = {
fg = "#bdae93";
};
title = { };
value = { };
selected = {
reversed = true;
};
};
}

View File

@@ -1,13 +1,17 @@
{
programs.yazi.theme.manager = {
cwd = {fg = "#83a598";};
cwd = {
fg = "#83a598";
};
# Hovered
hovered = {
fg = "#282828";
bg = "#83a598";
};
preview_hovered = {underline = true;};
preview_hovered = {
underline = true;
};
# Find
find_keyword = {
@@ -47,11 +51,23 @@
# Border;
border_symbol = "";
border_style = {fg = "#665c54";};
border_style = {
fg = "#665c54";
};
# Offset;
folder_offset = [1 0 1 0];
preview_offset = [1 1 1 1];
folder_offset = [
1
0
1
0
];
preview_offset = [
1
1
1
1
];
# Highlighting;
syntect_theme = "";

View File

@@ -1,7 +1,11 @@
{
programs.yazi.theme.select = {
border = {fg = "#504945";};
active = {fg = "#fe8019";};
inactive = {};
border = {
fg = "#504945";
};
active = {
fg = "#fe8019";
};
inactive = { };
};
}

View File

@@ -39,10 +39,20 @@
};
# Permissions;
permissions_t = {fg = "#504945";};
permissions_r = {fg = "#b8bb26";};
permissions_w = {fg = "#fb4934";};
permissions_x = {fg = "#b8bb26";};
permissions_s = {fg = "#665c54";};
permissions_t = {
fg = "#504945";
};
permissions_r = {
fg = "#b8bb26";
};
permissions_w = {
fg = "#fb4934";
};
permissions_x = {
fg = "#b8bb26";
};
permissions_s = {
fg = "#665c54";
};
};
}

View File

@@ -1,7 +1,11 @@
{
programs.yazi.theme.tasks = {
border = {fg = "#504945";};
title = {};
hovered = {underline = true;};
border = {
fg = "#504945";
};
title = { };
hovered = {
underline = true;
};
};
}

View File

@@ -1,10 +1,20 @@
{
programs.yazi.theme.which = {
mask = {bg = "#3c3836";};
cand = {fg = "#83a598";};
rest = {fg = "#928374";};
desc = {fg = "#fe8019";};
mask = {
bg = "#3c3836";
};
cand = {
fg = "#83a598";
};
rest = {
fg = "#928374";
};
desc = {
fg = "#fe8019";
};
separator = " ";
separator_style = {fg = "#504945";};
separator_style = {
fg = "#504945";
};
};
}

View File

@@ -2,10 +2,12 @@
config,
lib,
...
}: let
}:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.home.programs.zathura;
in {
in
{
options = {
home.programs.zathura.enable = mkEnableOption "Enables zathura";
};

View File

@@ -2,10 +2,12 @@
config,
lib,
...
}: let
}:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.home.programs.zed-editor;
in {
in
{
options = {
home.programs.zed-editor.enable = mkEnableOption "Enables zed-editor";
};

View File

@@ -2,10 +2,12 @@
config,
lib,
...
}: let
}:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.home.programs.zellij;
in {
in
{
options = {
home.programs.zellij.enable = mkEnableOption "Enables zellij";
};

View File

@@ -4,10 +4,12 @@
lib,
inputs,
...
}: let
}:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.home.programs.zen;
in {
in
{
options = {
home.programs.zen.enable = mkEnableOption "Enables zen browser";
};

View File

@@ -3,12 +3,14 @@
lib,
pkgs,
...
}: let
}:
let
inherit (lib) mkIf mkEnableOption;
inherit (lib.meta) getExe;
inherit (pkgs) eza bat;
cfg = config.home.programs.zsh;
in {
in
{
options = {
home.programs.zsh.enable = mkEnableOption "Enables zsh home configuration";
};

View File

@@ -2,10 +2,12 @@
config,
lib,
...
}: let
}:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.home.services.blueman-applet;
in {
in
{
options = {
home.services.blueman-applet.enable = mkEnableOption "Enables blueman-applet";
};

View File

@@ -2,10 +2,12 @@
config,
lib,
...
}: let
}:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.home.services.copyq;
in {
in
{
options = {
home.services.copyq.enable = mkEnableOption "Enables copyq";
};

View File

@@ -2,10 +2,12 @@
config,
lib,
...
}: let
}:
let
inherit (lib) types mkOption;
cfg = config.home.services.dconf;
in {
in
{
options = {
home.services.dconf.settings.color-scheme = mkOption {
type = types.str;

View File

@@ -3,10 +3,12 @@
lib,
pkgs,
...
}: let
}:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.home.services.dunst;
in {
in
{
options = {
home.services.dunst.enable = mkEnableOption "Enables dunst";
};

View File

@@ -3,10 +3,12 @@
lib,
pkgs,
...
}: let
}:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.home.services.gpg;
in {
in
{
options = {
home.services.gpg.enable = mkEnableOption "Enables gpg";
};

View File

@@ -3,10 +3,12 @@
config,
lib,
...
}: let
}:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.home.services.gtk;
in {
in
{
options = {
home.services.gtk.enable = mkEnableOption "Enables miscellaneous GTK elements";
};

View File

@@ -3,10 +3,12 @@
pkgs,
lib,
...
}: let
}:
let
inherit (lib) types mkOption mkIf;
cfg = config.home.userd.gtk;
in {
in
{
options = {
home.userd.gtk.enable = mkOption {
type = types.bool;
@@ -60,7 +62,7 @@ in {
config = mkIf cfg.enable {
home = {
packages = [pkgs.glib];
packages = [ pkgs.glib ];
pointerCursor = {
package = cfg.cursorTheme.package;

View File

@@ -4,13 +4,15 @@
pkgs,
inputs,
...
}: let
}:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.home.services.hypridle;
hypridleFlake = inputs.hypridle.packages.${pkgs.system}.hypridle;
# hypridlePkg = pkgs.hypridle;
in {
in
{
options = {
home.services.hypridle.enable = mkEnableOption "Enables hypridle";
};

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