Compare commits
24 commits
2f67b084d2
...
db66e7ea65
Author | SHA1 | Date | |
---|---|---|---|
|
db66e7ea65 | ||
|
6e27e32a7a | ||
|
8508606050 | ||
|
e1dc0649d3 | ||
|
103ac20f1e | ||
|
1e204760c4 | ||
|
46a75ce485 | ||
|
16eeb3e1e5 | ||
|
97d95d678d | ||
|
c20343c129 | ||
|
0093ab7007 | ||
|
fbcf9bd14e | ||
|
8376baaf34 | ||
|
4fdbf6f821 | ||
|
7808c20502 | ||
|
49ea594496 | ||
|
4494f23f22 | ||
|
314d95f9dd | ||
|
d29b92d8b4 | ||
|
f2ffa579f2 | ||
|
52bd0f67ed | ||
|
5e0c4ff27d | ||
|
4c356d6822 | ||
|
0d5a1c1fd5 |
15
flake.lock
15
flake.lock
|
@ -491,15 +491,16 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1715359697,
|
"lastModified": 1716563886,
|
||||||
"narHash": "sha256-FJYyXqulIbCdsUCTFBTu/bIH4aN+7jzjQAn52Qc6qPg=",
|
"narHash": "sha256-MKSVKxP50gEbdP60G0M5LampyVSIGT8FGGB88nKPmi8=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "f2c5ba5e720fd584d83f2f97399dac0d26ae60b9",
|
"rev": "00a86e4f7a6455ad58b7090a931f1c6097e4fcd7",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
|
"ref": "release-24.05",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
@ -881,16 +882,16 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_4": {
|
"nixpkgs_4": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1715266358,
|
"lastModified": 1716408587,
|
||||||
"narHash": "sha256-doPgfj+7FFe9rfzWo1siAV2mVCasW+Bh8I1cToAXEE4=",
|
"narHash": "sha256-el71IUaQdEmntmd51GBpkJs/Hqh6S4dmfmUGP8GQaME=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "f1010e0469db743d14519a1efd37e23f8513d714",
|
"rev": "1a7abfa62e8a36f7f2dbe463722ed9ea31be5e43",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"id": "nixpkgs",
|
"id": "nixpkgs",
|
||||||
"ref": "nixos-unstable",
|
"ref": "nixos-24.05",
|
||||||
"type": "indirect"
|
"type": "indirect"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
83
flake.nix
83
flake.nix
|
@ -1,8 +1,8 @@
|
||||||
{
|
{
|
||||||
description = "My system config";
|
description = "My system config";
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "nixpkgs/nixos-unstable";
|
nixpkgs.url = "nixpkgs/nixos-24.05";
|
||||||
home-manager.url = "github:nix-community/home-manager";
|
home-manager.url = "github:nix-community/home-manager/release-24.05";
|
||||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
nix-index-database = {
|
nix-index-database = {
|
||||||
|
@ -68,11 +68,14 @@
|
||||||
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 = inputs:
|
outputs =
|
||||||
|
inputs:
|
||||||
let
|
let
|
||||||
nixpkgsConfig = {
|
nixpkgsConfig = {
|
||||||
inherit system;
|
inherit system;
|
||||||
config = { allowUnfree = true; };
|
config = {
|
||||||
|
allowUnfree = true;
|
||||||
|
};
|
||||||
overlays = old_overlays.all;
|
overlays = old_overlays.all;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -85,32 +88,37 @@
|
||||||
|
|
||||||
old_overlays = (import ./overlays { inherit packages inputs; });
|
old_overlays = (import ./overlays { inherit packages inputs; });
|
||||||
|
|
||||||
specialArgs = { inherit inputs; };
|
specialArgs = {
|
||||||
common_modules = [
|
inherit inputs;
|
||||||
{ nixpkgs.pkgs = pkgs; }
|
};
|
||||||
./system/configuration.nix
|
common_modules =
|
||||||
./system/secrets.nix
|
[
|
||||||
./system/specialisation.nix
|
{ nixpkgs.pkgs = pkgs; }
|
||||||
./system/greetd.nix
|
./system/configuration.nix
|
||||||
{ login-manager.greetd.enable = desktop == "sway" || desktop == "hyprland"; }
|
./system/secrets.nix
|
||||||
|
./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 = { inherit inputs; };
|
home-manager.extraSpecialArgs = {
|
||||||
}
|
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 = {
|
||||||
|
@ -144,11 +152,16 @@
|
||||||
};
|
};
|
||||||
pixie = lib.nixosSystem {
|
pixie = lib.nixosSystem {
|
||||||
inherit system specialArgs;
|
inherit system specialArgs;
|
||||||
modules = [ ./hosts/pixie.nix ] ++ common_modules ++ [{
|
modules =
|
||||||
packages.media-packages.enable = lib.mkOverride 0 false;
|
[ ./hosts/pixie.nix ]
|
||||||
programs.steam.enable = lib.mkOverride 0 false;
|
++ common_modules
|
||||||
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;
|
||||||
|
@ -169,6 +182,6 @@
|
||||||
|
|
||||||
packages.${system} = pkgs // packages;
|
packages.${system} = pkgs // packages;
|
||||||
|
|
||||||
formatter.${system} = pkgs.nixpkgs-fmt;
|
formatter.${system} = pkgs.nixfmt-rfc-style;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,32 @@
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
btrfs_options = [ "compress=zstd:3" "noatime" "x-systemd.device-timeout=0" ];
|
btrfs_options = [
|
||||||
btrfs_ssd = [ "ssd" "discard=async" ];
|
"compress=zstd:3"
|
||||||
|
"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" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" ];
|
"xhci_pci"
|
||||||
|
"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 = [ ];
|
||||||
|
@ -18,8 +37,7 @@ in
|
||||||
options = [ "subvol=@" ] ++ btrfs_options ++ btrfs_ssd;
|
options = [ "subvol=@" ] ++ btrfs_options ++ btrfs_ssd;
|
||||||
};
|
};
|
||||||
|
|
||||||
boot.initrd.luks.devices."luks-d6573cf8-25f0-4ffc-8046-ac3a4db1e964".device =
|
boot.initrd.luks.devices."luks-d6573cf8-25f0-4ffc-8046-ac3a4db1e964".device = "/dev/disk/by-uuid/d6573cf8-25f0-4ffc-8046-ac3a4db1e964";
|
||||||
"/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";
|
||||||
|
@ -37,8 +55,7 @@ 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 =
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
|
|
||||||
networking.hostName = "double-rainbow"; # Define your hostname.
|
networking.hostName = "double-rainbow"; # Define your hostname.
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,15 +1,30 @@
|
||||||
# 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 = [ "compress=zstd:3" "noatime" "x-systemd.device-timeout=0" ];
|
btrfs_options = [
|
||||||
|
"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" "ahci" "usb_storage" "sd_mod" "rtsx_usb_sdmmc" ];
|
"xhci_pci"
|
||||||
|
"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 = [ ];
|
||||||
|
@ -45,10 +60,12 @@ in
|
||||||
options = [ "subvol=@swap" ] ++ btrfs_options;
|
options = [ "subvol=@swap" ] ++ btrfs_options;
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [{
|
swapDevices = [
|
||||||
device = "/swap/swapfile";
|
{
|
||||||
size = (1024 * 8) + (1024 * 2); # RAM size + 2 GB
|
device = "/swap/swapfile";
|
||||||
}];
|
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
|
||||||
|
@ -59,7 +76,6 @@ 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 =
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
networking.hostName = "i15"; # Define your hostname.
|
networking.hostName = "i15"; # Define your hostname.
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,21 +1,38 @@
|
||||||
# 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 = [ "compress=zstd:3" "noatime" "x-systemd.device-timeout=0" ];
|
btrfs_options = [
|
||||||
btrfs_ssd = [ "ssd" "discard=async" ];
|
"compress=zstd:3"
|
||||||
|
"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" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
|
"nvme"
|
||||||
|
"xhci_pci"
|
||||||
|
"ahci"
|
||||||
|
"usb_storage"
|
||||||
|
"usbhid"
|
||||||
|
"sd_mod"
|
||||||
|
];
|
||||||
|
|
||||||
hardware.opentabletdriver.enable = true;
|
hardware.opentabletdriver.enable = true;
|
||||||
|
|
||||||
boot.extraModulePackages = with config.boot.kernelPackages; [
|
boot.extraModulePackages = with config.boot.kernelPackages; [ zenpower ];
|
||||||
zenpower
|
|
||||||
];
|
|
||||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||||
boot.kernelModules = [
|
boot.kernelModules = [
|
||||||
"kvm-amd"
|
"kvm-amd"
|
||||||
|
@ -55,8 +72,6 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
virtualisation.virtualbox.host.enable = true;
|
|
||||||
|
|
||||||
fileSystems."/" = {
|
fileSystems."/" = {
|
||||||
device = "/dev/disk/by-label/BTRFS_ROOT";
|
device = "/dev/disk/by-label/BTRFS_ROOT";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
|
@ -90,22 +105,34 @@ 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 = [ "subvol=@games" "nofail" ] ++ btrfs_options;
|
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 = [ "subvol=@torrents" "nofail" ] ++ btrfs_options;
|
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 = [ "subvol=@music" "nofail" ] ++ btrfs_options;
|
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 = [ "subvol=@data" "nofail" ] ++ btrfs_options;
|
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";
|
||||||
|
@ -115,8 +142,20 @@ 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 = [ "subvol=@projects" "nofail" ] ++ btrfs_options ++ btrfs_ssd;
|
options = [
|
||||||
|
"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
|
||||||
|
@ -124,14 +163,16 @@ 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 =
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
networking.hostName = "monolith"; # Define your hostname.
|
networking.hostName = "monolith"; # Define your hostname.
|
||||||
|
|
||||||
# Fix broken suspend with Logitech USB dongle
|
|
||||||
# `lsusb | grep Logitech` will return "vendor:product"
|
|
||||||
services.udev.extraRules = ''
|
services.udev.extraRules = ''
|
||||||
|
# Fix broken suspend with Logitech USB dongle
|
||||||
|
# `lsusb | grep Logitech` will return "vendor:product"
|
||||||
ACTION=="add" SUBSYSTEM=="usb" ATTR{idVendor}=="046d" ATTR{idProduct}=="c547" ATTR{power/wakeup}="disabled"
|
ACTION=="add" SUBSYSTEM=="usb" ATTR{idVendor}=="046d" ATTR{idProduct}=="c547" ATTR{power/wakeup}="disabled"
|
||||||
|
# Force all disks to use mq-deadline scheduler
|
||||||
|
# For some reason "noop" is used by default which is kinda bad when io is saturated
|
||||||
|
ACTION=="add|change", KERNEL=="sd[a-z]*[0-9]*|mmcblk[0-9]*p[0-9]*|nvme[0-9]*n[0-9]*p[0-9]*", ATTR{../queue/scheduler}="mq-deadline"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# swap
|
# swap
|
||||||
|
@ -142,8 +183,10 @@ 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";
|
{
|
||||||
size = (1024 * 16) + (1024 * 2); # RAM size + 2 GB
|
device = "/swap/swapfile";
|
||||||
}];
|
size = (1024 * 16) + (1024 * 2); # RAM size + 2 GB
|
||||||
|
}
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,10 @@
|
||||||
{ config, pkgs, inputs, ... }: {
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./vpsadminos.nix
|
./vpsadminos.nix
|
||||||
inputs.agenix.nixosModules.default
|
inputs.agenix.nixosModules.default
|
||||||
|
@ -49,7 +55,12 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
dates = "04:40";
|
dates = "04:40";
|
||||||
operation = "switch";
|
operation = "switch";
|
||||||
flags = [ "--update-input" "nixpkgs" "--no-write-lock-file" "-L" ];
|
flags = [
|
||||||
|
"--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";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -57,4 +68,3 @@
|
||||||
|
|
||||||
system.stateVersion = "23.05"; # Never change this
|
system.stateVersion = "23.05"; # Never change this
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,14 @@
|
||||||
{ 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 = [
|
imports = [ inputs.nixos-mailserver.nixosModules.mailserver ];
|
||||||
inputs.nixos-mailserver.nixosModules.mailserver
|
|
||||||
];
|
|
||||||
|
|
||||||
mailserver = {
|
mailserver = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -22,7 +26,11 @@
|
||||||
loginAccounts = {
|
loginAccounts = {
|
||||||
"lelgenio@lelgenio.com" = {
|
"lelgenio@lelgenio.com" = {
|
||||||
hashedPassword = "$2y$05$z5s7QCXcs5uTFsfyYpwNJeWzb3RmzgWxNgcPCr0zjSytkLFF/qZmS";
|
hashedPassword = "$2y$05$z5s7QCXcs5uTFsfyYpwNJeWzb3RmzgWxNgcPCr0zjSytkLFF/qZmS";
|
||||||
aliases = [ "postmaster@lelgenio.com" "lelgenio@lelgenio.xyz" "lelgenio@lelgenio.xyz" ];
|
aliases = [
|
||||||
|
"postmaster@lelgenio.com"
|
||||||
|
"lelgenio@lelgenio.xyz"
|
||||||
|
"lelgenio@lelgenio.xyz"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
"noreply@git.lelgenio.com" = {
|
"noreply@git.lelgenio.com" = {
|
||||||
hashedPassword = "$2b$05$TmR1R7ZwXfec7yrOfeBL7u3ZtyXf0up5dEO6uMWSvb/O7LPEm.j0.";
|
hashedPassword = "$2b$05$TmR1R7ZwXfec7yrOfeBL7u3ZtyXf0up5dEO6uMWSvb/O7LPEm.j0.";
|
||||||
|
@ -50,5 +58,4 @@
|
||||||
$config['plugins'] = [ "carddav", "archive" ];
|
$config['plugins'] = [ "carddav", "archive" ];
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
{ 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,7 +1,14 @@
|
||||||
{ config, pkgs, inputs, ... }: {
|
{
|
||||||
swapDevices = [{
|
config,
|
||||||
device = "/swap/swapfile";
|
pkgs,
|
||||||
size = (1024 * 2); # 2 GB
|
inputs,
|
||||||
}];
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
swapDevices = [
|
||||||
|
{
|
||||||
|
device = "/swap/swapfile";
|
||||||
|
size = (1024 * 2); # 2 GB
|
||||||
|
}
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,10 @@
|
||||||
{ config, pkgs, inputs, ... }: {
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
services.mastodon = {
|
services.mastodon = {
|
||||||
enable = true;
|
enable = true;
|
||||||
configureNginx = true;
|
configureNginx = true;
|
||||||
|
|
|
@ -1,4 +1,10 @@
|
||||||
{ config, pkgs, inputs, ... }: {
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
services.nextcloud = {
|
services.nextcloud = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.nextcloud27;
|
package = pkgs.nextcloud27;
|
||||||
|
@ -22,6 +28,4 @@
|
||||||
group = "nextcloud";
|
group = "nextcloud";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,10 @@
|
||||||
{ config, pkgs, lib, ... }: {
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
services.nginx = {
|
services.nginx = {
|
||||||
enable = true;
|
enable = true;
|
||||||
recommendedProxySettings = true;
|
recommendedProxySettings = true;
|
||||||
|
@ -8,21 +14,33 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
# Redirect *lelgenio.xyz -> *lelgenio.com
|
# Redirect *lelgenio.xyz -> *lelgenio.com
|
||||||
services.nginx.virtualHosts = lib.mapAttrs'
|
services.nginx.virtualHosts =
|
||||||
(key: value: lib.nameValuePair "${key}lelgenio.xyz" value)
|
lib.mapAttrs' (key: value: lib.nameValuePair "${key}lelgenio.xyz" value)
|
||||||
(
|
(
|
||||||
lib.genAttrs [ "" "social." "blog." "cloud." "mail." "git." "syncthing." ] (name: {
|
lib.genAttrs
|
||||||
enableACME = true;
|
[
|
||||||
forceSSL = true;
|
""
|
||||||
locations."/".return = "301 $scheme://${name}lelgenio.com$request_uri";
|
"social."
|
||||||
})
|
"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 = [ 80 443 ];
|
networking.firewall.allowedTCPPorts = [
|
||||||
|
80
|
||||||
|
443
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,10 @@
|
||||||
{ config, pkgs, inputs, ... }: {
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
|
||||||
services.syncthing = {
|
services.syncthing = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -14,11 +20,10 @@
|
||||||
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
|
+
|
||||||
"proxy_pass_header Authorization;"
|
# required when the server wants to use HTTP Authentication
|
||||||
;
|
"proxy_pass_header Authorization;";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,12 @@
|
||||||
{ pkgs, ... }: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
security.rtkit.enable = true;
|
security.rtkit.enable = true;
|
||||||
services.openssh = {
|
services.openssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
ports = [ 9022 22 ];
|
ports = [
|
||||||
|
9022
|
||||||
|
22
|
||||||
|
];
|
||||||
settings = {
|
settings = {
|
||||||
PasswordAuthentication = false;
|
PasswordAuthentication = false;
|
||||||
KbdInteractiveAuthentication = false;
|
KbdInteractiveAuthentication = false;
|
||||||
|
@ -15,7 +19,15 @@
|
||||||
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 = [ "networkmanager" "wheel" "docker" "adbusers" "bluetooth" "corectrl" "vboxusers" ];
|
extraGroups = [
|
||||||
|
"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"
|
||||||
|
@ -32,7 +44,5 @@
|
||||||
|
|
||||||
programs.fish.enable = true;
|
programs.fish.enable = true;
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [ git ];
|
||||||
git
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,12 @@
|
||||||
#
|
#
|
||||||
# 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 = [
|
||||||
|
@ -22,16 +27,19 @@ 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 = [{ where = "/sys/kernel/debug"; enable = false; }];
|
systemd.mounts = [
|
||||||
|
{
|
||||||
|
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.additionalUpstreamSystemUnits = [ "systemd-udev-trigger.service" ];
|
||||||
"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,4 +1,10 @@
|
||||||
{ config, pkgs, inputs, ... }: {
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
services.writefreely = {
|
services.writefreely = {
|
||||||
enable = true;
|
enable = true;
|
||||||
acme.enable = true;
|
acme.enable = true;
|
||||||
|
@ -22,4 +28,3 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,25 @@
|
||||||
# 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" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
|
"nvme"
|
||||||
|
"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 = [ ];
|
||||||
|
@ -18,8 +30,7 @@
|
||||||
options = [ "subvol=nixos" ];
|
options = [ "subvol=nixos" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
boot.initrd.luks.devices."pixie".device =
|
boot.initrd.luks.devices."pixie".device = "/dev/disk/by-uuid/f4ae5858-d2d6-4cd1-a054-bf5147a9a928";
|
||||||
"/dev/disk/by-uuid/f4ae5858-d2d6-4cd1-a054-bf5147a9a928";
|
|
||||||
|
|
||||||
fileSystems."/home" = {
|
fileSystems."/home" = {
|
||||||
device = "/dev/mapper/pixie";
|
device = "/dev/mapper/pixie";
|
||||||
|
@ -46,8 +57,7 @@
|
||||||
# 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 =
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
|
|
||||||
networking.hostName = "pixie"; # Define your hostname.
|
networking.hostName = "pixie"; # Define your hostname.
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,16 +1,34 @@
|
||||||
# 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 = [ "compress=zstd:3" "noatime" "x-systemd.device-timeout=0" ];
|
btrfs_options = [
|
||||||
btrfs_ssd = [ "ssd" "discard=async" ];
|
"compress=zstd:3"
|
||||||
|
"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" "ahci" "usb_storage" "usbhid" "sd_mod" ];
|
"xhci_pci"
|
||||||
|
"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 = [ ];
|
||||||
|
@ -46,10 +64,12 @@ in
|
||||||
options = [ "subvol=@swap" ] ++ btrfs_ssd;
|
options = [ "subvol=@swap" ] ++ btrfs_ssd;
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [{
|
swapDevices = [
|
||||||
device = "/swap/swapfile";
|
{
|
||||||
size = (1024 * 8);
|
device = "/swap/swapfile";
|
||||||
}];
|
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
|
||||||
|
@ -59,8 +79,7 @@ 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 =
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
|
|
||||||
networking.hostName = "rainbow"; # Define your hostname.
|
networking.hostName = "rainbow"; # Define your hostname.
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{ inputs, packages, ... }: rec {
|
{ inputs, packages, ... }:
|
||||||
|
rec {
|
||||||
all = [
|
all = [
|
||||||
scripts
|
scripts
|
||||||
sway
|
sway
|
||||||
|
@ -13,66 +14,87 @@
|
||||||
|
|
||||||
sway = (import ./sway.nix);
|
sway = (import ./sway.nix);
|
||||||
|
|
||||||
themes = (final: prev: {
|
themes = (
|
||||||
material-wifi-icons = final.stdenv.mkDerivation rec {
|
final: prev: {
|
||||||
name = "material-wifi-icons";
|
material-wifi-icons = final.stdenv.mkDerivation rec {
|
||||||
src = inputs.material-wifi-icons;
|
name = "material-wifi-icons";
|
||||||
installPhase = ''
|
src = inputs.material-wifi-icons;
|
||||||
install -D material-wifi.ttf $out/share/fonts/${name}
|
installPhase = ''
|
||||||
'';
|
install -D material-wifi.ttf $out/share/fonts/${name}
|
||||||
};
|
'';
|
||||||
papirus_red = (final.papirus-icon-theme.override { color = "red"; });
|
};
|
||||||
orchis_theme_compact = (final.orchis-theme.override {
|
papirus_red = (final.papirus-icon-theme.override { color = "red"; });
|
||||||
border-radius = 0;
|
orchis_theme_compact = (
|
||||||
tweaks = [ "compact" "solid" ];
|
final.orchis-theme.override {
|
||||||
});
|
border-radius = 0;
|
||||||
nerdfonts_fira_hack = (final.nerdfonts.override { fonts = [ "FiraCode" "Hack" ]; });
|
tweaks = [
|
||||||
});
|
"compact"
|
||||||
|
"solid"
|
||||||
|
];
|
||||||
|
}
|
||||||
|
);
|
||||||
|
nerdfonts_fira_hack = (
|
||||||
|
final.nerdfonts.override {
|
||||||
|
fonts = [
|
||||||
|
"FiraCode"
|
||||||
|
"Hack"
|
||||||
|
];
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
new-packages = (final: prev: packages // {
|
new-packages = (
|
||||||
dhist = inputs.dhist.packages.${prev.system}.dhist;
|
final: prev:
|
||||||
demoji = inputs.demoji.packages.${prev.system}.default;
|
packages
|
||||||
tlauncher = inputs.tlauncher.packages.${prev.system}.tlauncher;
|
// {
|
||||||
maildir-notify-daemon = inputs.maildir-notify-daemon.packages.${prev.system}.default;
|
dhist = inputs.dhist.packages.${prev.system}.dhist;
|
||||||
wl-crosshair = inputs.wl-crosshair.packages.${prev.system}.default;
|
demoji = inputs.demoji.packages.${prev.system}.default;
|
||||||
});
|
tlauncher = inputs.tlauncher.packages.${prev.system}.tlauncher;
|
||||||
|
maildir-notify-daemon = inputs.maildir-notify-daemon.packages.${prev.system}.default;
|
||||||
|
wl-crosshair = inputs.wl-crosshair.packages.${prev.system}.default;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
patches = (final: prev: {
|
patches = (
|
||||||
bemenu = prev.bemenu.overrideAttrs (o: {
|
final: prev: {
|
||||||
postPatch = ''
|
bemenu = prev.bemenu.overrideAttrs (o: {
|
||||||
substituteInPlace lib/renderers/wayland/window.c \
|
postPatch = ''
|
||||||
--replace ZWLR_LAYER_SHELL_V1_LAYER_TOP ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY
|
substituteInPlace lib/renderers/wayland/window.c \
|
||||||
'';
|
--replace ZWLR_LAYER_SHELL_V1_LAYER_TOP ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY
|
||||||
});
|
'';
|
||||||
sway-unwrapped = prev.sway-unwrapped.overrideAttrs (old: {
|
});
|
||||||
patches = old.patches
|
mySway = prev.sway.override {
|
||||||
++ [ ../patches/sway/fix-hide_cursor-clearing-focus.patch ];
|
sway-unwrapped = prev.sway-unwrapped.overrideAttrs (old: {
|
||||||
});
|
patches = old.patches ++ [ ../patches/sway/fix-hide_cursor-clearing-focus.patch ];
|
||||||
mangohud = prev.mangohud.overrideAttrs (o: {
|
});
|
||||||
patches = o.patches ++ [
|
};
|
||||||
(prev.fetchpatch {
|
mangohud = prev.mangohud.overrideAttrs (o: {
|
||||||
url = "https://github.com/flightlessmango/MangoHud/commit/95141de657e02577f1d3fab0ca12122bfb68bc56.patch";
|
patches = o.patches ++ [
|
||||||
hash = "sha256-a2tESliGBkfF7uYQn8TDgeFt07A9FOioI4VcTT7DC7A=";
|
(prev.fetchpatch {
|
||||||
})
|
url = "https://github.com/flightlessmango/MangoHud/commit/95141de657e02577f1d3fab0ca12122bfb68bc56.patch";
|
||||||
];
|
hash = "sha256-a2tESliGBkfF7uYQn8TDgeFt07A9FOioI4VcTT7DC7A=";
|
||||||
});
|
})
|
||||||
});
|
];
|
||||||
|
});
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
variables = (final: prev: {
|
variables = (final: prev: { uservars = import ../user/variables.nix; });
|
||||||
uservars = import ../user/variables.nix;
|
|
||||||
});
|
|
||||||
|
|
||||||
lib_extended = (final: prev: {
|
lib_extended = (
|
||||||
lib = prev.lib // rec {
|
final: prev: {
|
||||||
# Utility function
|
lib = prev.lib // rec {
|
||||||
# Input: [{v1=1;} {v2=2;}]
|
# Utility function
|
||||||
# Output: {v1=1;v2=2;}
|
# Input: [{v1=1;} {v2=2;}]
|
||||||
mergeAttrsSet = prev.lib.foldAttrs (n: _: n) { };
|
# Output: {v1=1;v2=2;}
|
||||||
|
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);
|
||||||
};
|
};
|
||||||
});
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,11 +1,12 @@
|
||||||
{ lib
|
{
|
||||||
, mkYarnPackage
|
lib,
|
||||||
, fetchFromGitHub
|
mkYarnPackage,
|
||||||
, fetchYarnDeps
|
fetchFromGitHub,
|
||||||
, testers
|
fetchYarnDeps,
|
||||||
, writeText
|
testers,
|
||||||
, runCommand
|
writeText,
|
||||||
, blade-formatter
|
runCommand,
|
||||||
|
blade-formatter,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
mkYarnPackage rec {
|
mkYarnPackage rec {
|
||||||
|
@ -40,15 +41,17 @@ mkYarnPackage rec {
|
||||||
Hello world!
|
Hello world!
|
||||||
@endif
|
@endif
|
||||||
'';
|
'';
|
||||||
actual = runCommand "actual"
|
actual =
|
||||||
{
|
runCommand "actual"
|
||||||
nativeBuildInputs = [ blade-formatter ];
|
{
|
||||||
base = writeText "base" ''
|
nativeBuildInputs = [ blade-formatter ];
|
||||||
@if( true ) Hello world! @endif
|
base = writeText "base" ''
|
||||||
|
@if( true ) Hello world! @endif
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
''
|
||||||
|
blade-formatter $base > $out
|
||||||
'';
|
'';
|
||||||
} ''
|
|
||||||
blade-formatter $base > $out
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
{ lib
|
{
|
||||||
, rustPlatform
|
lib,
|
||||||
, fetchFromGitHub
|
rustPlatform,
|
||||||
, pkg-config
|
fetchFromGitHub,
|
||||||
, openssl
|
pkg-config,
|
||||||
, zlib
|
openssl,
|
||||||
, stdenv
|
zlib,
|
||||||
, Security ? null
|
stdenv,
|
||||||
|
Security ? null,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
rustPlatform.buildRustPackage rec {
|
rustPlatform.buildRustPackage rec {
|
||||||
|
@ -22,9 +23,7 @@ rustPlatform.buildRustPackage rec {
|
||||||
cargoSha256 = "sha256-hOB84u55ishahIFSqBnqccqH3OlC9J8mCYzsd23jTyA=";
|
cargoSha256 = "sha256-hOB84u55ishahIFSqBnqccqH3OlC9J8mCYzsd23jTyA=";
|
||||||
|
|
||||||
nativeBuildInputs = [ pkg-config ];
|
nativeBuildInputs = [ pkg-config ];
|
||||||
buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [
|
buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security ];
|
||||||
Security
|
|
||||||
];
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Check all the things.";
|
description = "Check all the things.";
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
# 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,6 +1,7 @@
|
||||||
{ lib
|
{
|
||||||
, buildNpmPackage
|
lib,
|
||||||
, fetchFromGitHub
|
buildNpmPackage,
|
||||||
|
fetchFromGitHub,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildNpmPackage rec {
|
buildNpmPackage rec {
|
||||||
|
|
|
@ -11,9 +11,7 @@ pkgs.stdenv.mkDerivation rec {
|
||||||
wrapGAppsHook
|
wrapGAppsHook
|
||||||
];
|
];
|
||||||
|
|
||||||
makeFlags = [
|
makeFlags = [ "PRG=${pname}" ];
|
||||||
"PRG=${pname}"
|
|
||||||
];
|
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
install -Dm 755 "$pname" "$out/bin/$pname"
|
install -Dm 755 "$pname" "$out/bin/$pname"
|
||||||
|
@ -21,4 +19,3 @@ pkgs.stdenv.mkDerivation rec {
|
||||||
glib-compile-schemas "$out/share/glib-2.0/schemas/"
|
glib-compile-schemas "$out/share/glib-2.0/schemas/"
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
26
scripts/auto_connect_gamepad
Executable file
26
scripts/auto_connect_gamepad
Executable file
|
@ -0,0 +1,26 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
list_paired_controllers() {
|
||||||
|
bluetoothctl devices Paired | grep -i 'controller' | cut -d' ' -f2
|
||||||
|
}
|
||||||
|
|
||||||
|
count_connected_controllers() {
|
||||||
|
bluetoothctl devices Connected | grep -i 'controller' | wc -l
|
||||||
|
}
|
||||||
|
|
||||||
|
try_to_connect_to_all_controllers() {
|
||||||
|
list_paired_controllers | while read paired_controller; do
|
||||||
|
echo "Trying to connect to controller $paired_controller"
|
||||||
|
bluetoothctl connect "$paired_controller"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
while true; do
|
||||||
|
echo "looping"
|
||||||
|
if test "$(count_connected_controllers)" -ne 0 ; then
|
||||||
|
echo "there is a controller connected, not attempting to connect to any other"
|
||||||
|
sleep 10s
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
try_to_connect_to_all_controllers
|
||||||
|
done
|
|
@ -1,58 +1,135 @@
|
||||||
(final: prev:
|
(
|
||||||
with prev;
|
final: prev:
|
||||||
let
|
with prev;
|
||||||
import_script = (_: path: import (path) { inherit pkgs lib; });
|
let
|
||||||
create_script = (name: text: runtimeInputs:
|
import_script = (_: path: import (path) { inherit pkgs lib; });
|
||||||
let
|
create_script = (
|
||||||
script_body = pkgs.writeTextFile {
|
name: text: runtimeInputs:
|
||||||
inherit name;
|
let
|
||||||
executable = true;
|
script_body = pkgs.writeTextFile {
|
||||||
text = ''
|
inherit name;
|
||||||
${builtins.readFile text}
|
executable = true;
|
||||||
'';
|
text = ''
|
||||||
};
|
${builtins.readFile text}
|
||||||
in
|
'';
|
||||||
(pkgs.writeShellApplication {
|
};
|
||||||
inherit name runtimeInputs;
|
in
|
||||||
text = ''exec ${script_body} "$@"'';
|
(pkgs.writeShellApplication {
|
||||||
checkPhase = "";
|
inherit name runtimeInputs;
|
||||||
}));
|
text = ''exec ${script_body} "$@"'';
|
||||||
create_scripts =
|
checkPhase = "";
|
||||||
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 = pkgs.pass.withExtensions (ex: with ex; [ pass-otp ]);
|
||||||
pass-otp
|
in
|
||||||
]);
|
create_scripts {
|
||||||
in
|
|
||||||
create_scripts
|
|
||||||
{
|
|
||||||
br = [ ];
|
br = [ ];
|
||||||
bmenu = [ final.bemenu final.dhist fish j4-dmenu-desktop jq sway ];
|
bmenu = [
|
||||||
down_meme = [ wl-clipboard yt-dlp libnotify ];
|
final.bemenu
|
||||||
wl-copy-file = [ wl-clipboard fish ];
|
final.dhist
|
||||||
|
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 = [ fish final._diffr ];
|
kak-pager = [
|
||||||
|
fish
|
||||||
|
final._diffr
|
||||||
|
];
|
||||||
kak-man-pager = [ final.kak-pager ];
|
kak-man-pager = [ final.kak-pager ];
|
||||||
helix-pager = [ fish final._diffr ];
|
helix-pager = [
|
||||||
|
fish
|
||||||
|
final._diffr
|
||||||
|
];
|
||||||
helix-man-pager = [ final.helix-pager ];
|
helix-man-pager = [ final.helix-pager ];
|
||||||
musmenu = [ mpc-cli final.wdmenu trash-cli xdg-user-dirs libnotify sd wl-clipboard ];
|
musmenu = [
|
||||||
showkeys =
|
mpc-cli
|
||||||
[ ]; # This will not work unless programs.wshowkeys is enabled systemwide
|
final.wdmenu
|
||||||
|
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 ];
|
||||||
wpass = [ final.wdmenu fd pass sd wl-clipboard wtype ];
|
pass-export = [
|
||||||
screenshotsh =
|
pass2csv
|
||||||
[ capitaine-cursors grim slurp jq sway wl-clipboard xdg-user-dirs ];
|
gnupg
|
||||||
volumesh = [ pulseaudio libnotify ];
|
];
|
||||||
pulse_sink = [ pulseaudio pamixer final.wdmenu ];
|
wpass = [
|
||||||
color_picker = [ grim slurp wl-clipboard libnotify imagemagick ];
|
final.wdmenu
|
||||||
dzadd = [ procps libnotify final.wdmenu jq mpv pqiv python3Packages.deemix mpc-cli final.mpdDup ];
|
fd
|
||||||
mpdDup = [ mpc-cli perl ];
|
pass
|
||||||
readQrCode = [ grim zbar wl-clipboard ];
|
sd
|
||||||
} // lib.mapAttrs import_script {
|
wl-clipboard
|
||||||
wdmenu = ./wdmenu.nix;
|
wtype
|
||||||
wlauncher = ./wlauncher.nix;
|
];
|
||||||
_gpg-unlock = ./_gpg-unlock.nix;
|
screenshotsh = [
|
||||||
})
|
capitaine-cursors
|
||||||
|
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
|
||||||
|
];
|
||||||
|
auto_connect_gamepad = [ bluez ];
|
||||||
|
}
|
||||||
|
// lib.mapAttrs import_script {
|
||||||
|
wdmenu = ./wdmenu.nix;
|
||||||
|
wlauncher = ./wlauncher.nix;
|
||||||
|
_gpg-unlock = ./_gpg-unlock.nix;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
10
scripts/pass-export
Executable file
10
scripts/pass-export
Executable file
|
@ -0,0 +1,10 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if test -z "$PASSWORD_STORE_DIR"; then
|
||||||
|
PASSWORD_STORE_DIR="$HOME/.password-store"
|
||||||
|
fi
|
||||||
|
|
||||||
|
pass2csv "$PASSWORD_STORE_DIR" "$HOME/passwords.csv" \
|
||||||
|
-f User '(user|login)(:\s*)?' \
|
||||||
|
-f TOTP 'otpauth(:)?' \
|
||||||
|
-f URL 'url(:\s*)?'
|
|
@ -50,10 +50,6 @@ main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
autotype(){
|
autotype(){
|
||||||
if pgrep qutebrowser >/dev/null; then
|
|
||||||
qutebrowser ":mode-enter insert"
|
|
||||||
fi
|
|
||||||
|
|
||||||
env wtype -s 100 "$username"
|
env wtype -s 100 "$username"
|
||||||
env wtype -s 100 -k tab
|
env wtype -s 100 -k tab
|
||||||
env wtype -s 100 "$password"
|
env wtype -s 100 "$password"
|
||||||
|
|
|
@ -2,8 +2,12 @@ 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 = [ main_ssh_public_key ];
|
"rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.age".publicKeys = [
|
||||||
"monolith-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
|
||||||
|
];
|
||||||
"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 ];
|
||||||
|
|
17
system/bluetooth.nix
Normal file
17
system/bluetooth.nix
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
services.blueman.enable = true;
|
||||||
|
hardware.bluetooth = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
General = {
|
||||||
|
DiscoverableTimeout = 0;
|
||||||
|
# Discoverable = true;
|
||||||
|
AlwaysPairable = true;
|
||||||
|
};
|
||||||
|
Policy = {
|
||||||
|
AutoEnable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,4 +1,11 @@
|
||||||
{ 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 ];
|
||||||
|
@ -38,9 +45,7 @@
|
||||||
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 {
|
(adi1090x-plymouth-themes.override { selected_themes = [ "red_loader" ]; })
|
||||||
selected_themes = [ "red_loader" ];
|
|
||||||
})
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,4 +1,10 @@
|
||||||
{ pkgs, lib, config, ... }: {
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
services.cachix-watch-store = {
|
services.cachix-watch-store = {
|
||||||
enable = true;
|
enable = true;
|
||||||
cacheName = "lelgenio";
|
cacheName = "lelgenio";
|
||||||
|
|
|
@ -1,7 +1,13 @@
|
||||||
# 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
|
||||||
|
@ -9,6 +15,13 @@
|
||||||
./boot.nix
|
./boot.nix
|
||||||
./thunar.nix
|
./thunar.nix
|
||||||
./nix.nix
|
./nix.nix
|
||||||
|
./fonts.nix
|
||||||
|
./sound.nix
|
||||||
|
./bluetooth.nix
|
||||||
|
./locale.nix
|
||||||
|
./users.nix
|
||||||
|
./containers.nix
|
||||||
|
./network.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
@ -18,109 +31,9 @@
|
||||||
programs.adb.enable = true;
|
programs.adb.enable = true;
|
||||||
services.udev.packages = [ pkgs.android-udev-rules ];
|
services.udev.packages = [ pkgs.android-udev-rules ];
|
||||||
|
|
||||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
|
||||||
# Configure network proxy if necessary
|
|
||||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
|
||||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
|
||||||
# Enable networking
|
|
||||||
networking.networkmanager.enable = true;
|
|
||||||
# Open kde connect ports
|
|
||||||
programs.kdeconnect.enable = true;
|
|
||||||
networking.firewall.allowedTCPPorts = [ 55201 ];
|
|
||||||
|
|
||||||
# Set your time zone.
|
|
||||||
time.timeZone = "America/Sao_Paulo";
|
|
||||||
environment.variables.TZ = config.time.timeZone;
|
|
||||||
# Select internationalisation properties.
|
|
||||||
i18n.defaultLocale = "pt_BR.utf8";
|
|
||||||
|
|
||||||
# Enable the GNOME Desktop Environment.
|
|
||||||
# services.xserver.displayManager.gdm.enable = true;
|
|
||||||
# services.xserver.desktopManager.gnome.enable = true;
|
|
||||||
# services.xserver.displayManager.autologin.user = "lelgenio";
|
|
||||||
|
|
||||||
# Configure keymap in X11
|
|
||||||
services.xserver.xkb = {
|
|
||||||
layout = "us";
|
|
||||||
variant = "colemak";
|
|
||||||
};
|
|
||||||
console.keyMap = "colemak";
|
|
||||||
# Enable CUPS to print documents.
|
|
||||||
# services.printing.enable = true;
|
|
||||||
services.flatpak.enable = true;
|
|
||||||
virtualisation.docker.enable = true;
|
|
||||||
virtualisation.docker.autoPrune.enable = true;
|
|
||||||
virtualisation.docker.autoPrune.dates = "monthly";
|
|
||||||
virtualisation.docker.autoPrune.flags = [ "--all --volumes" ];
|
|
||||||
|
|
||||||
programs.extra-container.enable = true;
|
|
||||||
|
|
||||||
programs.firejail.enable = true;
|
|
||||||
|
|
||||||
security.rtkit.enable = true;
|
|
||||||
services.openssh = {
|
|
||||||
enable = false;
|
|
||||||
ports = [ 9022 ];
|
|
||||||
settings = {
|
|
||||||
PermitRootLogin = "no";
|
|
||||||
PasswordAuthentication = false;
|
|
||||||
KbdInteractiveAuthentication = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
# programs.ssh = {
|
|
||||||
# startAgent = true;
|
|
||||||
# extraConfig = ''
|
|
||||||
# AddKeysToAgent yes
|
|
||||||
# '';
|
|
||||||
# };
|
|
||||||
|
|
||||||
## Enable sound with pipewire.
|
|
||||||
sound.enable = true;
|
|
||||||
hardware.pulseaudio.enable = false;
|
|
||||||
services.pipewire = {
|
|
||||||
enable = true;
|
|
||||||
wireplumber.enable = true;
|
|
||||||
pulse.enable = true;
|
|
||||||
alsa.enable = true;
|
|
||||||
jack.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
services.blueman.enable = true;
|
|
||||||
hardware.bluetooth = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
General = {
|
|
||||||
DiscoverableTimeout = 0;
|
|
||||||
# Discoverable = true;
|
|
||||||
AlwaysPairable = true;
|
|
||||||
};
|
|
||||||
Policy = { AutoEnable = true; };
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Enable touchpad support (enabled default in most desktopManager).
|
# Enable touchpad support (enabled default in most desktopManager).
|
||||||
services.libinput.enable = true;
|
services.libinput.enable = true;
|
||||||
|
|
||||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
|
||||||
users.mutableUsers = false;
|
|
||||||
users.users.lelgenio = {
|
|
||||||
isNormalUser = true;
|
|
||||||
description = "Leonardo Eugênio";
|
|
||||||
hashedPassword = "$y$j9T$0e/rczjOVCy7PuwC3pG0V/$gTHZhfO4wQSlFvbDyfghbCnGI2uDI0a52zSrQ/yOA5A";
|
|
||||||
extraGroups = [ "networkmanager" "wheel" "docker" "adbusers" "bluetooth" "corectrl" "vboxusers" ];
|
|
||||||
shell = pkgs.fish;
|
|
||||||
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"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
users.users.root.initialHashedPassword = "$y$j9T$E3aBBSSq0Gma8hZD9L7ov0$iCGDW4fqrXWfHO0qodBYYgMFA9CpIraoklHcPbJJrM3";
|
|
||||||
|
|
||||||
# services.getty.autologinUser = "lelgenio";
|
|
||||||
programs.fish.enable = true;
|
|
||||||
|
|
||||||
programs.dzgui.enable = true;
|
|
||||||
programs.dzgui.package = inputs.dzgui-nix.packages.${pkgs.system}.default;
|
|
||||||
|
|
||||||
packages.media-packages.enable = true;
|
packages.media-packages.enable = true;
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
pavucontrol
|
pavucontrol
|
||||||
|
@ -131,21 +44,7 @@
|
||||||
gnome3.adwaita-icon-theme # default gnome cursors
|
gnome3.adwaita-icon-theme # default gnome cursors
|
||||||
];
|
];
|
||||||
|
|
||||||
fonts.enableDefaultPackages = true;
|
|
||||||
fonts.packages = with pkgs; [
|
|
||||||
noto-fonts
|
|
||||||
noto-fonts-cjk
|
|
||||||
noto-fonts-emoji
|
|
||||||
nerdfonts_fira_hack
|
|
||||||
];
|
|
||||||
|
|
||||||
services.geoclue2.enable = true;
|
services.geoclue2.enable = true;
|
||||||
# programs.qt5ct.enable = true;
|
|
||||||
# Some programs need SUID wrappers, can be configured further or are
|
|
||||||
# started in user sessions.
|
|
||||||
# programs.mtr.enable = true;
|
|
||||||
services.pcscd.enable = true;
|
|
||||||
security.sudo.wheelNeedsPassword = false;
|
|
||||||
|
|
||||||
systemd.extraConfig = ''
|
systemd.extraConfig = ''
|
||||||
DefaultTimeoutStopSec=10s
|
DefaultTimeoutStopSec=10s
|
||||||
|
|
12
system/containers.nix
Normal file
12
system/containers.nix
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
services.flatpak.enable = true;
|
||||||
|
virtualisation.docker.enable = true;
|
||||||
|
virtualisation.docker.autoPrune.enable = true;
|
||||||
|
virtualisation.docker.autoPrune.dates = "monthly";
|
||||||
|
virtualisation.docker.autoPrune.flags = [ "--all --volumes" ];
|
||||||
|
|
||||||
|
programs.extra-container.enable = true;
|
||||||
|
|
||||||
|
programs.firejail.enable = true;
|
||||||
|
}
|
10
system/fonts.nix
Normal file
10
system/fonts.nix
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
fonts.enableDefaultPackages = true;
|
||||||
|
fonts.packages = with pkgs; [
|
||||||
|
noto-fonts
|
||||||
|
noto-fonts-cjk
|
||||||
|
noto-fonts-emoji
|
||||||
|
nerdfonts_fira_hack
|
||||||
|
];
|
||||||
|
}
|
|
@ -1,8 +1,16 @@
|
||||||
{ 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 = { renice = 10; };
|
general = {
|
||||||
|
renice = 10;
|
||||||
|
};
|
||||||
|
|
||||||
# Warning: GPU optimisations have the potential to damage hardware
|
# Warning: GPU optimisations have the potential to damage hardware
|
||||||
gpu = {
|
gpu = {
|
||||||
|
|
|
@ -1,40 +1,52 @@
|
||||||
{ pkgs, lib, ... }: {
|
{ pkgs, lib, ... }:
|
||||||
mkNixRunner = registrationConfigFile: with lib; rec {
|
{
|
||||||
# File should contain at least these two variables:
|
mkNixRunner =
|
||||||
# `CI_SERVER_URL`
|
registrationConfigFile: with lib; rec {
|
||||||
# `REGISTRATION_TOKEN`
|
# File should contain at least these two variables:
|
||||||
inherit registrationConfigFile; # 2
|
# `CI_SERVER_URL`
|
||||||
dockerImage = "alpine:3.18.2";
|
# `REGISTRATION_TOKEN`
|
||||||
dockerAllowedImages = [ dockerImage ];
|
inherit registrationConfigFile; # 2
|
||||||
dockerVolumes = [
|
dockerImage = "alpine:3.18.2";
|
||||||
"/etc/nix/nix.conf:/etc/nix/nix.conf:ro"
|
dockerAllowedImages = [ dockerImage ];
|
||||||
"/nix/store:/nix/store:ro"
|
dockerVolumes = [
|
||||||
"/nix/var/nix/db:/nix/var/nix/db:ro"
|
"/etc/nix/nix.conf:/etc/nix/nix.conf:ro"
|
||||||
"/nix/var/nix/daemon-socket:/nix/var/nix/daemon-socket:ro"
|
"/nix/store:/nix/store:ro"
|
||||||
];
|
"/nix/var/nix/db:/nix/var/nix/db:ro"
|
||||||
dockerDisableCache = true;
|
"/nix/var/nix/daemon-socket:/nix/var/nix/daemon-socket:ro"
|
||||||
preBuildScript = pkgs.writeScript "setup-container" ''
|
];
|
||||||
mkdir -p -m 0755 /nix/var/log/nix/drvs
|
dockerDisableCache = true;
|
||||||
mkdir -p -m 0755 /nix/var/nix/gcroots
|
preBuildScript = pkgs.writeScript "setup-container" ''
|
||||||
mkdir -p -m 0755 /nix/var/nix/profiles
|
mkdir -p -m 0755 /nix/var/log/nix/drvs
|
||||||
mkdir -p -m 0755 /nix/var/nix/temproots
|
mkdir -p -m 0755 /nix/var/nix/gcroots
|
||||||
mkdir -p -m 0755 /nix/var/nix/userpool
|
mkdir -p -m 0755 /nix/var/nix/profiles
|
||||||
mkdir -p -m 1777 /nix/var/nix/gcroots/per-user
|
mkdir -p -m 0755 /nix/var/nix/temproots
|
||||||
mkdir -p -m 1777 /nix/var/nix/profiles/per-user
|
mkdir -p -m 0755 /nix/var/nix/userpool
|
||||||
mkdir -p -m 0755 /nix/var/nix/profiles/per-user/root
|
mkdir -p -m 1777 /nix/var/nix/gcroots/per-user
|
||||||
mkdir -p -m 0700 "$HOME/.nix-defexpr"
|
mkdir -p -m 1777 /nix/var/nix/profiles/per-user
|
||||||
|
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 ${concatStringsSep " " (with pkgs; [ nix cacert git openssh ])}
|
${pkgs.nix}/bin/nix-env -i ${
|
||||||
'';
|
concatStringsSep " " (
|
||||||
environmentVariables = {
|
with pkgs;
|
||||||
ENV = "/etc/profile";
|
[
|
||||||
USER = "root";
|
nix
|
||||||
NIX_REMOTE = "daemon";
|
cacert
|
||||||
PATH = "/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:/bin:/sbin:/usr/bin:/usr/sbin";
|
git
|
||||||
NIX_SSL_CERT_FILE = "/nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt";
|
openssh
|
||||||
|
]
|
||||||
|
)
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
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,25 +1,44 @@
|
||||||
# Edit this configuration file to define what should be installed on
|
{ pkgs, lib, ... }:
|
||||||
# your system. Help is available in the configuration.nix(5) man page
|
{
|
||||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
services.xserver = {
|
||||||
{ config, pkgs, ... }: {
|
enable = true;
|
||||||
# Enable the X11 windowing system.
|
desktopManager.gnome = {
|
||||||
services.xserver.enable = true;
|
enable = true;
|
||||||
# Enable the GNOME Desktop Environment.
|
# Enable VRR (Variable Refresh Rate)
|
||||||
services.xserver.displayManager.gdm.enable = true;
|
extraGSettingsOverridePackages = with pkgs; [ gnome.mutter ];
|
||||||
services.xserver.desktopManager.gnome.enable = true;
|
extraGSettingsOverrides = ''
|
||||||
|
[org.gnome.mutter]
|
||||||
|
experimental-features=['variable-refresh-rate', 'scale-monitor-framebuffer']
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
displayManager.gdm.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
services.xserver.displayManager.autoLogin = {
|
# Workaround for https://github.com/NixOS/nixpkgs/issues/103746
|
||||||
|
systemd.services."getty@tty1".enable = false;
|
||||||
|
systemd.services."autovt@tty1".enable = false;
|
||||||
|
|
||||||
|
services.displayManager.autoLogin = {
|
||||||
enable = true;
|
enable = true;
|
||||||
user = "lelgenio";
|
user = "lelgenio";
|
||||||
};
|
};
|
||||||
|
|
||||||
# services.xserver.displayManager.autologin.user = "lelgenio";
|
programs.kdeconnect = {
|
||||||
environment.systemPackages = with pkgs; with gnome; [
|
enable = true;
|
||||||
gnome-tweaks
|
package = pkgs.gnomeExtensions.gsconnect;
|
||||||
dconf-editor
|
};
|
||||||
|
|
||||||
chrome-gnome-shell
|
hardware.opentabletdriver.enable = lib.mkForce false;
|
||||||
gnomeExtensions.gsconnect
|
|
||||||
gnomeExtensions.quick-settings-audio-devices-hider
|
# services.xserver.displayManager.autologin.user = "lelgenio";
|
||||||
];
|
environment.systemPackages =
|
||||||
|
with pkgs;
|
||||||
|
with gnome;
|
||||||
|
[
|
||||||
|
gnome-tweaks
|
||||||
|
dconf-editor
|
||||||
|
|
||||||
|
chrome-gnome-shell
|
||||||
|
gnomeExtensions.quick-settings-audio-devices-hider
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,17 @@
|
||||||
{ lib, pkgs, config, ... }:
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
inherit (pkgs.uservars) key accent font theme desktop;
|
inherit (pkgs.uservars)
|
||||||
|
key
|
||||||
|
accent
|
||||||
|
font
|
||||||
|
theme
|
||||||
|
desktop
|
||||||
|
;
|
||||||
|
|
||||||
cfg = config.login-manager.greetd;
|
cfg = config.login-manager.greetd;
|
||||||
in
|
in
|
||||||
|
@ -17,6 +28,7 @@ in
|
||||||
# enable sway window manager
|
# enable sway window manager
|
||||||
programs.sway = {
|
programs.sway = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
package = pkgs.mySway;
|
||||||
wrapperFeatures.gtk = true;
|
wrapperFeatures.gtk = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{ 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.
|
||||||
|
|
13
system/locale.nix
Normal file
13
system/locale.nix
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
{ pkgs, config, ... }:
|
||||||
|
{
|
||||||
|
time.timeZone = "America/Sao_Paulo";
|
||||||
|
environment.variables.TZ = config.time.timeZone;
|
||||||
|
i18n.defaultLocale = "pt_BR.utf8";
|
||||||
|
|
||||||
|
# Configure keymap in X11
|
||||||
|
services.xserver.xkb = {
|
||||||
|
layout = "us";
|
||||||
|
variant = "colemak";
|
||||||
|
};
|
||||||
|
console.keyMap = "colemak";
|
||||||
|
}
|
|
@ -1,6 +1,13 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{
|
||||||
let cfg = config.packages.media-packages;
|
config,
|
||||||
in {
|
pkgs,
|
||||||
|
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,4 +1,5 @@
|
||||||
{ 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,4 +1,9 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
inherit (pkgs.callPackage ./gitlab-runner.nix { }) mkNixRunner;
|
inherit (pkgs.callPackage ./gitlab-runner.nix { }) mkNixRunner;
|
||||||
in
|
in
|
||||||
|
@ -15,7 +20,8 @@ in
|
||||||
# dockerPrivileged = true;
|
# dockerPrivileged = true;
|
||||||
# };
|
# };
|
||||||
thoreb_builder = {
|
thoreb_builder = {
|
||||||
registrationConfigFile = config.age.secrets.monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.path;
|
registrationConfigFile =
|
||||||
|
config.age.secrets.monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.path;
|
||||||
dockerImage = "debian";
|
dockerImage = "debian";
|
||||||
dockerPrivileged = true;
|
dockerPrivileged = true;
|
||||||
};
|
};
|
||||||
|
|
25
system/network.nix
Normal file
25
system/network.nix
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||||
|
# Configure network proxy if necessary
|
||||||
|
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||||
|
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||||
|
# Enable networking
|
||||||
|
networking.networkmanager.enable = true;
|
||||||
|
# Open kde connect ports
|
||||||
|
programs.kdeconnect.enable = true;
|
||||||
|
|
||||||
|
# Enable CUPS to print documents.
|
||||||
|
# services.printing.enable = true;
|
||||||
|
|
||||||
|
security.rtkit.enable = true;
|
||||||
|
services.openssh = {
|
||||||
|
enable = true;
|
||||||
|
ports = [ 9022 ];
|
||||||
|
settings = {
|
||||||
|
PermitRootLogin = "no";
|
||||||
|
PasswordAuthentication = false;
|
||||||
|
KbdInteractiveAuthentication = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,4 +1,10 @@
|
||||||
{ 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,7 +1,13 @@
|
||||||
{ lib, config, pkgs, inputs, ... }:
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
collectFlakeInputs = input:
|
collectFlakeInputs =
|
||||||
[ input ] ++ lib.concatMap collectFlakeInputs (builtins.attrValues (input.inputs or { }));
|
input: [ input ] ++ lib.concatMap collectFlakeInputs (builtins.attrValues (input.inputs or { }));
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
system.extraDependencies = collectFlakeInputs inputs.self;
|
system.extraDependencies = collectFlakeInputs inputs.self;
|
||||||
|
@ -11,13 +17,15 @@ in
|
||||||
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
|
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
|
||||||
gc = {
|
gc = {
|
||||||
automatic = true;
|
automatic = true;
|
||||||
dates = "daily";
|
dates = "weekly";
|
||||||
options = "--delete-older-than 3d";
|
options = "--delete-older-than 7d";
|
||||||
};
|
};
|
||||||
optimise.automatic = true;
|
optimise.automatic = true;
|
||||||
settings = {
|
settings = {
|
||||||
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,4 +1,9 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
inherit (pkgs.callPackage ./gitlab-runner.nix { }) mkNixRunner;
|
inherit (pkgs.callPackage ./gitlab-runner.nix { }) mkNixRunner;
|
||||||
in
|
in
|
||||||
|
@ -15,7 +20,8 @@ in
|
||||||
# dockerPrivileged = true;
|
# dockerPrivileged = true;
|
||||||
# };
|
# };
|
||||||
thoreb_builder = {
|
thoreb_builder = {
|
||||||
registrationConfigFile = config.age.secrets.rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.path;
|
registrationConfigFile =
|
||||||
|
config.age.secrets.rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.path;
|
||||||
dockerImage = "debian";
|
dockerImage = "debian";
|
||||||
dockerPrivileged = true;
|
dockerPrivileged = true;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,18 +1,13 @@
|
||||||
{ 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.file = ../secrets/monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.age;
|
||||||
../secrets/monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.age;
|
secrets.gitlab-runner-thoreb-telemetria-registrationConfigFile.file = ../secrets/gitlab-runner-thoreb-telemetria-registrationConfigFile.age;
|
||||||
secrets.gitlab-runner-thoreb-telemetria-registrationConfigFile.file =
|
secrets.monolith-forgejo-runner-token.file = ../secrets/monolith-forgejo-runner-token.age;
|
||||||
../secrets/gitlab-runner-thoreb-telemetria-registrationConfigFile.age;
|
secrets.rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.file = ../secrets/rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.age;
|
||||||
secrets.monolith-forgejo-runner-token.file =
|
secrets.monolith-nix-serve-privkey.file = ../secrets/monolith-nix-serve-privkey.age;
|
||||||
../secrets/monolith-forgejo-runner-token.age;
|
secrets.phantom-forgejo-mailer-password.file = ../secrets/phantom-forgejo-mailer-password.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;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
12
system/sound.nix
Normal file
12
system/sound.nix
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
sound.enable = true;
|
||||||
|
hardware.pulseaudio.enable = false;
|
||||||
|
services.pipewire = {
|
||||||
|
enable = true;
|
||||||
|
wireplumber.enable = true;
|
||||||
|
pulse.enable = true;
|
||||||
|
alsa.enable = true;
|
||||||
|
jack.enable = true;
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,10 +1,7 @@
|
||||||
{ pkgs, ... }: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
specialisation.dark-theme.configuration = {
|
specialisation.dark-theme.configuration = {
|
||||||
nixpkgs.overlays = [
|
nixpkgs.overlays = [ (final: prev: { uservars = prev.uservars; }) ];
|
||||||
(final: prev: {
|
|
||||||
uservars = prev.uservars;
|
|
||||||
})
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
specialisation.light-theme.configuration = {
|
specialisation.light-theme.configuration = {
|
||||||
nixpkgs.overlays = [
|
nixpkgs.overlays = [
|
||||||
|
|
|
@ -1,20 +1,33 @@
|
||||||
{ 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 = pkgs: with config.hardware.opengl;
|
extraLibraries =
|
||||||
if pkgs.hostPlatform.is64bit
|
pkgs:
|
||||||
then [ package ] ++ extraPackages
|
with config.hardware.opengl;
|
||||||
else [ package32 ] ++ extraPackages32;
|
if pkgs.hostPlatform.is64bit then
|
||||||
|
[ package ] ++ extraPackages
|
||||||
|
else
|
||||||
|
[ package32 ] ++ extraPackages32;
|
||||||
|
|
||||||
extraPkgs = pkgs: with pkgs; [
|
extraPkgs =
|
||||||
capitaine-cursors
|
pkgs: with pkgs; [
|
||||||
bibata-cursors
|
capitaine-cursors
|
||||||
mangohud
|
bibata-cursors
|
||||||
xdg-user-dirs
|
mangohud
|
||||||
];
|
xdg-user-dirs
|
||||||
|
];
|
||||||
};
|
};
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
protontricks
|
protontricks
|
||||||
bottles
|
bottles
|
||||||
];
|
];
|
||||||
|
|
||||||
|
programs.dzgui.enable = true;
|
||||||
|
programs.dzgui.package = inputs.dzgui-nix.packages.${pkgs.system}.default;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,10 @@
|
||||||
{ config, pkgs, inputs, ... }: {
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
programs.thunar = {
|
programs.thunar = {
|
||||||
enable = true;
|
enable = true;
|
||||||
plugins = with pkgs.xfce; [
|
plugins = with pkgs.xfce; [
|
||||||
|
@ -12,17 +18,15 @@
|
||||||
services.tumbler.enable = true;
|
services.tumbler.enable = true;
|
||||||
|
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
(
|
(pkgs.writeTextFile {
|
||||||
pkgs.writeTextFile {
|
name = "thumbs";
|
||||||
name = "thumbs";
|
text = ''
|
||||||
text = ''
|
[Thumbnailer Entry]
|
||||||
[Thumbnailer Entry]
|
TryExec=unzip
|
||||||
TryExec=unzip
|
Exec=sh -c "${pkgs.unzip}/bin/unzip -p %i preview.png > %o"
|
||||||
Exec=sh -c "${pkgs.unzip}/bin/unzip -p %i preview.png > %o"
|
MimeType=application/x-krita;
|
||||||
MimeType=application/x-krita;
|
'';
|
||||||
'';
|
destination = "/share/thumbnailers/kra.thumbnailer";
|
||||||
destination = "/share/thumbnailers/kra.thumbnailer";
|
})
|
||||||
}
|
|
||||||
)
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
29
system/users.nix
Normal file
29
system/users.nix
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
security.sudo.wheelNeedsPassword = false;
|
||||||
|
|
||||||
|
# services.getty.autologinUser = "lelgenio";
|
||||||
|
programs.fish.enable = true;
|
||||||
|
|
||||||
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||||
|
users.mutableUsers = false;
|
||||||
|
users.users.lelgenio = {
|
||||||
|
isNormalUser = true;
|
||||||
|
description = "Leonardo Eugênio";
|
||||||
|
hashedPassword = "$y$j9T$0e/rczjOVCy7PuwC3pG0V/$gTHZhfO4wQSlFvbDyfghbCnGI2uDI0a52zSrQ/yOA5A";
|
||||||
|
extraGroups = [
|
||||||
|
"networkmanager"
|
||||||
|
"wheel"
|
||||||
|
"docker"
|
||||||
|
"adbusers"
|
||||||
|
"bluetooth"
|
||||||
|
"corectrl"
|
||||||
|
"vboxusers"
|
||||||
|
];
|
||||||
|
shell = pkgs.fish;
|
||||||
|
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"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
users.users.root.initialHashedPassword = "$y$j9T$E3aBBSSq0Gma8hZD9L7ov0$iCGDW4fqrXWfHO0qodBYYgMFA9CpIraoklHcPbJJrM3";
|
||||||
|
}
|
|
@ -1,6 +1,16 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
inherit (pkgs.uservars) key theme accent font;
|
inherit (pkgs.uservars)
|
||||||
|
key
|
||||||
|
theme
|
||||||
|
accent
|
||||||
|
font
|
||||||
|
;
|
||||||
inherit (theme) color;
|
inherit (theme) color;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
@ -10,7 +20,9 @@ in
|
||||||
settings = {
|
settings = {
|
||||||
font = {
|
font = {
|
||||||
size = font.size.small;
|
size = font.size.small;
|
||||||
normal = { family = font.mono; };
|
normal = {
|
||||||
|
family = font.mono;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
colors = {
|
colors = {
|
||||||
primary = {
|
primary = {
|
||||||
|
@ -40,31 +52,34 @@ in
|
||||||
|
|
||||||
hints = {
|
hints = {
|
||||||
alphabet = key.hints;
|
alphabet = key.hints;
|
||||||
enabled = [{
|
enabled = [
|
||||||
regex =
|
{
|
||||||
let
|
regex =
|
||||||
mimes =
|
let
|
||||||
"(mailto:|gemini:|gopher:|https:|http:|news:|file:|git:|ssh:|ftp:)";
|
mimes = "(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;
|
||||||
|
@ -141,7 +156,9 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
home.sessionVariables = { TERMINAL = "alacritty"; };
|
home.sessionVariables = {
|
||||||
|
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,6 +1,17 @@
|
||||||
{ config, pkgs, lib, inputs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
inherit (pkgs.uservars) key theme accent font;
|
inherit (pkgs.uservars)
|
||||||
|
key
|
||||||
|
theme
|
||||||
|
accent
|
||||||
|
font
|
||||||
|
;
|
||||||
inherit (theme) color;
|
inherit (theme) color;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +1,11 @@
|
||||||
{ config, pkgs, lib, inputs, ... }: {
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
wayland.windowManager.sway = {
|
wayland.windowManager.sway = {
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
exec thunderbird
|
exec thunderbird
|
||||||
|
|
|
@ -1,10 +1,22 @@
|
||||||
{ config, pkgs, lib, inputs, ... }: {
|
{ pkgs, lib, ... }:
|
||||||
xdg.desktopEntries = {
|
{
|
||||||
connect-controller = {
|
systemd.user.services = {
|
||||||
name = "Connect Controller";
|
autoconnect-gamepad = {
|
||||||
exec = "bluetoothctl connect 84:30:95:97:1A:79";
|
Unit = {
|
||||||
terminal = false;
|
Description = "Attempt to connect to game controllers";
|
||||||
|
PartOf = [ "graphical-session.target" ];
|
||||||
|
After = [ "graphical-session.target" ];
|
||||||
|
};
|
||||||
|
Service = {
|
||||||
|
ExecStart = lib.getExe pkgs.auto_connect_gamepad;
|
||||||
|
};
|
||||||
|
Install = {
|
||||||
|
WantedBy = [ "sway-session.target" ];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
xdg.desktopEntries = {
|
||||||
disconnect-controller = {
|
disconnect-controller = {
|
||||||
name = "Disconnect Controller";
|
name = "Disconnect Controller";
|
||||||
exec = "bluetoothctl disconnect 84:30:95:97:1A:79";
|
exec = "bluetoothctl disconnect 84:30:95:97:1A:79";
|
||||||
|
|
|
@ -1,4 +1,10 @@
|
||||||
{ config, pkgs, lib, ... }: {
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
xdg.desktopEntries = {
|
xdg.desktopEntries = {
|
||||||
kak = {
|
kak = {
|
||||||
name = "Kakoune";
|
name = "Kakoune";
|
||||||
|
@ -8,7 +14,10 @@
|
||||||
terminal = true;
|
terminal = true;
|
||||||
type = "Application";
|
type = "Application";
|
||||||
icon = "kak.desktop";
|
icon = "kak.desktop";
|
||||||
categories = [ "Utility" "TextEditor" ];
|
categories = [
|
||||||
|
"Utility"
|
||||||
|
"TextEditor"
|
||||||
|
];
|
||||||
startupNotify = true;
|
startupNotify = true;
|
||||||
mimeType = [
|
mimeType = [
|
||||||
"text/english"
|
"text/english"
|
||||||
|
@ -40,10 +49,15 @@
|
||||||
terminal = true;
|
terminal = true;
|
||||||
type = "Application";
|
type = "Application";
|
||||||
icon = "mutt";
|
icon = "mutt";
|
||||||
categories = [ "Network" "Email" ];
|
categories = [
|
||||||
|
"Network"
|
||||||
|
"Email"
|
||||||
|
];
|
||||||
startupNotify = false;
|
startupNotify = false;
|
||||||
mimeType = [ "x-scheme-handler/mailto" ];
|
mimeType = [ "x-scheme-handler/mailto" ];
|
||||||
settings = { Keywords = "Mail;E-mail;"; };
|
settings = {
|
||||||
|
Keywords = "Mail;E-mail;";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
down_meme = {
|
down_meme = {
|
||||||
name = "DownMeme";
|
name = "DownMeme";
|
||||||
|
|
|
@ -1,6 +1,16 @@
|
||||||
{ config, pkgs, lib, font, ... }:
|
{
|
||||||
let inherit (pkgs.uservars) desktop browser;
|
config,
|
||||||
bugfixedFirefox = pkgs.firefox-esr-unwrapped // { requireSigning = false; allowAddonSideload = true; };
|
pkgs,
|
||||||
|
lib,
|
||||||
|
font,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
inherit (pkgs.uservars) desktop browser;
|
||||||
|
bugfixedFirefox = pkgs.firefox-esr-unwrapped // {
|
||||||
|
requireSigning = false;
|
||||||
|
allowAddonSideload = true;
|
||||||
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
config = {
|
config = {
|
||||||
|
|
|
@ -1,6 +1,21 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{
|
||||||
let inherit (pkgs.uservars) key theme color accent font editor desktop;
|
config,
|
||||||
in {
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
inherit (pkgs.uservars)
|
||||||
|
key
|
||||||
|
theme
|
||||||
|
color
|
||||||
|
accent
|
||||||
|
font
|
||||||
|
editor
|
||||||
|
desktop
|
||||||
|
;
|
||||||
|
in
|
||||||
|
{
|
||||||
config = {
|
config = {
|
||||||
programs.fish = {
|
programs.fish = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -34,10 +49,12 @@ in {
|
||||||
};
|
};
|
||||||
shellAbbrs = {
|
shellAbbrs = {
|
||||||
off = "shutdown now";
|
off = "shutdown now";
|
||||||
v = {
|
v =
|
||||||
"helix" = "hx";
|
{
|
||||||
"kakoune" = "kak";
|
"helix" = "hx";
|
||||||
}.${editor};
|
"kakoune" = "kak";
|
||||||
|
}
|
||||||
|
.${editor};
|
||||||
ns = "nix develop --command $SHELL";
|
ns = "nix develop --command $SHELL";
|
||||||
wcf = "wl-copy-file";
|
wcf = "wl-copy-file";
|
||||||
c = "cargo";
|
c = "cargo";
|
||||||
|
@ -64,7 +81,9 @@ in {
|
||||||
gr = "cd (git root)";
|
gr = "cd (git root)";
|
||||||
gri = "git rebase --interactive FETCH_HEAD";
|
gri = "git rebase --interactive FETCH_HEAD";
|
||||||
};
|
};
|
||||||
functions = { fish_greeting = ""; };
|
functions = {
|
||||||
|
fish_greeting = "";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
programs = {
|
programs = {
|
||||||
zoxide.enable = true;
|
zoxide.enable = true;
|
||||||
|
@ -85,13 +104,18 @@ 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 = (with pkgs; with fishPlugins;[
|
home.packages = (
|
||||||
trash-cli
|
with pkgs;
|
||||||
wl-copy-file
|
with fishPlugins;
|
||||||
foreign-env
|
[
|
||||||
] ++ (lib.optionals (desktop == "sway") [
|
trash-cli
|
||||||
async-prompt
|
wl-copy-file
|
||||||
done
|
foreign-env
|
||||||
]));
|
]
|
||||||
|
++ (lib.optionals (desktop == "sway") [
|
||||||
|
async-prompt
|
||||||
|
done
|
||||||
|
])
|
||||||
|
);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
30
user/fzf.nix
30
user/fzf.nix
|
@ -1,6 +1,17 @@
|
||||||
{ config, pkgs, lib, inputs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
inherit (pkgs.uservars) key theme accent font;
|
inherit (pkgs.uservars)
|
||||||
|
key
|
||||||
|
theme
|
||||||
|
accent
|
||||||
|
font
|
||||||
|
;
|
||||||
inherit (theme) color;
|
inherit (theme) color;
|
||||||
|
|
||||||
colors = {
|
colors = {
|
||||||
|
@ -15,22 +26,21 @@ 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_opts = "--preview '${pkgs.bat}/bin/bat --style=numbers --color=always {}'";
|
||||||
"--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 =
|
fileWidgetOptions = [ "--preview '${pkgs.bat}/bin/bat --style=numbers --color=always {}'" ];
|
||||||
[ "--preview '${pkgs.bat}/bin/bat --style=numbers --color=always {}'" ];
|
|
||||||
|
|
||||||
changeDirWidgetCommand = "${pkgs.fd}/bin/fd --type d";
|
changeDirWidgetCommand = "${pkgs.fd}/bin/fd --type d";
|
||||||
changeDirWidgetOptions =
|
changeDirWidgetOptions = [ "--preview '${pkgs.eza}/bin/eza -T L3 | head -200'" ];
|
||||||
[ "--preview '${pkgs.eza}/bin/eza -T L3 | head -200'" ];
|
|
||||||
|
|
||||||
defaultOptions = [ color_opts preview_opts ];
|
defaultOptions = [
|
||||||
|
color_opts
|
||||||
|
preview_opts
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
13
user/git.nix
13
user/git.nix
|
@ -1,6 +1,13 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{
|
||||||
let inherit (pkgs.uservars) username mail;
|
config,
|
||||||
in {
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
inherit (pkgs.uservars) username mail;
|
||||||
|
in
|
||||||
|
{
|
||||||
config = {
|
config = {
|
||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -1,4 +1,10 @@
|
||||||
{ 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";
|
||||||
|
@ -14,9 +20,7 @@
|
||||||
cursor-theme = "Adwaita";
|
cursor-theme = "Adwaita";
|
||||||
# color-scheme = "default";
|
# color-scheme = "default";
|
||||||
};
|
};
|
||||||
"org/gnome/desktop/wm/preferences" = lib.mkForce {
|
"org/gnome/desktop/wm/preferences" = lib.mkForce { button-layout = "appmenu:close"; };
|
||||||
button-layout = "appmenu:close";
|
|
||||||
};
|
|
||||||
"org/gnome/desktop/input-sources" = {
|
"org/gnome/desktop/input-sources" = {
|
||||||
xkb-options = [ "lv3:lsgt_switch" ];
|
xkb-options = [ "lv3:lsgt_switch" ];
|
||||||
};
|
};
|
||||||
|
@ -40,18 +44,11 @@
|
||||||
qt6Packages.qtstyleplugin-kvantum
|
qt6Packages.qtstyleplugin-kvantum
|
||||||
];
|
];
|
||||||
|
|
||||||
home.sessionVariables = { QT_QPA_PLATFORMTHEME = "qt5ct"; };
|
home.sessionVariables = {
|
||||||
|
QT_QPA_PLATFORMTHEME = "qt5ct";
|
||||||
|
};
|
||||||
|
|
||||||
xdg.defaultApplications = {
|
xdg.defaultApplications = {
|
||||||
enable = true;
|
enable = lib.mkForce false;
|
||||||
text-editor = "codium.desktop";
|
|
||||||
image-viewer = "org.gnome.eog.desktop";
|
|
||||||
video-player = "org.gnome.Totem.desktop";
|
|
||||||
web-browser = "firefox.desktop";
|
|
||||||
document-viewer = "org.gnome.Evince.desktop";
|
|
||||||
file-manager = "org.gnome.Nautilus.desktop";
|
|
||||||
archive-manager = "org.gnome.FileRoller.desktop;";
|
|
||||||
email-client = "thunderbird.desktop";
|
|
||||||
torrent-client = "torrent.desktop";
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
17
user/gpg.nix
17
user/gpg.nix
|
@ -1,4 +1,10 @@
|
||||||
{ config, pkgs, lib, ... }: {
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
config = {
|
config = {
|
||||||
services.gpg-agent = {
|
services.gpg-agent = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -16,7 +22,9 @@
|
||||||
PartOf = [ "graphical-session.target" ];
|
PartOf = [ "graphical-session.target" ];
|
||||||
After = [ "graphical-session.target" ];
|
After = [ "graphical-session.target" ];
|
||||||
};
|
};
|
||||||
Service = { ExecStart = "${pkgs._gpg-unlock}/bin/_gpg-unlock"; };
|
Service = {
|
||||||
|
ExecStart = "${pkgs._gpg-unlock}/bin/_gpg-unlock";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
systemd.user.timers = {
|
systemd.user.timers = {
|
||||||
|
@ -31,9 +39,10 @@
|
||||||
OnUnitActiveSec = "300";
|
OnUnitActiveSec = "300";
|
||||||
Unit = "gpg_unlock.service";
|
Unit = "gpg_unlock.service";
|
||||||
};
|
};
|
||||||
Install = { WantedBy = [ "sway-session.target" ]; };
|
Install = {
|
||||||
|
WantedBy = [ "sway-session.target" ];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,7 +74,9 @@ in
|
||||||
g.n = "goto_line_start";
|
g.n = "goto_line_start";
|
||||||
g.o = "goto_line_end";
|
g.o = "goto_line_end";
|
||||||
};
|
};
|
||||||
keys.insert = { "A-k" = "normal_mode"; };
|
keys.insert = {
|
||||||
|
"A-k" = "normal_mode";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
languages.language = [
|
languages.language = [
|
||||||
{
|
{
|
||||||
|
@ -96,14 +98,29 @@ in
|
||||||
my-theme = {
|
my-theme = {
|
||||||
"inherits" = "gruvbox";
|
"inherits" = "gruvbox";
|
||||||
"ui.menu" = "none";
|
"ui.menu" = "none";
|
||||||
"ui.background" = { bg = "none"; };
|
"ui.background" = {
|
||||||
|
bg = "none";
|
||||||
|
};
|
||||||
"ui.virtual.whitespace" = color.nontxt;
|
"ui.virtual.whitespace" = color.nontxt;
|
||||||
"ui.cursor.primary" = { fg = accent.fg; bg = accent.color; };
|
"ui.cursor.primary" = {
|
||||||
"ui.cursorline.primary" = { bg = color.bg_dark; };
|
fg = accent.fg;
|
||||||
"ui.cursorcolumn.primary" = { modifiers = [ "bold" ]; };
|
bg = accent.color;
|
||||||
"ui.cursorline" = { bg = "none"; };
|
};
|
||||||
"ui.cursorcolumn" = { bg = "none"; };
|
"ui.cursorline.primary" = {
|
||||||
"ui.linenr.selected" = { fg = color.txt; };
|
bg = color.bg_dark;
|
||||||
|
};
|
||||||
|
"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;
|
||||||
|
@ -124,8 +141,6 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
home.sessionVariables = lib.mkIf (editor == "helix") {
|
home.sessionVariables = lib.mkIf (editor == "helix") { EDITOR = "hx"; };
|
||||||
EDITOR = "hx";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,12 @@
|
||||||
{ config, pkgs, lib, inputs, osConfig, ... }: {
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
inputs,
|
||||||
|
osConfig,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./controller.nix
|
./controller.nix
|
||||||
./waybar
|
./waybar
|
||||||
|
@ -11,7 +19,6 @@
|
||||||
./alacritty.nix
|
./alacritty.nix
|
||||||
./git.nix
|
./git.nix
|
||||||
./ssh.nix
|
./ssh.nix
|
||||||
./qutebrowser
|
|
||||||
./gpg.nix
|
./gpg.nix
|
||||||
./rofi.nix
|
./rofi.nix
|
||||||
./mpv.nix
|
./mpv.nix
|
||||||
|
@ -70,9 +77,7 @@
|
||||||
comma
|
comma
|
||||||
|
|
||||||
# System monitors
|
# System monitors
|
||||||
(btop.override {
|
(btop.override { cudaSupport = true; })
|
||||||
cudaSupport = true;
|
|
||||||
})
|
|
||||||
amdgpu_top
|
amdgpu_top
|
||||||
inxi
|
inxi
|
||||||
dmidecode
|
dmidecode
|
||||||
|
@ -128,7 +133,7 @@
|
||||||
rust-analyzer # rust analyzer
|
rust-analyzer # rust analyzer
|
||||||
|
|
||||||
blade-formatter
|
blade-formatter
|
||||||
nixpkgs-fmt
|
nixfmt-rfc-style
|
||||||
];
|
];
|
||||||
|
|
||||||
fonts.fontconfig.enable = true;
|
fonts.fontconfig.enable = true;
|
||||||
|
@ -140,22 +145,18 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
VOLUME_CHANGE_SOUND =
|
VOLUME_CHANGE_SOUND = "${pkgs.sound-theme-freedesktop}/share/sounds/freedesktop/stereo/audio-volume-change.oga";
|
||||||
"${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;
|
||||||
text-editor = lib.mkDefault "kak.desktop";
|
text-editor = lib.mkDefault "kak.desktop";
|
||||||
image-viewer = lib.mkDefault "pqiv.desktop";
|
image-viewer = lib.mkDefault "pqiv.desktop";
|
||||||
video-player = lib.mkDefault "mpv.desktop";
|
video-player = lib.mkDefault "mpv.desktop";
|
||||||
web-browser = lib.mkDefault (
|
web-browser = lib.mkDefault "firefox.desktop";
|
||||||
{
|
|
||||||
firefox = lib.mkDefault "firefox.desktop";
|
|
||||||
qutebrowser = lib.mkDefault "org.qutebrowser.qutebrowser.desktop";
|
|
||||||
}.${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";
|
||||||
archive-manager = "engrampa.desktop";
|
archive-manager = "engrampa.desktop";
|
||||||
|
@ -163,12 +164,14 @@
|
||||||
torrent-client = lib.mkDefault "torrent.desktop";
|
torrent-client = lib.mkDefault "torrent.desktop";
|
||||||
};
|
};
|
||||||
|
|
||||||
wayland.windowManager.sway.extraConfig = lib.optionalString (osConfig.networking.hostName or "" == "monolith") ''
|
wayland.windowManager.sway.extraConfig =
|
||||||
exec steam
|
lib.optionalString (osConfig.networking.hostName or "" == "monolith")
|
||||||
exec obs --startreplaybuffer --disable-shutdown-check
|
''
|
||||||
exec deluge-gtk
|
exec steam
|
||||||
exec nicotine
|
exec obs --startreplaybuffer --disable-shutdown-check
|
||||||
'';
|
exec deluge-gtk
|
||||||
|
exec nicotine
|
||||||
|
'';
|
||||||
|
|
||||||
systemd.user.services.rm-target = {
|
systemd.user.services.rm-target = {
|
||||||
Unit = {
|
Unit = {
|
||||||
|
@ -182,12 +185,16 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
systemd.user.timers.rm-target = {
|
systemd.user.timers.rm-target = {
|
||||||
Unit = { Description = "Remove directories named 'target'"; };
|
Unit = {
|
||||||
|
Description = "Remove directories named 'target'";
|
||||||
|
};
|
||||||
Timer = {
|
Timer = {
|
||||||
OnCalendar = "weekly";
|
OnCalendar = "weekly";
|
||||||
Unit = "rm-target.service";
|
Unit = "rm-target.service";
|
||||||
};
|
};
|
||||||
Install = { WantedBy = [ "timers.target" ]; };
|
Install = {
|
||||||
|
WantedBy = [ "timers.target" ];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# This value determines the Home Manager release that your
|
# This value determines the Home Manager release that your
|
||||||
|
|
|
@ -1,4 +1,10 @@
|
||||||
{ 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;
|
||||||
|
@ -122,6 +128,9 @@
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
home.file.".config/eww".source = ./eww;
|
home.file.".config/eww".source = ./eww;
|
||||||
home.packages = with pkgs; [ eww-wayland jq ];
|
home.packages = with pkgs; [
|
||||||
|
eww-wayland
|
||||||
|
jq
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
{ 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;
|
||||||
|
@ -94,8 +99,9 @@ with colors;
|
||||||
face global InlayHint ${bg_light}+buif
|
face global InlayHint ${bg_light}+buif
|
||||||
|
|
||||||
# Lsp
|
# Lsp
|
||||||
'' + (
|
''
|
||||||
lib.concatStringsSep "\n" (lib.mapAttrsToList
|
+ (lib.concatStringsSep "\n" (
|
||||||
|
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
|
||||||
|
@ -106,6 +112,5 @@ with colors;
|
||||||
Error = "red";
|
Error = "red";
|
||||||
Warning = "yellow";
|
Warning = "yellow";
|
||||||
Hint = "blue";
|
Hint = "blue";
|
||||||
})
|
}
|
||||||
)
|
))
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,17 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
inherit (pkgs.uservars) key dmenu editor theme accent;
|
inherit (pkgs.uservars)
|
||||||
|
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;
|
||||||
|
@ -74,26 +85,39 @@ in
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
extraConfig =
|
extraConfig =
|
||||||
lib.concatStringsSep "\n"
|
lib.concatStringsSep "\n" (
|
||||||
(map (lib.readFile) ([
|
map (lib.readFile) (
|
||||||
./filetypes.kak
|
[
|
||||||
./hooks.kak
|
./filetypes.kak
|
||||||
./indent.kak
|
./hooks.kak
|
||||||
./keys.kak
|
./indent.kak
|
||||||
./lsp-config.kak
|
./keys.kak
|
||||||
./usermode.kak
|
./lsp-config.kak
|
||||||
./git-mode.kak
|
./usermode.kak
|
||||||
] ++ lib.optional (dmenu == "rofi") ./rofi-commands.kak)) + ''
|
./git-mode.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 {
|
''
|
||||||
inherit pkgs lib color accent;
|
+ (import ./colors.nix {
|
||||||
|
inherit
|
||||||
|
pkgs
|
||||||
|
lib
|
||||||
|
color
|
||||||
|
accent
|
||||||
|
;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
home.file = { ".config/kak-lsp/kak-lsp.toml".source = ./kak-lsp.toml; };
|
home.file = {
|
||||||
|
".config/kak-lsp/kak-lsp.toml".source = ./kak-lsp.toml;
|
||||||
|
};
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
terminal
|
terminal
|
||||||
ranger
|
ranger
|
||||||
|
@ -123,4 +147,3 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ hook global WinSetOption filetype=c %{
|
||||||
}
|
}
|
||||||
|
|
||||||
hook global WinSetOption filetype=nix %{
|
hook global WinSetOption filetype=nix %{
|
||||||
set buffer formatcmd 'nixpkgs-fmt'
|
set buffer formatcmd 'nixfmt'
|
||||||
}
|
}
|
||||||
|
|
||||||
hook global BufCreate .*\.html %{
|
hook global BufCreate .*\.html %{
|
||||||
|
@ -93,6 +93,7 @@ hook global WinSetOption filetype=blade %[
|
||||||
hook -once -always window WinSetOption filetype=.* %{ remove-hooks window blade-.+ }
|
hook -once -always window WinSetOption filetype=.* %{ remove-hooks window blade-.+ }
|
||||||
|
|
||||||
require-module php
|
require-module php
|
||||||
|
require-module javascript
|
||||||
|
|
||||||
add-highlighter buffer/blade regions
|
add-highlighter buffer/blade regions
|
||||||
add-highlighter buffer/blade/base default-region group
|
add-highlighter buffer/blade/base default-region group
|
||||||
|
@ -108,6 +109,9 @@ hook global WinSetOption filetype=blade %[
|
||||||
add-highlighter buffer/blade/php/ ref php
|
add-highlighter buffer/blade/php/ ref php
|
||||||
add-highlighter buffer/blade/php/ regex '@((end)?php)' 1:block
|
add-highlighter buffer/blade/php/ regex '@((end)?php)' 1:block
|
||||||
|
|
||||||
|
add-highlighter buffer/blade/js region '<script>' '</script>' group
|
||||||
|
add-highlighter buffer/blade/js/ ref javascript
|
||||||
|
|
||||||
add-highlighter buffer/blade/expression region '\{\{(?!--)' '(?!--)\}\}' ref php
|
add-highlighter buffer/blade/expression region '\{\{(?!--)' '(?!--)\}\}' ref php
|
||||||
add-highlighter buffer/blade/statement region -recurse '\(' '@(if|foreach|for|section|yield|include)\s*\(' '\)' ref php
|
add-highlighter buffer/blade/statement region -recurse '\(' '@(if|foreach|for|section|yield|include)\s*\(' '\)' ref php
|
||||||
add-highlighter buffer/blade/base/ regex '@(else(if)?|include|case|break)' 1:keyword
|
add-highlighter buffer/blade/base/ regex '@(else(if)?|include|case|break)' 1:keyword
|
||||||
|
|
|
@ -74,7 +74,7 @@ filetypes = ["nix"]
|
||||||
command = "nil"
|
command = "nil"
|
||||||
roots = ["flake.nix", "shell.nix", ".git"]
|
roots = ["flake.nix", "shell.nix", ".git"]
|
||||||
[language_server.nil.settings.nil]
|
[language_server.nil.settings.nil]
|
||||||
formatting.command = [ "nixpkgs-fmt" ]
|
formatting.command = [ "nixfmt" ]
|
||||||
|
|
||||||
[language_server.intelephense]
|
[language_server.intelephense]
|
||||||
filetypes = ["php"]
|
filetypes = ["php"]
|
||||||
|
|
|
@ -1,4 +1,11 @@
|
||||||
{ 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,5 +1,20 @@
|
||||||
{ config, pkgs, lib, inputs, ... }:
|
{
|
||||||
let inherit (pkgs.uservars) key theme color accent font desktop editor;
|
config,
|
||||||
|
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,6 +1,20 @@
|
||||||
{ config, pkgs, lib, font, ... }:
|
{
|
||||||
let inherit (pkgs.uservars) key theme color accent font;
|
config,
|
||||||
in {
|
pkgs,
|
||||||
|
lib,
|
||||||
|
font,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
inherit (pkgs.uservars)
|
||||||
|
key
|
||||||
|
theme
|
||||||
|
color
|
||||||
|
accent
|
||||||
|
font
|
||||||
|
;
|
||||||
|
in
|
||||||
|
{
|
||||||
config = {
|
config = {
|
||||||
programs.mangohud = {
|
programs.mangohud = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -1,4 +1,10 @@
|
||||||
{ 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;
|
||||||
|
@ -26,20 +32,21 @@ in
|
||||||
xdg.mimeApps =
|
xdg.mimeApps =
|
||||||
let
|
let
|
||||||
|
|
||||||
createMimeAssociation = (mime_prefix: application: mime_suffix: {
|
createMimeAssociation = (
|
||||||
"${mime_prefix}/${mime_suffix}" = application;
|
mime_prefix: application: mime_suffix: { "${mime_prefix}/${mime_suffix}" = application; }
|
||||||
});
|
);
|
||||||
|
|
||||||
createMimeAssociations = (mime_prefix: application: mime_suffixes:
|
createMimeAssociations = (
|
||||||
lib.foldAttrs (n: _: n) { }
|
mime_prefix: application: mime_suffixes:
|
||||||
(map (createMimeAssociation mime_prefix application) mime_suffixes));
|
lib.foldAttrs (n: _: n) { } (map (createMimeAssociation mime_prefix application) mime_suffixes)
|
||||||
|
);
|
||||||
|
|
||||||
mimes = simple
|
mimes =
|
||||||
|
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;
|
||||||
|
@ -421,7 +428,6 @@ in
|
||||||
"x-theora+ogg"
|
"x-theora+ogg"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
archive-suffixes = [
|
archive-suffixes = [
|
||||||
"bzip2"
|
"bzip2"
|
||||||
"gzip"
|
"gzip"
|
||||||
|
@ -487,6 +493,5 @@ in
|
||||||
enable = true;
|
enable = true;
|
||||||
defaultApplications = mimes;
|
defaultApplications = mimes;
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,10 @@
|
||||||
{ 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,4 +1,5 @@
|
||||||
{ pkgs, ... }: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
config = {
|
config = {
|
||||||
programs.mpv = {
|
programs.mpv = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -6,8 +7,7 @@
|
||||||
# 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 =
|
ytdl-raw-options = "cookies=~/.cache/cookies-youtube-com.txt,mark-watched=";
|
||||||
"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,10 +1,15 @@
|
||||||
{ 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; [
|
package = pkgs.pass.withExtensions (ex: with ex; [ pass-otp ]);
|
||||||
pass-otp
|
|
||||||
]);
|
|
||||||
};
|
};
|
||||||
services = {
|
services = {
|
||||||
pass-secret-service.enable = true;
|
pass-secret-service.enable = true;
|
||||||
|
|
|
@ -1,4 +1,10 @@
|
||||||
{ 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,8 +1,21 @@
|
||||||
{ config, pkgs, lib, inputs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
inherit (pkgs.uservars) key theme color accent font;
|
inherit (pkgs.uservars)
|
||||||
|
key
|
||||||
|
theme
|
||||||
|
color
|
||||||
|
accent
|
||||||
|
font
|
||||||
|
;
|
||||||
|
|
||||||
make_direction_binds = lib.imap0 (idx: direction:
|
make_direction_binds = lib.imap0 (
|
||||||
|
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";
|
||||||
|
@ -15,8 +28,8 @@ let
|
||||||
montage_mode_shift_${axis}(${toString (sign * -1)})
|
montage_mode_shift_${axis}(${toString (sign * -1)})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
'');
|
''
|
||||||
|
);
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
# My bemenu wrapper
|
# My bemenu wrapper
|
||||||
|
@ -45,7 +58,12 @@ 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 [ "left" "up" "right" "down" ])}
|
${lib.concatStrings (make_direction_binds [
|
||||||
|
"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); }
|
||||||
|
@ -54,10 +72,7 @@ in
|
||||||
d { send_keys(6) }
|
d { send_keys(6) }
|
||||||
y { send_keys(8) }
|
y { send_keys(8) }
|
||||||
|
|
||||||
${if (key.layout == "colemak") then
|
${if (key.layout == "colemak") then "\n t { toggle_scale_mode(0) }\n " else ""}
|
||||||
"\n t { toggle_scale_mode(0) }\n "
|
|
||||||
else
|
|
||||||
""}
|
|
||||||
|
|
||||||
# vim: ft=ini
|
# vim: ft=ini
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -1,219 +0,0 @@
|
||||||
{ config, pkgs, lib, font, ... }:
|
|
||||||
let
|
|
||||||
inherit (pkgs.uservars) key theme accent font browser;
|
|
||||||
inherit (theme) color;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
programs.qutebrowser.settings = {
|
|
||||||
hints.border = "2px solid ${accent.color}";
|
|
||||||
|
|
||||||
content.user_stylesheets = "style.css";
|
|
||||||
colors = {
|
|
||||||
|
|
||||||
########################################################
|
|
||||||
# Tabs
|
|
||||||
########################################################
|
|
||||||
|
|
||||||
tabs =
|
|
||||||
let
|
|
||||||
tabs_defaults = {
|
|
||||||
odd = {
|
|
||||||
fg = color.txt;
|
|
||||||
bg = color.bg;
|
|
||||||
};
|
|
||||||
even = {
|
|
||||||
fg = color.txt;
|
|
||||||
bg = color.bg_dark;
|
|
||||||
};
|
|
||||||
selected = {
|
|
||||||
odd = {
|
|
||||||
fg = accent.fg;
|
|
||||||
bg = accent.color;
|
|
||||||
};
|
|
||||||
even = {
|
|
||||||
fg = accent.fg;
|
|
||||||
bg = accent.color;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
bar = { bg = color.bg; };
|
|
||||||
pinned = tabs_defaults;
|
|
||||||
} // tabs_defaults;
|
|
||||||
|
|
||||||
########################################################
|
|
||||||
# Completion for urls and commands
|
|
||||||
########################################################
|
|
||||||
|
|
||||||
completion = {
|
|
||||||
fg = color.txt;
|
|
||||||
even = { bg = color.bg; };
|
|
||||||
odd = { bg = color.bg; };
|
|
||||||
scrollbar = { bg = color.bg_dark; };
|
|
||||||
match = { fg = accent.color; };
|
|
||||||
category = {
|
|
||||||
fg = color.txt;
|
|
||||||
bg = color.bg_dark;
|
|
||||||
border = {
|
|
||||||
top = color.bg_dark;
|
|
||||||
bottom = color.bg_dark;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
item = {
|
|
||||||
selected = {
|
|
||||||
fg = accent.fg;
|
|
||||||
bg = accent.color;
|
|
||||||
border = {
|
|
||||||
top = color.bg_dark;
|
|
||||||
bottom = color.bg_dark;
|
|
||||||
};
|
|
||||||
match = { fg = color.txt; };
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
########################################################
|
|
||||||
# Statusbar
|
|
||||||
########################################################
|
|
||||||
|
|
||||||
statusbar = {
|
|
||||||
normal = {
|
|
||||||
fg = color.txt;
|
|
||||||
bg = color.bg;
|
|
||||||
};
|
|
||||||
insert = {
|
|
||||||
fg = color.normal.green;
|
|
||||||
bg = color.bg;
|
|
||||||
};
|
|
||||||
passthrough = {
|
|
||||||
fg = color.normal.blue;
|
|
||||||
bg = color.bg;
|
|
||||||
};
|
|
||||||
command = {
|
|
||||||
fg = color.txt;
|
|
||||||
bg = color.bg;
|
|
||||||
};
|
|
||||||
caret = {
|
|
||||||
selection = {
|
|
||||||
fg = accent.fg;
|
|
||||||
bg = accent.color;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
url = {
|
|
||||||
success = {
|
|
||||||
https = { fg = color.txt; };
|
|
||||||
http = { fg = color.normal.red; };
|
|
||||||
};
|
|
||||||
hover = { fg = color.normal.cyan; };
|
|
||||||
};
|
|
||||||
};
|
|
||||||
########################################################
|
|
||||||
# Downloads
|
|
||||||
########################################################
|
|
||||||
|
|
||||||
downloads = {
|
|
||||||
start = { bg = color.normal.blue; };
|
|
||||||
stop = { bg = color.normal.green; };
|
|
||||||
bar = { bg = color.bg; };
|
|
||||||
};
|
|
||||||
|
|
||||||
########################################################
|
|
||||||
# Choice of what element should be clicked
|
|
||||||
########################################################
|
|
||||||
|
|
||||||
hints = {
|
|
||||||
fg = color.txt;
|
|
||||||
bg = color.bg;
|
|
||||||
match = { fg = accent.color; };
|
|
||||||
};
|
|
||||||
|
|
||||||
########################################################
|
|
||||||
# List of what each keybinding does
|
|
||||||
########################################################
|
|
||||||
|
|
||||||
keyhint = {
|
|
||||||
fg = color.txt;
|
|
||||||
bg = color.bg;
|
|
||||||
suffix = { fg = accent.color; };
|
|
||||||
};
|
|
||||||
|
|
||||||
########################################################
|
|
||||||
# Right click menu
|
|
||||||
########################################################
|
|
||||||
|
|
||||||
contextmenu = {
|
|
||||||
menu = {
|
|
||||||
fg = color.txt;
|
|
||||||
bg = color.bg;
|
|
||||||
};
|
|
||||||
selected = {
|
|
||||||
fg = accent.fg;
|
|
||||||
bg = accent.color;
|
|
||||||
};
|
|
||||||
disabled = { fg = color.bg_light; };
|
|
||||||
};
|
|
||||||
|
|
||||||
########################################################
|
|
||||||
# Dark theme
|
|
||||||
########################################################
|
|
||||||
|
|
||||||
# webpage = lib.mkIf (color.type == "dark") {
|
|
||||||
# bg = color.bg;
|
|
||||||
# preferred_color_scheme = "dark";
|
|
||||||
# darkmode = {
|
|
||||||
# enabled = false;
|
|
||||||
# threshold = {
|
|
||||||
# text = 150;
|
|
||||||
# background = 205;
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
};
|
|
||||||
};
|
|
||||||
home.file = {
|
|
||||||
".config/qutebrowser/style.css".text = ''
|
|
||||||
${lib.optionalString (color.type == "dark") ''
|
|
||||||
button,
|
|
||||||
input[type="button"] {
|
|
||||||
color: unset;
|
|
||||||
background-color: unset;
|
|
||||||
}
|
|
||||||
|
|
||||||
.bg-gradient-to-b,
|
|
||||||
body {
|
|
||||||
background-image: none !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
/***************************
|
|
||||||
* Remove borked ellements *
|
|
||||||
***************************/
|
|
||||||
|
|
||||||
.search-filters-wrap:before, .search-filters-wrap:after {
|
|
||||||
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
''}
|
|
||||||
|
|
||||||
/*****************
|
|
||||||
* Hide some ads *
|
|
||||||
*****************/
|
|
||||||
|
|
||||||
/*Reddit*/
|
|
||||||
#sr-header-area .redesign-beta-optin,
|
|
||||||
.link.promotedlink.promoted,
|
|
||||||
.spacer:empty,
|
|
||||||
.spacer .premium-banner-outer,
|
|
||||||
.ad-container,
|
|
||||||
|
|
||||||
/*Youtube*/
|
|
||||||
div#masthead-ad ,
|
|
||||||
.video-ads,
|
|
||||||
#player-ads,
|
|
||||||
ytd-popup-container {
|
|
||||||
display: none !important;
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,90 +0,0 @@
|
||||||
{ config, pkgs, lib, font, ... }:
|
|
||||||
let
|
|
||||||
inherit (pkgs.uservars) theme;
|
|
||||||
inherit (theme) color;
|
|
||||||
|
|
||||||
# ".config/qutebrowser/greasemonkey/darkreader.js".text =
|
|
||||||
darkThemeUserscript = enabled: pkgs.writeText "darkreader.js" ''
|
|
||||||
// ==UserScript==
|
|
||||||
// @name Dark Reader (Unofficial)
|
|
||||||
// @icon https://darkreader.org/images/darkreader-icon-256x256.png
|
|
||||||
// @namespace DarkReader
|
|
||||||
// @description Inverts the brightness of pages to reduce eye strain
|
|
||||||
// @version 4.7.15
|
|
||||||
// @author https://github.com/darkreader/darkreader#contributors
|
|
||||||
// @homepageURL https://darkreader.org/ | https://github.com/darkreader/darkreader
|
|
||||||
// @run-at document-end
|
|
||||||
// @grant none
|
|
||||||
// @include http*
|
|
||||||
// @require https://cdn.jsdelivr.net/npm/darkreader/darkreader.min.js
|
|
||||||
// @noframes
|
|
||||||
// ==/UserScript==
|
|
||||||
|
|
||||||
DarkReader.setFetchMethod(window.fetch)
|
|
||||||
|
|
||||||
if (${if enabled then "false" else "true"}) {
|
|
||||||
DarkReader.disable();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const ignore_list = [
|
|
||||||
"askubuntu.com",
|
|
||||||
"mathoverflow.com",
|
|
||||||
"mathoverflow.net",
|
|
||||||
"serverfault.com",
|
|
||||||
"stackapps.com",
|
|
||||||
"stackexchange.com",
|
|
||||||
"stackoverflow.com",
|
|
||||||
"superuser.com",
|
|
||||||
"hub.docker.com",
|
|
||||||
];
|
|
||||||
|
|
||||||
for (let item of ignore_list) {
|
|
||||||
if (window.location.origin.indexOf(item) >= 0) {
|
|
||||||
console.log("URL matched dark-mode ignore list");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
DarkReader.enable({
|
|
||||||
brightness: 100,
|
|
||||||
contrast: 100,
|
|
||||||
sepia: 0,
|
|
||||||
|
|
||||||
darkSchemeBackgroundColor: "${color.bg}",
|
|
||||||
darkSchemeTextColor: "${color.txt}",
|
|
||||||
|
|
||||||
lightSchemeBackgroundColor: "${color.bg}",
|
|
||||||
lightSchemeTextColor: "${color.txt}",
|
|
||||||
});
|
|
||||||
'';
|
|
||||||
in
|
|
||||||
{
|
|
||||||
programs.qutebrowser.keyBindings = {
|
|
||||||
normal = {
|
|
||||||
"K" = "spawn --userscript toggle-dark-theme";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
home.file = {
|
|
||||||
".local/share/qutebrowser/userscripts/toggle-dark-theme".executable = true;
|
|
||||||
".local/share/qutebrowser/userscripts/toggle-dark-theme".text = ''
|
|
||||||
#!/bin/sh
|
|
||||||
DARK_READER_SCRIPT="$HOME/.config/qutebrowser/greasemonkey/darkreader.js"
|
|
||||||
MARKER="$HOME/.config/qutebrowser/is-dark-mode"
|
|
||||||
if test -f "$MARKER"
|
|
||||||
then
|
|
||||||
rm -f "$MARKER"
|
|
||||||
cp -f ${darkThemeUserscript false} "$DARK_READER_SCRIPT"
|
|
||||||
echo "jseval --world main DarkReader.disable()" >> "$QUTE_FIFO"
|
|
||||||
else
|
|
||||||
touch "$MARKER"
|
|
||||||
cp -f ${darkThemeUserscript true} "$DARK_READER_SCRIPT"
|
|
||||||
echo "jseval --world main DarkReader.enable()" >> "$QUTE_FIFO"
|
|
||||||
fi
|
|
||||||
if test -n "$QUTE_FIFO"; then
|
|
||||||
echo "greasemonkey-reload --quiet" >> "$QUTE_FIFO"
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,152 +0,0 @@
|
||||||
{ config, pkgs, lib, font, ... }:
|
|
||||||
let
|
|
||||||
inherit (pkgs.uservars) key browser editor;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./colors.nix
|
|
||||||
./dark-theme.nix
|
|
||||||
./fonts.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
config = {
|
|
||||||
programs.qutebrowser = {
|
|
||||||
enable = true;
|
|
||||||
# enableDefaultBindings = false;
|
|
||||||
keyBindings = {
|
|
||||||
normal = {
|
|
||||||
# basic movent
|
|
||||||
"${key.left}" = "scroll left";
|
|
||||||
"${key.down}" = "scroll down";
|
|
||||||
"${key.up}" = "scroll up";
|
|
||||||
"${key.right}" = "scroll right";
|
|
||||||
|
|
||||||
"${lib.toUpper key.up}" = "scroll-px 0 -100";
|
|
||||||
"${lib.toUpper key.down}" = "scroll-px 0 100";
|
|
||||||
"${lib.toUpper key.left}" = "back";
|
|
||||||
"${lib.toUpper key.right}" = "forward";
|
|
||||||
"${lib.toUpper key.tabL}" = "tab-prev";
|
|
||||||
"${lib.toUpper key.tabR}" = "tab-next";
|
|
||||||
|
|
||||||
"${key.next}" = "search-next";
|
|
||||||
"${lib.toUpper key.next}" = "search-prev";
|
|
||||||
|
|
||||||
"${key.insertMode}" = "mode-enter insert";
|
|
||||||
# ":" = "mode-enter command";
|
|
||||||
|
|
||||||
"t" = "hint all";
|
|
||||||
"h" = "set-cmd-text -s :open";
|
|
||||||
"T" = "hint all tab";
|
|
||||||
"H" = "set-cmd-text -s :open -t";
|
|
||||||
|
|
||||||
"<Ctrl-${lib.toLower key.tabL}>" = "tree-tab-promote";
|
|
||||||
"<Ctrl-${lib.toLower key.tabR}>" = "tree-tab-demote";
|
|
||||||
|
|
||||||
"co" = "tab-only --pinned keep";
|
|
||||||
|
|
||||||
# "K" = "jseval --world main if (DarkReader.isEnabled()) {DarkReader.disable()} else {DarkReader.enable()}";
|
|
||||||
};
|
|
||||||
insert = {
|
|
||||||
# quit insert mode
|
|
||||||
"<Alt-k>" = "mode-enter normal";
|
|
||||||
};
|
|
||||||
caret = {
|
|
||||||
# basic movent
|
|
||||||
"${key.left}" = "move-to-prev-char";
|
|
||||||
"${key.down}" = "move-to-next-line";
|
|
||||||
"${key.up}" = "move-to-prev-line";
|
|
||||||
"${key.right}" = "move-to-next-char";
|
|
||||||
|
|
||||||
"${key.insertMode}" = "mode-enter insert";
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
settings = {
|
|
||||||
tabs.tree_tabs = true;
|
|
||||||
tabs.position = "right";
|
|
||||||
tabs.pinned.shrink = false;
|
|
||||||
tabs.title.format = "{tree}{collapsed}{audio}{index}: {current_title}";
|
|
||||||
tabs.title.format_pinned = "{tree}{collapsed}{audio}{index} 🔒: {current_title}";
|
|
||||||
|
|
||||||
session.lazy_restore = true;
|
|
||||||
auto_save.session = true;
|
|
||||||
|
|
||||||
hints.chars = key.hints;
|
|
||||||
editor.command = [
|
|
||||||
"terminal"
|
|
||||||
"-e"
|
|
||||||
{
|
|
||||||
kakoune = "kak";
|
|
||||||
helix = "hx";
|
|
||||||
}.${editor}
|
|
||||||
"{file}"
|
|
||||||
"+{line}"
|
|
||||||
];
|
|
||||||
|
|
||||||
input.insert_mode.auto_leave = false;
|
|
||||||
|
|
||||||
content.autoplay = false;
|
|
||||||
content.blocking.adblock.lists = [
|
|
||||||
"https://easylist.to/easylist/easylist.txt"
|
|
||||||
"https://easylist.to/easylist/easyprivacy.txt"
|
|
||||||
"https://easylist-downloads.adblockplus.org/easylistdutch.txt"
|
|
||||||
"https://easylist-downloads.adblockplus.org/abp-filters-anti-cv.txt"
|
|
||||||
"https://www.i-dont-care-about-cookies.eu/abp/"
|
|
||||||
"https://secure.fanboy.co.nz/fanboy-cookiemonster.txt"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
extraConfig = ''
|
|
||||||
config.load_autoconfig()
|
|
||||||
config.set("content.notifications.enabled", True, "https://web.whatsapp.com")
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
systemd.user.services = lib.mkIf (browser == "qutebrowser") {
|
|
||||||
qutebrowser = {
|
|
||||||
Unit = {
|
|
||||||
Description = "Qutebrowser Web client";
|
|
||||||
PartOf = [ "graphical-session.target" ];
|
|
||||||
After = [ "graphical-session.target" ];
|
|
||||||
};
|
|
||||||
Service = {
|
|
||||||
ExecStartPre = "/usr/bin/env sleep 10s";
|
|
||||||
ExecStart = "${pkgs.qutebrowser}/bin/qutebrowser";
|
|
||||||
Restart = "on-failure";
|
|
||||||
};
|
|
||||||
Install = { WantedBy = [ "sway-session.target" ]; };
|
|
||||||
};
|
|
||||||
};
|
|
||||||
home.file = {
|
|
||||||
# For some stupid reason qutebrowser crashes if this dir does not exist
|
|
||||||
".local/share/qutebrowser/greasemonkey/.keep".text = "";
|
|
||||||
".config/qutebrowser/greasemonkey/youtube.js".text = ''
|
|
||||||
// ==UserScript==
|
|
||||||
// @name Auto Skip YouTube Ads
|
|
||||||
// @version 1.0.2
|
|
||||||
// @description Speed up and skip YouTube ads automatically
|
|
||||||
// @author codiac-killer
|
|
||||||
// @match *://*.youtube.com/*
|
|
||||||
// @exclude *://*.youtube.com/subscribe_embed?*
|
|
||||||
// ==/UserScript==
|
|
||||||
|
|
||||||
let main = new MutationObserver(() => {
|
|
||||||
// Get skip button and click it
|
|
||||||
let btn = document.getElementsByClassName("ytp-ad-skip-button ytp-button").item(0)
|
|
||||||
if (btn) {
|
|
||||||
btn.click()
|
|
||||||
}
|
|
||||||
|
|
||||||
// (unskipable ads) If skip button didn't exist / was not clicked speed up video
|
|
||||||
const ad = [...document.querySelectorAll('.ad-showing')][0];
|
|
||||||
if (ad) {
|
|
||||||
// Speed up and mute
|
|
||||||
document.querySelector('video').playbackRate = 16;
|
|
||||||
document.querySelector('video').muted = true;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
main.observe(document.getElementsByClassName("video-ads ytp-ad-module").item(0), {attributes: true, characterData: true, childList: true})
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,36 +0,0 @@
|
||||||
{ pkgs, ... }:
|
|
||||||
let
|
|
||||||
inherit (pkgs.uservars) font;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
programs.qutebrowser.settings.fonts =
|
|
||||||
let
|
|
||||||
mkFont = name: size: "${toString size}px ${name}";
|
|
||||||
DEF_MONO = mkFont font.mono font.size.medium;
|
|
||||||
BIG_MONO = mkFont font.mono font.size.big;
|
|
||||||
DEF_INTER = mkFont font.interface font.size.medium;
|
|
||||||
BIG_INTER = mkFont font.interface font.size.big;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
debug_console = BIG_INTER;
|
|
||||||
downloads = BIG_INTER;
|
|
||||||
hints = "bold " + BIG_MONO;
|
|
||||||
keyhint = BIG_INTER;
|
|
||||||
prompts = BIG_INTER;
|
|
||||||
statusbar = DEF_MONO;
|
|
||||||
completion = {
|
|
||||||
entry = BIG_INTER;
|
|
||||||
category = BIG_INTER;
|
|
||||||
};
|
|
||||||
messages = {
|
|
||||||
error = DEF_INTER;
|
|
||||||
info = DEF_INTER;
|
|
||||||
warning = DEF_INTER;
|
|
||||||
};
|
|
||||||
tabs = {
|
|
||||||
selected = BIG_INTER;
|
|
||||||
unselected = BIG_INTER;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,4 +1,11 @@
|
||||||
{ 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,6 +1,17 @@
|
||||||
{ config, pkgs, lib, font, ... }:
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
font,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
inherit (pkgs.uservars) key theme accent font;
|
inherit (pkgs.uservars)
|
||||||
|
key
|
||||||
|
theme
|
||||||
|
accent
|
||||||
|
font
|
||||||
|
;
|
||||||
inherit (theme) color;
|
inherit (theme) color;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
@ -42,14 +53,15 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
"#window" = {
|
"#window" = {
|
||||||
background-color = mkLiteral
|
background-color = mkLiteral "${color.bg}${lib.toHexString (theme.opacity * 255 / 100)}";
|
||||||
"${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" = { margin = mkLiteral "10px"; };
|
"#inputbar" = {
|
||||||
|
margin = mkLiteral "10px";
|
||||||
|
};
|
||||||
"#listview" = {
|
"#listview" = {
|
||||||
# fixed-height=0;
|
# fixed-height=0;
|
||||||
border = mkLiteral "2px solid 0px 0px";
|
border = mkLiteral "2px solid 0px 0px";
|
||||||
|
@ -78,9 +90,7 @@ in
|
||||||
margin-right = mkLiteral "20px";
|
margin-right = mkLiteral "20px";
|
||||||
size = 24;
|
size = 24;
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
13
user/ssh.nix
13
user/ssh.nix
|
@ -1,6 +1,13 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{
|
||||||
let inherit (pkgs.uservars) username mail;
|
config,
|
||||||
in {
|
pkgs,
|
||||||
|
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,6 +1,16 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
inherit (pkgs.uservars) key accent font theme;
|
inherit (pkgs.uservars)
|
||||||
|
key
|
||||||
|
accent
|
||||||
|
font
|
||||||
|
theme
|
||||||
|
;
|
||||||
inherit (theme) color;
|
inherit (theme) color;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
@ -21,6 +31,7 @@ in
|
||||||
|
|
||||||
wayland.windowManager.sway = {
|
wayland.windowManager.sway = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
package = pkgs.mySway;
|
||||||
config = {
|
config = {
|
||||||
bars = [ ];
|
bars = [ ];
|
||||||
|
|
||||||
|
@ -41,7 +52,13 @@ 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 border background text indicator childBorder;
|
inherit
|
||||||
|
border
|
||||||
|
background
|
||||||
|
text
|
||||||
|
indicator
|
||||||
|
childBorder
|
||||||
|
;
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
@ -78,9 +95,7 @@ in
|
||||||
};
|
};
|
||||||
# setup cursor based on home.pointerCursor
|
# setup cursor based on home.pointerCursor
|
||||||
seat."*" = {
|
seat."*" = {
|
||||||
xcursor_theme = "${config.home.pointerCursor.name} ${
|
xcursor_theme = "${config.home.pointerCursor.name} ${toString config.home.pointerCursor.size}";
|
||||||
toString config.home.pointerCursor.size
|
|
||||||
}";
|
|
||||||
hide_cursor = "when-typing enable";
|
hide_cursor = "when-typing enable";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -105,7 +120,7 @@ in
|
||||||
xdg.configFile."OpenTabletDriver/settings.json".source = ./open-tablet-driver.json;
|
xdg.configFile."OpenTabletDriver/settings.json".source = ./open-tablet-driver.json;
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
sway
|
mySway
|
||||||
swaybg
|
swaybg
|
||||||
swaylock
|
swaylock
|
||||||
wdisplays
|
wdisplays
|
||||||
|
@ -131,7 +146,10 @@ in
|
||||||
grim
|
grim
|
||||||
swappy
|
swappy
|
||||||
(tesseract5.override {
|
(tesseract5.override {
|
||||||
enableLanguages = [ "eng" "por" ];
|
enableLanguages = [
|
||||||
|
"eng"
|
||||||
|
"por"
|
||||||
|
];
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,6 +1,16 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
inherit (pkgs.uservars) key accent font theme;
|
inherit (pkgs.uservars)
|
||||||
|
key
|
||||||
|
accent
|
||||||
|
font
|
||||||
|
theme
|
||||||
|
;
|
||||||
inherit (theme) color;
|
inherit (theme) color;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
@ -26,11 +36,13 @@ in
|
||||||
{
|
{
|
||||||
profile = {
|
profile = {
|
||||||
name = "nomad";
|
name = "nomad";
|
||||||
outputs = [{
|
outputs = [
|
||||||
criteria = "eDP-1";
|
{
|
||||||
status = "enable";
|
criteria = "eDP-1";
|
||||||
position = "1920,312";
|
status = "enable";
|
||||||
}];
|
position = "1920,312";
|
||||||
|
}
|
||||||
|
];
|
||||||
exec = [ "xrdb .Xresources" ];
|
exec = [ "xrdb .Xresources" ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,16 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
inherit (pkgs.uservars) key accent font theme;
|
inherit (pkgs.uservars)
|
||||||
|
key
|
||||||
|
accent
|
||||||
|
font
|
||||||
|
theme
|
||||||
|
;
|
||||||
inherit (theme) color;
|
inherit (theme) color;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
@ -48,6 +58,8 @@ in
|
||||||
ExecStart = "${pkgs.mako}/bin/mako";
|
ExecStart = "${pkgs.mako}/bin/mako";
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
};
|
};
|
||||||
Install = { WantedBy = [ "sway-session.target" ]; };
|
Install = {
|
||||||
|
WantedBy = [ "sway-session.target" ];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,26 +1,22 @@
|
||||||
{ 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 = {
|
||||||
"2" = [
|
"2" = [
|
||||||
{ class = "qutebrowser"; }
|
|
||||||
{ app_id = "qutebrowser"; }
|
|
||||||
{ class = "firefox"; }
|
{ class = "firefox"; }
|
||||||
{ app_id = "firefox"; }
|
{ app_id = "firefox"; }
|
||||||
{ class = "Chromium"; }
|
{ class = "Chromium"; }
|
||||||
|
|
|
@ -1,6 +1,11 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
let
|
let
|
||||||
inherit (pkgs.uservars) key accent font theme;
|
inherit (pkgs.uservars)
|
||||||
|
key
|
||||||
|
accent
|
||||||
|
font
|
||||||
|
theme
|
||||||
|
;
|
||||||
inherit (theme) color;
|
inherit (theme) color;
|
||||||
inherit (pkgs) lib;
|
inherit (pkgs) lib;
|
||||||
|
|
||||||
|
@ -21,29 +26,27 @@ 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) (i:
|
workspace_binds = lib.forEachMerge (lib.range 1 10) (
|
||||||
|
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}" =
|
"${mod}+Shift+${key}" = "move container to workspace number ${workspaceNumber}";
|
||||||
"move container to workspace number ${workspaceNumber}";
|
}
|
||||||
});
|
);
|
||||||
|
|
||||||
prev_next_binds =
|
prev_next_binds =
|
||||||
let
|
let
|
||||||
maybe_window = key:
|
maybe_window = key: if (lib.strings.hasInfix "button" key) then "--whole-window" else "";
|
||||||
if (lib.strings.hasInfix "button" key) then
|
makePrevNextBindFunction = (
|
||||||
"--whole-window"
|
prev_or_next:
|
||||||
else
|
|
||||||
"";
|
|
||||||
makePrevNextBindFunction = (prev_or_next:
|
|
||||||
map (key: {
|
map (key: {
|
||||||
"${maybe_window key} ${mod}+${key}" =
|
"${maybe_window key} ${mod}+${key}" = "workspace ${prev_or_next}_on_output";
|
||||||
"workspace ${prev_or_next}_on_output";
|
})
|
||||||
}));
|
);
|
||||||
prev_binds = makePrevNextBindFunction "prev" [
|
prev_binds = makePrevNextBindFunction "prev" [
|
||||||
key.tabL
|
key.tabL
|
||||||
"bracketleft"
|
"bracketleft"
|
||||||
|
@ -67,36 +70,51 @@ 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 = [ "Left" "Up" "Right" "Down" ];
|
directions = [
|
||||||
|
"Left"
|
||||||
|
"Up"
|
||||||
|
"Right"
|
||||||
|
"Down"
|
||||||
|
];
|
||||||
makeVimKeys = (k: key.${lib.toLower k});
|
makeVimKeys = (k: key.${lib.toLower k});
|
||||||
makeArrowKeys = (k: k);
|
makeArrowKeys = (k: k);
|
||||||
makeResizeCommand = direction:
|
makeResizeCommand =
|
||||||
|
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 [ makeVimKeys makeArrowKeys ] (prefixFun:
|
lib.forEachMerge
|
||||||
lib.forEachMerge directions (direction:
|
[
|
||||||
let
|
makeVimKeys
|
||||||
resize_cmd = makeResizeCommand direction;
|
makeArrowKeys
|
||||||
keyBind = prefixFun direction;
|
]
|
||||||
in
|
(
|
||||||
{
|
prefixFun:
|
||||||
# Move focus
|
lib.forEachMerge directions (
|
||||||
"${mod}+${keyBind}" = "focus ${direction}";
|
direction:
|
||||||
# Move window
|
let
|
||||||
"${mod}+Shift+${keyBind}" = "move ${direction}";
|
resize_cmd = makeResizeCommand direction;
|
||||||
# Resize window
|
keyBind = prefixFun direction;
|
||||||
"${mod}+Control+${keyBind}" = "resize ${resize_cmd}";
|
in
|
||||||
# focus output
|
{
|
||||||
"${mod}+mod1+${keyBind}" = "focus output ${direction}";
|
# Move focus
|
||||||
# Move workspace to output
|
"${mod}+${keyBind}" = "focus ${direction}";
|
||||||
"${mod}+mod1+Shift+${keyBind}" =
|
# Move window
|
||||||
"move workspace output ${direction}";
|
"${mod}+Shift+${keyBind}" = "move ${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";
|
||||||
|
@ -116,8 +134,7 @@ 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 =
|
XF86AudioMicMute = "exec pactl set-source-mute @DEFAULT_SOURCE@ toggle";
|
||||||
"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";
|
||||||
|
@ -136,8 +153,7 @@ 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" =
|
"Control+Shift+Print" = "exec ${pkgs.screenshotsh}/bin/screenshotsh area-clip";
|
||||||
"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";
|
||||||
};
|
};
|
||||||
|
@ -155,8 +171,7 @@ 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" =
|
"${mod}+escape" = "mode passthrough;exec notify-send 'Passthrough on'";
|
||||||
"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,6 +1,11 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
let
|
let
|
||||||
inherit (pkgs.uservars) key accent font theme;
|
inherit (pkgs.uservars)
|
||||||
|
key
|
||||||
|
accent
|
||||||
|
font
|
||||||
|
theme
|
||||||
|
;
|
||||||
inherit (theme) color;
|
inherit (theme) color;
|
||||||
inherit (pkgs) lib;
|
inherit (pkgs) lib;
|
||||||
|
|
||||||
|
@ -8,10 +13,8 @@ let
|
||||||
menu = "wlauncher";
|
menu = "wlauncher";
|
||||||
terminal = "alacritty";
|
terminal = "alacritty";
|
||||||
|
|
||||||
locked =
|
locked = lib.mapAttrs' (k: v: lib.nameValuePair "--locked ${k}" v);
|
||||||
lib.mapAttrs' (k: v: lib.nameValuePair "--locked ${k}" v);
|
to-code = lib.mapAttrs' (k: v: lib.nameValuePair "--to-code ${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";
|
||||||
|
|
||||||
|
@ -20,20 +23,32 @@ in
|
||||||
{
|
{
|
||||||
wayland.windowManager.sway.config.modes = {
|
wayland.windowManager.sway.config.modes = {
|
||||||
audio =
|
audio =
|
||||||
(bind_group [ to-code locked ] {
|
(bind_group
|
||||||
${key.tabR} = "exec volumesh -i 10";
|
[
|
||||||
${key.tabL} = "exec volumesh -d 10";
|
to-code
|
||||||
${key.right} = "exec mpc next";
|
locked
|
||||||
${key.left} = "exec mpc prev";
|
]
|
||||||
${key.up} = "exec volumesh --mpd -i 10";
|
{
|
||||||
${key.down} = "exec volumesh --mpd -d 10";
|
${key.tabR} = "exec volumesh -i 10";
|
||||||
}) //
|
${key.tabL} = "exec volumesh -d 10";
|
||||||
(bind_group [ locked quit-mode ] {
|
${key.right} = "exec mpc next";
|
||||||
"space" = "exec mpc toggle";
|
${key.left} = "exec mpc prev";
|
||||||
"escape" = "";
|
${key.up} = "exec volumesh --mpd -i 10";
|
||||||
"q" = "";
|
${key.down} = "exec volumesh --mpd -d 10";
|
||||||
}) //
|
}
|
||||||
(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";
|
||||||
|
|
||||||
|
@ -47,28 +62,38 @@ 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 [ to-code locked ] {
|
(bind_group
|
||||||
${key.left} = "${playerctl} previous";
|
[
|
||||||
${key.right} = "${playerctl} next";
|
to-code
|
||||||
${key.up} = "${playerctl} volume 10+";
|
locked
|
||||||
${key.down} = "${playerctl} volume 10-";
|
]
|
||||||
${key.tabR} = "${playerctl} volume 10+";
|
{
|
||||||
${key.tabL} = "${playerctl} volume 10-";
|
${key.left} = "${playerctl} previous";
|
||||||
}) //
|
${key.right} = "${playerctl} next";
|
||||||
(bind_group [ to-code quit-mode ] {
|
${key.up} = "${playerctl} volume 10+";
|
||||||
"space" = "${playerctl} play-pause";
|
${key.down} = "${playerctl} volume 10-";
|
||||||
"escape" = "";
|
${key.tabR} = "${playerctl} volume 10+";
|
||||||
"q" = "";
|
${key.tabL} = "${playerctl} volume 10-";
|
||||||
})
|
}
|
||||||
;
|
)
|
||||||
|
// (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,6 +1,16 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
inherit (pkgs.uservars) key accent font theme;
|
inherit (pkgs.uservars)
|
||||||
|
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,6 +1,16 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
inherit (pkgs.uservars) key accent font theme;
|
inherit (pkgs.uservars)
|
||||||
|
key
|
||||||
|
accent
|
||||||
|
font
|
||||||
|
theme
|
||||||
|
;
|
||||||
inherit (theme) color;
|
inherit (theme) color;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,38 +1,53 @@
|
||||||
{ config, pkgs, lib, inputs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
inherit (pkgs.uservars) theme font desktop;
|
inherit (pkgs.uservars) theme font desktop;
|
||||||
inherit (theme) color gtk_theme icon_theme cursor_theme;
|
inherit (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;
|
{
|
||||||
font = {
|
enable = true;
|
||||||
name = font.interface;
|
font = {
|
||||||
size = font.size.small;
|
name = font.interface;
|
||||||
};
|
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:";
|
|
||||||
};
|
};
|
||||||
in
|
theme = {
|
||||||
{ gtk4 = shared; gtk3 = shared; }
|
name = gtk_theme;
|
||||||
);
|
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,4 +1,5 @@
|
||||||
{ ... }: {
|
{ ... }:
|
||||||
|
{
|
||||||
services.syncthing = {
|
services.syncthing = {
|
||||||
enable = true;
|
enable = true;
|
||||||
tray = {
|
tray = {
|
||||||
|
|
|
@ -1,8 +1,12 @@
|
||||||
{ pkgs, ... }: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
_thunar-terminal
|
_thunar-terminal
|
||||||
(xfce.thunar.override {
|
(xfce.thunar.override {
|
||||||
thunarPlugins = with pkgs.xfce; [ thunar-volman thunar-archive-plugin ];
|
thunarPlugins = with pkgs.xfce; [
|
||||||
|
thunar-volman
|
||||||
|
thunar-archive-plugin
|
||||||
|
];
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue