Compare commits
47 commits
81e474d726
...
056899d344
Author | SHA1 | Date | |
---|---|---|---|
056899d344 | |||
276658b73c | |||
884e2dcf89 | |||
82e5246293 | |||
ae6354806e | |||
337df8cc99 | |||
6c34b71580 | |||
7a5f26cca5 | |||
29e5b92702 | |||
d795d1fc6b | |||
7232b41cf6 | |||
518f075e79 | |||
92d4323155 | |||
952b367f22 | |||
405bbee2bf | |||
9632aba595 | |||
a7f5a40a43 | |||
56e0f9230e | |||
e8a24dcbe7 | |||
12d91be692 | |||
b2354df152 | |||
02f6f2c5d9 | |||
4f29961c4c | |||
a2d3fc0667 | |||
fc60ae8fed | |||
42b554c87f | |||
85ec5290d0 | |||
9740163109 | |||
01a3efdd1d | |||
f6d8c5e76b | |||
07d7f551f9 | |||
51524ccd8a | |||
c26cea6183 | |||
2433d75e85 | |||
ea25b5d28e | |||
5c5bff3a65 | |||
45448b8102 | |||
80e84121dd | |||
13f31c1b8e | |||
fad53f2613 | |||
bffb3a75cc | |||
5975c82fd8 | |||
7aa4ccbc7e | |||
6d08d7b0f1 | |||
83a7ce70b5 | |||
487adbf911 | |||
12cfafeb3e |
79
flake.nix
79
flake.nix
|
@ -68,14 +68,11 @@
|
||||||
nixos-conf-editor.url = "github:vlinkz/nixos-conf-editor";
|
nixos-conf-editor.url = "github:vlinkz/nixos-conf-editor";
|
||||||
nix-software-center.url = "github:vlinkz/nix-software-center";
|
nix-software-center.url = "github:vlinkz/nix-software-center";
|
||||||
};
|
};
|
||||||
outputs =
|
outputs = inputs:
|
||||||
inputs:
|
|
||||||
let
|
let
|
||||||
nixpkgsConfig = {
|
nixpkgsConfig = {
|
||||||
inherit system;
|
inherit system;
|
||||||
config = {
|
config = { allowUnfree = true; };
|
||||||
allowUnfree = true;
|
|
||||||
};
|
|
||||||
overlays = old_overlays.all;
|
overlays = old_overlays.all;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -88,37 +85,32 @@
|
||||||
|
|
||||||
old_overlays = (import ./overlays { inherit packages inputs; });
|
old_overlays = (import ./overlays { inherit packages inputs; });
|
||||||
|
|
||||||
specialArgs = {
|
specialArgs = { inherit inputs; };
|
||||||
inherit inputs;
|
common_modules = [
|
||||||
};
|
{ nixpkgs.pkgs = pkgs; }
|
||||||
common_modules =
|
./system/configuration.nix
|
||||||
[
|
./system/secrets.nix
|
||||||
{ nixpkgs.pkgs = pkgs; }
|
./system/specialisation.nix
|
||||||
./system/configuration.nix
|
./system/greetd.nix
|
||||||
./system/secrets.nix
|
{ login-manager.greetd.enable = desktop == "sway" || desktop == "hyprland"; }
|
||||||
./system/specialisation.nix
|
|
||||||
./system/greetd.nix
|
|
||||||
{ login-manager.greetd.enable = desktop == "sway" || desktop == "hyprland"; }
|
|
||||||
|
|
||||||
inputs.agenix.nixosModules.default
|
inputs.agenix.nixosModules.default
|
||||||
inputs.hyprland.nixosModules.default
|
inputs.hyprland.nixosModules.default
|
||||||
inputs.dzgui-nix.nixosModules.default
|
inputs.dzgui-nix.nixosModules.default
|
||||||
{ programs.hyprland.enable = (desktop == "hyprland"); }
|
{ programs.hyprland.enable = (desktop == "hyprland"); }
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
{
|
{
|
||||||
home-manager.useGlobalPkgs = true;
|
home-manager.useGlobalPkgs = true;
|
||||||
home-manager.useUserPackages = true;
|
home-manager.useUserPackages = true;
|
||||||
home-manager.users.lelgenio = import ./user/home.nix;
|
home-manager.users.lelgenio = import ./user/home.nix;
|
||||||
home-manager.backupFileExtension = "bkp";
|
home-manager.backupFileExtension = "bkp";
|
||||||
# Optionally, use home-manager.extraSpecialArgs to pass
|
# Optionally, use home-manager.extraSpecialArgs to pass
|
||||||
# arguments to home.nix
|
# arguments to home.nix
|
||||||
home-manager.extraSpecialArgs = {
|
home-manager.extraSpecialArgs = { inherit inputs; };
|
||||||
inherit inputs;
|
}
|
||||||
};
|
]
|
||||||
}
|
++ lib.optional (desktop == "gnome") ./system/gnome.nix
|
||||||
]
|
++ lib.optional (desktop == "kde") ./system/kde.nix;
|
||||||
++ lib.optional (desktop == "gnome") ./system/gnome.nix
|
|
||||||
++ lib.optional (desktop == "kde") ./system/kde.nix;
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
|
@ -152,16 +144,11 @@
|
||||||
};
|
};
|
||||||
pixie = lib.nixosSystem {
|
pixie = lib.nixosSystem {
|
||||||
inherit system specialArgs;
|
inherit system specialArgs;
|
||||||
modules =
|
modules = [ ./hosts/pixie.nix ] ++ common_modules ++ [{
|
||||||
[ ./hosts/pixie.nix ]
|
packages.media-packages.enable = lib.mkOverride 0 false;
|
||||||
++ common_modules
|
programs.steam.enable = lib.mkOverride 0 false;
|
||||||
++ [
|
services.flatpak.enable = lib.mkOverride 0 false;
|
||||||
{
|
}];
|
||||||
packages.media-packages.enable = lib.mkOverride 0 false;
|
|
||||||
programs.steam.enable = lib.mkOverride 0 false;
|
|
||||||
services.flatpak.enable = lib.mkOverride 0 false;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
phantom = lib.nixosSystem {
|
phantom = lib.nixosSystem {
|
||||||
inherit system specialArgs;
|
inherit system specialArgs;
|
||||||
|
@ -182,6 +169,6 @@
|
||||||
|
|
||||||
packages.${system} = pkgs // packages;
|
packages.${system} = pkgs // packages;
|
||||||
|
|
||||||
formatter.${system} = pkgs.nixfmt-rfc-style;
|
formatter.${system} = pkgs.nixpkgs-fmt;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,32 +1,13 @@
|
||||||
{
|
{ config, lib, pkgs, modulesPath, ... }:
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
modulesPath,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
let
|
||||||
btrfs_options = [
|
btrfs_options = [ "compress=zstd:3" "noatime" "x-systemd.device-timeout=0" ];
|
||||||
"compress=zstd:3"
|
btrfs_ssd = [ "ssd" "discard=async" ];
|
||||||
"noatime"
|
|
||||||
"x-systemd.device-timeout=0"
|
|
||||||
];
|
|
||||||
btrfs_ssd = [
|
|
||||||
"ssd"
|
|
||||||
"discard=async"
|
|
||||||
];
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [
|
boot.initrd.availableKernelModules =
|
||||||
"xhci_pci"
|
[ "xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" ];
|
||||||
"ahci"
|
|
||||||
"nvme"
|
|
||||||
"usb_storage"
|
|
||||||
"usbhid"
|
|
||||||
"sd_mod"
|
|
||||||
];
|
|
||||||
boot.initrd.kernelModules = [ "i915" ];
|
boot.initrd.kernelModules = [ "i915" ];
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
@ -37,7 +18,8 @@ in
|
||||||
options = [ "subvol=@" ] ++ btrfs_options ++ btrfs_ssd;
|
options = [ "subvol=@" ] ++ btrfs_options ++ btrfs_ssd;
|
||||||
};
|
};
|
||||||
|
|
||||||
boot.initrd.luks.devices."luks-d6573cf8-25f0-4ffc-8046-ac3a4db1e964".device = "/dev/disk/by-uuid/d6573cf8-25f0-4ffc-8046-ac3a4db1e964";
|
boot.initrd.luks.devices."luks-d6573cf8-25f0-4ffc-8046-ac3a4db1e964".device =
|
||||||
|
"/dev/disk/by-uuid/d6573cf8-25f0-4ffc-8046-ac3a4db1e964";
|
||||||
|
|
||||||
fileSystems."/boot" = {
|
fileSystems."/boot" = {
|
||||||
device = "/dev/disk/by-uuid/97EB-7DB5";
|
device = "/dev/disk/by-uuid/97EB-7DB5";
|
||||||
|
@ -55,7 +37,8 @@ in
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
|
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
|
||||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
hardware.cpu.intel.updateMicrocode =
|
||||||
|
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
|
||||||
networking.hostName = "double-rainbow"; # Define your hostname.
|
networking.hostName = "double-rainbow"; # Define your hostname.
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,30 +1,15 @@
|
||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
# and may be overwritten by future invocations. Please make changes
|
# and may be overwritten by future invocations. Please make changes
|
||||||
# to /etc/nixos/configuration.nix instead.
|
# to /etc/nixos/configuration.nix instead.
|
||||||
{
|
{ config, lib, pkgs, modulesPath, ... }:
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
modulesPath,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
let
|
||||||
btrfs_options = [
|
btrfs_options = [ "compress=zstd:3" "noatime" "x-systemd.device-timeout=0" ];
|
||||||
"compress=zstd:3"
|
|
||||||
"noatime"
|
|
||||||
"x-systemd.device-timeout=0"
|
|
||||||
];
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [
|
boot.initrd.availableKernelModules =
|
||||||
"xhci_pci"
|
[ "xhci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_usb_sdmmc" ];
|
||||||
"ahci"
|
|
||||||
"usb_storage"
|
|
||||||
"sd_mod"
|
|
||||||
"rtsx_usb_sdmmc"
|
|
||||||
];
|
|
||||||
boot.initrd.kernelModules = [ ];
|
boot.initrd.kernelModules = [ ];
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
@ -60,12 +45,10 @@ in
|
||||||
options = [ "subvol=@swap" ] ++ btrfs_options;
|
options = [ "subvol=@swap" ] ++ btrfs_options;
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [
|
swapDevices = [{
|
||||||
{
|
device = "/swap/swapfile";
|
||||||
device = "/swap/swapfile";
|
size = (1024 * 8) + (1024 * 2); # RAM size + 2 GB
|
||||||
size = (1024 * 8) + (1024 * 2); # RAM size + 2 GB
|
}];
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
# 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
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
|
@ -76,6 +59,7 @@ in
|
||||||
# networking.interfaces.wlp1s0.useDHCP = lib.mkDefault true;
|
# networking.interfaces.wlp1s0.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
|
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
|
||||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
hardware.cpu.intel.updateMicrocode =
|
||||||
|
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
networking.hostName = "i15"; # Define your hostname.
|
networking.hostName = "i15"; # Define your hostname.
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,38 +1,21 @@
|
||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
# and may be overwritten by future invocations. Please make changes
|
# and may be overwritten by future invocations. Please make changes
|
||||||
# to /etc/nixos/configuration.nix instead.
|
# to /etc/nixos/configuration.nix instead.
|
||||||
{
|
{ config, lib, pkgs, modulesPath, ... }:
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
modulesPath,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
let
|
||||||
btrfs_options = [
|
btrfs_options = [ "compress=zstd:3" "noatime" "x-systemd.device-timeout=0" ];
|
||||||
"compress=zstd:3"
|
btrfs_ssd = [ "ssd" "discard=async" ];
|
||||||
"noatime"
|
|
||||||
"x-systemd.device-timeout=0"
|
|
||||||
];
|
|
||||||
btrfs_ssd = [
|
|
||||||
"ssd"
|
|
||||||
"discard=async"
|
|
||||||
];
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||||
boot.initrd.availableKernelModules = [
|
boot.initrd.availableKernelModules =
|
||||||
"nvme"
|
[ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
|
||||||
"xhci_pci"
|
|
||||||
"ahci"
|
|
||||||
"usb_storage"
|
|
||||||
"usbhid"
|
|
||||||
"sd_mod"
|
|
||||||
];
|
|
||||||
|
|
||||||
hardware.opentabletdriver.enable = true;
|
hardware.opentabletdriver.enable = true;
|
||||||
|
|
||||||
boot.extraModulePackages = with config.boot.kernelPackages; [ zenpower ];
|
boot.extraModulePackages = with config.boot.kernelPackages; [
|
||||||
|
zenpower
|
||||||
|
];
|
||||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||||
boot.kernelModules = [
|
boot.kernelModules = [
|
||||||
"kvm-amd"
|
"kvm-amd"
|
||||||
|
@ -105,34 +88,22 @@ in
|
||||||
fileSystems."/home/lelgenio/Games" = {
|
fileSystems."/home/lelgenio/Games" = {
|
||||||
device = "/dev/disk/by-label/BTRFS_DATA";
|
device = "/dev/disk/by-label/BTRFS_DATA";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = [
|
options = [ "subvol=@games" "nofail" ] ++ btrfs_options;
|
||||||
"subvol=@games"
|
|
||||||
"nofail"
|
|
||||||
] ++ btrfs_options;
|
|
||||||
};
|
};
|
||||||
fileSystems."/home/lelgenio/Downloads/Torrents" = {
|
fileSystems."/home/lelgenio/Downloads/Torrents" = {
|
||||||
device = "/dev/disk/by-label/BTRFS_DATA";
|
device = "/dev/disk/by-label/BTRFS_DATA";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = [
|
options = [ "subvol=@torrents" "nofail" ] ++ btrfs_options;
|
||||||
"subvol=@torrents"
|
|
||||||
"nofail"
|
|
||||||
] ++ btrfs_options;
|
|
||||||
};
|
};
|
||||||
fileSystems."/home/lelgenio/Música" = {
|
fileSystems."/home/lelgenio/Música" = {
|
||||||
device = "/dev/disk/by-label/BTRFS_DATA";
|
device = "/dev/disk/by-label/BTRFS_DATA";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = [
|
options = [ "subvol=@music" "nofail" ] ++ btrfs_options;
|
||||||
"subvol=@music"
|
|
||||||
"nofail"
|
|
||||||
] ++ btrfs_options;
|
|
||||||
};
|
};
|
||||||
fileSystems."/home/lelgenio/.local/mount/data" = {
|
fileSystems."/home/lelgenio/.local/mount/data" = {
|
||||||
device = "/dev/disk/by-label/BTRFS_DATA";
|
device = "/dev/disk/by-label/BTRFS_DATA";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = [
|
options = [ "subvol=@data" "nofail" ] ++ btrfs_options;
|
||||||
"subvol=@data"
|
|
||||||
"nofail"
|
|
||||||
] ++ btrfs_options;
|
|
||||||
};
|
};
|
||||||
fileSystems."/home/lelgenio/.local/mount/bigboy" = {
|
fileSystems."/home/lelgenio/.local/mount/bigboy" = {
|
||||||
device = "/dev/disk/by-label/BTRFS_BIGBOY";
|
device = "/dev/disk/by-label/BTRFS_BIGBOY";
|
||||||
|
@ -142,20 +113,8 @@ in
|
||||||
fileSystems."/home/lelgenio/projects" = {
|
fileSystems."/home/lelgenio/projects" = {
|
||||||
device = "/dev/disk/by-label/BTRFS_BIGBOY";
|
device = "/dev/disk/by-label/BTRFS_BIGBOY";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = [
|
options = [ "subvol=@projects" "nofail" ] ++ btrfs_options ++ btrfs_ssd;
|
||||||
"subvol=@projects"
|
|
||||||
"nofail"
|
|
||||||
] ++ btrfs_options ++ btrfs_ssd;
|
|
||||||
};
|
};
|
||||||
fileSystems."/var/lib/docker" = {
|
|
||||||
device = "/dev/disk/by-label/BTRFS_BIGBOY";
|
|
||||||
fsType = "btrfs";
|
|
||||||
options = [
|
|
||||||
"subvol=@docker"
|
|
||||||
"nofail"
|
|
||||||
] ++ btrfs_options ++ btrfs_ssd;
|
|
||||||
};
|
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
# 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
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
# still possible to use this option, but it's recommended to use it in conjunction
|
# still possible to use this option, but it's recommended to use it in conjunction
|
||||||
|
@ -163,7 +122,8 @@ in
|
||||||
networking.useDHCP = lib.mkDefault true;
|
networking.useDHCP = lib.mkDefault true;
|
||||||
# networking.interfaces.enp4s0.useDHCP = lib.mkDefault true;
|
# networking.interfaces.enp4s0.useDHCP = lib.mkDefault true;
|
||||||
powerManagement.cpuFreqGovernor = "ondemand";
|
powerManagement.cpuFreqGovernor = "ondemand";
|
||||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
hardware.cpu.amd.updateMicrocode =
|
||||||
|
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
networking.hostName = "monolith"; # Define your hostname.
|
networking.hostName = "monolith"; # Define your hostname.
|
||||||
|
|
||||||
# Fix broken suspend with Logitech USB dongle
|
# Fix broken suspend with Logitech USB dongle
|
||||||
|
@ -180,10 +140,8 @@ in
|
||||||
# with the exception of `"subvol=swap"`, the other options are repeated in my other `fileSystem` mounts
|
# with the exception of `"subvol=swap"`, the other options are repeated in my other `fileSystem` mounts
|
||||||
options = [ "subvol=swap" ] ++ btrfs_options ++ btrfs_ssd;
|
options = [ "subvol=swap" ] ++ btrfs_options ++ btrfs_ssd;
|
||||||
};
|
};
|
||||||
swapDevices = [
|
swapDevices = [{
|
||||||
{
|
device = "/swap/swapfile";
|
||||||
device = "/swap/swapfile";
|
size = (1024 * 16) + (1024 * 2); # RAM size + 2 GB
|
||||||
size = (1024 * 16) + (1024 * 2); # RAM size + 2 GB
|
}];
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
{
|
{ config, pkgs, inputs, ... }: {
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
inputs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
./vpsadminos.nix
|
./vpsadminos.nix
|
||||||
inputs.agenix.nixosModules.default
|
inputs.agenix.nixosModules.default
|
||||||
|
@ -55,16 +49,10 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
dates = "04:40";
|
dates = "04:40";
|
||||||
operation = "switch";
|
operation = "switch";
|
||||||
flags = [
|
flags = [ "--update-input" "nixpkgs" "--no-write-lock-file" "-L" ];
|
||||||
"--update-input"
|
|
||||||
"nixpkgs"
|
|
||||||
"--no-write-lock-file"
|
|
||||||
"-L"
|
|
||||||
];
|
|
||||||
flake = "git+https://git.lelgenio.com/lelgenio/nixos-config#phantom";
|
flake = "git+https://git.lelgenio.com/lelgenio/nixos-config#phantom";
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [ 8745 ];
|
|
||||||
|
|
||||||
system.stateVersion = "23.05"; # Never change this
|
system.stateVersion = "23.05"; # Never change this
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,10 @@
|
||||||
{
|
{ pkgs, inputs, config, ... }: {
|
||||||
pkgs,
|
|
||||||
inputs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
# It's important to let Digital Ocean set the hostname so we get rDNS to work
|
# It's important to let Digital Ocean set the hostname so we get rDNS to work
|
||||||
networking.hostName = "";
|
networking.hostName = "";
|
||||||
|
|
||||||
imports = [ inputs.nixos-mailserver.nixosModules.mailserver ];
|
imports = [
|
||||||
|
inputs.nixos-mailserver.nixosModules.mailserver
|
||||||
|
];
|
||||||
|
|
||||||
mailserver = {
|
mailserver = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -58,4 +54,5 @@
|
||||||
$config['plugins'] = [ "carddav", "archive" ];
|
$config['plugins'] = [ "carddav", "archive" ];
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,4 @@
|
||||||
{
|
{ lib, pkgs, config, ... }:
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
let
|
||||||
cfg = config.services.forgejo;
|
cfg = config.services.forgejo;
|
||||||
srv = cfg.settings.server;
|
srv = cfg.settings.server;
|
||||||
|
|
|
@ -1,14 +1,7 @@
|
||||||
{
|
{ config, pkgs, inputs, ... }: {
|
||||||
config,
|
swapDevices = [{
|
||||||
pkgs,
|
device = "/swap/swapfile";
|
||||||
inputs,
|
size = (1024 * 2); # 2 GB
|
||||||
...
|
}];
|
||||||
}:
|
|
||||||
{
|
|
||||||
swapDevices = [
|
|
||||||
{
|
|
||||||
device = "/swap/swapfile";
|
|
||||||
size = (1024 * 2); # 2 GB
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
{
|
{ config, pkgs, inputs, ... }: {
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
inputs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
services.mastodon = {
|
services.mastodon = {
|
||||||
enable = true;
|
enable = true;
|
||||||
configureNginx = true;
|
configureNginx = true;
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
{
|
{ config, pkgs, inputs, ... }: {
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
inputs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
services.nextcloud = {
|
services.nextcloud = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.nextcloud27;
|
package = pkgs.nextcloud27;
|
||||||
|
@ -28,4 +22,6 @@
|
||||||
group = "nextcloud";
|
group = "nextcloud";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
{
|
{ config, pkgs, lib, ... }: {
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
services.nginx = {
|
services.nginx = {
|
||||||
enable = true;
|
enable = true;
|
||||||
recommendedProxySettings = true;
|
recommendedProxySettings = true;
|
||||||
|
@ -14,33 +8,21 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
# Redirect *lelgenio.xyz -> *lelgenio.com
|
# Redirect *lelgenio.xyz -> *lelgenio.com
|
||||||
services.nginx.virtualHosts =
|
services.nginx.virtualHosts = lib.mapAttrs'
|
||||||
lib.mapAttrs' (key: value: lib.nameValuePair "${key}lelgenio.xyz" value)
|
(key: value: lib.nameValuePair "${key}lelgenio.xyz" value)
|
||||||
(
|
(
|
||||||
lib.genAttrs
|
lib.genAttrs [ "" "social." "blog." "cloud." "mail." "git." "syncthing." ] (name: {
|
||||||
[
|
enableACME = true;
|
||||||
""
|
forceSSL = true;
|
||||||
"social."
|
locations."/".return = "301 $scheme://${name}lelgenio.com$request_uri";
|
||||||
"blog."
|
})
|
||||||
"cloud."
|
);
|
||||||
"mail."
|
|
||||||
"git."
|
|
||||||
"syncthing."
|
|
||||||
]
|
|
||||||
(name: {
|
|
||||||
enableACME = true;
|
|
||||||
forceSSL = true;
|
|
||||||
locations."/".return = "301 $scheme://${name}lelgenio.com$request_uri";
|
|
||||||
})
|
|
||||||
);
|
|
||||||
|
|
||||||
security.acme = {
|
security.acme = {
|
||||||
acceptTerms = true;
|
acceptTerms = true;
|
||||||
defaults.email = "lelgenio@disroot.org";
|
defaults.email = "lelgenio@disroot.org";
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [
|
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
||||||
80
|
|
||||||
443
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
{
|
{ config, pkgs, inputs, ... }: {
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
inputs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
|
|
||||||
services.syncthing = {
|
services.syncthing = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -20,10 +14,11 @@
|
||||||
proxyPass = "http://127.0.0.1:8384";
|
proxyPass = "http://127.0.0.1:8384";
|
||||||
extraConfig =
|
extraConfig =
|
||||||
# required when the target is also TLS server with multiple hosts
|
# required when the target is also TLS server with multiple hosts
|
||||||
"proxy_ssl_server_name on;"
|
"proxy_ssl_server_name on;" +
|
||||||
+
|
# required when the server wants to use HTTP Authentication
|
||||||
# required when the server wants to use HTTP Authentication
|
"proxy_pass_header Authorization;"
|
||||||
"proxy_pass_header Authorization;";
|
;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,8 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }: {
|
||||||
{
|
|
||||||
security.rtkit.enable = true;
|
security.rtkit.enable = true;
|
||||||
services.openssh = {
|
services.openssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
ports = [
|
ports = [ 9022 22 ];
|
||||||
9022
|
|
||||||
22
|
|
||||||
];
|
|
||||||
settings = {
|
settings = {
|
||||||
PasswordAuthentication = false;
|
PasswordAuthentication = false;
|
||||||
KbdInteractiveAuthentication = false;
|
KbdInteractiveAuthentication = false;
|
||||||
|
@ -19,15 +15,7 @@
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
description = "Leonardo Eugênio";
|
description = "Leonardo Eugênio";
|
||||||
hashedPassword = "$y$j9T$0e/rczjOVCy7PuwC3pG0V/$gTHZhfO4wQSlFvbDyfghbCnGI2uDI0a52zSrQ/yOA5A";
|
hashedPassword = "$y$j9T$0e/rczjOVCy7PuwC3pG0V/$gTHZhfO4wQSlFvbDyfghbCnGI2uDI0a52zSrQ/yOA5A";
|
||||||
extraGroups = [
|
extraGroups = [ "networkmanager" "wheel" "docker" "adbusers" "bluetooth" "corectrl" "vboxusers" ];
|
||||||
"networkmanager"
|
|
||||||
"wheel"
|
|
||||||
"docker"
|
|
||||||
"adbusers"
|
|
||||||
"bluetooth"
|
|
||||||
"corectrl"
|
|
||||||
"vboxusers"
|
|
||||||
];
|
|
||||||
shell = pkgs.fish;
|
shell = pkgs.fish;
|
||||||
openssh.authorizedKeys.keys = [
|
openssh.authorizedKeys.keys = [
|
||||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCxR/w+38b2lX90yNBqhq3mUmkn1WGu6GAPhN1tVp2ZjYRJNV/+5gWCnTtOWYtDx35HmK/spQ2Qy8X9ttkzORa24fysNx1Iqn/TiXhD7eIJjbGPnrOpIKTkW5/uB3SD/P5NBSa06//BaqJU4sBlG79hoXRpod052hQtdpTVDiMCIV+iboWPKqopmJJfWdBtVnHXs9rep0htPRExxGslImFk7Z6xjcaHyCpIQZPlOGf+sGsmUU7jRqzvZFV8ucIdbnAlMHrU4pepNFhuraESyZVTa/bi9sw0iozXp5Q5+5thMebEslmT1Z771kI4sieDy+O4r8c0Sx2/VY1UAzcpq1faggc3YB01MTh+tiEC6xdMvZLrQGL1NBWjHleMyL53GU5ERluC0vXJF3Hv3BGGBDfXWbrEm5n06DHr2apRVJGC0LwiQ7Woud1X4V4X1pKSusxCVMjT2lmcOwV6YhKhB2sowJc1OdMx4+tL0UWE+YKSZgBHfolwk6ml0F4EO9nnUHc= lelgenio@i15"
|
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCxR/w+38b2lX90yNBqhq3mUmkn1WGu6GAPhN1tVp2ZjYRJNV/+5gWCnTtOWYtDx35HmK/spQ2Qy8X9ttkzORa24fysNx1Iqn/TiXhD7eIJjbGPnrOpIKTkW5/uB3SD/P5NBSa06//BaqJU4sBlG79hoXRpod052hQtdpTVDiMCIV+iboWPKqopmJJfWdBtVnHXs9rep0htPRExxGslImFk7Z6xjcaHyCpIQZPlOGf+sGsmUU7jRqzvZFV8ucIdbnAlMHrU4pepNFhuraESyZVTa/bi9sw0iozXp5Q5+5thMebEslmT1Z771kI4sieDy+O4r8c0Sx2/VY1UAzcpq1faggc3YB01MTh+tiEC6xdMvZLrQGL1NBWjHleMyL53GU5ERluC0vXJF3Hv3BGGBDfXWbrEm5n06DHr2apRVJGC0LwiQ7Woud1X4V4X1pKSusxCVMjT2lmcOwV6YhKhB2sowJc1OdMx4+tL0UWE+YKSZgBHfolwk6ml0F4EO9nnUHc= lelgenio@i15"
|
||||||
|
@ -44,5 +32,7 @@
|
||||||
|
|
||||||
programs.fish.enable = true;
|
programs.fish.enable = true;
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [ git ];
|
environment.systemPackages = with pkgs; [
|
||||||
|
git
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,12 +6,7 @@
|
||||||
#
|
#
|
||||||
# https://github.com/vpsfreecz/vpsadminos/blob/staging/os/lib/nixos-container/vpsadminos.nix
|
# https://github.com/vpsfreecz/vpsadminos/blob/staging/os/lib/nixos-container/vpsadminos.nix
|
||||||
|
|
||||||
{
|
{ config, pkgs, lib, ... }:
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
nameservers = [
|
nameservers = [
|
||||||
|
@ -27,19 +22,16 @@ in
|
||||||
systemd.services.systemd-sysctl.enable = false;
|
systemd.services.systemd-sysctl.enable = false;
|
||||||
systemd.services.systemd-oomd.enable = false;
|
systemd.services.systemd-oomd.enable = false;
|
||||||
systemd.sockets."systemd-journald-audit".enable = false;
|
systemd.sockets."systemd-journald-audit".enable = false;
|
||||||
systemd.mounts = [
|
systemd.mounts = [{ where = "/sys/kernel/debug"; enable = false; }];
|
||||||
{
|
|
||||||
where = "/sys/kernel/debug";
|
|
||||||
enable = false;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
systemd.services.rpc-gssd.enable = false;
|
systemd.services.rpc-gssd.enable = false;
|
||||||
|
|
||||||
# Due to our restrictions in /sys, the default systemd-udev-trigger fails
|
# Due to our restrictions in /sys, the default systemd-udev-trigger fails
|
||||||
# on accessing PCI devices, etc. Override it to match only network devices.
|
# on accessing PCI devices, etc. Override it to match only network devices.
|
||||||
# In addition, boot.isContainer prevents systemd-udev-trigger.service from
|
# In addition, boot.isContainer prevents systemd-udev-trigger.service from
|
||||||
# being enabled at all, so add it explicitly.
|
# being enabled at all, so add it explicitly.
|
||||||
systemd.additionalUpstreamSystemUnits = [ "systemd-udev-trigger.service" ];
|
systemd.additionalUpstreamSystemUnits = [
|
||||||
|
"systemd-udev-trigger.service"
|
||||||
|
];
|
||||||
systemd.services.systemd-udev-trigger.serviceConfig.ExecStart = [
|
systemd.services.systemd-udev-trigger.serviceConfig.ExecStart = [
|
||||||
""
|
""
|
||||||
"-udevadm trigger --subsystem-match=net --action=add"
|
"-udevadm trigger --subsystem-match=net --action=add"
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
{
|
{ config, pkgs, inputs, ... }: {
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
inputs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
services.writefreely = {
|
services.writefreely = {
|
||||||
enable = true;
|
enable = true;
|
||||||
acme.enable = true;
|
acme.enable = true;
|
||||||
|
@ -28,3 +22,4 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,25 +1,13 @@
|
||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
# and may be overwritten by future invocations. Please make changes
|
# and may be overwritten by future invocations. Please make changes
|
||||||
# to /etc/nixos/configuration.nix instead.
|
# to /etc/nixos/configuration.nix instead.
|
||||||
{
|
{ config, lib, pkgs, modulesPath, ... }:
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
modulesPath,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [
|
boot.initrd.availableKernelModules =
|
||||||
"nvme"
|
[ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
|
||||||
"xhci_pci"
|
|
||||||
"ahci"
|
|
||||||
"usb_storage"
|
|
||||||
"usbhid"
|
|
||||||
"sd_mod"
|
|
||||||
];
|
|
||||||
boot.initrd.kernelModules = [ ];
|
boot.initrd.kernelModules = [ ];
|
||||||
boot.kernelModules = [ "kvm-amd" ];
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
@ -30,7 +18,8 @@
|
||||||
options = [ "subvol=nixos" ];
|
options = [ "subvol=nixos" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
boot.initrd.luks.devices."pixie".device = "/dev/disk/by-uuid/f4ae5858-d2d6-4cd1-a054-bf5147a9a928";
|
boot.initrd.luks.devices."pixie".device =
|
||||||
|
"/dev/disk/by-uuid/f4ae5858-d2d6-4cd1-a054-bf5147a9a928";
|
||||||
|
|
||||||
fileSystems."/home" = {
|
fileSystems."/home" = {
|
||||||
device = "/dev/mapper/pixie";
|
device = "/dev/mapper/pixie";
|
||||||
|
@ -57,7 +46,8 @@
|
||||||
# networking.interfaces.enp4s0.useDHCP = lib.mkDefault true;
|
# networking.interfaces.enp4s0.useDHCP = lib.mkDefault true;
|
||||||
# networking.interfaces.veth74f3ffc.useDHCP = lib.mkDefault true;
|
# networking.interfaces.veth74f3ffc.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
hardware.cpu.amd.updateMicrocode =
|
||||||
|
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
|
||||||
networking.hostName = "pixie"; # Define your hostname.
|
networking.hostName = "pixie"; # Define your hostname.
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,34 +1,16 @@
|
||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
# and may be overwritten by future invocations. Please make changes
|
# and may be overwritten by future invocations. Please make changes
|
||||||
# to /etc/nixos/configuration.nix instead.
|
# to /etc/nixos/configuration.nix instead.
|
||||||
{
|
{ config, lib, pkgs, modulesPath, ... }:
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
modulesPath,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
let
|
||||||
btrfs_options = [
|
btrfs_options = [ "compress=zstd:3" "noatime" "x-systemd.device-timeout=0" ];
|
||||||
"compress=zstd:3"
|
btrfs_ssd = [ "ssd" "discard=async" ];
|
||||||
"noatime"
|
|
||||||
"x-systemd.device-timeout=0"
|
|
||||||
];
|
|
||||||
btrfs_ssd = [
|
|
||||||
"ssd"
|
|
||||||
"discard=async"
|
|
||||||
];
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [
|
boot.initrd.availableKernelModules =
|
||||||
"xhci_pci"
|
[ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
|
||||||
"ahci"
|
|
||||||
"usb_storage"
|
|
||||||
"usbhid"
|
|
||||||
"sd_mod"
|
|
||||||
];
|
|
||||||
boot.initrd.kernelModules = [ "i915" ];
|
boot.initrd.kernelModules = [ "i915" ];
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
@ -64,12 +46,10 @@ in
|
||||||
options = [ "subvol=@swap" ] ++ btrfs_ssd;
|
options = [ "subvol=@swap" ] ++ btrfs_ssd;
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [
|
swapDevices = [{
|
||||||
{
|
device = "/swap/swapfile";
|
||||||
device = "/swap/swapfile";
|
size = (1024 * 8);
|
||||||
size = (1024 * 8);
|
}];
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
# 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
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
|
@ -79,7 +59,8 @@ in
|
||||||
# networking.interfaces.enp1s0.useDHCP = lib.mkDefault true;
|
# networking.interfaces.enp1s0.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
|
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
|
||||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
hardware.cpu.intel.updateMicrocode =
|
||||||
|
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
|
||||||
networking.hostName = "rainbow"; # Define your hostname.
|
networking.hostName = "rainbow"; # Define your hostname.
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{ inputs, packages, ... }:
|
{ inputs, packages, ... }: rec {
|
||||||
rec {
|
|
||||||
all = [
|
all = [
|
||||||
scripts
|
scripts
|
||||||
sway
|
sway
|
||||||
|
@ -14,87 +13,68 @@ rec {
|
||||||
|
|
||||||
sway = (import ./sway.nix);
|
sway = (import ./sway.nix);
|
||||||
|
|
||||||
themes = (
|
themes = (final: prev: {
|
||||||
final: prev: {
|
material-wifi-icons = final.stdenv.mkDerivation rec {
|
||||||
material-wifi-icons = final.stdenv.mkDerivation rec {
|
name = "material-wifi-icons";
|
||||||
name = "material-wifi-icons";
|
src = inputs.material-wifi-icons;
|
||||||
src = inputs.material-wifi-icons;
|
installPhase = ''
|
||||||
installPhase = ''
|
install -D material-wifi.ttf $out/share/fonts/${name}
|
||||||
install -D material-wifi.ttf $out/share/fonts/${name}
|
'';
|
||||||
'';
|
};
|
||||||
};
|
papirus_red = (final.papirus-icon-theme.override { color = "red"; });
|
||||||
papirus_red = (final.papirus-icon-theme.override { color = "red"; });
|
orchis_theme_compact = (final.orchis-theme.override {
|
||||||
orchis_theme_compact = (
|
border-radius = 0;
|
||||||
final.orchis-theme.override {
|
tweaks = [ "compact" "solid" ];
|
||||||
border-radius = 0;
|
});
|
||||||
tweaks = [
|
nerdfonts_fira_hack = (final.nerdfonts.override { fonts = [ "FiraCode" "Hack" ]; });
|
||||||
"compact"
|
});
|
||||||
"solid"
|
|
||||||
];
|
|
||||||
}
|
|
||||||
);
|
|
||||||
nerdfonts_fira_hack = (
|
|
||||||
final.nerdfonts.override {
|
|
||||||
fonts = [
|
|
||||||
"FiraCode"
|
|
||||||
"Hack"
|
|
||||||
];
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
new-packages = (
|
new-packages = (final: prev: packages // {
|
||||||
final: prev:
|
dhist = inputs.dhist.packages.${prev.system}.dhist;
|
||||||
packages
|
demoji = inputs.demoji.packages.${prev.system}.default;
|
||||||
// {
|
tlauncher = inputs.tlauncher.packages.${prev.system}.tlauncher;
|
||||||
dhist = inputs.dhist.packages.${prev.system}.dhist;
|
maildir-notify-daemon = inputs.maildir-notify-daemon.packages.${prev.system}.default;
|
||||||
demoji = inputs.demoji.packages.${prev.system}.default;
|
wl-crosshair = inputs.wl-crosshair.packages.${prev.system}.default;
|
||||||
tlauncher = inputs.tlauncher.packages.${prev.system}.tlauncher;
|
});
|
||||||
maildir-notify-daemon = inputs.maildir-notify-daemon.packages.${prev.system}.default;
|
|
||||||
wl-crosshair = inputs.wl-crosshair.packages.${prev.system}.default;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
patches = (
|
patches = (final: prev: {
|
||||||
final: prev: {
|
bemenu = prev.bemenu.overrideAttrs (o: {
|
||||||
bemenu = prev.bemenu.overrideAttrs (o: {
|
postPatch = ''
|
||||||
postPatch = ''
|
substituteInPlace lib/renderers/wayland/window.c \
|
||||||
substituteInPlace lib/renderers/wayland/window.c \
|
--replace ZWLR_LAYER_SHELL_V1_LAYER_TOP ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY
|
||||||
--replace ZWLR_LAYER_SHELL_V1_LAYER_TOP ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY
|
'';
|
||||||
'';
|
});
|
||||||
|
mySway = prev.sway.override {
|
||||||
|
sway-unwrapped = prev.sway-unwrapped.overrideAttrs (old: {
|
||||||
|
patches = old.patches
|
||||||
|
++ [ ../patches/sway/fix-hide_cursor-clearing-focus.patch ];
|
||||||
});
|
});
|
||||||
mySway = prev.sway.override {
|
};
|
||||||
sway-unwrapped = prev.sway-unwrapped.overrideAttrs (old: {
|
mangohud = prev.mangohud.overrideAttrs (o: {
|
||||||
patches = old.patches ++ [ ../patches/sway/fix-hide_cursor-clearing-focus.patch ];
|
patches = o.patches ++ [
|
||||||
});
|
(prev.fetchpatch {
|
||||||
};
|
url = "https://github.com/flightlessmango/MangoHud/commit/95141de657e02577f1d3fab0ca12122bfb68bc56.patch";
|
||||||
mangohud = prev.mangohud.overrideAttrs (o: {
|
hash = "sha256-a2tESliGBkfF7uYQn8TDgeFt07A9FOioI4VcTT7DC7A=";
|
||||||
patches = o.patches ++ [
|
})
|
||||||
(prev.fetchpatch {
|
];
|
||||||
url = "https://github.com/flightlessmango/MangoHud/commit/95141de657e02577f1d3fab0ca12122bfb68bc56.patch";
|
});
|
||||||
hash = "sha256-a2tESliGBkfF7uYQn8TDgeFt07A9FOioI4VcTT7DC7A=";
|
});
|
||||||
})
|
|
||||||
];
|
|
||||||
});
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
variables = (final: prev: { uservars = import ../user/variables.nix; });
|
variables = (final: prev: {
|
||||||
|
uservars = import ../user/variables.nix;
|
||||||
|
});
|
||||||
|
|
||||||
lib_extended = (
|
lib_extended = (final: prev: {
|
||||||
final: prev: {
|
lib = prev.lib // rec {
|
||||||
lib = prev.lib // rec {
|
# Utility function
|
||||||
# Utility function
|
# Input: [{v1=1;} {v2=2;}]
|
||||||
# Input: [{v1=1;} {v2=2;}]
|
# Output: {v1=1;v2=2;}
|
||||||
# Output: {v1=1;v2=2;}
|
mergeAttrsSet = prev.lib.foldAttrs (n: _: n) { };
|
||||||
mergeAttrsSet = prev.lib.foldAttrs (n: _: n) { };
|
|
||||||
|
|
||||||
# Easily translate imperative templating code
|
# Easily translate imperative templating code
|
||||||
# Input: [ 1 2 ] (num: { "v${num}" = num; })
|
# Input: [ 1 2 ] (num: { "v${num}" = num; })
|
||||||
# Output: {v1=1;v2=2;}
|
# Output: {v1=1;v2=2;}
|
||||||
forEachMerge = list: func: mergeAttrsSet (prev.lib.forEach list func);
|
forEachMerge = list: func: mergeAttrsSet (prev.lib.forEach list func);
|
||||||
};
|
};
|
||||||
}
|
});
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,11 @@
|
||||||
{
|
{ lib
|
||||||
lib,
|
, mkYarnPackage
|
||||||
mkYarnPackage,
|
, fetchFromGitHub
|
||||||
fetchFromGitHub,
|
, fetchYarnDeps
|
||||||
fetchYarnDeps,
|
, testers
|
||||||
testers,
|
, writeText
|
||||||
writeText,
|
, runCommand
|
||||||
runCommand,
|
, blade-formatter
|
||||||
blade-formatter,
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
mkYarnPackage rec {
|
mkYarnPackage rec {
|
||||||
|
@ -41,17 +40,15 @@ mkYarnPackage rec {
|
||||||
Hello world!
|
Hello world!
|
||||||
@endif
|
@endif
|
||||||
'';
|
'';
|
||||||
actual =
|
actual = runCommand "actual"
|
||||||
runCommand "actual"
|
{
|
||||||
{
|
nativeBuildInputs = [ blade-formatter ];
|
||||||
nativeBuildInputs = [ blade-formatter ];
|
base = writeText "base" ''
|
||||||
base = writeText "base" ''
|
@if( true ) Hello world! @endif
|
||||||
@if( true ) Hello world! @endif
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
''
|
|
||||||
blade-formatter $base > $out
|
|
||||||
'';
|
'';
|
||||||
|
} ''
|
||||||
|
blade-formatter $base > $out
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,11 @@
|
||||||
{
|
{ lib
|
||||||
lib,
|
, rustPlatform
|
||||||
rustPlatform,
|
, fetchFromGitHub
|
||||||
fetchFromGitHub,
|
, pkg-config
|
||||||
pkg-config,
|
, openssl
|
||||||
openssl,
|
, zlib
|
||||||
zlib,
|
, stdenv
|
||||||
stdenv,
|
, Security ? null
|
||||||
Security ? null,
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
rustPlatform.buildRustPackage rec {
|
rustPlatform.buildRustPackage rec {
|
||||||
|
@ -23,7 +22,9 @@ rustPlatform.buildRustPackage rec {
|
||||||
cargoSha256 = "sha256-hOB84u55ishahIFSqBnqccqH3OlC9J8mCYzsd23jTyA=";
|
cargoSha256 = "sha256-hOB84u55ishahIFSqBnqccqH3OlC9J8mCYzsd23jTyA=";
|
||||||
|
|
||||||
nativeBuildInputs = [ pkg-config ];
|
nativeBuildInputs = [ pkg-config ];
|
||||||
buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security ];
|
buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [
|
||||||
|
Security
|
||||||
|
];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Check all the things.";
|
description = "Check all the things.";
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
# Custom packages, that can be defined similarly to ones from nixpkgs
|
# Custom packages, that can be defined similarly to ones from nixpkgs
|
||||||
# You can build them using 'nix build .#example' or (legacy) 'nix-build -A example'
|
# You can build them using 'nix build .#example' or (legacy) 'nix-build -A example'
|
||||||
|
|
||||||
{ pkgs, inputs }:
|
{ pkgs, inputs }: {
|
||||||
{
|
|
||||||
blade-formatter = pkgs.callPackage ./blade-formatter { };
|
blade-formatter = pkgs.callPackage ./blade-formatter { };
|
||||||
cargo-checkmate = pkgs.callPackage ./cargo-checkmate.nix { };
|
cargo-checkmate = pkgs.callPackage ./cargo-checkmate.nix { };
|
||||||
lipsum = pkgs.callPackage ./lipsum.nix { inherit inputs; };
|
lipsum = pkgs.callPackage ./lipsum.nix { inherit inputs; };
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
{
|
{ lib
|
||||||
lib,
|
, buildNpmPackage
|
||||||
buildNpmPackage,
|
, fetchFromGitHub
|
||||||
fetchFromGitHub,
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildNpmPackage rec {
|
buildNpmPackage rec {
|
||||||
|
|
|
@ -11,7 +11,9 @@ pkgs.stdenv.mkDerivation rec {
|
||||||
wrapGAppsHook
|
wrapGAppsHook
|
||||||
];
|
];
|
||||||
|
|
||||||
makeFlags = [ "PRG=${pname}" ];
|
makeFlags = [
|
||||||
|
"PRG=${pname}"
|
||||||
|
];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
install -Dm 755 "$pname" "$out/bin/$pname"
|
install -Dm 755 "$pname" "$out/bin/$pname"
|
||||||
|
@ -19,3 +21,4 @@ pkgs.stdenv.mkDerivation rec {
|
||||||
glib-compile-schemas "$out/share/glib-2.0/schemas/"
|
glib-compile-schemas "$out/share/glib-2.0/schemas/"
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,134 +1,59 @@
|
||||||
(
|
(final: prev:
|
||||||
final: prev:
|
with prev;
|
||||||
with prev;
|
let
|
||||||
let
|
import_script = (_: path: import (path) { inherit pkgs lib; });
|
||||||
import_script = (_: path: import (path) { inherit pkgs lib; });
|
create_script = (name: text: runtimeInputs:
|
||||||
create_script = (
|
let
|
||||||
name: text: runtimeInputs:
|
script_body = pkgs.writeTextFile {
|
||||||
let
|
inherit name;
|
||||||
script_body = pkgs.writeTextFile {
|
executable = true;
|
||||||
inherit name;
|
text = ''
|
||||||
executable = true;
|
${builtins.readFile text}
|
||||||
text = ''
|
'';
|
||||||
${builtins.readFile text}
|
};
|
||||||
'';
|
in
|
||||||
};
|
(pkgs.writeShellApplication {
|
||||||
in
|
inherit name runtimeInputs;
|
||||||
(pkgs.writeShellApplication {
|
text = ''exec ${script_body} "$@"'';
|
||||||
inherit name runtimeInputs;
|
checkPhase = "";
|
||||||
text = ''exec ${script_body} "$@"'';
|
}));
|
||||||
checkPhase = "";
|
create_scripts =
|
||||||
})
|
lib.mapAttrs (name: deps: create_script name ./${name} deps);
|
||||||
);
|
|
||||||
create_scripts = lib.mapAttrs (name: deps: create_script name ./${name} deps);
|
|
||||||
|
|
||||||
pass = pkgs.pass.withExtensions (ex: with ex; [ pass-otp ]);
|
pass = pkgs.pass.withExtensions (ex: with ex; [
|
||||||
in
|
pass-otp
|
||||||
create_scripts {
|
]);
|
||||||
|
in
|
||||||
|
create_scripts
|
||||||
|
{
|
||||||
br = [ ];
|
br = [ ];
|
||||||
bmenu = [
|
bmenu = [ final.bemenu final.dhist fish j4-dmenu-desktop jq sway ];
|
||||||
final.bemenu
|
down_meme = [ wl-clipboard yt-dlp libnotify ];
|
||||||
final.dhist
|
wl-copy-file = [ wl-clipboard fish ];
|
||||||
fish
|
|
||||||
j4-dmenu-desktop
|
|
||||||
jq
|
|
||||||
sway
|
|
||||||
];
|
|
||||||
down_meme = [
|
|
||||||
wl-clipboard
|
|
||||||
yt-dlp
|
|
||||||
libnotify
|
|
||||||
];
|
|
||||||
wl-copy-file = [
|
|
||||||
wl-clipboard
|
|
||||||
fish
|
|
||||||
];
|
|
||||||
_diffr = [ diffr ];
|
_diffr = [ diffr ];
|
||||||
_thunar-terminal = [ final.terminal ];
|
_thunar-terminal = [ final.terminal ];
|
||||||
_sway_idle_toggle = [ final.swayidle ];
|
_sway_idle_toggle = [ final.swayidle ];
|
||||||
kak-pager = [
|
kak-pager = [ fish final._diffr ];
|
||||||
fish
|
|
||||||
final._diffr
|
|
||||||
];
|
|
||||||
kak-man-pager = [ final.kak-pager ];
|
kak-man-pager = [ final.kak-pager ];
|
||||||
helix-pager = [
|
helix-pager = [ fish final._diffr ];
|
||||||
fish
|
|
||||||
final._diffr
|
|
||||||
];
|
|
||||||
helix-man-pager = [ final.helix-pager ];
|
helix-man-pager = [ final.helix-pager ];
|
||||||
musmenu = [
|
musmenu = [ mpc-cli final.wdmenu trash-cli xdg-user-dirs libnotify sd wl-clipboard ];
|
||||||
mpc-cli
|
showkeys =
|
||||||
final.wdmenu
|
[ ]; # This will not work unless programs.wshowkeys is enabled systemwide
|
||||||
trash-cli
|
|
||||||
xdg-user-dirs
|
|
||||||
libnotify
|
|
||||||
sd
|
|
||||||
wl-clipboard
|
|
||||||
];
|
|
||||||
showkeys = [ ]; # This will not work unless programs.wshowkeys is enabled systemwide
|
|
||||||
terminal = [ alacritty ];
|
terminal = [ alacritty ];
|
||||||
playerctl-status = [ playerctl ];
|
playerctl-status = [ playerctl ];
|
||||||
pass-export = [
|
pass-export = [ pass2csv gnupg ];
|
||||||
pass2csv
|
wpass = [ final.wdmenu fd pass sd wl-clipboard wtype ];
|
||||||
gnupg
|
screenshotsh =
|
||||||
];
|
[ capitaine-cursors grim slurp jq sway wl-clipboard xdg-user-dirs ];
|
||||||
wpass = [
|
volumesh = [ pulseaudio libnotify ];
|
||||||
final.wdmenu
|
pulse_sink = [ pulseaudio pamixer final.wdmenu ];
|
||||||
fd
|
color_picker = [ grim slurp wl-clipboard libnotify imagemagick ];
|
||||||
pass
|
dzadd = [ procps libnotify final.wdmenu jq mpv pqiv python3Packages.deemix mpc-cli final.mpdDup ];
|
||||||
sd
|
mpdDup = [ mpc-cli perl ];
|
||||||
wl-clipboard
|
readQrCode = [ grim zbar wl-clipboard ];
|
||||||
wtype
|
} // lib.mapAttrs import_script {
|
||||||
];
|
wdmenu = ./wdmenu.nix;
|
||||||
screenshotsh = [
|
wlauncher = ./wlauncher.nix;
|
||||||
capitaine-cursors
|
_gpg-unlock = ./_gpg-unlock.nix;
|
||||||
grim
|
})
|
||||||
slurp
|
|
||||||
jq
|
|
||||||
sway
|
|
||||||
wl-clipboard
|
|
||||||
xdg-user-dirs
|
|
||||||
];
|
|
||||||
volumesh = [
|
|
||||||
pulseaudio
|
|
||||||
libnotify
|
|
||||||
];
|
|
||||||
pulse_sink = [
|
|
||||||
pulseaudio
|
|
||||||
pamixer
|
|
||||||
final.wdmenu
|
|
||||||
];
|
|
||||||
color_picker = [
|
|
||||||
grim
|
|
||||||
slurp
|
|
||||||
wl-clipboard
|
|
||||||
libnotify
|
|
||||||
imagemagick
|
|
||||||
];
|
|
||||||
dzadd = [
|
|
||||||
procps
|
|
||||||
libnotify
|
|
||||||
final.wdmenu
|
|
||||||
jq
|
|
||||||
mpv
|
|
||||||
pqiv
|
|
||||||
python3Packages.deemix
|
|
||||||
mpc-cli
|
|
||||||
final.mpdDup
|
|
||||||
];
|
|
||||||
mpdDup = [
|
|
||||||
mpc-cli
|
|
||||||
perl
|
|
||||||
];
|
|
||||||
readQrCode = [
|
|
||||||
grim
|
|
||||||
zbar
|
|
||||||
wl-clipboard
|
|
||||||
];
|
|
||||||
}
|
|
||||||
// lib.mapAttrs import_script {
|
|
||||||
wdmenu = ./wdmenu.nix;
|
|
||||||
wlauncher = ./wlauncher.nix;
|
|
||||||
_gpg-unlock = ./_gpg-unlock.nix;
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
|
@ -2,12 +2,8 @@ let
|
||||||
main_ssh_public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCxR/w+38b2lX90yNBqhq3mUmkn1WGu6GAPhN1tVp2ZjYRJNV/+5gWCnTtOWYtDx35HmK/spQ2Qy8X9ttkzORa24fysNx1Iqn/TiXhD7eIJjbGPnrOpIKTkW5/uB3SD/P5NBSa06//BaqJU4sBlG79hoXRpod052hQtdpTVDiMCIV+iboWPKqopmJJfWdBtVnHXs9rep0htPRExxGslImFk7Z6xjcaHyCpIQZPlOGf+sGsmUU7jRqzvZFV8ucIdbnAlMHrU4pepNFhuraESyZVTa/bi9sw0iozXp5Q5+5thMebEslmT1Z771kI4sieDy+O4r8c0Sx2/VY1UAzcpq1faggc3YB01MTh+tiEC6xdMvZLrQGL1NBWjHleMyL53GU5ERluC0vXJF3Hv3BGGBDfXWbrEm5n06DHr2apRVJGC0LwiQ7Woud1X4V4X1pKSusxCVMjT2lmcOwV6YhKhB2sowJc1OdMx4+tL0UWE+YKSZgBHfolwk6ml0F4EO9nnUHc= lelgenio@i15";
|
main_ssh_public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCxR/w+38b2lX90yNBqhq3mUmkn1WGu6GAPhN1tVp2ZjYRJNV/+5gWCnTtOWYtDx35HmK/spQ2Qy8X9ttkzORa24fysNx1Iqn/TiXhD7eIJjbGPnrOpIKTkW5/uB3SD/P5NBSa06//BaqJU4sBlG79hoXRpod052hQtdpTVDiMCIV+iboWPKqopmJJfWdBtVnHXs9rep0htPRExxGslImFk7Z6xjcaHyCpIQZPlOGf+sGsmUU7jRqzvZFV8ucIdbnAlMHrU4pepNFhuraESyZVTa/bi9sw0iozXp5Q5+5thMebEslmT1Z771kI4sieDy+O4r8c0Sx2/VY1UAzcpq1faggc3YB01MTh+tiEC6xdMvZLrQGL1NBWjHleMyL53GU5ERluC0vXJF3Hv3BGGBDfXWbrEm5n06DHr2apRVJGC0LwiQ7Woud1X4V4X1pKSusxCVMjT2lmcOwV6YhKhB2sowJc1OdMx4+tL0UWE+YKSZgBHfolwk6ml0F4EO9nnUHc= lelgenio@i15";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
"rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.age".publicKeys = [
|
"rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.age".publicKeys = [ main_ssh_public_key ];
|
||||||
main_ssh_public_key
|
"monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.age".publicKeys = [ main_ssh_public_key ];
|
||||||
];
|
|
||||||
"monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.age".publicKeys = [
|
|
||||||
main_ssh_public_key
|
|
||||||
];
|
|
||||||
"gitlab-runner-thoreb-telemetria-registrationConfigFile.age".publicKeys = [ main_ssh_public_key ];
|
"gitlab-runner-thoreb-telemetria-registrationConfigFile.age".publicKeys = [ main_ssh_public_key ];
|
||||||
"monolith-forgejo-runner-token.age".publicKeys = [ main_ssh_public_key ];
|
"monolith-forgejo-runner-token.age".publicKeys = [ main_ssh_public_key ];
|
||||||
"lelgenio-cachix.age".publicKeys = [ main_ssh_public_key ];
|
"lelgenio-cachix.age".publicKeys = [ main_ssh_public_key ];
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }: {
|
||||||
{
|
|
||||||
services.blueman.enable = true;
|
services.blueman.enable = true;
|
||||||
hardware.bluetooth = {
|
hardware.bluetooth = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -9,9 +8,7 @@
|
||||||
# Discoverable = true;
|
# Discoverable = true;
|
||||||
AlwaysPairable = true;
|
AlwaysPairable = true;
|
||||||
};
|
};
|
||||||
Policy = {
|
Policy = { AutoEnable = true; };
|
||||||
AutoEnable = true;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,4 @@
|
||||||
{
|
{ config, pkgs, lib, inputs, ... }: {
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
inputs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
console = {
|
console = {
|
||||||
font = "${pkgs.terminus_font}/share/consolefonts/ter-120n.psf.gz";
|
font = "${pkgs.terminus_font}/share/consolefonts/ter-120n.psf.gz";
|
||||||
packages = [ pkgs.terminus_font ];
|
packages = [ pkgs.terminus_font ];
|
||||||
|
@ -45,7 +38,9 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
theme = lib.mkIf (pkgs.uservars.desktop == "sway") "red_loader";
|
theme = lib.mkIf (pkgs.uservars.desktop == "sway") "red_loader";
|
||||||
themePackages = with pkgs; [
|
themePackages = with pkgs; [
|
||||||
(adi1090x-plymouth-themes.override { selected_themes = [ "red_loader" ]; })
|
(adi1090x-plymouth-themes.override {
|
||||||
|
selected_themes = [ "red_loader" ];
|
||||||
|
})
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
{
|
{ pkgs, lib, config, ... }: {
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
services.cachix-watch-store = {
|
services.cachix-watch-store = {
|
||||||
enable = true;
|
enable = true;
|
||||||
cacheName = "lelgenio";
|
cacheName = "lelgenio";
|
||||||
|
|
|
@ -1,13 +1,7 @@
|
||||||
# Edit this configuration file to define what should be installed on
|
# Edit this configuration file to define what should be installed on
|
||||||
# your system. Help is available in the configuration.nix(5) man page
|
# your system. Help is available in the configuration.nix(5) man page
|
||||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||||
{
|
{ config, pkgs, inputs, ... }: {
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
inputs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
./gamemode.nix
|
./gamemode.nix
|
||||||
./cachix.nix
|
./cachix.nix
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }: {
|
||||||
{
|
|
||||||
services.flatpak.enable = true;
|
services.flatpak.enable = true;
|
||||||
virtualisation.docker.enable = true;
|
virtualisation.docker.enable = true;
|
||||||
virtualisation.docker.autoPrune.enable = true;
|
virtualisation.docker.autoPrune.enable = true;
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }: {
|
||||||
{
|
|
||||||
fonts.enableDefaultPackages = true;
|
fonts.enableDefaultPackages = true;
|
||||||
fonts.packages = with pkgs; [
|
fonts.packages = with pkgs; [
|
||||||
noto-fonts
|
noto-fonts
|
||||||
|
|
|
@ -1,16 +1,8 @@
|
||||||
{
|
{ config, pkgs, inputs, ... }: {
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
inputs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
programs.gamemode.enable = true;
|
programs.gamemode.enable = true;
|
||||||
programs.gamemode.enableRenice = true;
|
programs.gamemode.enableRenice = true;
|
||||||
programs.gamemode.settings = {
|
programs.gamemode.settings = {
|
||||||
general = {
|
general = { renice = 10; };
|
||||||
renice = 10;
|
|
||||||
};
|
|
||||||
|
|
||||||
# Warning: GPU optimisations have the potential to damage hardware
|
# Warning: GPU optimisations have the potential to damage hardware
|
||||||
gpu = {
|
gpu = {
|
||||||
|
|
|
@ -1,52 +1,40 @@
|
||||||
{ pkgs, lib, ... }:
|
{ pkgs, lib, ... }: {
|
||||||
{
|
mkNixRunner = registrationConfigFile: with lib; rec {
|
||||||
mkNixRunner =
|
# File should contain at least these two variables:
|
||||||
registrationConfigFile: with lib; rec {
|
# `CI_SERVER_URL`
|
||||||
# File should contain at least these two variables:
|
# `REGISTRATION_TOKEN`
|
||||||
# `CI_SERVER_URL`
|
inherit registrationConfigFile; # 2
|
||||||
# `REGISTRATION_TOKEN`
|
dockerImage = "alpine:3.18.2";
|
||||||
inherit registrationConfigFile; # 2
|
dockerAllowedImages = [ dockerImage ];
|
||||||
dockerImage = "alpine:3.18.2";
|
dockerVolumes = [
|
||||||
dockerAllowedImages = [ dockerImage ];
|
"/etc/nix/nix.conf:/etc/nix/nix.conf:ro"
|
||||||
dockerVolumes = [
|
"/nix/store:/nix/store:ro"
|
||||||
"/etc/nix/nix.conf:/etc/nix/nix.conf:ro"
|
"/nix/var/nix/db:/nix/var/nix/db:ro"
|
||||||
"/nix/store:/nix/store:ro"
|
"/nix/var/nix/daemon-socket:/nix/var/nix/daemon-socket:ro"
|
||||||
"/nix/var/nix/db:/nix/var/nix/db:ro"
|
];
|
||||||
"/nix/var/nix/daemon-socket:/nix/var/nix/daemon-socket:ro"
|
dockerDisableCache = true;
|
||||||
];
|
preBuildScript = pkgs.writeScript "setup-container" ''
|
||||||
dockerDisableCache = true;
|
mkdir -p -m 0755 /nix/var/log/nix/drvs
|
||||||
preBuildScript = pkgs.writeScript "setup-container" ''
|
mkdir -p -m 0755 /nix/var/nix/gcroots
|
||||||
mkdir -p -m 0755 /nix/var/log/nix/drvs
|
mkdir -p -m 0755 /nix/var/nix/profiles
|
||||||
mkdir -p -m 0755 /nix/var/nix/gcroots
|
mkdir -p -m 0755 /nix/var/nix/temproots
|
||||||
mkdir -p -m 0755 /nix/var/nix/profiles
|
mkdir -p -m 0755 /nix/var/nix/userpool
|
||||||
mkdir -p -m 0755 /nix/var/nix/temproots
|
mkdir -p -m 1777 /nix/var/nix/gcroots/per-user
|
||||||
mkdir -p -m 0755 /nix/var/nix/userpool
|
mkdir -p -m 1777 /nix/var/nix/profiles/per-user
|
||||||
mkdir -p -m 1777 /nix/var/nix/gcroots/per-user
|
mkdir -p -m 0755 /nix/var/nix/profiles/per-user/root
|
||||||
mkdir -p -m 1777 /nix/var/nix/profiles/per-user
|
mkdir -p -m 0700 "$HOME/.nix-defexpr"
|
||||||
mkdir -p -m 0755 /nix/var/nix/profiles/per-user/root
|
|
||||||
mkdir -p -m 0700 "$HOME/.nix-defexpr"
|
|
||||||
|
|
||||||
. ${pkgs.nix}/etc/profile.d/nix.sh
|
. ${pkgs.nix}/etc/profile.d/nix.sh
|
||||||
|
|
||||||
${pkgs.nix}/bin/nix-env -i ${
|
${pkgs.nix}/bin/nix-env -i ${concatStringsSep " " (with pkgs; [ nix cacert git openssh ])}
|
||||||
concatStringsSep " " (
|
'';
|
||||||
with pkgs;
|
environmentVariables = {
|
||||||
[
|
ENV = "/etc/profile";
|
||||||
nix
|
USER = "root";
|
||||||
cacert
|
NIX_REMOTE = "daemon";
|
||||||
git
|
PATH = "/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:/bin:/sbin:/usr/bin:/usr/sbin";
|
||||||
openssh
|
NIX_SSL_CERT_FILE = "/nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt";
|
||||||
]
|
|
||||||
)
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
environmentVariables = {
|
|
||||||
ENV = "/etc/profile";
|
|
||||||
USER = "root";
|
|
||||||
NIX_REMOTE = "daemon";
|
|
||||||
PATH = "/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:/bin:/sbin:/usr/bin:/usr/sbin";
|
|
||||||
NIX_SSL_CERT_FILE = "/nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt";
|
|
||||||
};
|
|
||||||
tagList = [ "nix" ];
|
|
||||||
};
|
};
|
||||||
|
tagList = [ "nix" ];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
# Edit this configuration file to define what should be installed on
|
# Edit this configuration file to define what should be installed on
|
||||||
# your system. Help is available in the configuration.nix(5) man page
|
# your system. Help is available in the configuration.nix(5) man page
|
||||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }: {
|
||||||
{
|
|
||||||
# Enable the X11 windowing system.
|
# Enable the X11 windowing system.
|
||||||
services.xserver.enable = true;
|
services.xserver.enable = true;
|
||||||
# Enable the GNOME Desktop Environment.
|
# Enable the GNOME Desktop Environment.
|
||||||
|
@ -20,14 +19,11 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
# services.xserver.displayManager.autologin.user = "lelgenio";
|
# services.xserver.displayManager.autologin.user = "lelgenio";
|
||||||
environment.systemPackages =
|
environment.systemPackages = with pkgs; with gnome; [
|
||||||
with pkgs;
|
gnome-tweaks
|
||||||
with gnome;
|
dconf-editor
|
||||||
[
|
|
||||||
gnome-tweaks
|
|
||||||
dconf-editor
|
|
||||||
|
|
||||||
chrome-gnome-shell
|
chrome-gnome-shell
|
||||||
gnomeExtensions.quick-settings-audio-devices-hider
|
gnomeExtensions.quick-settings-audio-devices-hider
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,17 +1,6 @@
|
||||||
{
|
{ lib, pkgs, config, ... }:
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
let
|
||||||
inherit (pkgs.uservars)
|
inherit (pkgs.uservars) key accent font theme desktop;
|
||||||
key
|
|
||||||
accent
|
|
||||||
font
|
|
||||||
theme
|
|
||||||
desktop
|
|
||||||
;
|
|
||||||
|
|
||||||
cfg = config.login-manager.greetd;
|
cfg = config.login-manager.greetd;
|
||||||
in
|
in
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }: {
|
||||||
{
|
|
||||||
# Enable the X11 windowing system.
|
# Enable the X11 windowing system.
|
||||||
services.xserver.enable = true;
|
services.xserver.enable = true;
|
||||||
# Enable the KDE Desktop Environment.
|
# Enable the KDE Desktop Environment.
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{ pkgs, config, ... }:
|
{ pkgs, config, ... }: {
|
||||||
{
|
|
||||||
time.timeZone = "America/Sao_Paulo";
|
time.timeZone = "America/Sao_Paulo";
|
||||||
environment.variables.TZ = config.time.timeZone;
|
environment.variables.TZ = config.time.timeZone;
|
||||||
i18n.defaultLocale = "pt_BR.utf8";
|
i18n.defaultLocale = "pt_BR.utf8";
|
||||||
|
|
|
@ -1,13 +1,6 @@
|
||||||
{
|
{ config, pkgs, lib, ... }:
|
||||||
config,
|
let cfg = config.packages.media-packages;
|
||||||
pkgs,
|
in {
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
cfg = config.packages.media-packages;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.packages.media-packages = {
|
options.packages.media-packages = {
|
||||||
enable = lib.mkEnableOption "media packages";
|
enable = lib.mkEnableOption "media packages";
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{ pkgs, config, ... }:
|
{ pkgs, config, ... }: {
|
||||||
{
|
|
||||||
services.gitea-actions-runner = {
|
services.gitea-actions-runner = {
|
||||||
package = pkgs.forgejo-actions-runner;
|
package = pkgs.forgejo-actions-runner;
|
||||||
instances.default = {
|
instances.default = {
|
||||||
|
|
|
@ -1,9 +1,4 @@
|
||||||
{
|
{ config, pkgs, lib, ... }:
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
let
|
||||||
inherit (pkgs.callPackage ./gitlab-runner.nix { }) mkNixRunner;
|
inherit (pkgs.callPackage ./gitlab-runner.nix { }) mkNixRunner;
|
||||||
in
|
in
|
||||||
|
@ -20,8 +15,7 @@ in
|
||||||
# dockerPrivileged = true;
|
# dockerPrivileged = true;
|
||||||
# };
|
# };
|
||||||
thoreb_builder = {
|
thoreb_builder = {
|
||||||
registrationConfigFile =
|
registrationConfigFile = config.age.secrets.monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.path;
|
||||||
config.age.secrets.monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.path;
|
|
||||||
dockerImage = "debian";
|
dockerImage = "debian";
|
||||||
dockerPrivileged = true;
|
dockerPrivileged = true;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }: {
|
||||||
{
|
|
||||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||||
# Configure network proxy if necessary
|
# Configure network proxy if necessary
|
||||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
{
|
{ config, pkgs, lib, ... }: {
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
services.nix-serve = {
|
services.nix-serve = {
|
||||||
enable = true;
|
enable = true;
|
||||||
secretKeyFile = config.age.secrets.monolith-nix-serve-privkey.path;
|
secretKeyFile = config.age.secrets.monolith-nix-serve-privkey.path;
|
||||||
|
|
|
@ -1,13 +1,7 @@
|
||||||
{
|
{ lib, config, pkgs, inputs, ... }:
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
inputs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
let
|
||||||
collectFlakeInputs =
|
collectFlakeInputs = input:
|
||||||
input: [ input ] ++ lib.concatMap collectFlakeInputs (builtins.attrValues (input.inputs or { }));
|
[ input ] ++ lib.concatMap collectFlakeInputs (builtins.attrValues (input.inputs or { }));
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
system.extraDependencies = collectFlakeInputs inputs.self;
|
system.extraDependencies = collectFlakeInputs inputs.self;
|
||||||
|
@ -17,16 +11,13 @@ in
|
||||||
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
|
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
|
||||||
gc = {
|
gc = {
|
||||||
automatic = true;
|
automatic = true;
|
||||||
dates = "weekly";
|
dates = "daily";
|
||||||
options = "--delete-older-than 7d";
|
options = "--delete-older-than 3d";
|
||||||
};
|
};
|
||||||
optimise.automatic = true;
|
optimise.automatic = true;
|
||||||
settings = {
|
settings = {
|
||||||
auto-optimise-store = true;
|
auto-optimise-store = true;
|
||||||
trusted-users = [
|
trusted-users = [ "root" "@wheel" ];
|
||||||
"root"
|
|
||||||
"@wheel"
|
|
||||||
];
|
|
||||||
substituters = [
|
substituters = [
|
||||||
"https://cache.nixos.org"
|
"https://cache.nixos.org"
|
||||||
"https://nix-community.cachix.org"
|
"https://nix-community.cachix.org"
|
||||||
|
|
|
@ -1,9 +1,4 @@
|
||||||
{
|
{ config, pkgs, lib, ... }:
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
let
|
||||||
inherit (pkgs.callPackage ./gitlab-runner.nix { }) mkNixRunner;
|
inherit (pkgs.callPackage ./gitlab-runner.nix { }) mkNixRunner;
|
||||||
in
|
in
|
||||||
|
@ -20,8 +15,7 @@ in
|
||||||
# dockerPrivileged = true;
|
# dockerPrivileged = true;
|
||||||
# };
|
# };
|
||||||
thoreb_builder = {
|
thoreb_builder = {
|
||||||
registrationConfigFile =
|
registrationConfigFile = config.age.secrets.rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.path;
|
||||||
config.age.secrets.rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.path;
|
|
||||||
dockerImage = "debian";
|
dockerImage = "debian";
|
||||||
dockerPrivileged = true;
|
dockerPrivileged = true;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,13 +1,18 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }: {
|
||||||
{
|
|
||||||
age = {
|
age = {
|
||||||
identityPaths = [ "/root/.ssh/id_rsa" ];
|
identityPaths = [ "/root/.ssh/id_rsa" ];
|
||||||
secrets.lelgenio-cachix.file = ../secrets/lelgenio-cachix.age;
|
secrets.lelgenio-cachix.file = ../secrets/lelgenio-cachix.age;
|
||||||
secrets.monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.file = ../secrets/monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.age;
|
secrets.monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.file =
|
||||||
secrets.gitlab-runner-thoreb-telemetria-registrationConfigFile.file = ../secrets/gitlab-runner-thoreb-telemetria-registrationConfigFile.age;
|
../secrets/monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.age;
|
||||||
secrets.monolith-forgejo-runner-token.file = ../secrets/monolith-forgejo-runner-token.age;
|
secrets.gitlab-runner-thoreb-telemetria-registrationConfigFile.file =
|
||||||
secrets.rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.file = ../secrets/rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.age;
|
../secrets/gitlab-runner-thoreb-telemetria-registrationConfigFile.age;
|
||||||
secrets.monolith-nix-serve-privkey.file = ../secrets/monolith-nix-serve-privkey.age;
|
secrets.monolith-forgejo-runner-token.file =
|
||||||
secrets.phantom-forgejo-mailer-password.file = ../secrets/phantom-forgejo-mailer-password.age;
|
../secrets/monolith-forgejo-runner-token.age;
|
||||||
|
secrets.rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.file =
|
||||||
|
../secrets/rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.age;
|
||||||
|
secrets.monolith-nix-serve-privkey.file =
|
||||||
|
../secrets/monolith-nix-serve-privkey.age;
|
||||||
|
secrets.phantom-forgejo-mailer-password.file =
|
||||||
|
../secrets/phantom-forgejo-mailer-password.age;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }: {
|
||||||
{
|
|
||||||
sound.enable = true;
|
sound.enable = true;
|
||||||
hardware.pulseaudio.enable = false;
|
hardware.pulseaudio.enable = false;
|
||||||
services.pipewire = {
|
services.pipewire = {
|
||||||
|
|
|
@ -1,7 +1,10 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }: {
|
||||||
{
|
|
||||||
specialisation.dark-theme.configuration = {
|
specialisation.dark-theme.configuration = {
|
||||||
nixpkgs.overlays = [ (final: prev: { uservars = prev.uservars; }) ];
|
nixpkgs.overlays = [
|
||||||
|
(final: prev: {
|
||||||
|
uservars = prev.uservars;
|
||||||
|
})
|
||||||
|
];
|
||||||
};
|
};
|
||||||
specialisation.light-theme.configuration = {
|
specialisation.light-theme.configuration = {
|
||||||
nixpkgs.overlays = [
|
nixpkgs.overlays = [
|
||||||
|
|
|
@ -1,27 +1,17 @@
|
||||||
{
|
{ config, pkgs, inputs, ... }: {
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
inputs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
programs.steam.enable = true;
|
programs.steam.enable = true;
|
||||||
programs.steam.package = pkgs.steam.override {
|
programs.steam.package = pkgs.steam.override {
|
||||||
extraLibraries =
|
extraLibraries = pkgs: with config.hardware.opengl;
|
||||||
pkgs:
|
if pkgs.hostPlatform.is64bit
|
||||||
with config.hardware.opengl;
|
then [ package ] ++ extraPackages
|
||||||
if pkgs.hostPlatform.is64bit then
|
else [ package32 ] ++ extraPackages32;
|
||||||
[ package ] ++ extraPackages
|
|
||||||
else
|
|
||||||
[ package32 ] ++ extraPackages32;
|
|
||||||
|
|
||||||
extraPkgs =
|
extraPkgs = pkgs: with pkgs; [
|
||||||
pkgs: with pkgs; [
|
capitaine-cursors
|
||||||
capitaine-cursors
|
bibata-cursors
|
||||||
bibata-cursors
|
mangohud
|
||||||
mangohud
|
xdg-user-dirs
|
||||||
xdg-user-dirs
|
];
|
||||||
];
|
|
||||||
};
|
};
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
protontricks
|
protontricks
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
{
|
{ config, pkgs, inputs, ... }: {
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
inputs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
programs.thunar = {
|
programs.thunar = {
|
||||||
enable = true;
|
enable = true;
|
||||||
plugins = with pkgs.xfce; [
|
plugins = with pkgs.xfce; [
|
||||||
|
@ -18,15 +12,17 @@
|
||||||
services.tumbler.enable = true;
|
services.tumbler.enable = true;
|
||||||
|
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
(pkgs.writeTextFile {
|
(
|
||||||
name = "thumbs";
|
pkgs.writeTextFile {
|
||||||
text = ''
|
name = "thumbs";
|
||||||
[Thumbnailer Entry]
|
text = ''
|
||||||
TryExec=unzip
|
[Thumbnailer Entry]
|
||||||
Exec=sh -c "${pkgs.unzip}/bin/unzip -p %i preview.png > %o"
|
TryExec=unzip
|
||||||
MimeType=application/x-krita;
|
Exec=sh -c "${pkgs.unzip}/bin/unzip -p %i preview.png > %o"
|
||||||
'';
|
MimeType=application/x-krita;
|
||||||
destination = "/share/thumbnailers/kra.thumbnailer";
|
'';
|
||||||
})
|
destination = "/share/thumbnailers/kra.thumbnailer";
|
||||||
|
}
|
||||||
|
)
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }: {
|
||||||
{
|
|
||||||
security.sudo.wheelNeedsPassword = false;
|
security.sudo.wheelNeedsPassword = false;
|
||||||
|
|
||||||
# services.getty.autologinUser = "lelgenio";
|
# services.getty.autologinUser = "lelgenio";
|
||||||
|
@ -11,15 +10,7 @@
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
description = "Leonardo Eugênio";
|
description = "Leonardo Eugênio";
|
||||||
hashedPassword = "$y$j9T$0e/rczjOVCy7PuwC3pG0V/$gTHZhfO4wQSlFvbDyfghbCnGI2uDI0a52zSrQ/yOA5A";
|
hashedPassword = "$y$j9T$0e/rczjOVCy7PuwC3pG0V/$gTHZhfO4wQSlFvbDyfghbCnGI2uDI0a52zSrQ/yOA5A";
|
||||||
extraGroups = [
|
extraGroups = [ "networkmanager" "wheel" "docker" "adbusers" "bluetooth" "corectrl" "vboxusers" ];
|
||||||
"networkmanager"
|
|
||||||
"wheel"
|
|
||||||
"docker"
|
|
||||||
"adbusers"
|
|
||||||
"bluetooth"
|
|
||||||
"corectrl"
|
|
||||||
"vboxusers"
|
|
||||||
];
|
|
||||||
shell = pkgs.fish;
|
shell = pkgs.fish;
|
||||||
openssh.authorizedKeys.keys = [
|
openssh.authorizedKeys.keys = [
|
||||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCxR/w+38b2lX90yNBqhq3mUmkn1WGu6GAPhN1tVp2ZjYRJNV/+5gWCnTtOWYtDx35HmK/spQ2Qy8X9ttkzORa24fysNx1Iqn/TiXhD7eIJjbGPnrOpIKTkW5/uB3SD/P5NBSa06//BaqJU4sBlG79hoXRpod052hQtdpTVDiMCIV+iboWPKqopmJJfWdBtVnHXs9rep0htPRExxGslImFk7Z6xjcaHyCpIQZPlOGf+sGsmUU7jRqzvZFV8ucIdbnAlMHrU4pepNFhuraESyZVTa/bi9sw0iozXp5Q5+5thMebEslmT1Z771kI4sieDy+O4r8c0Sx2/VY1UAzcpq1faggc3YB01MTh+tiEC6xdMvZLrQGL1NBWjHleMyL53GU5ERluC0vXJF3Hv3BGGBDfXWbrEm5n06DHr2apRVJGC0LwiQ7Woud1X4V4X1pKSusxCVMjT2lmcOwV6YhKhB2sowJc1OdMx4+tL0UWE+YKSZgBHfolwk6ml0F4EO9nnUHc= lelgenio@i15"
|
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCxR/w+38b2lX90yNBqhq3mUmkn1WGu6GAPhN1tVp2ZjYRJNV/+5gWCnTtOWYtDx35HmK/spQ2Qy8X9ttkzORa24fysNx1Iqn/TiXhD7eIJjbGPnrOpIKTkW5/uB3SD/P5NBSa06//BaqJU4sBlG79hoXRpod052hQtdpTVDiMCIV+iboWPKqopmJJfWdBtVnHXs9rep0htPRExxGslImFk7Z6xjcaHyCpIQZPlOGf+sGsmUU7jRqzvZFV8ucIdbnAlMHrU4pepNFhuraESyZVTa/bi9sw0iozXp5Q5+5thMebEslmT1Z771kI4sieDy+O4r8c0Sx2/VY1UAzcpq1faggc3YB01MTh+tiEC6xdMvZLrQGL1NBWjHleMyL53GU5ERluC0vXJF3Hv3BGGBDfXWbrEm5n06DHr2apRVJGC0LwiQ7Woud1X4V4X1pKSusxCVMjT2lmcOwV6YhKhB2sowJc1OdMx4+tL0UWE+YKSZgBHfolwk6ml0F4EO9nnUHc= lelgenio@i15"
|
||||||
|
|
|
@ -1,16 +1,6 @@
|
||||||
{
|
{ config, pkgs, lib, ... }:
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
let
|
||||||
inherit (pkgs.uservars)
|
inherit (pkgs.uservars) key theme accent font;
|
||||||
key
|
|
||||||
theme
|
|
||||||
accent
|
|
||||||
font
|
|
||||||
;
|
|
||||||
inherit (theme) color;
|
inherit (theme) color;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
@ -20,9 +10,7 @@ in
|
||||||
settings = {
|
settings = {
|
||||||
font = {
|
font = {
|
||||||
size = font.size.small;
|
size = font.size.small;
|
||||||
normal = {
|
normal = { family = font.mono; };
|
||||||
family = font.mono;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
colors = {
|
colors = {
|
||||||
primary = {
|
primary = {
|
||||||
|
@ -52,34 +40,31 @@ in
|
||||||
|
|
||||||
hints = {
|
hints = {
|
||||||
alphabet = key.hints;
|
alphabet = key.hints;
|
||||||
enabled = [
|
enabled = [{
|
||||||
{
|
regex =
|
||||||
regex =
|
let
|
||||||
let
|
mimes =
|
||||||
mimes = "(mailto:|gemini:|gopher:|https:|http:|news:|file:|git:|ssh:|ftp:)";
|
"(mailto:|gemini:|gopher:|https:|http:|news:|file:|git:|ssh:|ftp:)";
|
||||||
# I fucking hate regex, look at this bullshit
|
# I fucking hate regex, look at this bullshit
|
||||||
delimiters = ''^\\u0000-\\u001F\\u007F-\\u009F<>"\\s{-}\\^⟨⟩`'';
|
delimiters = ''^\\u0000-\\u001F\\u007F-\\u009F<>"\\s{-}\\^⟨⟩`'';
|
||||||
# Kakoune uses these characters to represent whitespace,
|
# Kakoune uses these characters to represent whitespace,
|
||||||
# but alacritty doesn't know about them
|
# but alacritty doesn't know about them
|
||||||
whitespace_characters = ''¬·→'';
|
whitespace_characters = ''¬·→'';
|
||||||
in
|
in
|
||||||
"${mimes}[${delimiters}${whitespace_characters}]+";
|
"${mimes}[${delimiters}${whitespace_characters}]+";
|
||||||
command = "xdg-open";
|
command = "xdg-open";
|
||||||
post_processing = true;
|
post_processing = true;
|
||||||
mouse = {
|
mouse = {
|
||||||
enabled = true;
|
enabled = true;
|
||||||
mods = "None";
|
mods = "None";
|
||||||
};
|
};
|
||||||
binding = {
|
binding = {
|
||||||
key = "U";
|
key = "U";
|
||||||
mods = "Control|Shift";
|
mods = "Control|Shift";
|
||||||
};
|
};
|
||||||
}
|
}];
|
||||||
];
|
|
||||||
};
|
|
||||||
mouse = {
|
|
||||||
hide_when_typing = true;
|
|
||||||
};
|
};
|
||||||
|
mouse = { hide_when_typing = true; };
|
||||||
keyboard.bindings = [
|
keyboard.bindings = [
|
||||||
{
|
{
|
||||||
key = lib.toUpper key.up;
|
key = lib.toUpper key.up;
|
||||||
|
@ -156,9 +141,7 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
home.sessionVariables = {
|
home.sessionVariables = { TERMINAL = "alacritty"; };
|
||||||
TERMINAL = "alacritty";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Look at this fucking bullshit:
|
# Look at this fucking bullshit:
|
||||||
# https://gitlab.gnome.org/GNOME/glib/-/blob/20c4fcb2a7246a2b205649eae3ebda4296217afc/gio/gdesktopappinfo.c#L2702
|
# https://gitlab.gnome.org/GNOME/glib/-/blob/20c4fcb2a7246a2b205649eae3ebda4296217afc/gio/gdesktopappinfo.c#L2702
|
||||||
|
|
|
@ -1,17 +1,6 @@
|
||||||
{
|
{ config, pkgs, lib, inputs, ... }:
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
inputs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
let
|
||||||
inherit (pkgs.uservars)
|
inherit (pkgs.uservars) key theme accent font;
|
||||||
key
|
|
||||||
theme
|
|
||||||
accent
|
|
||||||
font
|
|
||||||
;
|
|
||||||
inherit (theme) color;
|
inherit (theme) color;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,11 +1,4 @@
|
||||||
{
|
{ config, pkgs, lib, inputs, ... }: {
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
inputs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
wayland.windowManager.sway = {
|
wayland.windowManager.sway = {
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
exec thunderbird
|
exec thunderbird
|
||||||
|
|
|
@ -1,11 +1,4 @@
|
||||||
{
|
{ config, pkgs, lib, inputs, ... }: {
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
inputs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
xdg.desktopEntries = {
|
xdg.desktopEntries = {
|
||||||
connect-controller = {
|
connect-controller = {
|
||||||
name = "Connect Controller";
|
name = "Connect Controller";
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
{
|
{ config, pkgs, lib, ... }: {
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
xdg.desktopEntries = {
|
xdg.desktopEntries = {
|
||||||
kak = {
|
kak = {
|
||||||
name = "Kakoune";
|
name = "Kakoune";
|
||||||
|
@ -14,10 +8,7 @@
|
||||||
terminal = true;
|
terminal = true;
|
||||||
type = "Application";
|
type = "Application";
|
||||||
icon = "kak.desktop";
|
icon = "kak.desktop";
|
||||||
categories = [
|
categories = [ "Utility" "TextEditor" ];
|
||||||
"Utility"
|
|
||||||
"TextEditor"
|
|
||||||
];
|
|
||||||
startupNotify = true;
|
startupNotify = true;
|
||||||
mimeType = [
|
mimeType = [
|
||||||
"text/english"
|
"text/english"
|
||||||
|
@ -49,15 +40,10 @@
|
||||||
terminal = true;
|
terminal = true;
|
||||||
type = "Application";
|
type = "Application";
|
||||||
icon = "mutt";
|
icon = "mutt";
|
||||||
categories = [
|
categories = [ "Network" "Email" ];
|
||||||
"Network"
|
|
||||||
"Email"
|
|
||||||
];
|
|
||||||
startupNotify = false;
|
startupNotify = false;
|
||||||
mimeType = [ "x-scheme-handler/mailto" ];
|
mimeType = [ "x-scheme-handler/mailto" ];
|
||||||
settings = {
|
settings = { Keywords = "Mail;E-mail;"; };
|
||||||
Keywords = "Mail;E-mail;";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
down_meme = {
|
down_meme = {
|
||||||
name = "DownMeme";
|
name = "DownMeme";
|
||||||
|
|
|
@ -1,16 +1,6 @@
|
||||||
{
|
{ config, pkgs, lib, font, ... }:
|
||||||
config,
|
let inherit (pkgs.uservars) desktop browser;
|
||||||
pkgs,
|
bugfixedFirefox = pkgs.firefox-esr-unwrapped // { requireSigning = false; allowAddonSideload = true; };
|
||||||
lib,
|
|
||||||
font,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
inherit (pkgs.uservars) desktop browser;
|
|
||||||
bugfixedFirefox = pkgs.firefox-esr-unwrapped // {
|
|
||||||
requireSigning = false;
|
|
||||||
allowAddonSideload = true;
|
|
||||||
};
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
config = {
|
config = {
|
||||||
|
|
|
@ -1,21 +1,6 @@
|
||||||
{
|
{ config, pkgs, lib, ... }:
|
||||||
config,
|
let inherit (pkgs.uservars) key theme color accent font editor desktop;
|
||||||
pkgs,
|
in {
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
inherit (pkgs.uservars)
|
|
||||||
key
|
|
||||||
theme
|
|
||||||
color
|
|
||||||
accent
|
|
||||||
font
|
|
||||||
editor
|
|
||||||
desktop
|
|
||||||
;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
config = {
|
config = {
|
||||||
programs.fish = {
|
programs.fish = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -49,12 +34,10 @@ in
|
||||||
};
|
};
|
||||||
shellAbbrs = {
|
shellAbbrs = {
|
||||||
off = "shutdown now";
|
off = "shutdown now";
|
||||||
v =
|
v = {
|
||||||
{
|
"helix" = "hx";
|
||||||
"helix" = "hx";
|
"kakoune" = "kak";
|
||||||
"kakoune" = "kak";
|
}.${editor};
|
||||||
}
|
|
||||||
.${editor};
|
|
||||||
ns = "nix develop --command $SHELL";
|
ns = "nix develop --command $SHELL";
|
||||||
wcf = "wl-copy-file";
|
wcf = "wl-copy-file";
|
||||||
c = "cargo";
|
c = "cargo";
|
||||||
|
@ -81,9 +64,7 @@ in
|
||||||
gr = "cd (git root)";
|
gr = "cd (git root)";
|
||||||
gri = "git rebase --interactive FETCH_HEAD";
|
gri = "git rebase --interactive FETCH_HEAD";
|
||||||
};
|
};
|
||||||
functions = {
|
functions = { fish_greeting = ""; };
|
||||||
fish_greeting = "";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
programs = {
|
programs = {
|
||||||
zoxide.enable = true;
|
zoxide.enable = true;
|
||||||
|
@ -104,18 +85,13 @@ in
|
||||||
};
|
};
|
||||||
# programs.command-not-found.enable = true;
|
# programs.command-not-found.enable = true;
|
||||||
programs.nix-index.enable = true;
|
programs.nix-index.enable = true;
|
||||||
home.packages = (
|
home.packages = (with pkgs; with fishPlugins;[
|
||||||
with pkgs;
|
trash-cli
|
||||||
with fishPlugins;
|
wl-copy-file
|
||||||
[
|
foreign-env
|
||||||
trash-cli
|
] ++ (lib.optionals (desktop == "sway") [
|
||||||
wl-copy-file
|
async-prompt
|
||||||
foreign-env
|
done
|
||||||
]
|
]));
|
||||||
++ (lib.optionals (desktop == "sway") [
|
|
||||||
async-prompt
|
|
||||||
done
|
|
||||||
])
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
30
user/fzf.nix
30
user/fzf.nix
|
@ -1,17 +1,6 @@
|
||||||
{
|
{ config, pkgs, lib, inputs, ... }:
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
inputs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
let
|
||||||
inherit (pkgs.uservars)
|
inherit (pkgs.uservars) key theme accent font;
|
||||||
key
|
|
||||||
theme
|
|
||||||
accent
|
|
||||||
font
|
|
||||||
;
|
|
||||||
inherit (theme) color;
|
inherit (theme) color;
|
||||||
|
|
||||||
colors = {
|
colors = {
|
||||||
|
@ -26,21 +15,22 @@ let
|
||||||
makeOptList = lib.mapAttrsToList makeKeyValue colors;
|
makeOptList = lib.mapAttrsToList makeKeyValue colors;
|
||||||
makeColorValue = lib.strings.concatStringsSep "," makeOptList;
|
makeColorValue = lib.strings.concatStringsSep "," makeOptList;
|
||||||
color_opts = "--color=${makeColorValue}";
|
color_opts = "--color=${makeColorValue}";
|
||||||
preview_opts = "--preview '${pkgs.bat}/bin/bat --style=numbers --color=always {}'";
|
preview_opts =
|
||||||
|
"--preview '${pkgs.bat}/bin/bat --style=numbers --color=always {}'";
|
||||||
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
programs.fzf = {
|
programs.fzf = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
fileWidgetCommand = "${pkgs.fd}/bin/fd --type f";
|
fileWidgetCommand = "${pkgs.fd}/bin/fd --type f";
|
||||||
fileWidgetOptions = [ "--preview '${pkgs.bat}/bin/bat --style=numbers --color=always {}'" ];
|
fileWidgetOptions =
|
||||||
|
[ "--preview '${pkgs.bat}/bin/bat --style=numbers --color=always {}'" ];
|
||||||
|
|
||||||
changeDirWidgetCommand = "${pkgs.fd}/bin/fd --type d";
|
changeDirWidgetCommand = "${pkgs.fd}/bin/fd --type d";
|
||||||
changeDirWidgetOptions = [ "--preview '${pkgs.eza}/bin/eza -T L3 | head -200'" ];
|
changeDirWidgetOptions =
|
||||||
|
[ "--preview '${pkgs.eza}/bin/eza -T L3 | head -200'" ];
|
||||||
|
|
||||||
defaultOptions = [
|
defaultOptions = [ color_opts preview_opts ];
|
||||||
color_opts
|
|
||||||
preview_opts
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
13
user/git.nix
13
user/git.nix
|
@ -1,13 +1,6 @@
|
||||||
{
|
{ config, pkgs, lib, ... }:
|
||||||
config,
|
let inherit (pkgs.uservars) username mail;
|
||||||
pkgs,
|
in {
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
inherit (pkgs.uservars) username mail;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
config = {
|
config = {
|
||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
{
|
{ pkgs, lib, inputs, ... }: lib.mkIf (pkgs.uservars.desktop == "gnome") {
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
inputs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
lib.mkIf (pkgs.uservars.desktop == "gnome") {
|
|
||||||
|
|
||||||
home.pointerCursor = {
|
home.pointerCursor = {
|
||||||
name = "Adwaita";
|
name = "Adwaita";
|
||||||
|
@ -20,7 +14,9 @@ lib.mkIf (pkgs.uservars.desktop == "gnome") {
|
||||||
cursor-theme = "Adwaita";
|
cursor-theme = "Adwaita";
|
||||||
# color-scheme = "default";
|
# color-scheme = "default";
|
||||||
};
|
};
|
||||||
"org/gnome/desktop/wm/preferences" = lib.mkForce { button-layout = "appmenu:close"; };
|
"org/gnome/desktop/wm/preferences" = lib.mkForce {
|
||||||
|
button-layout = "appmenu:close";
|
||||||
|
};
|
||||||
"org/gnome/desktop/input-sources" = {
|
"org/gnome/desktop/input-sources" = {
|
||||||
xkb-options = [ "lv3:lsgt_switch" ];
|
xkb-options = [ "lv3:lsgt_switch" ];
|
||||||
};
|
};
|
||||||
|
@ -44,9 +40,7 @@ lib.mkIf (pkgs.uservars.desktop == "gnome") {
|
||||||
qt6Packages.qtstyleplugin-kvantum
|
qt6Packages.qtstyleplugin-kvantum
|
||||||
];
|
];
|
||||||
|
|
||||||
home.sessionVariables = {
|
home.sessionVariables = { QT_QPA_PLATFORMTHEME = "qt5ct"; };
|
||||||
QT_QPA_PLATFORMTHEME = "qt5ct";
|
|
||||||
};
|
|
||||||
|
|
||||||
xdg.defaultApplications = {
|
xdg.defaultApplications = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
17
user/gpg.nix
17
user/gpg.nix
|
@ -1,10 +1,4 @@
|
||||||
{
|
{ config, pkgs, lib, ... }: {
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
config = {
|
config = {
|
||||||
services.gpg-agent = {
|
services.gpg-agent = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -22,9 +16,7 @@
|
||||||
PartOf = [ "graphical-session.target" ];
|
PartOf = [ "graphical-session.target" ];
|
||||||
After = [ "graphical-session.target" ];
|
After = [ "graphical-session.target" ];
|
||||||
};
|
};
|
||||||
Service = {
|
Service = { ExecStart = "${pkgs._gpg-unlock}/bin/_gpg-unlock"; };
|
||||||
ExecStart = "${pkgs._gpg-unlock}/bin/_gpg-unlock";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
systemd.user.timers = {
|
systemd.user.timers = {
|
||||||
|
@ -39,10 +31,9 @@
|
||||||
OnUnitActiveSec = "300";
|
OnUnitActiveSec = "300";
|
||||||
Unit = "gpg_unlock.service";
|
Unit = "gpg_unlock.service";
|
||||||
};
|
};
|
||||||
Install = {
|
Install = { WantedBy = [ "sway-session.target" ]; };
|
||||||
WantedBy = [ "sway-session.target" ];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,9 +74,7 @@ in
|
||||||
g.n = "goto_line_start";
|
g.n = "goto_line_start";
|
||||||
g.o = "goto_line_end";
|
g.o = "goto_line_end";
|
||||||
};
|
};
|
||||||
keys.insert = {
|
keys.insert = { "A-k" = "normal_mode"; };
|
||||||
"A-k" = "normal_mode";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
languages.language = [
|
languages.language = [
|
||||||
{
|
{
|
||||||
|
@ -98,29 +96,14 @@ in
|
||||||
my-theme = {
|
my-theme = {
|
||||||
"inherits" = "gruvbox";
|
"inherits" = "gruvbox";
|
||||||
"ui.menu" = "none";
|
"ui.menu" = "none";
|
||||||
"ui.background" = {
|
"ui.background" = { bg = "none"; };
|
||||||
bg = "none";
|
|
||||||
};
|
|
||||||
"ui.virtual.whitespace" = color.nontxt;
|
"ui.virtual.whitespace" = color.nontxt;
|
||||||
"ui.cursor.primary" = {
|
"ui.cursor.primary" = { fg = accent.fg; bg = accent.color; };
|
||||||
fg = accent.fg;
|
"ui.cursorline.primary" = { bg = color.bg_dark; };
|
||||||
bg = accent.color;
|
"ui.cursorcolumn.primary" = { modifiers = [ "bold" ]; };
|
||||||
};
|
"ui.cursorline" = { bg = "none"; };
|
||||||
"ui.cursorline.primary" = {
|
"ui.cursorcolumn" = { bg = "none"; };
|
||||||
bg = color.bg_dark;
|
"ui.linenr.selected" = { fg = color.txt; };
|
||||||
};
|
|
||||||
"ui.cursorcolumn.primary" = {
|
|
||||||
modifiers = [ "bold" ];
|
|
||||||
};
|
|
||||||
"ui.cursorline" = {
|
|
||||||
bg = "none";
|
|
||||||
};
|
|
||||||
"ui.cursorcolumn" = {
|
|
||||||
bg = "none";
|
|
||||||
};
|
|
||||||
"ui.linenr.selected" = {
|
|
||||||
fg = color.txt;
|
|
||||||
};
|
|
||||||
|
|
||||||
function = color.normal.orange;
|
function = color.normal.orange;
|
||||||
module = color.normal.brown;
|
module = color.normal.brown;
|
||||||
|
@ -141,6 +124,8 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
home.sessionVariables = lib.mkIf (editor == "helix") { EDITOR = "hx"; };
|
home.sessionVariables = lib.mkIf (editor == "helix") {
|
||||||
|
EDITOR = "hx";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,4 @@
|
||||||
{
|
{ config, pkgs, lib, inputs, osConfig, ... }: {
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
inputs,
|
|
||||||
osConfig,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
./controller.nix
|
./controller.nix
|
||||||
./waybar
|
./waybar
|
||||||
|
@ -78,7 +70,9 @@
|
||||||
comma
|
comma
|
||||||
|
|
||||||
# System monitors
|
# System monitors
|
||||||
(btop.override { cudaSupport = true; })
|
(btop.override {
|
||||||
|
cudaSupport = true;
|
||||||
|
})
|
||||||
amdgpu_top
|
amdgpu_top
|
||||||
inxi
|
inxi
|
||||||
dmidecode
|
dmidecode
|
||||||
|
@ -134,7 +128,7 @@
|
||||||
rust-analyzer # rust analyzer
|
rust-analyzer # rust analyzer
|
||||||
|
|
||||||
blade-formatter
|
blade-formatter
|
||||||
nixfmt-rfc-style
|
nixpkgs-fmt
|
||||||
];
|
];
|
||||||
|
|
||||||
fonts.fontconfig.enable = true;
|
fonts.fontconfig.enable = true;
|
||||||
|
@ -146,11 +140,10 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
VOLUME_CHANGE_SOUND = "${pkgs.sound-theme-freedesktop}/share/sounds/freedesktop/stereo/audio-volume-change.oga";
|
VOLUME_CHANGE_SOUND =
|
||||||
};
|
"${pkgs.sound-theme-freedesktop}/share/sounds/freedesktop/stereo/audio-volume-change.oga";
|
||||||
programs.bash = {
|
|
||||||
enable = true;
|
|
||||||
};
|
};
|
||||||
|
programs.bash = { enable = true; };
|
||||||
|
|
||||||
xdg.defaultApplications = {
|
xdg.defaultApplications = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -161,8 +154,7 @@
|
||||||
{
|
{
|
||||||
firefox = lib.mkDefault "firefox.desktop";
|
firefox = lib.mkDefault "firefox.desktop";
|
||||||
qutebrowser = lib.mkDefault "org.qutebrowser.qutebrowser.desktop";
|
qutebrowser = lib.mkDefault "org.qutebrowser.qutebrowser.desktop";
|
||||||
}
|
}.${pkgs.uservars.browser}
|
||||||
.${pkgs.uservars.browser}
|
|
||||||
);
|
);
|
||||||
document-viewer = lib.mkDefault "org.pwmt.zathura.desktop";
|
document-viewer = lib.mkDefault "org.pwmt.zathura.desktop";
|
||||||
file-manager = lib.mkDefault "thunar.desktop";
|
file-manager = lib.mkDefault "thunar.desktop";
|
||||||
|
@ -171,14 +163,12 @@
|
||||||
torrent-client = lib.mkDefault "torrent.desktop";
|
torrent-client = lib.mkDefault "torrent.desktop";
|
||||||
};
|
};
|
||||||
|
|
||||||
wayland.windowManager.sway.extraConfig =
|
wayland.windowManager.sway.extraConfig = lib.optionalString (osConfig.networking.hostName or "" == "monolith") ''
|
||||||
lib.optionalString (osConfig.networking.hostName or "" == "monolith")
|
exec steam
|
||||||
''
|
exec obs --startreplaybuffer --disable-shutdown-check
|
||||||
exec steam
|
exec deluge-gtk
|
||||||
exec obs --startreplaybuffer --disable-shutdown-check
|
exec nicotine
|
||||||
exec deluge-gtk
|
'';
|
||||||
exec nicotine
|
|
||||||
'';
|
|
||||||
|
|
||||||
systemd.user.services.rm-target = {
|
systemd.user.services.rm-target = {
|
||||||
Unit = {
|
Unit = {
|
||||||
|
@ -192,16 +182,12 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
systemd.user.timers.rm-target = {
|
systemd.user.timers.rm-target = {
|
||||||
Unit = {
|
Unit = { Description = "Remove directories named 'target'"; };
|
||||||
Description = "Remove directories named 'target'";
|
|
||||||
};
|
|
||||||
Timer = {
|
Timer = {
|
||||||
OnCalendar = "weekly";
|
OnCalendar = "weekly";
|
||||||
Unit = "rm-target.service";
|
Unit = "rm-target.service";
|
||||||
};
|
};
|
||||||
Install = {
|
Install = { WantedBy = [ "timers.target" ]; };
|
||||||
WantedBy = [ "timers.target" ];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# This value determines the Home Manager release that your
|
# This value determines the Home Manager release that your
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
{
|
{ config, pkgs, lib, ... }: {
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
config = lib.mkIf (pkgs.uservars.desktop == "hyprland") {
|
config = lib.mkIf (pkgs.uservars.desktop == "hyprland") {
|
||||||
wayland.windowManager.hyprland = {
|
wayland.windowManager.hyprland = {
|
||||||
enable = false;
|
enable = false;
|
||||||
|
@ -128,9 +122,6 @@
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
home.file.".config/eww".source = ./eww;
|
home.file.".config/eww".source = ./eww;
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [ eww-wayland jq ];
|
||||||
eww-wayland
|
|
||||||
jq
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,4 @@
|
||||||
{
|
{ pkgs, lib, color, accent }:
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
color,
|
|
||||||
accent,
|
|
||||||
}:
|
|
||||||
let
|
let
|
||||||
colors = lib.mapAttrs (_: lib.replaceStrings [ "#" ] [ "rgb:" ]) {
|
colors = lib.mapAttrs (_: lib.replaceStrings [ "#" ] [ "rgb:" ]) {
|
||||||
accent_fg = accent.fg;
|
accent_fg = accent.fg;
|
||||||
|
@ -99,9 +94,8 @@ with colors;
|
||||||
face global InlayHint ${bg_light}+buif
|
face global InlayHint ${bg_light}+buif
|
||||||
|
|
||||||
# Lsp
|
# Lsp
|
||||||
''
|
'' + (
|
||||||
+ (lib.concatStringsSep "\n" (
|
lib.concatStringsSep "\n" (lib.mapAttrsToList
|
||||||
lib.mapAttrsToList
|
|
||||||
(name: color: ''
|
(name: color: ''
|
||||||
face global HighlightDiagnostic${name} ${color},default+bu
|
face global HighlightDiagnostic${name} ${color},default+bu
|
||||||
face global Diagnostic${name} ${color},default+bu
|
face global Diagnostic${name} ${color},default+bu
|
||||||
|
@ -112,5 +106,6 @@ with colors;
|
||||||
Error = "red";
|
Error = "red";
|
||||||
Warning = "yellow";
|
Warning = "yellow";
|
||||||
Hint = "blue";
|
Hint = "blue";
|
||||||
}
|
})
|
||||||
))
|
)
|
||||||
|
|
||||||
|
|
|
@ -1,17 +1,6 @@
|
||||||
{
|
{ config, pkgs, lib, ... }:
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
let
|
||||||
inherit (pkgs.uservars)
|
inherit (pkgs.uservars) key dmenu editor theme accent;
|
||||||
key
|
|
||||||
dmenu
|
|
||||||
editor
|
|
||||||
theme
|
|
||||||
accent
|
|
||||||
;
|
|
||||||
inherit (theme) color;
|
inherit (theme) color;
|
||||||
inherit (pkgs) kakounePlugins;
|
inherit (pkgs) kakounePlugins;
|
||||||
inherit (pkgs.kakouneUtils) buildKakounePlugin;
|
inherit (pkgs.kakouneUtils) buildKakounePlugin;
|
||||||
|
@ -85,39 +74,26 @@ in
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
extraConfig =
|
extraConfig =
|
||||||
lib.concatStringsSep "\n" (
|
lib.concatStringsSep "\n"
|
||||||
map (lib.readFile) (
|
(map (lib.readFile) ([
|
||||||
[
|
./filetypes.kak
|
||||||
./filetypes.kak
|
./hooks.kak
|
||||||
./hooks.kak
|
./indent.kak
|
||||||
./indent.kak
|
./keys.kak
|
||||||
./keys.kak
|
./lsp-config.kak
|
||||||
./lsp-config.kak
|
./usermode.kak
|
||||||
./usermode.kak
|
./git-mode.kak
|
||||||
./git-mode.kak
|
] ++ lib.optional (dmenu == "rofi") ./rofi-commands.kak)) + ''
|
||||||
]
|
|
||||||
++ lib.optional (dmenu == "rofi") ./rofi-commands.kak
|
|
||||||
)
|
|
||||||
)
|
|
||||||
+ ''
|
|
||||||
|
|
||||||
set global scrolloff 10,20
|
set global scrolloff 10,20
|
||||||
set global autoreload yes
|
set global autoreload yes
|
||||||
set global startup_info_version 99999999
|
set global startup_info_version 99999999
|
||||||
|
|
||||||
''
|
'' + (import ./colors.nix {
|
||||||
+ (import ./colors.nix {
|
inherit pkgs lib color accent;
|
||||||
inherit
|
|
||||||
pkgs
|
|
||||||
lib
|
|
||||||
color
|
|
||||||
accent
|
|
||||||
;
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
home.file = {
|
home.file = { ".config/kak-lsp/kak-lsp.toml".source = ./kak-lsp.toml; };
|
||||||
".config/kak-lsp/kak-lsp.toml".source = ./kak-lsp.toml;
|
|
||||||
};
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
terminal
|
terminal
|
||||||
ranger
|
ranger
|
||||||
|
@ -147,3 +123,4 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ hook global WinSetOption filetype=c %{
|
||||||
}
|
}
|
||||||
|
|
||||||
hook global WinSetOption filetype=nix %{
|
hook global WinSetOption filetype=nix %{
|
||||||
set buffer formatcmd 'nixfmt'
|
set buffer formatcmd 'nixpkgs-fmt'
|
||||||
}
|
}
|
||||||
|
|
||||||
hook global BufCreate .*\.html %{
|
hook global BufCreate .*\.html %{
|
||||||
|
|
|
@ -1,11 +1,4 @@
|
||||||
{
|
{ config, pkgs, lib, inputs, ... }: {
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
inputs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
programs.lf = {
|
programs.lf = {
|
||||||
enable = true;
|
enable = true;
|
||||||
keybindings = {
|
keybindings = {
|
||||||
|
|
19
user/man.nix
19
user/man.nix
|
@ -1,20 +1,5 @@
|
||||||
{
|
{ config, pkgs, lib, inputs, ... }:
|
||||||
config,
|
let inherit (pkgs.uservars) key theme color accent font desktop editor;
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
inputs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
inherit (pkgs.uservars)
|
|
||||||
key
|
|
||||||
theme
|
|
||||||
color
|
|
||||||
accent
|
|
||||||
font
|
|
||||||
desktop
|
|
||||||
editor
|
|
||||||
;
|
|
||||||
pagers = rec {
|
pagers = rec {
|
||||||
kak = kakoune;
|
kak = kakoune;
|
||||||
kakoune = {
|
kakoune = {
|
||||||
|
|
|
@ -1,20 +1,6 @@
|
||||||
{
|
{ config, pkgs, lib, font, ... }:
|
||||||
config,
|
let inherit (pkgs.uservars) key theme color accent font;
|
||||||
pkgs,
|
in {
|
||||||
lib,
|
|
||||||
font,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
inherit (pkgs.uservars)
|
|
||||||
key
|
|
||||||
theme
|
|
||||||
color
|
|
||||||
accent
|
|
||||||
font
|
|
||||||
;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
config = {
|
config = {
|
||||||
programs.mangohud = {
|
programs.mangohud = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
{
|
{ config, pkgs, lib, font, ... }:
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
font,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
let
|
||||||
inherit (pkgs.uservars) browser;
|
inherit (pkgs.uservars) browser;
|
||||||
cfg = config.xdg.defaultApplications;
|
cfg = config.xdg.defaultApplications;
|
||||||
|
@ -32,21 +26,20 @@ in
|
||||||
xdg.mimeApps =
|
xdg.mimeApps =
|
||||||
let
|
let
|
||||||
|
|
||||||
createMimeAssociation = (
|
createMimeAssociation = (mime_prefix: application: mime_suffix: {
|
||||||
mime_prefix: application: mime_suffix: { "${mime_prefix}/${mime_suffix}" = application; }
|
"${mime_prefix}/${mime_suffix}" = application;
|
||||||
);
|
});
|
||||||
|
|
||||||
createMimeAssociations = (
|
createMimeAssociations = (mime_prefix: application: mime_suffixes:
|
||||||
mime_prefix: application: mime_suffixes:
|
lib.foldAttrs (n: _: n) { }
|
||||||
lib.foldAttrs (n: _: n) { } (map (createMimeAssociation mime_prefix application) mime_suffixes)
|
(map (createMimeAssociation mime_prefix application) mime_suffixes));
|
||||||
);
|
|
||||||
|
|
||||||
mimes =
|
mimes = simple
|
||||||
simple
|
|
||||||
// (createMimeAssociations "text" cfg.text-editor text_suffixes)
|
// (createMimeAssociations "text" cfg.text-editor text_suffixes)
|
||||||
// (createMimeAssociations "image" cfg.image-viewer image_suffixes)
|
// (createMimeAssociations "image" cfg.image-viewer image_suffixes)
|
||||||
// (createMimeAssociations "video" cfg.video-player video_suffixes)
|
// (createMimeAssociations "video" cfg.video-player video_suffixes)
|
||||||
// (createMimeAssociations "application" cfg.archive-manager archive-suffixes);
|
// (createMimeAssociations "application" cfg.archive-manager archive-suffixes)
|
||||||
|
;
|
||||||
|
|
||||||
simple = {
|
simple = {
|
||||||
"inode/directory" = cfg.file-manager;
|
"inode/directory" = cfg.file-manager;
|
||||||
|
@ -428,6 +421,7 @@ in
|
||||||
"x-theora+ogg"
|
"x-theora+ogg"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
archive-suffixes = [
|
archive-suffixes = [
|
||||||
"bzip2"
|
"bzip2"
|
||||||
"gzip"
|
"gzip"
|
||||||
|
@ -493,5 +487,6 @@ in
|
||||||
enable = true;
|
enable = true;
|
||||||
defaultApplications = mimes;
|
defaultApplications = mimes;
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
{
|
{ lib, pkgs, config, ... }: {
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
config = lib.mkIf (pkgs.uservars.desktop != "gnome") {
|
config = lib.mkIf (pkgs.uservars.desktop != "gnome") {
|
||||||
services.mpd = {
|
services.mpd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }: {
|
||||||
{
|
|
||||||
config = {
|
config = {
|
||||||
programs.mpv = {
|
programs.mpv = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -7,7 +6,8 @@
|
||||||
# ytdl-format='best';
|
# ytdl-format='best';
|
||||||
# ytdl_path = "yt-dlp";
|
# ytdl_path = "yt-dlp";
|
||||||
ytdl-format = "bestvideo[height<=1080][vcodec!=vp9]+bestaudio/best";
|
ytdl-format = "bestvideo[height<=1080][vcodec!=vp9]+bestaudio/best";
|
||||||
ytdl-raw-options = "cookies=~/.cache/cookies-youtube-com.txt,mark-watched=";
|
ytdl-raw-options =
|
||||||
|
"cookies=~/.cache/cookies-youtube-com.txt,mark-watched=";
|
||||||
osd-fractions = true;
|
osd-fractions = true;
|
||||||
save-position-on-quit = true;
|
save-position-on-quit = true;
|
||||||
keep-open = true;
|
keep-open = true;
|
||||||
|
|
|
@ -1,15 +1,10 @@
|
||||||
{
|
{ config, pkgs, lib, inputs, ... }: {
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
inputs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
config = {
|
config = {
|
||||||
programs.password-store = {
|
programs.password-store = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.pass.withExtensions (ex: with ex; [ pass-otp ]);
|
package = pkgs.pass.withExtensions (ex: with ex; [
|
||||||
|
pass-otp
|
||||||
|
]);
|
||||||
};
|
};
|
||||||
services = {
|
services = {
|
||||||
pass-secret-service.enable = true;
|
pass-secret-service.enable = true;
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
{
|
{ config, pkgs, lib, ... }: {
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
# RNNoise is a noise supperssion neural network
|
# RNNoise is a noise supperssion neural network
|
||||||
# Here we use it as a plugin for pipewire to create a virtual microphone
|
# Here we use it as a plugin for pipewire to create a virtual microphone
|
||||||
config = {
|
config = {
|
||||||
|
|
|
@ -1,21 +1,8 @@
|
||||||
{
|
{ config, pkgs, lib, inputs, ... }:
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
inputs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
let
|
||||||
inherit (pkgs.uservars)
|
inherit (pkgs.uservars) key theme color accent font;
|
||||||
key
|
|
||||||
theme
|
|
||||||
color
|
|
||||||
accent
|
|
||||||
font
|
|
||||||
;
|
|
||||||
|
|
||||||
make_direction_binds = lib.imap0 (
|
make_direction_binds = lib.imap0 (idx: direction:
|
||||||
idx: direction:
|
|
||||||
let
|
let
|
||||||
sign = if (idx < 2) then 1 else -1;
|
sign = if (idx < 2) then 1 else -1;
|
||||||
axis = if ((lib.mod idx 2) != 0) then "y" else "x";
|
axis = if ((lib.mod idx 2) != 0) then "y" else "x";
|
||||||
|
@ -28,8 +15,8 @@ let
|
||||||
montage_mode_shift_${axis}(${toString (sign * -1)})
|
montage_mode_shift_${axis}(${toString (sign * -1)})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
''
|
'');
|
||||||
);
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
# My bemenu wrapper
|
# My bemenu wrapper
|
||||||
|
@ -58,12 +45,7 @@ in
|
||||||
<Left> { goto_file_relative(-1) }
|
<Left> { goto_file_relative(-1) }
|
||||||
<Right> { goto_file_relative(1); }
|
<Right> { goto_file_relative(1); }
|
||||||
|
|
||||||
${lib.concatStrings (make_direction_binds [
|
${lib.concatStrings (make_direction_binds [ "left" "up" "right" "down" ])}
|
||||||
"left"
|
|
||||||
"up"
|
|
||||||
"right"
|
|
||||||
"down"
|
|
||||||
])}
|
|
||||||
|
|
||||||
${key.tabL} { goto_file_relative(-1) }
|
${key.tabL} { goto_file_relative(-1) }
|
||||||
${key.tabR} { goto_file_relative(1); }
|
${key.tabR} { goto_file_relative(1); }
|
||||||
|
@ -72,7 +54,10 @@ in
|
||||||
d { send_keys(6) }
|
d { send_keys(6) }
|
||||||
y { send_keys(8) }
|
y { send_keys(8) }
|
||||||
|
|
||||||
${if (key.layout == "colemak") then "\n t { toggle_scale_mode(0) }\n " else ""}
|
${if (key.layout == "colemak") then
|
||||||
|
"\n t { toggle_scale_mode(0) }\n "
|
||||||
|
else
|
||||||
|
""}
|
||||||
|
|
||||||
# vim: ft=ini
|
# vim: ft=ini
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -1,18 +1,6 @@
|
||||||
{
|
{ config, pkgs, lib, font, ... }:
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
font,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
let
|
||||||
inherit (pkgs.uservars)
|
inherit (pkgs.uservars) key theme accent font browser;
|
||||||
key
|
|
||||||
theme
|
|
||||||
accent
|
|
||||||
font
|
|
||||||
browser
|
|
||||||
;
|
|
||||||
inherit (theme) color;
|
inherit (theme) color;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
@ -50,12 +38,9 @@ in
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
bar = {
|
bar = { bg = color.bg; };
|
||||||
bg = color.bg;
|
|
||||||
};
|
|
||||||
pinned = tabs_defaults;
|
pinned = tabs_defaults;
|
||||||
}
|
} // tabs_defaults;
|
||||||
// tabs_defaults;
|
|
||||||
|
|
||||||
########################################################
|
########################################################
|
||||||
# Completion for urls and commands
|
# Completion for urls and commands
|
||||||
|
@ -63,18 +48,10 @@ in
|
||||||
|
|
||||||
completion = {
|
completion = {
|
||||||
fg = color.txt;
|
fg = color.txt;
|
||||||
even = {
|
even = { bg = color.bg; };
|
||||||
bg = color.bg;
|
odd = { bg = color.bg; };
|
||||||
};
|
scrollbar = { bg = color.bg_dark; };
|
||||||
odd = {
|
match = { fg = accent.color; };
|
||||||
bg = color.bg;
|
|
||||||
};
|
|
||||||
scrollbar = {
|
|
||||||
bg = color.bg_dark;
|
|
||||||
};
|
|
||||||
match = {
|
|
||||||
fg = accent.color;
|
|
||||||
};
|
|
||||||
category = {
|
category = {
|
||||||
fg = color.txt;
|
fg = color.txt;
|
||||||
bg = color.bg_dark;
|
bg = color.bg_dark;
|
||||||
|
@ -91,9 +68,7 @@ in
|
||||||
top = color.bg_dark;
|
top = color.bg_dark;
|
||||||
bottom = color.bg_dark;
|
bottom = color.bg_dark;
|
||||||
};
|
};
|
||||||
match = {
|
match = { fg = color.txt; };
|
||||||
fg = color.txt;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -127,16 +102,10 @@ in
|
||||||
};
|
};
|
||||||
url = {
|
url = {
|
||||||
success = {
|
success = {
|
||||||
https = {
|
https = { fg = color.txt; };
|
||||||
fg = color.txt;
|
http = { fg = color.normal.red; };
|
||||||
};
|
|
||||||
http = {
|
|
||||||
fg = color.normal.red;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
hover = {
|
|
||||||
fg = color.normal.cyan;
|
|
||||||
};
|
};
|
||||||
|
hover = { fg = color.normal.cyan; };
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
########################################################
|
########################################################
|
||||||
|
@ -144,15 +113,9 @@ in
|
||||||
########################################################
|
########################################################
|
||||||
|
|
||||||
downloads = {
|
downloads = {
|
||||||
start = {
|
start = { bg = color.normal.blue; };
|
||||||
bg = color.normal.blue;
|
stop = { bg = color.normal.green; };
|
||||||
};
|
bar = { bg = color.bg; };
|
||||||
stop = {
|
|
||||||
bg = color.normal.green;
|
|
||||||
};
|
|
||||||
bar = {
|
|
||||||
bg = color.bg;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
########################################################
|
########################################################
|
||||||
|
@ -162,9 +125,7 @@ in
|
||||||
hints = {
|
hints = {
|
||||||
fg = color.txt;
|
fg = color.txt;
|
||||||
bg = color.bg;
|
bg = color.bg;
|
||||||
match = {
|
match = { fg = accent.color; };
|
||||||
fg = accent.color;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
########################################################
|
########################################################
|
||||||
|
@ -174,9 +135,7 @@ in
|
||||||
keyhint = {
|
keyhint = {
|
||||||
fg = color.txt;
|
fg = color.txt;
|
||||||
bg = color.bg;
|
bg = color.bg;
|
||||||
suffix = {
|
suffix = { fg = accent.color; };
|
||||||
fg = accent.color;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
########################################################
|
########################################################
|
||||||
|
@ -192,9 +151,7 @@ in
|
||||||
fg = accent.fg;
|
fg = accent.fg;
|
||||||
bg = accent.color;
|
bg = accent.color;
|
||||||
};
|
};
|
||||||
disabled = {
|
disabled = { fg = color.bg_light; };
|
||||||
fg = color.bg_light;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
########################################################
|
########################################################
|
||||||
|
@ -259,3 +216,4 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,71 +1,63 @@
|
||||||
{
|
{ config, pkgs, lib, font, ... }:
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
font,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
let
|
||||||
inherit (pkgs.uservars) theme;
|
inherit (pkgs.uservars) theme;
|
||||||
inherit (theme) color;
|
inherit (theme) color;
|
||||||
|
|
||||||
# ".config/qutebrowser/greasemonkey/darkreader.js".text =
|
# ".config/qutebrowser/greasemonkey/darkreader.js".text =
|
||||||
darkThemeUserscript =
|
darkThemeUserscript = enabled: pkgs.writeText "darkreader.js" ''
|
||||||
enabled:
|
// ==UserScript==
|
||||||
pkgs.writeText "darkreader.js" ''
|
// @name Dark Reader (Unofficial)
|
||||||
// ==UserScript==
|
// @icon https://darkreader.org/images/darkreader-icon-256x256.png
|
||||||
// @name Dark Reader (Unofficial)
|
// @namespace DarkReader
|
||||||
// @icon https://darkreader.org/images/darkreader-icon-256x256.png
|
// @description Inverts the brightness of pages to reduce eye strain
|
||||||
// @namespace DarkReader
|
// @version 4.7.15
|
||||||
// @description Inverts the brightness of pages to reduce eye strain
|
// @author https://github.com/darkreader/darkreader#contributors
|
||||||
// @version 4.7.15
|
// @homepageURL https://darkreader.org/ | https://github.com/darkreader/darkreader
|
||||||
// @author https://github.com/darkreader/darkreader#contributors
|
// @run-at document-end
|
||||||
// @homepageURL https://darkreader.org/ | https://github.com/darkreader/darkreader
|
// @grant none
|
||||||
// @run-at document-end
|
// @include http*
|
||||||
// @grant none
|
// @require https://cdn.jsdelivr.net/npm/darkreader/darkreader.min.js
|
||||||
// @include http*
|
// @noframes
|
||||||
// @require https://cdn.jsdelivr.net/npm/darkreader/darkreader.min.js
|
// ==/UserScript==
|
||||||
// @noframes
|
|
||||||
// ==/UserScript==
|
|
||||||
|
|
||||||
DarkReader.setFetchMethod(window.fetch)
|
DarkReader.setFetchMethod(window.fetch)
|
||||||
|
|
||||||
if (${if enabled then "false" else "true"}) {
|
if (${if enabled then "false" else "true"}) {
|
||||||
DarkReader.disable();
|
DarkReader.disable();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const ignore_list = [
|
const ignore_list = [
|
||||||
"askubuntu.com",
|
"askubuntu.com",
|
||||||
"mathoverflow.com",
|
"mathoverflow.com",
|
||||||
"mathoverflow.net",
|
"mathoverflow.net",
|
||||||
"serverfault.com",
|
"serverfault.com",
|
||||||
"stackapps.com",
|
"stackapps.com",
|
||||||
"stackexchange.com",
|
"stackexchange.com",
|
||||||
"stackoverflow.com",
|
"stackoverflow.com",
|
||||||
"superuser.com",
|
"superuser.com",
|
||||||
"hub.docker.com",
|
"hub.docker.com",
|
||||||
];
|
];
|
||||||
|
|
||||||
for (let item of ignore_list) {
|
for (let item of ignore_list) {
|
||||||
if (window.location.origin.indexOf(item) >= 0) {
|
if (window.location.origin.indexOf(item) >= 0) {
|
||||||
console.log("URL matched dark-mode ignore list");
|
console.log("URL matched dark-mode ignore list");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DarkReader.enable({
|
DarkReader.enable({
|
||||||
brightness: 100,
|
brightness: 100,
|
||||||
contrast: 100,
|
contrast: 100,
|
||||||
sepia: 0,
|
sepia: 0,
|
||||||
|
|
||||||
darkSchemeBackgroundColor: "${color.bg}",
|
darkSchemeBackgroundColor: "${color.bg}",
|
||||||
darkSchemeTextColor: "${color.txt}",
|
darkSchemeTextColor: "${color.txt}",
|
||||||
|
|
||||||
lightSchemeBackgroundColor: "${color.bg}",
|
lightSchemeBackgroundColor: "${color.bg}",
|
||||||
lightSchemeTextColor: "${color.txt}",
|
lightSchemeTextColor: "${color.txt}",
|
||||||
});
|
});
|
||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
programs.qutebrowser.keyBindings = {
|
programs.qutebrowser.keyBindings = {
|
||||||
|
@ -95,3 +87,4 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
{
|
{ config, pkgs, lib, font, ... }:
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
font,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
let
|
||||||
inherit (pkgs.uservars) key browser editor;
|
inherit (pkgs.uservars) key browser editor;
|
||||||
in
|
in
|
||||||
|
@ -65,6 +59,7 @@ in
|
||||||
|
|
||||||
"${key.insertMode}" = "mode-enter insert";
|
"${key.insertMode}" = "mode-enter insert";
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
settings = {
|
settings = {
|
||||||
tabs.tree_tabs = true;
|
tabs.tree_tabs = true;
|
||||||
|
@ -83,8 +78,7 @@ in
|
||||||
{
|
{
|
||||||
kakoune = "kak";
|
kakoune = "kak";
|
||||||
helix = "hx";
|
helix = "hx";
|
||||||
}
|
}.${editor}
|
||||||
.${editor}
|
|
||||||
"{file}"
|
"{file}"
|
||||||
"+{line}"
|
"+{line}"
|
||||||
];
|
];
|
||||||
|
@ -118,9 +112,7 @@ in
|
||||||
ExecStart = "${pkgs.qutebrowser}/bin/qutebrowser";
|
ExecStart = "${pkgs.qutebrowser}/bin/qutebrowser";
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
};
|
};
|
||||||
Install = {
|
Install = { WantedBy = [ "sway-session.target" ]; };
|
||||||
WantedBy = [ "sway-session.target" ];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
home.file = {
|
home.file = {
|
||||||
|
@ -157,3 +149,4 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,3 +33,4 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,4 @@
|
||||||
{
|
{ config, pkgs, lib, inputs, ... }: {
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
inputs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
xdg.configFile = {
|
xdg.configFile = {
|
||||||
"ranger/rc.conf".source = ./rc.conf;
|
"ranger/rc.conf".source = ./rc.conf;
|
||||||
"ranger/rifle.conf".source = ./rifle.conf;
|
"ranger/rifle.conf".source = ./rifle.conf;
|
||||||
|
|
|
@ -1,17 +1,6 @@
|
||||||
{
|
{ config, pkgs, lib, font, ... }:
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
font,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
let
|
||||||
inherit (pkgs.uservars)
|
inherit (pkgs.uservars) key theme accent font;
|
||||||
key
|
|
||||||
theme
|
|
||||||
accent
|
|
||||||
font
|
|
||||||
;
|
|
||||||
inherit (theme) color;
|
inherit (theme) color;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
@ -53,15 +42,14 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
"#window" = {
|
"#window" = {
|
||||||
background-color = mkLiteral "${color.bg}${lib.toHexString (theme.opacity * 255 / 100)}";
|
background-color = mkLiteral
|
||||||
|
"${color.bg}${lib.toHexString (theme.opacity * 255 / 100)}";
|
||||||
# children = map mkLiteral [ "prompt" "entry" ];
|
# children = map mkLiteral [ "prompt" "entry" ];
|
||||||
border = mkLiteral "2px solid";
|
border = mkLiteral "2px solid";
|
||||||
border-color = mkLiteral accent.color;
|
border-color = mkLiteral accent.color;
|
||||||
padding = 0;
|
padding = 0;
|
||||||
};
|
};
|
||||||
"#inputbar" = {
|
"#inputbar" = { margin = mkLiteral "10px"; };
|
||||||
margin = mkLiteral "10px";
|
|
||||||
};
|
|
||||||
"#listview" = {
|
"#listview" = {
|
||||||
# fixed-height=0;
|
# fixed-height=0;
|
||||||
border = mkLiteral "2px solid 0px 0px";
|
border = mkLiteral "2px solid 0px 0px";
|
||||||
|
@ -90,7 +78,9 @@ in
|
||||||
margin-right = mkLiteral "20px";
|
margin-right = mkLiteral "20px";
|
||||||
size = 24;
|
size = 24;
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
13
user/ssh.nix
13
user/ssh.nix
|
@ -1,13 +1,6 @@
|
||||||
{
|
{ config, pkgs, lib, ... }:
|
||||||
config,
|
let inherit (pkgs.uservars) username mail;
|
||||||
pkgs,
|
in {
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
inherit (pkgs.uservars) username mail;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
config = {
|
config = {
|
||||||
programs.ssh.enable = true;
|
programs.ssh.enable = true;
|
||||||
programs.ssh.matchBlocks = {
|
programs.ssh.matchBlocks = {
|
||||||
|
|
|
@ -1,16 +1,6 @@
|
||||||
{
|
{ config, pkgs, lib, ... }:
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
let
|
||||||
inherit (pkgs.uservars)
|
inherit (pkgs.uservars) key accent font theme;
|
||||||
key
|
|
||||||
accent
|
|
||||||
font
|
|
||||||
theme
|
|
||||||
;
|
|
||||||
inherit (theme) color;
|
inherit (theme) color;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
@ -52,13 +42,7 @@ in
|
||||||
bg_color = color.bg_dark;
|
bg_color = color.bg_dark;
|
||||||
alert = "#000000";
|
alert = "#000000";
|
||||||
client = border: background: text: indicator: childBorder: {
|
client = border: background: text: indicator: childBorder: {
|
||||||
inherit
|
inherit border background text indicator childBorder;
|
||||||
border
|
|
||||||
background
|
|
||||||
text
|
|
||||||
indicator
|
|
||||||
childBorder
|
|
||||||
;
|
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
@ -95,7 +79,9 @@ in
|
||||||
};
|
};
|
||||||
# setup cursor based on home.pointerCursor
|
# setup cursor based on home.pointerCursor
|
||||||
seat."*" = {
|
seat."*" = {
|
||||||
xcursor_theme = "${config.home.pointerCursor.name} ${toString config.home.pointerCursor.size}";
|
xcursor_theme = "${config.home.pointerCursor.name} ${
|
||||||
|
toString config.home.pointerCursor.size
|
||||||
|
}";
|
||||||
hide_cursor = "when-typing enable";
|
hide_cursor = "when-typing enable";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -146,10 +132,7 @@ in
|
||||||
grim
|
grim
|
||||||
swappy
|
swappy
|
||||||
(tesseract5.override {
|
(tesseract5.override {
|
||||||
enableLanguages = [
|
enableLanguages = [ "eng" "por" ];
|
||||||
"eng"
|
|
||||||
"por"
|
|
||||||
];
|
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,16 +1,6 @@
|
||||||
{
|
{ config, pkgs, lib, ... }:
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
let
|
||||||
inherit (pkgs.uservars)
|
inherit (pkgs.uservars) key accent font theme;
|
||||||
key
|
|
||||||
accent
|
|
||||||
font
|
|
||||||
theme
|
|
||||||
;
|
|
||||||
inherit (theme) color;
|
inherit (theme) color;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
@ -36,13 +26,11 @@ in
|
||||||
{
|
{
|
||||||
profile = {
|
profile = {
|
||||||
name = "nomad";
|
name = "nomad";
|
||||||
outputs = [
|
outputs = [{
|
||||||
{
|
criteria = "eDP-1";
|
||||||
criteria = "eDP-1";
|
status = "enable";
|
||||||
status = "enable";
|
position = "1920,312";
|
||||||
position = "1920,312";
|
}];
|
||||||
}
|
|
||||||
];
|
|
||||||
exec = [ "xrdb .Xresources" ];
|
exec = [ "xrdb .Xresources" ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,16 +1,6 @@
|
||||||
{
|
{ config, pkgs, lib, ... }:
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
let
|
||||||
inherit (pkgs.uservars)
|
inherit (pkgs.uservars) key accent font theme;
|
||||||
key
|
|
||||||
accent
|
|
||||||
font
|
|
||||||
theme
|
|
||||||
;
|
|
||||||
inherit (theme) color;
|
inherit (theme) color;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
@ -58,8 +48,6 @@ in
|
||||||
ExecStart = "${pkgs.mako}/bin/mako";
|
ExecStart = "${pkgs.mako}/bin/mako";
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
};
|
};
|
||||||
Install = {
|
Install = { WantedBy = [ "sway-session.target" ]; };
|
||||||
WantedBy = [ "sway-session.target" ];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,18 +1,20 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
let
|
let
|
||||||
|
# inherit (pkgs.uservars) key accent font theme;
|
||||||
|
# inherit (theme) color;
|
||||||
|
# inherit (pkgs) lib;
|
||||||
|
|
||||||
|
# mod = "Mod4";
|
||||||
|
# menu = "wlauncher";
|
||||||
|
# terminal = "alacritty";
|
||||||
|
|
||||||
|
# locked_binds =
|
||||||
|
# lib.mapAttrs' (k: v: lib.nameValuePair "--locked ${k}" v);
|
||||||
|
# code_binds =
|
||||||
|
# lib.mapAttrs' (k: v: lib.nameValuePair "--to-code ${k}" v);
|
||||||
|
# return_mode = lib.mapAttrs (k: v: "${v}; mode default");
|
||||||
|
# playerctl = "exec ${pkgs.playerctl}/bin/playerctl";
|
||||||
in
|
in
|
||||||
# inherit (pkgs.uservars) key accent font theme;
|
|
||||||
# inherit (theme) color;
|
|
||||||
# inherit (pkgs) lib;
|
|
||||||
# mod = "Mod4";
|
|
||||||
# menu = "wlauncher";
|
|
||||||
# terminal = "alacritty";
|
|
||||||
# locked_binds =
|
|
||||||
# lib.mapAttrs' (k: v: lib.nameValuePair "--locked ${k}" v);
|
|
||||||
# code_binds =
|
|
||||||
# lib.mapAttrs' (k: v: lib.nameValuePair "--to-code ${k}" v);
|
|
||||||
# return_mode = lib.mapAttrs (k: v: "${v}; mode default");
|
|
||||||
# playerctl = "exec ${pkgs.playerctl}/bin/playerctl";
|
|
||||||
{
|
{
|
||||||
wayland.windowManager.sway.config = {
|
wayland.windowManager.sway.config = {
|
||||||
assigns = {
|
assigns = {
|
||||||
|
|
|
@ -1,11 +1,6 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
let
|
let
|
||||||
inherit (pkgs.uservars)
|
inherit (pkgs.uservars) key accent font theme;
|
||||||
key
|
|
||||||
accent
|
|
||||||
font
|
|
||||||
theme
|
|
||||||
;
|
|
||||||
inherit (theme) color;
|
inherit (theme) color;
|
||||||
inherit (pkgs) lib;
|
inherit (pkgs) lib;
|
||||||
|
|
||||||
|
@ -26,27 +21,29 @@ let
|
||||||
|
|
||||||
# mod+1 to swich to workspace 1
|
# mod+1 to swich to workspace 1
|
||||||
# mod+shift+1 to move to workspace 1
|
# mod+shift+1 to move to workspace 1
|
||||||
workspace_binds = lib.forEachMerge (lib.range 1 10) (
|
workspace_binds = lib.forEachMerge (lib.range 1 10) (i:
|
||||||
i:
|
|
||||||
let
|
let
|
||||||
key = toString (lib.mod i 10);
|
key = toString (lib.mod i 10);
|
||||||
workspaceNumber = toString i;
|
workspaceNumber = toString i;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
"${mod}+${key}" = "workspace number ${workspaceNumber}";
|
"${mod}+${key}" = "workspace number ${workspaceNumber}";
|
||||||
"${mod}+Shift+${key}" = "move container to workspace number ${workspaceNumber}";
|
"${mod}+Shift+${key}" =
|
||||||
}
|
"move container to workspace number ${workspaceNumber}";
|
||||||
);
|
});
|
||||||
|
|
||||||
prev_next_binds =
|
prev_next_binds =
|
||||||
let
|
let
|
||||||
maybe_window = key: if (lib.strings.hasInfix "button" key) then "--whole-window" else "";
|
maybe_window = key:
|
||||||
makePrevNextBindFunction = (
|
if (lib.strings.hasInfix "button" key) then
|
||||||
prev_or_next:
|
"--whole-window"
|
||||||
|
else
|
||||||
|
"";
|
||||||
|
makePrevNextBindFunction = (prev_or_next:
|
||||||
map (key: {
|
map (key: {
|
||||||
"${maybe_window key} ${mod}+${key}" = "workspace ${prev_or_next}_on_output";
|
"${maybe_window key} ${mod}+${key}" =
|
||||||
})
|
"workspace ${prev_or_next}_on_output";
|
||||||
);
|
}));
|
||||||
prev_binds = makePrevNextBindFunction "prev" [
|
prev_binds = makePrevNextBindFunction "prev" [
|
||||||
key.tabL
|
key.tabL
|
||||||
"bracketleft"
|
"bracketleft"
|
||||||
|
@ -70,51 +67,36 @@ let
|
||||||
# for every direction with both arrow keys and vim keys
|
# for every direction with both arrow keys and vim keys
|
||||||
movement_binds =
|
movement_binds =
|
||||||
let
|
let
|
||||||
directions = [
|
directions = [ "Left" "Up" "Right" "Down" ];
|
||||||
"Left"
|
|
||||||
"Up"
|
|
||||||
"Right"
|
|
||||||
"Down"
|
|
||||||
];
|
|
||||||
makeVimKeys = (k: key.${lib.toLower k});
|
makeVimKeys = (k: key.${lib.toLower k});
|
||||||
makeArrowKeys = (k: k);
|
makeArrowKeys = (k: k);
|
||||||
makeResizeCommand =
|
makeResizeCommand = direction:
|
||||||
direction:
|
|
||||||
{
|
{
|
||||||
Left = "shrink width 20px";
|
Left = "shrink width 20px";
|
||||||
Up = "shrink height 20px";
|
Up = "shrink height 20px";
|
||||||
Right = "grow width 20px";
|
Right = "grow width 20px";
|
||||||
Down = "grow height 20px";
|
Down = "grow height 20px";
|
||||||
}
|
}.${direction};
|
||||||
.${direction};
|
|
||||||
in
|
in
|
||||||
lib.forEachMerge
|
lib.forEachMerge [ makeVimKeys makeArrowKeys ] (prefixFun:
|
||||||
[
|
lib.forEachMerge directions (direction:
|
||||||
makeVimKeys
|
let
|
||||||
makeArrowKeys
|
resize_cmd = makeResizeCommand direction;
|
||||||
]
|
keyBind = prefixFun direction;
|
||||||
(
|
in
|
||||||
prefixFun:
|
{
|
||||||
lib.forEachMerge directions (
|
# Move focus
|
||||||
direction:
|
"${mod}+${keyBind}" = "focus ${direction}";
|
||||||
let
|
# Move window
|
||||||
resize_cmd = makeResizeCommand direction;
|
"${mod}+Shift+${keyBind}" = "move ${direction}";
|
||||||
keyBind = prefixFun direction;
|
# Resize window
|
||||||
in
|
"${mod}+Control+${keyBind}" = "resize ${resize_cmd}";
|
||||||
{
|
# focus output
|
||||||
# Move focus
|
"${mod}+mod1+${keyBind}" = "focus output ${direction}";
|
||||||
"${mod}+${keyBind}" = "focus ${direction}";
|
# Move workspace to output
|
||||||
# Move window
|
"${mod}+mod1+Shift+${keyBind}" =
|
||||||
"${mod}+Shift+${keyBind}" = "move ${direction}";
|
"move workspace output ${direction}";
|
||||||
# Resize window
|
}));
|
||||||
"${mod}+Control+${keyBind}" = "resize ${resize_cmd}";
|
|
||||||
# focus output
|
|
||||||
"${mod}+mod1+${keyBind}" = "focus output ${direction}";
|
|
||||||
# Move workspace to output
|
|
||||||
"${mod}+mod1+Shift+${keyBind}" = "move workspace output ${direction}";
|
|
||||||
}
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
parenting_binds = {
|
parenting_binds = {
|
||||||
"${mod}+equal" = "focus parent";
|
"${mod}+equal" = "focus parent";
|
||||||
|
@ -134,7 +116,8 @@ let
|
||||||
XF86AudioRaiseVolume = "exec volumesh -i 10";
|
XF86AudioRaiseVolume = "exec volumesh -i 10";
|
||||||
XF86AudioLowerVolume = "exec volumesh -d 10";
|
XF86AudioLowerVolume = "exec volumesh -d 10";
|
||||||
XF86AudioMute = "exec volumesh -t";
|
XF86AudioMute = "exec volumesh -t";
|
||||||
XF86AudioMicMute = "exec pactl set-source-mute @DEFAULT_SOURCE@ toggle";
|
XF86AudioMicMute =
|
||||||
|
"exec pactl set-source-mute @DEFAULT_SOURCE@ toggle";
|
||||||
# Control media
|
# Control media
|
||||||
XF86AudioPlay = "exec playerctl play-pause";
|
XF86AudioPlay = "exec playerctl play-pause";
|
||||||
XF86AudioPause = "exec playerctl play-pause";
|
XF86AudioPause = "exec playerctl play-pause";
|
||||||
|
@ -153,7 +136,8 @@ let
|
||||||
# Screen area to file
|
# Screen area to file
|
||||||
"Shift+Print" = "exec ${pkgs.screenshotsh}/bin/screenshotsh area";
|
"Shift+Print" = "exec ${pkgs.screenshotsh}/bin/screenshotsh area";
|
||||||
# Screen area to clipboard
|
# Screen area to clipboard
|
||||||
"Control+Shift+Print" = "exec ${pkgs.screenshotsh}/bin/screenshotsh area-clip";
|
"Control+Shift+Print" =
|
||||||
|
"exec ${pkgs.screenshotsh}/bin/screenshotsh area-clip";
|
||||||
# Focused monitor to clipboard
|
# Focused monitor to clipboard
|
||||||
"Control+Print" = "exec ${pkgs.screenshotsh}/bin/screenshotsh clip";
|
"Control+Print" = "exec ${pkgs.screenshotsh}/bin/screenshotsh clip";
|
||||||
};
|
};
|
||||||
|
@ -171,7 +155,8 @@ let
|
||||||
"${mod}+Alt+x" = "exec pkill wl-crosshair || exec wl-crosshair";
|
"${mod}+Alt+x" = "exec pkill wl-crosshair || exec wl-crosshair";
|
||||||
"${mod}+x" = "kill";
|
"${mod}+x" = "kill";
|
||||||
"${mod}+m" = "mode audio";
|
"${mod}+m" = "mode audio";
|
||||||
"${mod}+escape" = "mode passthrough;exec notify-send 'Passthrough on'";
|
"${mod}+escape" =
|
||||||
|
"mode passthrough;exec notify-send 'Passthrough on'";
|
||||||
"${mod}+ctrl+k" = "exec swaymsg input type:pointer events disabled";
|
"${mod}+ctrl+k" = "exec swaymsg input type:pointer events disabled";
|
||||||
"${mod}+ctrl+shift+k" = "exec swaymsg input type:pointer events enabled";
|
"${mod}+ctrl+shift+k" = "exec swaymsg input type:pointer events enabled";
|
||||||
"${mod}+f" = "fullscreen toggle";
|
"${mod}+f" = "fullscreen toggle";
|
||||||
|
|
|
@ -1,11 +1,6 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
let
|
let
|
||||||
inherit (pkgs.uservars)
|
inherit (pkgs.uservars) key accent font theme;
|
||||||
key
|
|
||||||
accent
|
|
||||||
font
|
|
||||||
theme
|
|
||||||
;
|
|
||||||
inherit (theme) color;
|
inherit (theme) color;
|
||||||
inherit (pkgs) lib;
|
inherit (pkgs) lib;
|
||||||
|
|
||||||
|
@ -13,8 +8,10 @@ let
|
||||||
menu = "wlauncher";
|
menu = "wlauncher";
|
||||||
terminal = "alacritty";
|
terminal = "alacritty";
|
||||||
|
|
||||||
locked = lib.mapAttrs' (k: v: lib.nameValuePair "--locked ${k}" v);
|
locked =
|
||||||
to-code = lib.mapAttrs' (k: v: lib.nameValuePair "--to-code ${k}" v);
|
lib.mapAttrs' (k: v: lib.nameValuePair "--locked ${k}" v);
|
||||||
|
to-code =
|
||||||
|
lib.mapAttrs' (k: v: lib.nameValuePair "--to-code ${k}" v);
|
||||||
quit-mode = lib.mapAttrs (k: v: "${v}; mode default");
|
quit-mode = lib.mapAttrs (k: v: "${v}; mode default");
|
||||||
playerctl = "exec ${pkgs.playerctl}/bin/playerctl";
|
playerctl = "exec ${pkgs.playerctl}/bin/playerctl";
|
||||||
|
|
||||||
|
@ -23,32 +20,20 @@ in
|
||||||
{
|
{
|
||||||
wayland.windowManager.sway.config.modes = {
|
wayland.windowManager.sway.config.modes = {
|
||||||
audio =
|
audio =
|
||||||
(bind_group
|
(bind_group [ to-code locked ] {
|
||||||
[
|
${key.tabR} = "exec volumesh -i 10";
|
||||||
to-code
|
${key.tabL} = "exec volumesh -d 10";
|
||||||
locked
|
${key.right} = "exec mpc next";
|
||||||
]
|
${key.left} = "exec mpc prev";
|
||||||
{
|
${key.up} = "exec volumesh --mpd -i 10";
|
||||||
${key.tabR} = "exec volumesh -i 10";
|
${key.down} = "exec volumesh --mpd -d 10";
|
||||||
${key.tabL} = "exec volumesh -d 10";
|
}) //
|
||||||
${key.right} = "exec mpc next";
|
(bind_group [ locked quit-mode ] {
|
||||||
${key.left} = "exec mpc prev";
|
"space" = "exec mpc toggle";
|
||||||
${key.up} = "exec volumesh --mpd -i 10";
|
"escape" = "";
|
||||||
${key.down} = "exec volumesh --mpd -d 10";
|
"q" = "";
|
||||||
}
|
}) //
|
||||||
)
|
(bind_group [ quit-mode ] {
|
||||||
// (bind_group
|
|
||||||
[
|
|
||||||
locked
|
|
||||||
quit-mode
|
|
||||||
]
|
|
||||||
{
|
|
||||||
"space" = "exec mpc toggle";
|
|
||||||
"escape" = "";
|
|
||||||
"q" = "";
|
|
||||||
}
|
|
||||||
)
|
|
||||||
// (bind_group [ quit-mode ] {
|
|
||||||
"m" = "exec volumesh -t";
|
"m" = "exec volumesh -t";
|
||||||
"s" = "exec ${pkgs.pulse_sink}/bin/pulse_sink";
|
"s" = "exec ${pkgs.pulse_sink}/bin/pulse_sink";
|
||||||
|
|
||||||
|
@ -62,38 +47,28 @@ in
|
||||||
"Ctrl+s" = "exec ${pkgs.musmenu}/bin/musmenu psave";
|
"Ctrl+s" = "exec ${pkgs.musmenu}/bin/musmenu psave";
|
||||||
"Ctrl+o" = "exec ${pkgs.musmenu}/bin/musmenu pload";
|
"Ctrl+o" = "exec ${pkgs.musmenu}/bin/musmenu pload";
|
||||||
"Ctrl+d" = "exec ${pkgs.musmenu}/bin/musmenu pdelete";
|
"Ctrl+d" = "exec ${pkgs.musmenu}/bin/musmenu pdelete";
|
||||||
})
|
}) //
|
||||||
// {
|
{
|
||||||
"p" = "mode playerctl";
|
"p" = "mode playerctl";
|
||||||
"Ctrl+c" = "exec musmenu pclear";
|
"Ctrl+c" = "exec musmenu pclear";
|
||||||
};
|
}
|
||||||
|
;
|
||||||
|
|
||||||
playerctl =
|
playerctl =
|
||||||
(bind_group
|
(bind_group [ to-code locked ] {
|
||||||
[
|
${key.left} = "${playerctl} previous";
|
||||||
to-code
|
${key.right} = "${playerctl} next";
|
||||||
locked
|
${key.up} = "${playerctl} volume 10+";
|
||||||
]
|
${key.down} = "${playerctl} volume 10-";
|
||||||
{
|
${key.tabR} = "${playerctl} volume 10+";
|
||||||
${key.left} = "${playerctl} previous";
|
${key.tabL} = "${playerctl} volume 10-";
|
||||||
${key.right} = "${playerctl} next";
|
}) //
|
||||||
${key.up} = "${playerctl} volume 10+";
|
(bind_group [ to-code quit-mode ] {
|
||||||
${key.down} = "${playerctl} volume 10-";
|
"space" = "${playerctl} play-pause";
|
||||||
${key.tabR} = "${playerctl} volume 10+";
|
"escape" = "";
|
||||||
${key.tabL} = "${playerctl} volume 10-";
|
"q" = "";
|
||||||
}
|
})
|
||||||
)
|
;
|
||||||
// (bind_group
|
|
||||||
[
|
|
||||||
to-code
|
|
||||||
quit-mode
|
|
||||||
]
|
|
||||||
{
|
|
||||||
"space" = "${playerctl} play-pause";
|
|
||||||
"escape" = "";
|
|
||||||
"q" = "";
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
passthrough = {
|
passthrough = {
|
||||||
"${mod}+escape" = "mode default;exec notify-send 'Passthrough off'";
|
"${mod}+escape" = "mode default;exec notify-send 'Passthrough off'";
|
||||||
|
|
|
@ -1,16 +1,6 @@
|
||||||
{
|
{ config, pkgs, lib, ... }:
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
let
|
||||||
inherit (pkgs.uservars)
|
inherit (pkgs.uservars) key accent font theme;
|
||||||
key
|
|
||||||
accent
|
|
||||||
font
|
|
||||||
theme
|
|
||||||
;
|
|
||||||
inherit (theme) color;
|
inherit (theme) color;
|
||||||
|
|
||||||
asScript = filename: text: toString (pkgs.writeShellScript filename text);
|
asScript = filename: text: toString (pkgs.writeShellScript filename text);
|
||||||
|
|
|
@ -1,16 +1,6 @@
|
||||||
{
|
{ config, pkgs, lib, ... }:
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
let
|
||||||
inherit (pkgs.uservars)
|
inherit (pkgs.uservars) key accent font theme;
|
||||||
key
|
|
||||||
accent
|
|
||||||
font
|
|
||||||
theme
|
|
||||||
;
|
|
||||||
inherit (theme) color;
|
inherit (theme) color;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,53 +1,38 @@
|
||||||
{
|
{ config, pkgs, lib, inputs, ... }:
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
inputs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
let
|
||||||
inherit (pkgs.uservars) theme font desktop;
|
inherit (pkgs.uservars) theme font desktop;
|
||||||
inherit (theme)
|
inherit (theme) color gtk_theme icon_theme cursor_theme;
|
||||||
color
|
|
||||||
gtk_theme
|
|
||||||
icon_theme
|
|
||||||
cursor_theme
|
|
||||||
;
|
|
||||||
in
|
in
|
||||||
lib.mkIf (desktop == "sway") {
|
lib.mkIf (desktop == "sway")
|
||||||
|
{
|
||||||
home.pointerCursor = {
|
home.pointerCursor = {
|
||||||
name = cursor_theme;
|
name = cursor_theme;
|
||||||
size = 24;
|
size = 24;
|
||||||
package = pkgs.bibata-cursors;
|
package = pkgs.bibata-cursors;
|
||||||
gtk.enable = true;
|
gtk.enable = true;
|
||||||
};
|
};
|
||||||
gtk =
|
gtk = {
|
||||||
{
|
enable = true;
|
||||||
enable = true;
|
font = {
|
||||||
font = {
|
name = font.interface;
|
||||||
name = font.interface;
|
size = font.size.small;
|
||||||
size = font.size.small;
|
};
|
||||||
|
theme = {
|
||||||
|
name = gtk_theme;
|
||||||
|
package = pkgs.orchis_theme_compact;
|
||||||
|
};
|
||||||
|
iconTheme = {
|
||||||
|
name = icon_theme;
|
||||||
|
package = pkgs.papirus_red;
|
||||||
|
};
|
||||||
|
} // (
|
||||||
|
let
|
||||||
|
shared.extraConfig = {
|
||||||
|
gtk-decoration-layout = "menu:";
|
||||||
};
|
};
|
||||||
theme = {
|
in
|
||||||
name = gtk_theme;
|
{ gtk4 = shared; gtk3 = shared; }
|
||||||
package = pkgs.orchis_theme_compact;
|
);
|
||||||
};
|
|
||||||
iconTheme = {
|
|
||||||
name = icon_theme;
|
|
||||||
package = pkgs.papirus_red;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
// (
|
|
||||||
let
|
|
||||||
shared.extraConfig = {
|
|
||||||
gtk-decoration-layout = "menu:";
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
gtk4 = shared;
|
|
||||||
gtk3 = shared;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
qt = {
|
qt = {
|
||||||
enable = true;
|
enable = true;
|
||||||
platformTheme.name = "qtct";
|
platformTheme.name = "qtct";
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{ ... }:
|
{ ... }: {
|
||||||
{
|
|
||||||
services.syncthing = {
|
services.syncthing = {
|
||||||
enable = true;
|
enable = true;
|
||||||
tray = {
|
tray = {
|
||||||
|
|
|
@ -1,12 +1,8 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }: {
|
||||||
{
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
_thunar-terminal
|
_thunar-terminal
|
||||||
(xfce.thunar.override {
|
(xfce.thunar.override {
|
||||||
thunarPlugins = with pkgs.xfce; [
|
thunarPlugins = with pkgs.xfce; [ thunar-volman thunar-archive-plugin ];
|
||||||
thunar-volman
|
|
||||||
thunar-archive-plugin
|
|
||||||
];
|
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -1,23 +1,19 @@
|
||||||
{ pkgs, lib, ... }:
|
{ pkgs, lib, ... }:
|
||||||
let
|
let
|
||||||
inherit (pkgs.uservars) nextcloud;
|
inherit (pkgs.uservars) nextcloud;
|
||||||
pass_cmd = (
|
pass_cmd = (pkgs.writeShellScript "get_pass" ''
|
||||||
pkgs.writeShellScript "get_pass" ''
|
pass "${nextcloud.pass}" | head -n1
|
||||||
pass "${nextcloud.pass}" | head -n1
|
'');
|
||||||
''
|
|
||||||
);
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
systemd.user.services.vdirsyncer = {
|
systemd.user.services.vdirsyncer = {
|
||||||
Unit.Description = "vdirsyncer calendar and contacts synchronization";
|
Unit.Description = "vdirsyncer calendar and contacts synchronization";
|
||||||
Service = {
|
Service = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
ExecStart = toString (
|
ExecStart = toString (pkgs.writeShellScript "run-vdirsyncer" ''
|
||||||
pkgs.writeShellScript "run-vdirsyncer" ''
|
${pkgs.coreutils}/bin/yes | ${pkgs.vdirsyncer}/bin/vdirsyncer discover
|
||||||
${pkgs.coreutils}/bin/yes | ${pkgs.vdirsyncer}/bin/vdirsyncer discover
|
${pkgs.coreutils}/bin/yes | ${pkgs.vdirsyncer}/bin/vdirsyncer sync
|
||||||
${pkgs.coreutils}/bin/yes | ${pkgs.vdirsyncer}/bin/vdirsyncer sync
|
'');
|
||||||
''
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
systemd.user.timers.vdirsyncer = {
|
systemd.user.timers.vdirsyncer = {
|
||||||
|
@ -49,9 +45,9 @@ in
|
||||||
|
|
||||||
[storage contacts_remote]
|
[storage contacts_remote]
|
||||||
type = "carddav"
|
type = "carddav"
|
||||||
url = "https://${nextcloud.host}/remote.php/dav/addressbooks/users/${nextcloud.user}/"
|
url = "https://${ nextcloud.host }/remote.php/dav/addressbooks/users/${ nextcloud.user }/"
|
||||||
username = "${nextcloud.user}"
|
username = "${ nextcloud.user }"
|
||||||
password.fetch = [ "command", "${pass_cmd}" ]
|
password.fetch = [ "command", "${ pass_cmd }" ]
|
||||||
|
|
||||||
[pair calendar]
|
[pair calendar]
|
||||||
a = "calendar_local"
|
a = "calendar_local"
|
||||||
|
@ -67,9 +63,9 @@ in
|
||||||
|
|
||||||
[storage calendar_remote]
|
[storage calendar_remote]
|
||||||
type = "caldav"
|
type = "caldav"
|
||||||
url = "https://${nextcloud.host}/remote.php/dav/calendars/${nextcloud.user}/"
|
url = "https://${ nextcloud.host }/remote.php/dav/calendars/${ nextcloud.user }/"
|
||||||
username = "${nextcloud.user}"
|
username = "${ nextcloud.user }"
|
||||||
password.fetch = [ "command", "${pass_cmd}" ]
|
password.fetch = [ "command", "${ pass_cmd }" ]
|
||||||
'';
|
'';
|
||||||
"todoman/config.py".text = ''
|
"todoman/config.py".text = ''
|
||||||
path = "~/.local/share/calendars/*"
|
path = "~/.local/share/calendars/*"
|
||||||
|
@ -80,8 +76,10 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
vdirsyncer
|
vdirsyncer
|
||||||
todoman
|
todoman
|
||||||
];
|
];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{ pkgs, config, ... }:
|
{ pkgs, config, ... }: {
|
||||||
{
|
|
||||||
|
|
||||||
programs.vscode = {
|
programs.vscode = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -9,18 +9,4 @@
|
||||||
"git.confirmSync": false,
|
"git.confirmSync": false,
|
||||||
"editor.suggest.snippetsPreventQuickSuggestions": false,
|
"editor.suggest.snippetsPreventQuickSuggestions": false,
|
||||||
"update.mode": "none",
|
"update.mode": "none",
|
||||||
"intelephense.files.exclude": [
|
}
|
||||||
"**/.git/**",
|
|
||||||
"**/.svn/**",
|
|
||||||
"**/.hg/**",
|
|
||||||
"**/CVS/**",
|
|
||||||
"**/.DS_Store/**",
|
|
||||||
"**/node_modules/**",
|
|
||||||
"**/bower_components/**",
|
|
||||||
"**/vendor/**/{Tests,tests}/**",
|
|
||||||
"**/.history/**",
|
|
||||||
"**/vendor/**/vendor/**",
|
|
||||||
"**/.direnv/**"
|
|
||||||
],
|
|
||||||
"intelephense.format.braces": "k&r",
|
|
||||||
}
|
|
|
@ -1,18 +1,6 @@
|
||||||
{
|
{ config, osConfig, pkgs, lib, font, ... }:
|
||||||
config,
|
|
||||||
osConfig,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
font,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
let
|
||||||
inherit (pkgs.uservars)
|
inherit (pkgs.uservars) key theme accent font;
|
||||||
key
|
|
||||||
theme
|
|
||||||
accent
|
|
||||||
font
|
|
||||||
;
|
|
||||||
inherit (theme) color;
|
inherit (theme) color;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
@ -21,226 +9,184 @@ in
|
||||||
enable = true;
|
enable = true;
|
||||||
systemd.enable = true;
|
systemd.enable = true;
|
||||||
systemd.target = "sway-session.target";
|
systemd.target = "sway-session.target";
|
||||||
settings = [
|
settings = [{
|
||||||
{
|
layer = "top";
|
||||||
layer = "top";
|
modules-left = [ "sway/workspaces" "sway/mode" "sway/window" ];
|
||||||
modules-left = [
|
modules-center = [ "clock" ];
|
||||||
"sway/workspaces"
|
modules-right = lib.flatten [
|
||||||
"sway/mode"
|
"sway/language"
|
||||||
"sway/window"
|
"mpd"
|
||||||
];
|
"custom/playerctl"
|
||||||
modules-center = [ "clock" ];
|
"tray"
|
||||||
modules-right = lib.flatten [
|
"custom/caffeine"
|
||||||
"sway/language"
|
"pulseaudio"
|
||||||
"mpd"
|
(lib.optional (osConfig.services.vpn.enable or false) "custom/vpn")
|
||||||
"custom/playerctl"
|
"network"
|
||||||
"tray"
|
"battery"
|
||||||
"custom/caffeine"
|
];
|
||||||
"pulseaudio"
|
battery = {
|
||||||
(lib.optional (osConfig.services.vpn.enable or false) "custom/vpn")
|
tooltip = true;
|
||||||
"network"
|
states = {
|
||||||
"battery"
|
full = 100;
|
||||||
];
|
good = 95;
|
||||||
battery = {
|
warning = 25;
|
||||||
tooltip = true;
|
|
||||||
states = {
|
|
||||||
full = 100;
|
|
||||||
good = 95;
|
|
||||||
warning = 25;
|
|
||||||
};
|
|
||||||
format = "{icon} ";
|
|
||||||
format-charging = "";
|
|
||||||
format-plugged = "";
|
|
||||||
format-full = "";
|
|
||||||
format-warning = "{icon} {time}";
|
|
||||||
format-icons = [
|
|
||||||
""
|
|
||||||
""
|
|
||||||
""
|
|
||||||
""
|
|
||||||
""
|
|
||||||
""
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
network = {
|
format = "{icon} ";
|
||||||
interval = 5;
|
format-charging = "";
|
||||||
|
format-plugged = "";
|
||||||
|
format-full = "";
|
||||||
|
format-warning = "{icon} {time}";
|
||||||
|
format-icons = [ "" "" "" "" "" "" ];
|
||||||
|
};
|
||||||
|
network = {
|
||||||
|
interval = 5;
|
||||||
|
tooltip = false;
|
||||||
|
on-click = "terminal -e iwd";
|
||||||
|
format-wifi = "{icon}";
|
||||||
|
format-icons = [ "" "" "" "" "" ];
|
||||||
|
format-ethernet = "";
|
||||||
|
format-linked = "";
|
||||||
|
format-disconnected = "";
|
||||||
|
};
|
||||||
|
"sway/workspaces" = {
|
||||||
|
enable-bar-scroll = true;
|
||||||
|
format = "{icon}";
|
||||||
|
format-icons = {
|
||||||
|
"1" = "";
|
||||||
|
"2" = "";
|
||||||
|
"3" = "";
|
||||||
|
"4" = "";
|
||||||
|
"5" = "";
|
||||||
|
"6" = "";
|
||||||
|
"7" = "";
|
||||||
|
"8" = "";
|
||||||
|
"9" = "";
|
||||||
|
"10" = "";
|
||||||
|
urgent = "";
|
||||||
|
# focused = "";
|
||||||
|
default = "";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
"sway/window" = { max-length = 40; };
|
||||||
|
"tray" = {
|
||||||
|
"spacing" = 7;
|
||||||
|
"icon-size" = 19;
|
||||||
|
};
|
||||||
|
clock = {
|
||||||
|
interval = 60;
|
||||||
|
format = "<b>{:%H:%M %a %d/%m}</b>";
|
||||||
|
tooltip-format = "<tt><small>{calendar}</small></tt>";
|
||||||
|
calendar = {
|
||||||
|
mode = "year";
|
||||||
|
mode-mon-col = 3;
|
||||||
|
weeks-pos = "right";
|
||||||
|
on-scroll = 1;
|
||||||
|
on-click-right = "mode";
|
||||||
|
format = {
|
||||||
|
months = "<span color='${color.normal.magenta}'><b>{}</b></span>";
|
||||||
|
days = "<span color='${color.txt}'><b>{}</b></span>";
|
||||||
|
weeks = "<span color='${color.normal.cyan}'><b>W{}</b></span>";
|
||||||
|
weekdays = "<span color='${color.normal.yellow}'><b>{}</b></span>";
|
||||||
|
today = "<span color='${accent.color}'><b><u>{}</u></b></span>";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
actions = {
|
||||||
|
on-click-right = "mode";
|
||||||
|
on-click-forward = "tz_up";
|
||||||
|
on-click-backward = "tz_down";
|
||||||
|
on-scroll-up = "shift_up";
|
||||||
|
on-scroll-down = "shift_down";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
mpd =
|
||||||
|
let
|
||||||
|
mpc = "${pkgs.mpc-cli}/bin/mpc";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
format = "{stateIcon} {title} - {artist}";
|
||||||
|
format-paused = "{stateIcon}";
|
||||||
|
format-stopped = "";
|
||||||
|
state-icons = {
|
||||||
|
stopped = "";
|
||||||
|
paused = "";
|
||||||
|
playing = "";
|
||||||
|
};
|
||||||
tooltip = false;
|
tooltip = false;
|
||||||
on-click = "terminal -e iwd";
|
on-click = "${mpc} toggle";
|
||||||
format-wifi = "{icon}";
|
on-scroll-up = "${mpc} vol +10";
|
||||||
format-icons = [
|
on-scroll-down = "${mpc} vol -10";
|
||||||
""
|
|
||||||
""
|
|
||||||
""
|
|
||||||
""
|
|
||||||
""
|
|
||||||
];
|
|
||||||
format-ethernet = "";
|
|
||||||
format-linked = "";
|
|
||||||
format-disconnected = "";
|
|
||||||
};
|
};
|
||||||
"sway/workspaces" = {
|
"custom/playerctl" = {
|
||||||
enable-bar-scroll = true;
|
format = "{} ";
|
||||||
format = "{icon}";
|
exec = "${pkgs.playerctl-status}/bin/playerctl-status";
|
||||||
format-icons = {
|
on-click = "${pkgs.playerctl}/bin/playerctl --ignore-player=mpd play-pause";
|
||||||
"1" = "";
|
interval = 1;
|
||||||
"2" = "";
|
tooltip = false;
|
||||||
"3" = "";
|
};
|
||||||
"4" = "";
|
"sway/language" = { format = "{short} {variant}"; };
|
||||||
"5" = "";
|
"custom/caffeine" = {
|
||||||
"6" = "";
|
format = "{}";
|
||||||
"7" = "";
|
exec = "systemctl --user status swayidle > /dev/null && echo || echo ";
|
||||||
"8" = "";
|
on-click = "${pkgs._sway_idle_toggle}/bin/_sway_idle_toggle";
|
||||||
"9" = "";
|
interval = 1;
|
||||||
"10" = "";
|
tooltip = false;
|
||||||
urgent = "";
|
};
|
||||||
# focused = "";
|
"custom/vpn" = lib.mkIf (osConfig.services.vpn.enable or false) {
|
||||||
default = "";
|
format = "{}";
|
||||||
};
|
exec = ''
|
||||||
|
${pkgs.mullvad}/bin/mullvad status | ${pkgs.gnugrep}/bin/grep "^Connected" > /dev/null \
|
||||||
|
&& echo "" \
|
||||||
|
|| echo ""
|
||||||
|
'';
|
||||||
|
on-click = "mullvad connect";
|
||||||
|
on-click-right = "mullvad disconnect";
|
||||||
|
interval = 1;
|
||||||
|
tooltip = false;
|
||||||
|
};
|
||||||
|
pulseaudio = {
|
||||||
|
interval = 5;
|
||||||
|
tooltip = false;
|
||||||
|
scroll-step = 10;
|
||||||
|
format = "{icon}";
|
||||||
|
format-bluetooth = "";
|
||||||
|
format-bluetooth-muted = "";
|
||||||
|
format-muted = "";
|
||||||
|
format-icons = {
|
||||||
|
"rtp-sink" =
|
||||||
|
[ "" "" "" ];
|
||||||
|
"alsa_output.usb-C-Media_Electronics_Inc._USB_Audio_Device-00.analog-stereo" =
|
||||||
|
[ " " " " " " ];
|
||||||
|
"alsa_output.pci-0000_09_00.4.analog-stereo" =
|
||||||
|
[ " " " " " " ];
|
||||||
|
headphone = [ " " " " " " ];
|
||||||
|
handsfree = "";
|
||||||
|
headset = "";
|
||||||
|
phone = "";
|
||||||
|
portable = "";
|
||||||
|
car = "";
|
||||||
|
default = [ "" "" "" ];
|
||||||
};
|
};
|
||||||
"sway/window" = {
|
on-click = "pavucontrol";
|
||||||
max-length = 40;
|
on-click-right = "${pkgs.pulse_sink}/bin/pulse_sink";
|
||||||
};
|
on-scroll-up = "${pkgs.volumesh}/bin/volumesh -i 10";
|
||||||
"tray" = {
|
on-scroll-down = "${pkgs.volumesh}/bin/volumesh -d 10";
|
||||||
"spacing" = 7;
|
};
|
||||||
"icon-size" = 19;
|
}];
|
||||||
};
|
style = builtins.readFile (pkgs.substituteAll {
|
||||||
clock = {
|
src = ./style.css;
|
||||||
interval = 60;
|
|
||||||
format = "<b>{:%H:%M %a %d/%m}</b>";
|
|
||||||
tooltip-format = "<tt><small>{calendar}</small></tt>";
|
|
||||||
calendar = {
|
|
||||||
mode = "year";
|
|
||||||
mode-mon-col = 3;
|
|
||||||
weeks-pos = "right";
|
|
||||||
on-scroll = 1;
|
|
||||||
on-click-right = "mode";
|
|
||||||
format = {
|
|
||||||
months = "<span color='${color.normal.magenta}'><b>{}</b></span>";
|
|
||||||
days = "<span color='${color.txt}'><b>{}</b></span>";
|
|
||||||
weeks = "<span color='${color.normal.cyan}'><b>W{}</b></span>";
|
|
||||||
weekdays = "<span color='${color.normal.yellow}'><b>{}</b></span>";
|
|
||||||
today = "<span color='${accent.color}'><b><u>{}</u></b></span>";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
actions = {
|
|
||||||
on-click-right = "mode";
|
|
||||||
on-click-forward = "tz_up";
|
|
||||||
on-click-backward = "tz_down";
|
|
||||||
on-scroll-up = "shift_up";
|
|
||||||
on-scroll-down = "shift_down";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
mpd =
|
|
||||||
let
|
|
||||||
mpc = "${pkgs.mpc-cli}/bin/mpc";
|
|
||||||
in
|
|
||||||
{
|
|
||||||
format = "{stateIcon} {title} - {artist}";
|
|
||||||
format-paused = "{stateIcon}";
|
|
||||||
format-stopped = "";
|
|
||||||
state-icons = {
|
|
||||||
stopped = "";
|
|
||||||
paused = "";
|
|
||||||
playing = "";
|
|
||||||
};
|
|
||||||
tooltip = false;
|
|
||||||
on-click = "${mpc} toggle";
|
|
||||||
on-scroll-up = "${mpc} vol +10";
|
|
||||||
on-scroll-down = "${mpc} vol -10";
|
|
||||||
};
|
|
||||||
"custom/playerctl" = {
|
|
||||||
format = "{} ";
|
|
||||||
exec = "${pkgs.playerctl-status}/bin/playerctl-status";
|
|
||||||
on-click = "${pkgs.playerctl}/bin/playerctl --ignore-player=mpd play-pause";
|
|
||||||
interval = 1;
|
|
||||||
tooltip = false;
|
|
||||||
};
|
|
||||||
"sway/language" = {
|
|
||||||
format = "{short} {variant}";
|
|
||||||
};
|
|
||||||
"custom/caffeine" = {
|
|
||||||
format = "{}";
|
|
||||||
exec = "systemctl --user status swayidle > /dev/null && echo || echo ";
|
|
||||||
on-click = "${pkgs._sway_idle_toggle}/bin/_sway_idle_toggle";
|
|
||||||
interval = 1;
|
|
||||||
tooltip = false;
|
|
||||||
};
|
|
||||||
"custom/vpn" = lib.mkIf (osConfig.services.vpn.enable or false) {
|
|
||||||
format = "{}";
|
|
||||||
exec = ''
|
|
||||||
${pkgs.mullvad}/bin/mullvad status | ${pkgs.gnugrep}/bin/grep "^Connected" > /dev/null \
|
|
||||||
&& echo "" \
|
|
||||||
|| echo ""
|
|
||||||
'';
|
|
||||||
on-click = "mullvad connect";
|
|
||||||
on-click-right = "mullvad disconnect";
|
|
||||||
interval = 1;
|
|
||||||
tooltip = false;
|
|
||||||
};
|
|
||||||
pulseaudio = {
|
|
||||||
interval = 5;
|
|
||||||
tooltip = false;
|
|
||||||
scroll-step = 10;
|
|
||||||
format = "{icon}";
|
|
||||||
format-bluetooth = "";
|
|
||||||
format-bluetooth-muted = "";
|
|
||||||
format-muted = "";
|
|
||||||
format-icons = {
|
|
||||||
"rtp-sink" = [
|
|
||||||
""
|
|
||||||
""
|
|
||||||
""
|
|
||||||
];
|
|
||||||
"alsa_output.usb-C-Media_Electronics_Inc._USB_Audio_Device-00.analog-stereo" = [
|
|
||||||
" "
|
|
||||||
" "
|
|
||||||
" "
|
|
||||||
];
|
|
||||||
"alsa_output.pci-0000_09_00.4.analog-stereo" = [
|
|
||||||
" "
|
|
||||||
" "
|
|
||||||
" "
|
|
||||||
];
|
|
||||||
headphone = [
|
|
||||||
" "
|
|
||||||
" "
|
|
||||||
" "
|
|
||||||
];
|
|
||||||
handsfree = "";
|
|
||||||
headset = "";
|
|
||||||
phone = "";
|
|
||||||
portable = "";
|
|
||||||
car = "";
|
|
||||||
default = [
|
|
||||||
""
|
|
||||||
""
|
|
||||||
""
|
|
||||||
];
|
|
||||||
};
|
|
||||||
on-click = "pavucontrol";
|
|
||||||
on-click-right = "${pkgs.pulse_sink}/bin/pulse_sink";
|
|
||||||
on-scroll-up = "${pkgs.volumesh}/bin/volumesh -i 10";
|
|
||||||
on-scroll-down = "${pkgs.volumesh}/bin/volumesh -d 10";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
|
||||||
style = builtins.readFile (
|
|
||||||
pkgs.substituteAll {
|
|
||||||
src = ./style.css;
|
|
||||||
|
|
||||||
accent_color = accent.color;
|
accent_color = accent.color;
|
||||||
|
|
||||||
color_bg = color.bg;
|
color_bg = color.bg;
|
||||||
color_bg_dark = color.bg_dark;
|
color_bg_dark = color.bg_dark;
|
||||||
color_bg_light = color.bg_light;
|
color_bg_light = color.bg_light;
|
||||||
color_txt = color.txt;
|
color_txt = color.txt;
|
||||||
|
|
||||||
font_interface = font.interface;
|
font_interface = font.interface;
|
||||||
|
|
||||||
font_size_big = "${toString font.size.big}px";
|
font_size_big = "${toString font.size.big}px";
|
||||||
font_size_medium = "${toString font.size.medium}px";
|
font_size_medium = "${toString font.size.medium}px";
|
||||||
}
|
});
|
||||||
);
|
|
||||||
};
|
};
|
||||||
home.packages = with pkgs; [ waybar ];
|
home.packages = with pkgs; [ waybar ];
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
{
|
{ config, pkgs, lib, inputs, ... }:
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
inputs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
let
|
||||||
HOME = config.home.homeDirectory;
|
HOME = config.home.homeDirectory;
|
||||||
in
|
in
|
||||||
|
|
|
@ -1,17 +1,6 @@
|
||||||
{
|
{ config, pkgs, lib, font, ... }:
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
font,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
let
|
||||||
inherit (pkgs.uservars)
|
inherit (pkgs.uservars) key accent font theme;
|
||||||
key
|
|
||||||
accent
|
|
||||||
font
|
|
||||||
theme
|
|
||||||
;
|
|
||||||
inherit (theme) color;
|
inherit (theme) color;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue