mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 04:19:19 -08:00
refactor: restructure project to remove profiles, users, ...
This commit is contained in:
parent
cb3ae5f434
commit
53655a05fc
177 changed files with 544 additions and 2877 deletions
6
darwin/base/access.nix
Normal file
6
darwin/base/access.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
{ meta, config, ... }: {
|
||||||
|
imports = with meta; [
|
||||||
|
home.base
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -1,9 +1,8 @@
|
||||||
{ config, pkgs, lib, inputs, meta, ... }: {
|
{ config, pkgs, lib, inputs, meta, ... }: {
|
||||||
imports = with meta; [
|
imports = with meta; [
|
||||||
profiles.hardware.aarch64-darwin
|
hardware.aarch64-darwin
|
||||||
profiles.darwin
|
darwin.base
|
||||||
users.kat.darwin
|
darwin.kat
|
||||||
users.kat.dev
|
|
||||||
];
|
];
|
||||||
|
|
||||||
security.pam.enableSudoTouchIdAuth = true;
|
security.pam.enableSudoTouchIdAuth = true;
|
||||||
|
|
@ -14,6 +13,7 @@
|
||||||
"element"
|
"element"
|
||||||
"visual-studio-code"
|
"visual-studio-code"
|
||||||
"firefox"
|
"firefox"
|
||||||
|
"telegram"
|
||||||
"discord"
|
"discord"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
@ -29,7 +29,7 @@ let
|
||||||
nf-update = pkgs.writeShellScriptBin "nf-update" ''
|
nf-update = pkgs.writeShellScriptBin "nf-update" ''
|
||||||
nix flake update
|
nix flake update
|
||||||
if [[ -n $TRUSTED ]]; then
|
if [[ -n $TRUSTED ]]; then
|
||||||
nix flake lock ./trusted --update-input trusted
|
nix flake lock ./flake/trusted --update-input trusted
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
sumireko-apply = pkgs.writeShellScriptBin "sumireko-apply" ''
|
sumireko-apply = pkgs.writeShellScriptBin "sumireko-apply" ''
|
||||||
|
|
@ -45,6 +45,7 @@ with lib; pkgs.mkShell {
|
||||||
nf-update
|
nf-update
|
||||||
sumireko-apply
|
sumireko-apply
|
||||||
] ++ config.runners.lazy.nativeBuildInputs
|
] ++ config.runners.lazy.nativeBuildInputs
|
||||||
|
# ++ optional (builtins.getEnv "TRUSTED" != "") (pkgs.writeShellScriptBin "bitw" ''${pkgs.rbw-bitw}/bin/bitw -p gpg://${config.network.nodes.nixos.koishi.kw.secrets.repo.bitw.source} "$@"'')
|
||||||
++ (map
|
++ (map
|
||||||
(node: writeShellScriptBin "${node.networking.hostName}-sd-img" ''
|
(node: writeShellScriptBin "${node.networking.hostName}-sd-img" ''
|
||||||
nix build -f . network.nodes.${node.networking.hostName}.system.build.sdImage --show-trace
|
nix build -f . network.nodes.${node.networking.hostName}.system.build.sdImage --show-trace
|
||||||
|
|
|
||||||
28
flake.lock
generated
28
flake.lock
generated
|
|
@ -3,11 +3,11 @@
|
||||||
"arcexprs": {
|
"arcexprs": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1657234505,
|
"lastModified": 1657481944,
|
||||||
"narHash": "sha256-uDlulP599ZbH+Fgw317nYMfyS+vnKwIDgQevMyc/SV4=",
|
"narHash": "sha256-b9fAcaHvclH50zjwxCq972F7uKNEerkShjM5YFOm6RA=",
|
||||||
"owner": "arcnmx",
|
"owner": "arcnmx",
|
||||||
"repo": "nixexprs",
|
"repo": "nixexprs",
|
||||||
"rev": "28017bbbea8ca56691b9c7625a032c2e2dd6283a",
|
"rev": "493ec79ee75efe10f06747d83e5eaca4409a4a6c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -96,11 +96,11 @@
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1657305762,
|
"lastModified": 1657477325,
|
||||||
"narHash": "sha256-dsuJG/y2LtqyHhDEIo3d3g/+K9IqhG3qt/tf7WYheH4=",
|
"narHash": "sha256-MeTve5Xl2947w9wZRGPo6DrGvhPW2bbeqfSXNex/EG4=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "emacs-overlay",
|
"repo": "emacs-overlay",
|
||||||
"rev": "eae26b7d5fc04699078a1687185d65077bc73c96",
|
"rev": "23c09e04995402b7d97b18d72ce262cb60549df1",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -355,11 +355,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1657114324,
|
"lastModified": 1657356697,
|
||||||
"narHash": "sha256-fWuaUNXrHcz/ciHRHlcSO92dvV3EVS0GJQUSBO5JIB4=",
|
"narHash": "sha256-sT38tcx7m0Quz+Uj6jzx+yRa2+EVW2C3cE0FkROXUzQ=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "a5c867d9fe9e4380452628e8f171c26b69fa9d3d",
|
"rev": "87e7965bbcdbac3d103e3ed14ff04f719a4f7a58",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -387,11 +387,11 @@
|
||||||
},
|
},
|
||||||
"nur": {
|
"nur": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1657315594,
|
"lastModified": 1657458605,
|
||||||
"narHash": "sha256-lkAqmREtGhWwHK3wdVSfqt+Q+xUhZmQ0UZyubeMJLR4=",
|
"narHash": "sha256-WAoPHlCNTV/yXLF72D7vj+gk1yjfNBM3PmZ61sCT4co=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nur",
|
"repo": "nur",
|
||||||
"rev": "fae381cd12525fdfb5163ce0ac78c2705d5917c4",
|
"rev": "fe1f99449c93be772b31de520eebaee6feb8717e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -568,11 +568,11 @@
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1,
|
"lastModified": 1,
|
||||||
"narHash": "sha256-Q3QXOoy+iN4VK2CflvRulYvPZXYgF0dO7FoF7CvWFTA=",
|
"narHash": "sha256-Q3QXOoy+iN4VK2CflvRulYvPZXYgF0dO7FoF7CvWFTA=",
|
||||||
"path": "./empty/.",
|
"path": "./flake/empty/.",
|
||||||
"type": "path"
|
"type": "path"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"path": "./empty/.",
|
"path": "./flake/empty/.",
|
||||||
"type": "path"
|
"type": "path"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@
|
||||||
};
|
};
|
||||||
flake-utils.url = "github:numtide/flake-utils";
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
trusted = {
|
trusted = {
|
||||||
url = "path:./empty/.";
|
url = "path:./flake/empty/.";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
flake-compat = {
|
flake-compat = {
|
||||||
|
|
@ -50,7 +50,7 @@
|
||||||
providedSystems = flake-utils.lib.eachDefaultSystem
|
providedSystems = flake-utils.lib.eachDefaultSystem
|
||||||
(system:
|
(system:
|
||||||
rec {
|
rec {
|
||||||
devShell = import ./devShell.nix { inherit inputs system; };
|
devShells.default = import ./devShell.nix { inherit inputs system; };
|
||||||
legacyPackages = import ./outputs.nix { inherit inputs system; };
|
legacyPackages = import ./outputs.nix { inherit inputs system; };
|
||||||
});
|
});
|
||||||
in providedSystems // {
|
in providedSystems // {
|
||||||
|
|
|
||||||
38
trusted/flake.lock → flake/trusted/flake.lock
generated
38
trusted/flake.lock → flake/trusted/flake.lock
generated
|
|
@ -3,11 +3,11 @@
|
||||||
"arcexprs": {
|
"arcexprs": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1657234505,
|
"lastModified": 1657481944,
|
||||||
"narHash": "sha256-uDlulP599ZbH+Fgw317nYMfyS+vnKwIDgQevMyc/SV4=",
|
"narHash": "sha256-b9fAcaHvclH50zjwxCq972F7uKNEerkShjM5YFOm6RA=",
|
||||||
"owner": "arcnmx",
|
"owner": "arcnmx",
|
||||||
"repo": "nixexprs",
|
"repo": "nixexprs",
|
||||||
"rev": "28017bbbea8ca56691b9c7625a032c2e2dd6283a",
|
"rev": "493ec79ee75efe10f06747d83e5eaca4409a4a6c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -98,11 +98,11 @@
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1657305762,
|
"lastModified": 1657477325,
|
||||||
"narHash": "sha256-dsuJG/y2LtqyHhDEIo3d3g/+K9IqhG3qt/tf7WYheH4=",
|
"narHash": "sha256-MeTve5Xl2947w9wZRGPo6DrGvhPW2bbeqfSXNex/EG4=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "emacs-overlay",
|
"repo": "emacs-overlay",
|
||||||
"rev": "eae26b7d5fc04699078a1687185d65077bc73c96",
|
"rev": "23c09e04995402b7d97b18d72ce262cb60549df1",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -367,12 +367,12 @@
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 0,
|
"lastModified": 0,
|
||||||
"narHash": "sha256-FHjqiLYqBGP1qEmyNkmHIulZKiifg+K8AD1WlIW592s=",
|
"narHash": "sha256-WoNwisXEGdCMmpvIKl2ufMXkvIUboFJsImWy+a1Vqxk=",
|
||||||
"path": "/nix/store/psp2lvg1gjpy781cvvd703wrjmk27d5f-source",
|
"path": "/nix/store/1x5vxzi56ywzbw2pfnblwxy459gzm29g-source",
|
||||||
"type": "path"
|
"type": "path"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"path": "/nix/store/psp2lvg1gjpy781cvvd703wrjmk27d5f-source",
|
"path": "/nix/store/1x5vxzi56ywzbw2pfnblwxy459gzm29g-source",
|
||||||
"type": "path"
|
"type": "path"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -391,11 +391,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1657114324,
|
"lastModified": 1657356697,
|
||||||
"narHash": "sha256-fWuaUNXrHcz/ciHRHlcSO92dvV3EVS0GJQUSBO5JIB4=",
|
"narHash": "sha256-sT38tcx7m0Quz+Uj6jzx+yRa2+EVW2C3cE0FkROXUzQ=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "a5c867d9fe9e4380452628e8f171c26b69fa9d3d",
|
"rev": "87e7965bbcdbac3d103e3ed14ff04f719a4f7a58",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -423,11 +423,11 @@
|
||||||
},
|
},
|
||||||
"nur": {
|
"nur": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1657315594,
|
"lastModified": 1657458605,
|
||||||
"narHash": "sha256-lkAqmREtGhWwHK3wdVSfqt+Q+xUhZmQ0UZyubeMJLR4=",
|
"narHash": "sha256-WAoPHlCNTV/yXLF72D7vj+gk1yjfNBM3PmZ61sCT4co=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nur",
|
"repo": "nur",
|
||||||
"rev": "fae381cd12525fdfb5163ce0ac78c2705d5917c4",
|
"rev": "fe1f99449c93be772b31de520eebaee6feb8717e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -591,11 +591,11 @@
|
||||||
"trusted": {
|
"trusted": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1652985072,
|
"lastModified": 1657482041,
|
||||||
"narHash": "sha256-SHqXjkk10wMdE47jUSAuLfWIJ40L3cDP6UOiBhZKtVY=",
|
"narHash": "sha256-AEC0DO586Xq5NcYwyEBAosFj5VRSwLSPZCH5v5ri11s=",
|
||||||
"ref": "main",
|
"ref": "main",
|
||||||
"rev": "2af2d4cc2e4675a7eebbdfccd5542d306104c237",
|
"rev": "76779729b344d8427f05d9e78c76a19daa7cc2a8",
|
||||||
"revCount": 90,
|
"revCount": 92,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "ssh://git@github.com/kittywitch/nixfiles-trusted"
|
"url": "ssh://git@github.com/kittywitch/nixfiles-trusted"
|
||||||
},
|
},
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
nixfiles = {
|
nixfiles = {
|
||||||
url = "../.";
|
url = "../../.";
|
||||||
inputs.trusted.follows = "trusted";
|
inputs.trusted.follows = "trusted";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
@ -3,8 +3,6 @@
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
{
|
{
|
||||||
deploy.profile.hardware.amdgpu = true;
|
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "amdgpu" ];
|
boot.initrd.availableKernelModules = [ "amdgpu" ];
|
||||||
hardware.opengl.extraPackages = with pkgs; [ libvdpau-va-gl vaapiVdpau ];
|
hardware.opengl.extraPackages = with pkgs; [ libvdpau-va-gl vaapiVdpau ];
|
||||||
}
|
}
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
{ config, ... }:
|
{ config, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
deploy.profile.hardware.eeepc-1015pem = true;
|
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
initrd = {
|
initrd = {
|
||||||
availableKernelModules = [ "uhci_hcd" "ehci_pci" "ahci" "usb_storage" "sd_mod" ];
|
availableKernelModules = [ "uhci_hcd" "ehci_pci" "ahci" "usb_storage" "sd_mod" ];
|
||||||
|
|
@ -5,8 +5,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
{
|
{
|
||||||
deploy.profile.hardware.intel = true;
|
|
||||||
|
|
||||||
hardware.cpu.intel.updateMicrocode = true;
|
hardware.cpu.intel.updateMicrocode = true;
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
|
|
@ -7,8 +7,6 @@
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
{
|
{
|
||||||
deploy.profile.hardware.ms-7b86 = true;
|
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "sd_mod" ];
|
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "sd_mod" ];
|
||||||
boot.kernelModules = [ "nct6775" ];
|
boot.kernelModules = [ "nct6775" ];
|
||||||
}
|
}
|
||||||
|
|
@ -2,10 +2,6 @@
|
||||||
profiles = tree.prev;
|
profiles = tree.prev;
|
||||||
appendedProfiles = with profiles; {
|
appendedProfiles = with profiles; {
|
||||||
ubuntu = { config, ... }: {
|
ubuntu = { config, ... }: {
|
||||||
deploy.profile.hardware.oracle = {
|
|
||||||
ubuntu = true;
|
|
||||||
common = true;
|
|
||||||
};
|
|
||||||
kw.oci.base = "Canonical Ubuntu";
|
kw.oci.base = "Canonical Ubuntu";
|
||||||
imports = with import (inputs.tf-nix + "/modules"); [
|
imports = with import (inputs.tf-nix + "/modules"); [
|
||||||
nixos.ubuntu-linux
|
nixos.ubuntu-linux
|
||||||
|
|
@ -13,10 +9,6 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
oracle = { config, ... }: {
|
oracle = { config, ... }: {
|
||||||
deploy.profile.hardware.oracle = {
|
|
||||||
oracle = true;
|
|
||||||
common = true;
|
|
||||||
};
|
|
||||||
kw.oci.base = "Oracle Linux";
|
kw.oci.base = "Oracle Linux";
|
||||||
imports = with import (inputs.tf-nix + "/modules"); [
|
imports = with import (inputs.tf-nix + "/modules"); [
|
||||||
nixos.oracle-linux
|
nixos.oracle-linux
|
||||||
|
|
@ -5,8 +5,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
{
|
{
|
||||||
deploy.profile.hardware.rm-310 = true;
|
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "ata_generic" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
boot.initrd.availableKernelModules = [ "ata_generic" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||||
boot.initrd.kernelModules = [ ];
|
boot.initrd.kernelModules = [ ];
|
||||||
boot.kernelModules = [ ];
|
boot.kernelModules = [ ];
|
||||||
|
|
@ -34,8 +34,6 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
deploy.profile.hardware.ryzen = true;
|
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
kernelModules = [
|
kernelModules = [
|
||||||
"msr"
|
"msr"
|
||||||
|
|
@ -20,7 +20,6 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
deploy.profile.hardware.wifi = true;
|
|
||||||
networking.wireless = {
|
networking.wireless = {
|
||||||
enable = true;
|
enable = true;
|
||||||
networks = mkIf (builtins.getEnv "TF_IN_AUTOMATION" != "" || tf.state.enable) {
|
networks = mkIf (builtins.getEnv "TF_IN_AUTOMATION" != "" || tf.state.enable) {
|
||||||
|
|
@ -34,8 +34,6 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
deploy.profile.hardware.x270 = true;
|
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
initrd.availableKernelModules =
|
initrd.availableKernelModules =
|
||||||
[ "xhci_pci" "nvme" "usb_storage" "sd_mod" "sr_mod" "rtsx_usb_sdmmc" ];
|
[ "xhci_pci" "nvme" "usb_storage" "sd_mod" "sr_mod" "rtsx_usb_sdmmc" ];
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
{ config, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
kw.theme.enable = true;
|
||||||
|
|
||||||
base16 = {
|
base16 = {
|
||||||
shell.enable = true;
|
shell.enable = true;
|
||||||
schemes = [ "atelier.atelier-cave" "atelier.atelier-cave-light" ];
|
schemes = [ "atelier.atelier-cave" "atelier.atelier-cave-light" ];
|
||||||
3
home/dconf.nix
Normal file
3
home/dconf.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{ config, lib, ... }: {
|
||||||
|
dconf.enable = lib.mkDefault false;
|
||||||
|
}
|
||||||
48
home/default.nix
Normal file
48
home/default.nix
Normal file
|
|
@ -0,0 +1,48 @@
|
||||||
|
{ lib, tree, ... }: let
|
||||||
|
wrapImports = imports: lib.mapAttrs
|
||||||
|
(_: paths: { config, ... }: {
|
||||||
|
config.home-manager.users.kat = {
|
||||||
|
imports = lib.singleton paths;
|
||||||
|
};
|
||||||
|
})
|
||||||
|
imports;
|
||||||
|
dirImports = wrapImports tree.prev;
|
||||||
|
serviceImports = wrapImports tree.prev.services;
|
||||||
|
in
|
||||||
|
dirImports // {
|
||||||
|
base = {
|
||||||
|
imports = with dirImports; [
|
||||||
|
base16
|
||||||
|
shell
|
||||||
|
vim
|
||||||
|
secrets
|
||||||
|
state
|
||||||
|
dconf
|
||||||
|
];
|
||||||
|
};
|
||||||
|
gui = {
|
||||||
|
imports = with dirImports; [
|
||||||
|
gui
|
||||||
|
firefox
|
||||||
|
konawall
|
||||||
|
ranger
|
||||||
|
xkb
|
||||||
|
kitty
|
||||||
|
gpg
|
||||||
|
sway
|
||||||
|
mako
|
||||||
|
gammastep
|
||||||
|
wofi
|
||||||
|
waybar
|
||||||
|
xdg
|
||||||
|
fonts
|
||||||
|
media
|
||||||
|
obs
|
||||||
|
mpv
|
||||||
|
syncplay
|
||||||
|
gtk
|
||||||
|
qt
|
||||||
|
];
|
||||||
|
};
|
||||||
|
services = serviceImports;
|
||||||
|
}
|
||||||
174
home/firefox/default.nix
Normal file
174
home/firefox/default.nix
Normal file
|
|
@ -0,0 +1,174 @@
|
||||||
|
{ config, lib, pkgs, nixos, kw, ... }: with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
commonSettings = {
|
||||||
|
"app.update.auto" = false;
|
||||||
|
"identity.fxaccounts.account.device.name" = nixos.networking.hostName;
|
||||||
|
"browser.download.lastDir" = "/home/kat/downloads";
|
||||||
|
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
|
||||||
|
"svg.context-properties.content.enabled" = true;
|
||||||
|
"services.sync.engine.prefs" = false;
|
||||||
|
"services.sync.engine.prefs.modified" = false;
|
||||||
|
"services.sync.engine.passwords" = false;
|
||||||
|
"services.sync.declinedEngines" = "passwords,adblockplus,prefs";
|
||||||
|
"media.eme.enabled" = true; # whee drm
|
||||||
|
"gfx.webrender.all.qualified" = true;
|
||||||
|
"gfx.webrender.all" = true;
|
||||||
|
"layers.acceleration.force-enabled" = true;
|
||||||
|
"gfx.canvas.azure.accelerated" = true;
|
||||||
|
"browser.ctrlTab.recentlyUsedOrder" = false;
|
||||||
|
"privacy.resistFingerprinting.block_mozAddonManager" = true;
|
||||||
|
"extensions.webextensions.restrictedDomains" = "";
|
||||||
|
"tridactyl.unfixedamo" = true;
|
||||||
|
"tridactyl.unfixedamo_removed" = true;
|
||||||
|
"browser.shell.checkDefaultBrowser" = false;
|
||||||
|
"spellchecker.dictionary" = "en-CA";
|
||||||
|
"ui.context_menus.after_mouseup" = true;
|
||||||
|
"browser.warnOnQuit" = false;
|
||||||
|
"browser.quitShortcut.disabled" = true;
|
||||||
|
"browser.startup.homepage" = "about:blank";
|
||||||
|
"browser.contentblocking.category" = "strict";
|
||||||
|
"browser.discovery.enabled" = false;
|
||||||
|
"browser.tabs.multiselect" = true;
|
||||||
|
"browser.tabs.unloadOnLowMemory" = true;
|
||||||
|
"browser.newtab.privateAllowed" = true;
|
||||||
|
"browser.newtabpage.enabled" = false;
|
||||||
|
"browser.urlbar.placeholderName" = "";
|
||||||
|
"extensions.privatebrowsing.notification" = false;
|
||||||
|
"browser.startup.page" = 3;
|
||||||
|
"devtools.chrome.enabled" = true;
|
||||||
|
"devtools.inspector.showUserAgentStyles" = true;
|
||||||
|
"services.sync.prefs.sync.privacy.donottrackheader.value" = false;
|
||||||
|
"services.sync.prefs.sync.browser.safebrowsing.malware.enabled" = false;
|
||||||
|
"services.sync.prefs.sync.browser.safebrowsing.phishing.enabled" = false;
|
||||||
|
"app.shield.optoutstudies.enabled" = true;
|
||||||
|
"datareporting.healthreport.uploadEnabled" = false;
|
||||||
|
"datareporting.policy.dataSubmissionEnabled" = false;
|
||||||
|
"datareporting.sessions.current.clean" = true;
|
||||||
|
"devtools.onboarding.telemetry.logged" = false;
|
||||||
|
"toolkit.telemetry.updatePing.enabled" = false;
|
||||||
|
"browser.ping-centre.telemetry" = false;
|
||||||
|
"browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons" = false;
|
||||||
|
"browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features" = false;
|
||||||
|
"toolkit.telemetry.bhrPing.enabled" = false;
|
||||||
|
"toolkit.telemetry.enabled" = false;
|
||||||
|
"toolkit.telemetry.firstShutdownPing.enabled" = false;
|
||||||
|
"toolkit.telemetry.hybridContent.enabled" = false;
|
||||||
|
"toolkit.telemetry.newProfilePing.enabled" = false;
|
||||||
|
"toolkit.telemetry.reportingpolicy.firstRun" = false;
|
||||||
|
"toolkit.telemetry.shutdownPingSender.enabled" = false;
|
||||||
|
"toolkit.telemetry.unified" = false;
|
||||||
|
"toolkit.telemetry.server" = "";
|
||||||
|
"toolkit.telemetry.archive.enabled" = false;
|
||||||
|
"browser.onboarding.enabled" = false;
|
||||||
|
"experiments.enabled" = false;
|
||||||
|
"network.allow-experiments" = false;
|
||||||
|
"social.directories" = "";
|
||||||
|
"social.remote-install.enabled" = false;
|
||||||
|
"social.toast-notifications.enabled" = false;
|
||||||
|
"social.whitelist" = "";
|
||||||
|
"browser.safebrowsing.malware.enabled" = false;
|
||||||
|
"browser.safebrowsing.blockedURIs.enabled" = false;
|
||||||
|
"browser.safebrowsing.downloads.enabled" = false;
|
||||||
|
"browser.safebrowsing.downloads.remote.enabled" = false;
|
||||||
|
"browser.safebrowsing.phishing.enabled" = false;
|
||||||
|
"dom.ipc.plugins.reportCrashURL" = false;
|
||||||
|
"breakpad.reportURL" = "";
|
||||||
|
"beacon.enabled" = false;
|
||||||
|
"browser.search.geoip.url" = "";
|
||||||
|
"browser.search.region" = "UK";
|
||||||
|
"browser.search.suggest.enabled" = true;
|
||||||
|
"browser.search.update" = false;
|
||||||
|
"browser.selfsupport.url" = "";
|
||||||
|
"extensions.getAddons.cache.enabled" = false;
|
||||||
|
"extensions.pocket.enabled" = true;
|
||||||
|
"geo.enabled" = false;
|
||||||
|
"geo.wifi.uri" = false;
|
||||||
|
"media.getusermedia.screensharing.enabled" = false;
|
||||||
|
"media.video_stats.enabled" = false;
|
||||||
|
"device.sensors.enabled" = false;
|
||||||
|
"dom.battery.enabled" = false;
|
||||||
|
"dom.enable_performance" = false;
|
||||||
|
"network.dns.disablePrefetch" = false;
|
||||||
|
"network.http.speculative-parallel-limit" = 8;
|
||||||
|
"network.predictor.cleaned-up" = true;
|
||||||
|
"network.predictor.enabled" = true;
|
||||||
|
"network.prefetch-next" = true;
|
||||||
|
"security.dialog_enable_delay" = 300;
|
||||||
|
"dom.event.contextmenu.enabled" = false;
|
||||||
|
"privacy.trackingprotection.enabled" = true;
|
||||||
|
"privacy.trackingprotection.fingerprinting.enabled" = true;
|
||||||
|
"privacy.trackingprotection.cryptomining.enabled" = true;
|
||||||
|
"privacy.trackingprotection.introCount" = 20;
|
||||||
|
"signon.rememberSignons" = false;
|
||||||
|
"xpinstall.whitelist.required" = false;
|
||||||
|
"xpinstall.signatures.required" = false;
|
||||||
|
"general.warnOnAboutConfig" = false;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
home.file.".mozilla/tst.css" = { inherit (kw.sassTemplate { name = "tst"; src = ./tst.sass; }) source; };
|
||||||
|
|
||||||
|
programs.zsh.shellAliases = {
|
||||||
|
ff-pm = "firefox --ProfileManager";
|
||||||
|
ff-main = "firefox -P main";
|
||||||
|
};
|
||||||
|
|
||||||
|
home.sessionVariables = {
|
||||||
|
XDG_CURRENT_DESKTOP = "sway";
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.firefox = {
|
||||||
|
enable = true;
|
||||||
|
packageUnwrapped = pkgs.firefox-unwrapped;
|
||||||
|
wrapperConfig = {
|
||||||
|
extraPolicies = {
|
||||||
|
DisableAppUpdate = true;
|
||||||
|
};
|
||||||
|
extraNativeMessagingHosts = with pkgs; [
|
||||||
|
tridactyl-native
|
||||||
|
] ++ optional config.programs.buku.enable bukubrow;
|
||||||
|
};
|
||||||
|
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
|
||||||
|
sponsorblock
|
||||||
|
link-cleaner
|
||||||
|
a11ycss
|
||||||
|
canvasblocker
|
||||||
|
view-image
|
||||||
|
wappalyzer
|
||||||
|
auto-tab-discard
|
||||||
|
bitwarden
|
||||||
|
darkreader
|
||||||
|
decentraleyes
|
||||||
|
foxyproxy-standard
|
||||||
|
clearurls
|
||||||
|
df-youtube
|
||||||
|
tridactyl
|
||||||
|
old-reddit-redirect
|
||||||
|
privacy-badger
|
||||||
|
reddit-enhancement-suite
|
||||||
|
refined-github
|
||||||
|
stylus
|
||||||
|
temporary-containers
|
||||||
|
browserpass
|
||||||
|
tree-style-tab
|
||||||
|
multi-account-containers
|
||||||
|
ublock-origin
|
||||||
|
violentmonkey
|
||||||
|
];
|
||||||
|
profiles = {
|
||||||
|
main = {
|
||||||
|
id = 0;
|
||||||
|
isDefault = true;
|
||||||
|
settings = commonSettings;
|
||||||
|
userChrome = (kw.sassTemplate { name = "userChrome"; src = ./userChrome.sass; }).text;
|
||||||
|
containers.identities = [
|
||||||
|
{ id = 7; name = "Professional"; icon = "briefcase"; color = "red"; }
|
||||||
|
{ id = 8; name = "Shopping"; icon = "cart"; color = "pink"; }
|
||||||
|
{ id = 9; name = "Sensitive"; icon = "gift"; color = "orange"; }
|
||||||
|
{ id = 10; name = "Private"; icon = "fence"; color = "blue"; }
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
3
home/fonts.nix
Normal file
3
home/fonts.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{ config, pkgs, lib, ... }: {
|
||||||
|
fonts.fontconfig.enable = true;
|
||||||
|
}
|
||||||
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
_1password
|
|
||||||
btop
|
btop
|
||||||
bitwarden
|
bitwarden
|
||||||
discord
|
discord
|
||||||
|
|
@ -13,13 +12,10 @@
|
||||||
tdesktop
|
tdesktop
|
||||||
headsetcontrol
|
headsetcontrol
|
||||||
transmission-remote-gtk
|
transmission-remote-gtk
|
||||||
scrcpy
|
|
||||||
lm_sensors
|
lm_sensors
|
||||||
p7zip
|
p7zip
|
||||||
zip
|
zip
|
||||||
unzip
|
unzip
|
||||||
nyxt
|
|
||||||
baresip
|
|
||||||
yubikey-manager
|
yubikey-manager
|
||||||
jmtpfs
|
jmtpfs
|
||||||
element-desktop
|
element-desktop
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
{ config, pkgs, nixos, lib, ... }:
|
{ config, pkgs, nixos, lib, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
{
|
{
|
||||||
services.konawall = {
|
services.konawall = {
|
||||||
|
|
@ -8,7 +7,7 @@ with lib;
|
||||||
interval = "30m";
|
interval = "30m";
|
||||||
mode = "shuffle";
|
mode = "shuffle";
|
||||||
commonTags = [ "width:>=1600" ];
|
commonTags = [ "width:>=1600" ];
|
||||||
tagList = map (toList) [
|
tagList = map (lib.toList) [
|
||||||
(["score:>=50"
|
(["score:>=50"
|
||||||
"touhou" "rating:s"]) #++ optional (nixos.networking.hostName == "koishi") "rating:s")
|
"touhou" "rating:s"]) #++ optional (nixos.networking.hostName == "koishi") "rating:s")
|
||||||
];
|
];
|
||||||
12
home/shell/bitw.nix
Normal file
12
home/shell/bitw.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
{ config, pkgs, meta, lib, ... }: {
|
||||||
|
programs.rbw = {
|
||||||
|
enable = true;
|
||||||
|
package = lib.mkIf (meta.trusted ? secrets) (pkgs.writeShellScriptBin "bitw" ''${pkgs.rbw-bitw}/bin/bitw -p gpg://${config.kw.secrets.repo.bitw.source} "$@"'');
|
||||||
|
settings = {
|
||||||
|
email = "kat@kittywit.ch";
|
||||||
|
base_url = "https://vault.kittywit.ch";
|
||||||
|
identity_url = null;
|
||||||
|
lock_timeout = 3600;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
6
home/shell/direnv.nix
Normal file
6
home/shell/direnv.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
{ config, ... }: {
|
||||||
|
programs.direnv = {
|
||||||
|
enable = true;
|
||||||
|
enableZshIntegration = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
11
home/shell/exa.nix
Normal file
11
home/shell/exa.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
{ config, pkgs, ... }: {
|
||||||
|
home.packages = [ pkgs.exa ];
|
||||||
|
|
||||||
|
programs.zsh.shellAliases = {
|
||||||
|
exa = "exa --time-style long-iso";
|
||||||
|
ls = "exa -G";
|
||||||
|
la = "exa -Ga";
|
||||||
|
ll = "exa -l";
|
||||||
|
lla = "exa -lga";
|
||||||
|
};
|
||||||
|
}
|
||||||
10
home/shell/fzf.nix
Normal file
10
home/shell/fzf.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
{ config, pkgs, lib, ... }: {
|
||||||
|
programs.fzf = {
|
||||||
|
enable = true;
|
||||||
|
enableZshIntegration = true;
|
||||||
|
};
|
||||||
|
programs.zsh.plugins = lib.optional (pkgs.hostPlatform == pkgs.buildPlatform) ({
|
||||||
|
name = "fzf-tab";
|
||||||
|
src = "${pkgs.zsh-fzf-tab}/share/fzf-tab";
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
@ -1,7 +1,14 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
gitAndTools.gitRemoteGcrypt
|
||||||
|
git-crypt
|
||||||
|
git-revise
|
||||||
|
];
|
||||||
|
|
||||||
programs.git = {
|
programs.git = {
|
||||||
|
package = pkgs.gitAndTools.gitFull;
|
||||||
enable = true;
|
enable = true;
|
||||||
userName = "Kat Inskip";
|
userName = "Kat Inskip";
|
||||||
userEmail = "kat@inskip.me";
|
userEmail = "kat@inskip.me";
|
||||||
31
home/shell/packages.nix
Normal file
31
home/shell/packages.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
{ config, pkgs, ... }: {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
# disk usage
|
||||||
|
duc-cli
|
||||||
|
# nix formatting
|
||||||
|
nixpkgs-fmt
|
||||||
|
# show type of files
|
||||||
|
file
|
||||||
|
# command monitoring
|
||||||
|
progress
|
||||||
|
pv
|
||||||
|
# cat but better
|
||||||
|
bat
|
||||||
|
# ls replacement
|
||||||
|
exa
|
||||||
|
# sed replacement
|
||||||
|
sd
|
||||||
|
# find replacement
|
||||||
|
fd
|
||||||
|
# ripgrep / grep replacement
|
||||||
|
ripgrep
|
||||||
|
# remote tmux
|
||||||
|
tmate
|
||||||
|
# remote utilities
|
||||||
|
socat
|
||||||
|
rsync
|
||||||
|
wget
|
||||||
|
dnsutils
|
||||||
|
whois
|
||||||
|
];
|
||||||
|
}
|
||||||
6
home/shell/starship.nix
Normal file
6
home/shell/starship.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
{ config, ... }: {
|
||||||
|
programs.starship = {
|
||||||
|
enable = true;
|
||||||
|
enableZshIntegration = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
{
|
{
|
||||||
programs.zsh.shellAliases = {
|
programs.zsh.shellAliases = {
|
||||||
tt = "tmux new -AD -s";
|
tt = "tmux new -AD -s";
|
||||||
|
|
@ -11,7 +9,7 @@ with lib;
|
||||||
terminal = "tmux-256color";
|
terminal = "tmux-256color";
|
||||||
keyMode = "vi";
|
keyMode = "vi";
|
||||||
baseIndex = 1;
|
baseIndex = 1;
|
||||||
extraConfig = with mapAttrs (_: v: "colour${toString v}") pkgs.base16.shell.shell256; ''
|
extraConfig = with lib.mapAttrs (_: v: "colour${toString v}") pkgs.base16.shell.shell256; ''
|
||||||
# proper title handling
|
# proper title handling
|
||||||
set -g set-titles on
|
set -g set-titles on
|
||||||
set -g set-titles-string "#T"
|
set -g set-titles-string "#T"
|
||||||
16
home/shell/z.nix
Normal file
16
home/shell/z.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
{ config, pkgs, ... }: {
|
||||||
|
# ensure .local/share/z is created
|
||||||
|
xdg.dataFile."z/.keep".text = "";
|
||||||
|
|
||||||
|
programs.zsh = {
|
||||||
|
localVariables = {
|
||||||
|
_Z_DATA = "${config.xdg.dataHome}/z/data";
|
||||||
|
};
|
||||||
|
plugins = (map (plugin: (with pkgs.${plugin}; {
|
||||||
|
name = pname;
|
||||||
|
inherit src;
|
||||||
|
})) [
|
||||||
|
"zsh-z"
|
||||||
|
]);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,33 +1,12 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
let
|
|
||||||
shellFunAlias = command: replacement: ''
|
|
||||||
if [[ ! -t 0 ]]; then
|
|
||||||
command ${command} $@
|
|
||||||
else
|
|
||||||
echo 'use ${replacement}!'
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
shellFunAliases = mapAttrs shellFunAlias;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
home.shell.functions = {
|
|
||||||
genmac = ''
|
home.packages = with pkgs; [
|
||||||
nix run nixpkgs.openssl -c openssl rand -hex 6 | sed 's/\(..\)\(..\)\(..\)\(..\)\(..\)\(..\)/\1:\2:\3:\4:\5:\6/'
|
# programs.zsh.enableAutosuggestions only includes nix-zsh-autocompletions
|
||||||
'';
|
zsh-completions
|
||||||
getAlias = ''
|
];
|
||||||
printf '%s\n' $aliases[$1]
|
|
||||||
'';
|
|
||||||
} // shellFunAliases {
|
|
||||||
sed = "sd";
|
|
||||||
find = "fd";
|
|
||||||
grep = "rg";
|
|
||||||
yes = "me instead";
|
|
||||||
};
|
|
||||||
xdg.dataFile = { "z/.keep".text = ""; };
|
|
||||||
home.packages = with pkgs; [ fzf fd zsh-completions ];
|
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableSyntaxHighlighting = true;
|
enableSyntaxHighlighting = true;
|
||||||
|
|
@ -57,12 +36,12 @@ in
|
||||||
"listrowsfirst"
|
"listrowsfirst"
|
||||||
]; in
|
]; in
|
||||||
''
|
''
|
||||||
${if pkgs.stdenv.system != "aarch64-darwin" then ''
|
${if lib.hasSuffix "darwin" pkgs.stdenv.system then ''
|
||||||
eval $(dircolors)
|
eval $(dircolors)
|
||||||
'' else ''
|
'' else ''
|
||||||
''}
|
''}
|
||||||
PROMPT_EOL_MARK='''
|
PROMPT_EOL_MARK='''
|
||||||
ZSH_TAB_TITLE_ADDITIONAL_TERMS='foot'
|
ZSH_TAB_TITLE_ADDITIONAL_TERMS='kitty'
|
||||||
ZSH_TAB_TITLE_ENABLE_FULL_COMMAND=true
|
ZSH_TAB_TITLE_ENABLE_FULL_COMMAND=true
|
||||||
zmodload -i zsh/complist
|
zmodload -i zsh/complist
|
||||||
h=()
|
h=()
|
||||||
|
|
@ -87,24 +66,22 @@ in
|
||||||
${lib.concatStringsSep "\n" (map (opt: "setopt ${opt}") zshOpts)}
|
${lib.concatStringsSep "\n" (map (opt: "setopt ${opt}") zshOpts)}
|
||||||
bindkey '^ ' autosuggest-accept
|
bindkey '^ ' autosuggest-accept
|
||||||
'';
|
'';
|
||||||
shellAliases = {
|
shellAliases = lib.mkMerge [
|
||||||
nixdirfmt = "nixpkgs-fmt $(fd -e nix)";
|
{
|
||||||
exa = "exa --time-style long-iso";
|
nixdirfmt = "nixpkgs-fmt $(fd -e nix)";
|
||||||
ls = "exa -G";
|
dmesg = "dmesg -HP";
|
||||||
la = "exa -Ga";
|
hg = "history 0 | rg";
|
||||||
ll = "exa -l";
|
}
|
||||||
lla = "exa -lga";
|
(lib.mkIf (lib.hasSuffix "linux" pkgs.stdenv.system) {
|
||||||
sys = "systemctl";
|
sys = "systemctl";
|
||||||
sysu = "systemctl --user";
|
sysu = "systemctl --user";
|
||||||
walls = "journalctl _SYSTEMD_INVOCATION_ID=$(systemctl show -p InvocationID --value konawall.service --user) -o json | jq -r '.MESSAGE'";
|
walls = "journalctl _SYSTEMD_INVOCATION_ID=$(systemctl show -p InvocationID --value konawall.service --user) -o json | jq -r '.MESSAGE'";
|
||||||
logu = "journalctl --user";
|
logu = "journalctl --user";
|
||||||
log = "journalctl";
|
log = "journalctl";
|
||||||
dmesg = "dmesg -HP";
|
lg = "log --no-pager | rg";
|
||||||
lg = "log --no-pager | rg";
|
})
|
||||||
hg = "history 0 | rg";
|
];
|
||||||
};
|
|
||||||
localVariables = {
|
localVariables = {
|
||||||
_Z_DATA = "${config.xdg.dataHome}/z/data";
|
|
||||||
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE = "fg=3,bold";
|
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE = "fg=3,bold";
|
||||||
ZSH_AUTOSUGGEST_USE_ASYNC = 1;
|
ZSH_AUTOSUGGEST_USE_ASYNC = 1;
|
||||||
};
|
};
|
||||||
|
|
@ -112,30 +89,10 @@ in
|
||||||
tab-title
|
tab-title
|
||||||
vim-mode
|
vim-mode
|
||||||
evil-registers
|
evil-registers
|
||||||
]) ++ (map
|
]);
|
||||||
(plugin: (with pkgs.${plugin}; {
|
|
||||||
name = pname;
|
|
||||||
inherit src;
|
|
||||||
})) [
|
|
||||||
"zsh-z"
|
|
||||||
]) ++ lib.optional (pkgs.hostPlatform == pkgs.buildPlatform) ({
|
|
||||||
name = "fzf-tab";
|
|
||||||
src = "${pkgs.zsh-fzf-tab}/share/fzf-tab";
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
XDG_DATA_HOME = "${config.xdg.dataHome}";
|
XDG_DATA_HOME = "${config.xdg.dataHome}";
|
||||||
};
|
};
|
||||||
programs.fzf = {
|
|
||||||
enable = true;
|
|
||||||
enableZshIntegration = true;
|
|
||||||
};
|
|
||||||
programs.starship = {
|
|
||||||
enable = true;
|
|
||||||
enableZshIntegration = true;
|
|
||||||
};
|
|
||||||
programs.direnv = {
|
|
||||||
enable = true;
|
|
||||||
enableZshIntegration = true;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
@ -8,7 +8,7 @@ let lockCommand = config.programs.swaylock.script; in
|
||||||
WLR_DRM_DEVICES = "/dev/dri/card0";
|
WLR_DRM_DEVICES = "/dev/dri/card0";
|
||||||
};
|
};
|
||||||
|
|
||||||
home.packages = with pkgs; [ grim slurp swaylock-fancy wl-clipboard jq quintom-cursor-theme gsettings-desktop-schemas glib wofi wmctrl ];
|
home.packages = with pkgs; [ grim slurp swaylock-fancy wl-clipboard jq quintom-cursor-theme gsettings-desktop-schemas glib wofi wmctrl sway-scrot ];
|
||||||
|
|
||||||
services.i3gopher = { enable = true; };
|
services.i3gopher = { enable = true; };
|
||||||
|
|
||||||
|
|
@ -1,19 +1,19 @@
|
||||||
{ config, lib, pkgs, nixos, ... }: with lib;
|
{ config, lib, pkgs, nixos, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
home.sessionVariables = mkIf config.programs.neovim.enable { EDITOR = "nvim"; };
|
home.sessionVariables = lib.mkIf config.programs.neovim.enable { EDITOR = "nvim"; };
|
||||||
|
|
||||||
programs.neovim = {
|
programs.neovim = {
|
||||||
enable = true;
|
enable = true;
|
||||||
vimAlias = true;
|
vimAlias = true;
|
||||||
viAlias = true;
|
viAlias = true;
|
||||||
plugins = with pkgs.vimPlugins; [
|
plugins = with pkgs.vimPlugins; [
|
||||||
|
# Libraries
|
||||||
|
plenary-nvim
|
||||||
# Disables and re-enables highlighting when searching
|
# Disables and re-enables highlighting when searching
|
||||||
vim-cool
|
vim-cool
|
||||||
# Colour highlighting
|
# Colour highlighting
|
||||||
vim-hexokinase
|
vim-hexokinase
|
||||||
# fzf
|
|
||||||
fzf-vim
|
|
||||||
# Git porcelain
|
# Git porcelain
|
||||||
vim-fugitive
|
vim-fugitive
|
||||||
# Start screen
|
# Start screen
|
||||||
|
|
@ -24,10 +24,22 @@
|
||||||
lualine-nvim
|
lualine-nvim
|
||||||
# EasyMotion Equivalent
|
# EasyMotion Equivalent
|
||||||
hop-nvim
|
hop-nvim
|
||||||
|
# org-mode for vim
|
||||||
|
neorg
|
||||||
|
# Completion
|
||||||
|
nvim-cmp
|
||||||
|
# Fuzzy Finder
|
||||||
|
telescope-nvim
|
||||||
|
# Language Server
|
||||||
|
nvim-lspconfig
|
||||||
# Languages
|
# Languages
|
||||||
vim-nix
|
vim-nix
|
||||||
vim-terraform
|
vim-terraform
|
||||||
];
|
];
|
||||||
|
extraPackages = with pkgs; [
|
||||||
|
# For nvim-lspconfig, Terraform Language Server
|
||||||
|
terraform-ls
|
||||||
|
];
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
luafile ${./init.lua}
|
luafile ${./init.lua}
|
||||||
'';
|
'';
|
||||||
|
|
@ -112,3 +112,60 @@ local disabled_built_ins = {
|
||||||
for _, plugin in pairs(disabled_built_ins) do
|
for _, plugin in pairs(disabled_built_ins) do
|
||||||
g["loaded_" .. plugin] = 1
|
g["loaded_" .. plugin] = 1
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-----------------------------------------------------------
|
||||||
|
-- Plugins
|
||||||
|
-----------------------------------------------------------
|
||||||
|
|
||||||
|
-- nvim-cmp
|
||||||
|
local cmp = require'cmp'
|
||||||
|
|
||||||
|
cmp.setup({
|
||||||
|
snippet = {
|
||||||
|
expand = function(args)
|
||||||
|
vim.fn["vsnip#anonymous"](args.body)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
mapping = {
|
||||||
|
['<C-y>'] = cmp.mapping.confirm({ select = true }),
|
||||||
|
},
|
||||||
|
sources = {
|
||||||
|
{ name = 'neorg' },
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
-- lspconfig
|
||||||
|
require'lspconfig'.terraformls.setup{}
|
||||||
|
api.nvim_create_autocmd('BufWritePre', {
|
||||||
|
pattern = '*.tf',
|
||||||
|
command = 'lua vim.lsp.buf.formatting_sync()'
|
||||||
|
})
|
||||||
|
|
||||||
|
-- neorg
|
||||||
|
require('neorg').setup {
|
||||||
|
-- Tell Neorg what modules to load
|
||||||
|
load = {
|
||||||
|
['core.defaults'] = {}, -- Load all the default modules
|
||||||
|
['core.norg.concealer'] = {}, -- Allows for use of icons
|
||||||
|
['core.norg.dirman'] = { -- Manage your directories with Neorg
|
||||||
|
config = {
|
||||||
|
engine = 'nvim-cmp',
|
||||||
|
workspaces = {
|
||||||
|
home = '~/neorg'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
-- telescope
|
||||||
|
api.nvim_set_keymap('n', '<leader>ff', '<cmd>Telescope find_files<cr>', { noremap = true, silent = true })
|
||||||
|
api.nvim_set_keymap('n', '<leader>fg', '<cmd>Telescope live_grep<cr>', { noremap = true, silent = true })
|
||||||
|
api.nvim_set_keymap('n', '<leader>fb', '<cmd>Telescope buffers<cr>', { noremap = true, silent = true })
|
||||||
|
api.nvim_set_keymap('n', '<leader>fh', '<cmd>Telescope help_tags<cr>', { noremap = true, silent = true })
|
||||||
|
|
||||||
|
-- hop
|
||||||
|
vim.api.nvim_set_keymap('', 'f', "<cmd>lua require'hop'.hint_char1({ direction = require'hop.hint'.HintDirection.AFTER_CURSOR, current_line_only = true })<cr>", {})
|
||||||
|
vim.api.nvim_set_keymap('', 'F', "<cmd>lua require'hop'.hint_char1({ direction = require'hop.hint'.HintDirection.BEFORE_CURSOR, current_line_only = true })<cr>", {})
|
||||||
|
vim.api.nvim_set_keymap('', 't', "<cmd>lua require'hop'.hint_char1({ direction = require'hop.hint'.HintDirection.AFTER_CURSOR, current_line_only = true, hint_offset = -1 })<cr>", {})
|
||||||
|
vim.api.nvim_set_keymap('', 'T', "<cmd>lua require'hop'.hint_char1({ direction = require'hop.hint'.HintDirection.BEFORE_CURSOR, current_line_only = true, hint_offset = 1 })<cr>", {})
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
{ config, lib, pkgs, kw, ... }: with lib;
|
{ config, lib, pkgs, kw, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
xdg.configFile."waybar/style.css" = { inherit (kw.sassTemplate { name = "waybar-style"; src = ./waybar.sass; }) source; };
|
xdg.configFile."waybar/style.css" = { inherit (kw.sassTemplate { name = "waybar-style"; src = ./waybar.sass; }) source; };
|
||||||
|
|
||||||
systemd.user.services.waybar.Service.Environment = singleton "NOTMUCH_CONFIG=${config.home.sessionVariables.NOTMUCH_CONFIG}";
|
systemd.user.services.waybar.Service.Environment = lib.singleton "NOTMUCH_CONFIG=${config.home.sessionVariables.NOTMUCH_CONFIG}";
|
||||||
|
|
||||||
programs.waybar = {
|
programs.waybar = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -16,12 +16,6 @@
|
||||||
"sway/window"
|
"sway/window"
|
||||||
];
|
];
|
||||||
modules-center = [
|
modules-center = [
|
||||||
"custom/arc-h"
|
|
||||||
"clock#arc"
|
|
||||||
"custom/hex-h"
|
|
||||||
"clock#hex"
|
|
||||||
"custom/miku-h"
|
|
||||||
"clock#miku"
|
|
||||||
"clock#original"
|
"clock#original"
|
||||||
];
|
];
|
||||||
modules-right = [
|
modules-right = [
|
||||||
|
|
@ -168,33 +162,6 @@
|
||||||
];
|
];
|
||||||
interval = 1;
|
interval = 1;
|
||||||
};
|
};
|
||||||
"custom/arc-h" = {
|
|
||||||
format = "";
|
|
||||||
};
|
|
||||||
"custom/hex-h" = {
|
|
||||||
format = "";
|
|
||||||
};
|
|
||||||
"custom/miku-h" = {
|
|
||||||
format = "";
|
|
||||||
};
|
|
||||||
"clock#arc" = {
|
|
||||||
format = "-{:%H}";
|
|
||||||
tooltip = true;
|
|
||||||
timezone = "America/Vancouver";
|
|
||||||
tooltip-format = "{:%A, %F %R %z (%Z)}";
|
|
||||||
};
|
|
||||||
"clock#miku" = {
|
|
||||||
format = "+{:%H}";
|
|
||||||
tooltip = true;
|
|
||||||
timezone = "Pacific/Auckland";
|
|
||||||
tooltip-format = "{:%A, %F %R %z (%Z)}";
|
|
||||||
};
|
|
||||||
"clock#hex" = {
|
|
||||||
format = "+{:%H}";
|
|
||||||
tooltip = true;
|
|
||||||
timezone = "Europe/Berlin";
|
|
||||||
tooltip-format = "{:%A, %F %R %z (%Z)}";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}];
|
}];
|
||||||
};
|
};
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
{
|
{
|
||||||
programs.weechat = {
|
programs.weechat = {
|
||||||
init = lib.mkMerge [
|
init = lib.mkMerge [
|
||||||
|
|
@ -47,7 +45,7 @@ with lib;
|
||||||
highmon
|
highmon
|
||||||
zncplayback
|
zncplayback
|
||||||
];
|
];
|
||||||
config = with mapAttrs (_: toString) pkgs.base16.shell.shell256; {
|
config = with lib.mapAttrs (_: toString) pkgs.base16.shell.shell256; {
|
||||||
logger.level.irc = 0;
|
logger.level.irc = 0;
|
||||||
logger.level.python.matrix = 0;
|
logger.level.python.matrix = 0;
|
||||||
logger.level.core.weechat = 0;
|
logger.level.core.weechat = 0;
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, lib, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
xdg = {
|
xdg = {
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
desktop = "$HOME/tmp";
|
desktop = "$HOME/tmp";
|
||||||
templates = "$HOME/tmp";
|
templates = "$HOME/tmp";
|
||||||
publicShare = "$HOME/shared";
|
publicShare = "$HOME/shared";
|
||||||
music = "$HOME/media-share/music";
|
music = "$HOME/media/music";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
home.file = {
|
home.file = {
|
||||||
|
|
@ -6,7 +6,7 @@ let
|
||||||
sha256 = lock.nodes.flake-compat.locked.narHash;
|
sha256 = lock.nodes.flake-compat.locked.narHash;
|
||||||
};
|
};
|
||||||
trusted = import flakeCompat {
|
trusted = import flakeCompat {
|
||||||
src = ./trusted;
|
src = ./flake/trusted;
|
||||||
};
|
};
|
||||||
nixfiles = import flakeCompat {
|
nixfiles = import flakeCompat {
|
||||||
src = ./.;
|
src = ./.;
|
||||||
|
|
@ -14,5 +14,5 @@ let
|
||||||
in nixfiles.defaultNix.inputs // {
|
in nixfiles.defaultNix.inputs // {
|
||||||
trusted = if builtins.getEnv "TRUSTED" != ""
|
trusted = if builtins.getEnv "TRUSTED" != ""
|
||||||
then trusted.defaultNix.inputs.trusted
|
then trusted.defaultNix.inputs.trusted
|
||||||
else ./empty;
|
else ./flake/empty;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, lib, profiles, root, ... }:
|
{ config, lib, meta, root, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
|
|
@ -25,29 +25,26 @@ with lib;
|
||||||
config = {
|
config = {
|
||||||
network.importing = {
|
network.importing = {
|
||||||
nixosImports = mkDefault (map (path: toString path) [
|
nixosImports = mkDefault (map (path: toString path) [
|
||||||
(root + "/nodes/nixos/HN.nix")
|
(root + "/nixos/systems/HN.nix")
|
||||||
(root + "/nodes/nixos/HN/nixos.nix")
|
(root + "/nixos/systems/HN/nixos.nix")
|
||||||
(root + "/trusted/nodes/nixos/HN/nixos.nix")
|
(root + "/trusted/nixos/systems/HN/nixos.nix")
|
||||||
]);
|
]);
|
||||||
darwinImports = mkDefault (map (path: toString path) [
|
darwinImports = mkDefault (map (path: toString path) [
|
||||||
(root + "/nodes/darwin/HN.nix")
|
(root + "/darwin/systems/HN.nix")
|
||||||
(root + "/nodes/darwin/HN/darwin.nix")
|
(root + "/darwin/systems/HN/darwin.nix")
|
||||||
(root + "/trusted/nodes/darwin/HN/darwin.nix")
|
(root + "/trusted/darwin/systems/HN/darwin.nix")
|
||||||
]);
|
|
||||||
homeImports = mkDefault (map (path: toString path) [
|
|
||||||
(root + "/nodes/nixos/HN/home.nix")
|
|
||||||
(root + "/nodes/darwin/HN/home.nix")
|
|
||||||
(root + "/trusted/nodes/HN/home.nix")
|
|
||||||
]);
|
]);
|
||||||
|
homeImports = [];
|
||||||
users = mkDefault (singleton "kat");
|
users = mkDefault (singleton "kat");
|
||||||
};
|
};
|
||||||
lib.kw.nixosImport = hostName: lib.nodeImport {
|
lib.kw.nixosImport = hostName: lib.nodeImport {
|
||||||
inherit (config.network.importing) nixosImports homeImports users;
|
inherit (config.network.importing) nixosImports homeImports users;
|
||||||
inherit profiles hostName;
|
profiles = meta.nixos;
|
||||||
|
inherit hostName;
|
||||||
};
|
};
|
||||||
lib.kw.darwinImport = hostName: lib.nodeImport {
|
lib.kw.darwinImport = hostName: lib.nodeImport {
|
||||||
nixosImports = config.network.importing.darwinImports;
|
nixosImports = config.network.importing.darwinImports;
|
||||||
profiles = profiles // { base = {}; };
|
profiles = meta.darwin;
|
||||||
inherit (config.network.importing) homeImports users;
|
inherit (config.network.importing) homeImports users;
|
||||||
inherit hostName;
|
inherit hostName;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
'';
|
'';
|
||||||
|
|
||||||
imports = with meta; [
|
imports = with meta; [
|
||||||
users.kat.base
|
home.base
|
||||||
];
|
];
|
||||||
|
|
||||||
users.motd = ''
|
users.motd = ''
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue