new formatter
This commit is contained in:
parent
85aa90c2ac
commit
9fa59c1ba2
39 changed files with 556 additions and 405 deletions
119
flake.lock
generated
119
flake.lock
generated
|
|
@ -159,6 +159,22 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat_3": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1673956053,
|
||||
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
|
|
@ -249,6 +265,24 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_6": {
|
||||
"inputs": {
|
||||
"systems": "systems_7"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1685518550,
|
||||
"narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"gitignore": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
|
@ -294,6 +328,27 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"gitignore_3": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"pre-commit-hooks",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1660459072,
|
||||
"narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"rev": "a20de23b925fd8264fd7fad6454652e142fd7f73",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"gtk-nix": {
|
||||
"inputs": {
|
||||
"banner": "banner",
|
||||
|
|
@ -582,6 +637,22 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-stable_3": {
|
||||
"locked": {
|
||||
"lastModified": 1685801374,
|
||||
"narHash": "sha256-otaSUoFEMM+LjBI1XL/xGB5ao6IwnZOXc47qhIgJe8U=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "c37ca420157f4abc31e26f436c1145f8951ff373",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-23.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1699034771,
|
||||
|
|
@ -645,11 +716,11 @@
|
|||
},
|
||||
"nixpkgs_5": {
|
||||
"locked": {
|
||||
"lastModified": 1698924604,
|
||||
"narHash": "sha256-GCFbkl2tj8fEZBZCw3Tc0AkGo0v+YrQlohhEGJ/X4s0=",
|
||||
"lastModified": 1699099776,
|
||||
"narHash": "sha256-X09iKJ27mGsGambGfkKzqvw5esP1L/Rf8H3u3fCqIiU=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "fa804edfb7869c9fb230e174182a8a1a7e512c40",
|
||||
"rev": "85f1ba3e51676fa8cc604a3d863d729026a6b8eb",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -763,6 +834,30 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"pre-commit-hooks_3": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat_3",
|
||||
"flake-utils": "flake-utils_6",
|
||||
"gitignore": "gitignore_3",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"nixpkgs-stable": "nixpkgs-stable_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1698852633,
|
||||
"narHash": "sha256-Hsc/cCHud8ZXLvmm8pxrXpuaPEeNaaUttaCvtdX/Wug=",
|
||||
"owner": "cachix",
|
||||
"repo": "pre-commit-hooks.nix",
|
||||
"rev": "dec10399e5b56aa95fcd530e0338be72ad6462a0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "cachix",
|
||||
"repo": "pre-commit-hooks.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"agenix": "agenix",
|
||||
|
|
@ -774,7 +869,8 @@
|
|||
"nix-colors": "nix-colors",
|
||||
"nix-index-database": "nix-index-database",
|
||||
"nixpkgs": "nixpkgs_5",
|
||||
"nixpkgs-unstable": "nixpkgs-unstable"
|
||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||
"pre-commit-hooks": "pre-commit-hooks_3"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
|
|
@ -867,6 +963,21 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_7": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"utils": {
|
||||
"locked": {
|
||||
"lastModified": 1678901627,
|
||||
|
|
|
|||
68
flake.nix
68
flake.nix
|
|
@ -28,33 +28,53 @@
|
|||
agenix.url = "github:ryantm/agenix";
|
||||
|
||||
neovim-config.url = "github:gwg313/nvim-nix";
|
||||
|
||||
pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix";
|
||||
pre-commit-hooks.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, ... }@inputs:
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
...
|
||||
} @ inputs: let
|
||||
system = "x86_64-linux";
|
||||
user = "glen";
|
||||
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
user = "glen";
|
||||
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
|
||||
lib = nixpkgs.lib;
|
||||
|
||||
in
|
||||
{
|
||||
# Your custom packages and modifications, exported as overlays
|
||||
overlays = import ./overlays { inherit inputs; };
|
||||
|
||||
nixosConfigurations = (
|
||||
import ./hosts {
|
||||
inherit (nixpkgs) lib;
|
||||
specialArgs = { inherit inputs; };
|
||||
inherit inputs user system;
|
||||
}
|
||||
);
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
|
||||
lib = nixpkgs.lib;
|
||||
in {
|
||||
# Your custom packages and modifications, exported as overlays
|
||||
overlays = import ./overlays {inherit inputs;};
|
||||
|
||||
nixosConfigurations = (
|
||||
import ./hosts {
|
||||
inherit (nixpkgs) lib;
|
||||
specialArgs = {inherit inputs;};
|
||||
inherit inputs user system;
|
||||
}
|
||||
);
|
||||
|
||||
devShells.${system} = {
|
||||
default = pkgs.mkShell {
|
||||
inherit (self.checks.${system}.pre-commit-check) shellHook;
|
||||
buildInputs = with pkgs; [
|
||||
alejandra
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
checks.${system} = {
|
||||
pre-commit-check = inputs.pre-commit-hooks.lib.${system}.run {
|
||||
src = ./.;
|
||||
hooks = {
|
||||
alejandra.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,15 @@
|
|||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
{ config, pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
imports = (import ../modules/editors) ++
|
||||
(import ../modules/shell);
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
imports =
|
||||
(import ../modules/editors)
|
||||
++ (import ../modules/shell);
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
|
|
@ -41,9 +44,9 @@
|
|||
users.users.glen = {
|
||||
isNormalUser = true;
|
||||
description = "Glen";
|
||||
extraGroups = [ "networkmanager" "wheel" "video" "docker" "audio" ];
|
||||
extraGroups = ["networkmanager" "wheel" "video" "docker" "audio"];
|
||||
shell = pkgs.zsh; # Default shell
|
||||
packages = with pkgs; [ ];
|
||||
packages = with pkgs; [];
|
||||
};
|
||||
|
||||
# Allow unfree packages
|
||||
|
|
@ -110,15 +113,13 @@
|
|||
|
||||
# enable firewall and block all ports
|
||||
networking.firewall.enable = true;
|
||||
networking.firewall.allowedTCPPorts = [ ];
|
||||
networking.firewall.allowedUDPPorts = [ ];
|
||||
networking.firewall.allowedTCPPorts = [];
|
||||
networking.firewall.allowedUDPPorts = [];
|
||||
|
||||
# only members of wheel can interact with the nix daemon
|
||||
nix.settings.allowed-users = [ "@wheel" ];
|
||||
nix.settings.allowed-users = ["@wheel"];
|
||||
security.sudo.execWheelOnly = true;
|
||||
|
||||
|
||||
|
||||
# enable antivirus clamav and
|
||||
# keep the signatures' database updated
|
||||
services.clamav.daemon.enable = true;
|
||||
|
|
@ -136,5 +137,4 @@
|
|||
package = pkgs.nixFlakes;
|
||||
extraOptions = "experimental-features = nix-command flakes";
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
{ lib, inputs, system, user, ... }:
|
||||
|
||||
{
|
||||
|
||||
lib,
|
||||
inputs,
|
||||
system,
|
||||
user,
|
||||
...
|
||||
}: {
|
||||
thinkpad = lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = {
|
||||
|
|
@ -22,18 +25,11 @@
|
|||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.extraSpecialArgs = { inherit user inputs; };
|
||||
home-manager.extraSpecialArgs = {inherit user inputs;};
|
||||
home-manager.users.${user} = {
|
||||
imports = [ (import ./home.nix) ] ++ [ (import ./thinkpad/home.nix) ];
|
||||
|
||||
imports = [(import ./home.nix)] ++ [(import ./thinkpad/home.nix)];
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,20 +1,27 @@
|
|||
{ config, lib, pkgs, stable, user, devenv, inputs, ... }:
|
||||
|
||||
{
|
||||
imports = # Home Manager Modules
|
||||
[ (import ../modules/shell/git/home.nix) ] ++
|
||||
[ (import ../modules/programs/wofi.nix) ] ++
|
||||
[ (import ../modules/programs/devenv/home.nix) ] ++
|
||||
[ (import ../modules/programs/kitty.nix) ] ++
|
||||
[ (import ../modules/shell/tmux/home.nix) ] ++
|
||||
[ (import ../modules/shell/ranger/home.nix) ] ++
|
||||
[ (import ../modules/themes/home.nix) ] ++
|
||||
[ (import ../modules/programs/mako.nix) ] ++
|
||||
[ (import ../modules/programs/alacritty.nix) ] ++
|
||||
[ (import ../modules/programs/zathura.nix) ] ++
|
||||
[ (import ../modules/desktop/gtk.nix) ] ++
|
||||
[ (import ../modules/shell/zsh/home.nix) ];
|
||||
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
stable,
|
||||
user,
|
||||
devenv,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
imports =
|
||||
# Home Manager Modules
|
||||
[(import ../modules/shell/git/home.nix)]
|
||||
++ [(import ../modules/programs/wofi.nix)]
|
||||
++ [(import ../modules/programs/devenv/home.nix)]
|
||||
++ [(import ../modules/programs/kitty.nix)]
|
||||
++ [(import ../modules/shell/tmux/home.nix)]
|
||||
++ [(import ../modules/shell/ranger/home.nix)]
|
||||
++ [(import ../modules/themes/home.nix)]
|
||||
++ [(import ../modules/programs/mako.nix)]
|
||||
++ [(import ../modules/programs/alacritty.nix)]
|
||||
++ [(import ../modules/programs/zathura.nix)]
|
||||
++ [(import ../modules/desktop/gtk.nix)]
|
||||
++ [(import ../modules/shell/zsh/home.nix)];
|
||||
|
||||
#Add support for ./local/bin
|
||||
#home.sessionPath = [
|
||||
|
|
@ -81,8 +88,6 @@
|
|||
navi
|
||||
git-crypt
|
||||
|
||||
|
||||
|
||||
# Video/Audio
|
||||
feh # Image Viewer
|
||||
#mpv # Media Player
|
||||
|
|
@ -179,7 +184,7 @@
|
|||
#steam # Games
|
||||
#simple-scan # Scanning
|
||||
#sshpass # Ansible dependency
|
||||
#
|
||||
#
|
||||
# Laptop
|
||||
#cbatticon # Battery Notifications
|
||||
#blueman # Bluetooth
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
security.apparmor.enable = true;
|
||||
security.apparmor.killUnconfinedConfinables = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
{ ... }:
|
||||
{
|
||||
{...}: {
|
||||
security.auditd.enable = true;
|
||||
security.audit.enable = true;
|
||||
security.audit.rules = [
|
||||
|
|
|
|||
|
|
@ -1,23 +1,29 @@
|
|||
{ config, pkgs, user, ... }:
|
||||
|
||||
{
|
||||
imports = # For now, if applying to other system, swap files
|
||||
[ (import ./hardware-configuration.nix) ] ++ # Current system hardware config @ /etc/nixos/hardware-configuration.nix
|
||||
(import ../../modules/desktop/virtualisation/default.nix) ++
|
||||
(import ../../modules/hardware/default.nix) ++
|
||||
config,
|
||||
pkgs,
|
||||
user,
|
||||
...
|
||||
}: {
|
||||
imports =
|
||||
# For now, if applying to other system, swap files
|
||||
[(import ./hardware-configuration.nix)]
|
||||
++ # Current system hardware config @ /etc/nixos/hardware-configuration.nix
|
||||
(import ../../modules/desktop/virtualisation/default.nix)
|
||||
++ (import ../../modules/hardware/default.nix)
|
||||
++
|
||||
# (import ./auditd.nix) ++
|
||||
[ (import ./sysctl.nix) ] ++
|
||||
[ (import ./kernel.nix) ] ++
|
||||
[ (import ./auditd.nix) ] ++
|
||||
[ (import ./openssh.nix) ] ++
|
||||
[ (import ./apparmor.nix) ] ++
|
||||
[ (import ../../modules/programs/thunar.nix) ] ++
|
||||
[ (import ../../modules/desktop/hyprland/default.nix) ]; # Window Manager
|
||||
[(import ./sysctl.nix)]
|
||||
++ [(import ./kernel.nix)]
|
||||
++ [(import ./auditd.nix)]
|
||||
++ [(import ./openssh.nix)]
|
||||
++ [(import ./apparmor.nix)]
|
||||
++ [(import ../../modules/programs/thunar.nix)]
|
||||
++ [(import ../../modules/desktop/hyprland/default.nix)]; # Window Manager
|
||||
|
||||
hardware.sane = {
|
||||
# Used for scanning with Xsane
|
||||
enable = true;
|
||||
extraBackends = [ pkgs.sane-airscan ];
|
||||
extraBackends = [pkgs.sane-airscan];
|
||||
};
|
||||
|
||||
environment = {
|
||||
|
|
@ -42,11 +48,11 @@
|
|||
tailscale.enable = true;
|
||||
};
|
||||
|
||||
networking.firewall.trustedInterfaces = [ "tailscale0" ];
|
||||
networking.firewall.trustedInterfaces = ["tailscale0"];
|
||||
|
||||
#temporary bluetooth fix
|
||||
systemd.tmpfiles.rules = [
|
||||
"d /var/lib/bluetooth 700 root root - -"
|
||||
];
|
||||
systemd.targets."bluetooth".after = [ "systemd-tmpfiles-setup.service" ];
|
||||
systemd.targets."bluetooth".after = ["systemd-tmpfiles-setup.service"];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,62 +1,59 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = ["kvm-amd"];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
fileSystems."/" =
|
||||
{
|
||||
device = "/dev/disk/by-uuid/88ae54e9-a47f-4ef0-acae-256803662304";
|
||||
fsType = "ext4";
|
||||
};
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/88ae54e9-a47f-4ef0-acae-256803662304";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/media" =
|
||||
{
|
||||
device = "192.168.10.2:/mnt/tank/media";
|
||||
fsType = "nfs";
|
||||
options = [ "x-systemd.automount" "noauto" "x-systemd.after=network-online.target" "x-systemd.mount-timeout=90" ];
|
||||
};
|
||||
fileSystems."/media" = {
|
||||
device = "192.168.10.2:/mnt/tank/media";
|
||||
fsType = "nfs";
|
||||
options = ["x-systemd.automount" "noauto" "x-systemd.after=network-online.target" "x-systemd.mount-timeout=90"];
|
||||
};
|
||||
|
||||
fileSystems."/books" =
|
||||
{
|
||||
device = "192.168.10.2:/mnt/tank/books";
|
||||
fsType = "nfs";
|
||||
options = [ "x-systemd.automount" "noauto" "x-systemd.after=network-online.target" "x-systemd.mount-timeout=90" ];
|
||||
};
|
||||
fileSystems."/books" = {
|
||||
device = "192.168.10.2:/mnt/tank/books";
|
||||
fsType = "nfs";
|
||||
options = ["x-systemd.automount" "noauto" "x-systemd.after=network-online.target" "x-systemd.mount-timeout=90"];
|
||||
};
|
||||
|
||||
fileSystems."/music" =
|
||||
{
|
||||
device = "192.168.10.2:/mnt/tank/music";
|
||||
fsType = "nfs";
|
||||
options = [ "x-systemd.automount" "noauto" "x-systemd.after=network-online.target" "x-systemd.mount-timeout=90" ];
|
||||
};
|
||||
fileSystems."/music" = {
|
||||
device = "192.168.10.2:/mnt/tank/music";
|
||||
fsType = "nfs";
|
||||
options = ["x-systemd.automount" "noauto" "x-systemd.after=network-online.target" "x-systemd.mount-timeout=90"];
|
||||
};
|
||||
|
||||
fileSystems."/projects" =
|
||||
{
|
||||
device = "192.168.10.2:/mnt/tank/projects";
|
||||
fsType = "nfs";
|
||||
options = [ "x-systemd.automount" "noauto" "x-systemd.after=network-online.target" "x-systemd.mount-timeout=90" ];
|
||||
};
|
||||
fileSystems."/projects" = {
|
||||
device = "192.168.10.2:/mnt/tank/projects";
|
||||
fsType = "nfs";
|
||||
options = ["x-systemd.automount" "noauto" "x-systemd.after=network-online.target" "x-systemd.mount-timeout=90"];
|
||||
};
|
||||
|
||||
boot.initrd.luks.devices."luks-9d4b251f-b7d5-4a28-8e5d-6df09b434e47".device = "/dev/disk/by-uuid/9d4b251f-b7d5-4a28-8e5d-6df09b434e47";
|
||||
|
||||
fileSystems."/boot/efi" =
|
||||
{
|
||||
device = "/dev/disk/by-uuid/C3A8-F13F";
|
||||
fsType = "vfat";
|
||||
};
|
||||
fileSystems."/boot/efi" = {
|
||||
device = "/dev/disk/by-uuid/C3A8-F13F";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
swapDevices = [];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
|
|
|
|||
|
|
@ -1,11 +1,8 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
../../modules/shell/git/home.nix
|
||||
../../modules/desktop/hyprland/home.nix
|
||||
];
|
||||
{pkgs, ...}: {
|
||||
imports = [
|
||||
../../modules/shell/git/home.nix
|
||||
../../modules/desktop/hyprland/home.nix
|
||||
];
|
||||
|
||||
home = {
|
||||
# Specific packages for laptop
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
{ config, pkgs, stdenv, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
stdenv,
|
||||
...
|
||||
}: {
|
||||
boot.kernelPackages = pkgs.linuxPackages_hardened;
|
||||
boot.kernelParams = [
|
||||
# Disable slab merging to prevent heap exploitation
|
||||
|
|
@ -20,5 +23,4 @@
|
|||
# Enable lockdown LSM
|
||||
"lockdown=confidentiality"
|
||||
];
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
{ ... }:
|
||||
{
|
||||
{...}: {
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
boot.kernel.sysctl = {
|
||||
# Restrict kernel pointers
|
||||
"kernel.kptr_restrict" = 2;
|
||||
|
|
|
|||
|
|
@ -1,50 +1,35 @@
|
|||
{ inputs
|
||||
, pkgs
|
||||
, ...
|
||||
|
||||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
|
||||
gtk = {
|
||||
|
||||
cursorTheme = {
|
||||
|
||||
name = "Catppuccin-Mocha-Dark-Cursors";
|
||||
|
||||
package = pkgs.catppuccin-cursors.mochaDark;
|
||||
|
||||
};
|
||||
|
||||
enable = true;
|
||||
|
||||
|
||||
iconTheme = {
|
||||
|
||||
package = pkgs.catppuccin-papirus-folders.override {
|
||||
|
||||
flavor = "mocha";
|
||||
|
||||
accent = "blue";
|
||||
|
||||
};
|
||||
|
||||
name = "Papirus-Dark";
|
||||
|
||||
};
|
||||
|
||||
theme = {
|
||||
|
||||
package = pkgs.catppuccin-gtk.override {
|
||||
|
||||
size = "compact";
|
||||
|
||||
variant = "mocha";
|
||||
|
||||
};
|
||||
|
||||
name = "Catppuccin-Mocha-Compact-Blue-Dark";
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,14 @@
|
|||
{ config, lib, pkgs, system, inputs, ... }:
|
||||
let
|
||||
exec = "exec Hyprland";
|
||||
in
|
||||
{
|
||||
imports = [ ../../programs/waybar.nix ];
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
system,
|
||||
inputs,
|
||||
...
|
||||
}: let
|
||||
exec = "exec Hyprland";
|
||||
in {
|
||||
imports = [../../programs/waybar.nix];
|
||||
|
||||
environment = {
|
||||
loginShellInit = ''
|
||||
|
|
@ -55,7 +60,6 @@ in
|
|||
xdg.portal = {
|
||||
# Required for flatpak with window managers and for file browsing
|
||||
enable = true;
|
||||
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
||||
extraPortals = [pkgs.xdg-desktop-portal-gtk];
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
{ pkgs, config, ... }:
|
||||
|
||||
let
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
hyprlandConf = ''
|
||||
monitor=,preferred,auto,1
|
||||
#monitor=,preferred,auto,auto
|
||||
|
|
@ -153,8 +155,7 @@ let
|
|||
exec-once=${pkgs.blueman}/bin/blueman-applet
|
||||
exec-once=${pkgs.swaybg}/bin/swaybg -m fill -i $HOME/.config/wall
|
||||
'';
|
||||
in
|
||||
{
|
||||
in {
|
||||
xdg.configFile."hypr/hyprland.conf".text = hyprlandConf;
|
||||
|
||||
programs.swaylock.settings = {
|
||||
|
|
@ -186,11 +187,20 @@ in
|
|||
services.swayidle = {
|
||||
enable = true;
|
||||
events = [
|
||||
{ event = "before-sleep"; command = "${pkgs.swaylock}/bin/swaylock -f"; }
|
||||
{ event = "lock"; command = "lock"; }
|
||||
{
|
||||
event = "before-sleep";
|
||||
command = "${pkgs.swaylock}/bin/swaylock -f";
|
||||
}
|
||||
{
|
||||
event = "lock";
|
||||
command = "lock";
|
||||
}
|
||||
];
|
||||
timeouts = [
|
||||
{ timeout = 300; command = "${pkgs.swaylock}/bin/swaylock -f"; }
|
||||
{
|
||||
timeout = 300;
|
||||
command = "${pkgs.swaylock}/bin/swaylock -f";
|
||||
}
|
||||
];
|
||||
systemdTarget = "xdg-desktop-portal-hyprland.service";
|
||||
};
|
||||
|
|
@ -198,7 +208,7 @@ in
|
|||
home.packages = [
|
||||
(pkgs.writeShellApplication {
|
||||
name = "displayswitch";
|
||||
runtimeInputs = [ ];
|
||||
runtimeInputs = [];
|
||||
text = builtins.readFile ./displayswitch.sh;
|
||||
})
|
||||
];
|
||||
|
|
|
|||
|
|
@ -1,11 +1,14 @@
|
|||
{ config, pkgs, user, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
user,
|
||||
...
|
||||
}: {
|
||||
virtualisation = {
|
||||
docker.enable = true;
|
||||
};
|
||||
|
||||
users.groups.docker.members = [ "${user}" ];
|
||||
users.groups.docker.members = ["${user}"];
|
||||
|
||||
#environment = {
|
||||
# interactiveShellInit = ''
|
||||
|
|
@ -19,4 +22,3 @@
|
|||
kind
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,11 @@
|
|||
{ config, pkgs, user, ... }:
|
||||
|
||||
{
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
environment.systemPackages = with pkgs; [ virt-manager ];
|
||||
config,
|
||||
pkgs,
|
||||
user,
|
||||
...
|
||||
}: {
|
||||
boot.kernelModules = ["kvm-amd"];
|
||||
environment.systemPackages = with pkgs; [virt-manager];
|
||||
virtualisation.libvirtd.enable = true;
|
||||
users.extraGroups.libvirtd.members = [ "${user}" ];
|
||||
users.extraGroups.libvirtd.members = ["${user}"];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,13 @@
|
|||
{ config, pkgs, user, ... }:
|
||||
|
||||
{
|
||||
|
||||
config,
|
||||
pkgs,
|
||||
user,
|
||||
...
|
||||
}: {
|
||||
virtualisation.virtualbox.host.enable = true;
|
||||
users.extraGroups.vboxusers.members = [ "${user}" ];
|
||||
users.extraGroups.vboxusers.members = ["${user}"];
|
||||
virtualisation.virtualbox.host.enableExtensionPack = true;
|
||||
|
||||
|
||||
#environment = {
|
||||
# interactiveShellInit = ''
|
||||
# alias rtmp='docker start nginx-rtmp'
|
||||
|
|
@ -17,4 +18,3 @@
|
|||
vagrant
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,9 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
programs = {
|
||||
helix = { enable = true; };
|
||||
|
||||
helix = {enable = true;};
|
||||
};
|
||||
|
||||
xdg.configFile = { "helix/config.toml".source = ./config.toml; };
|
||||
xdg.configFile = {"helix/config.toml".source = ./config.toml;};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
pyright
|
||||
|
|
@ -21,5 +18,4 @@
|
|||
nodePackages_latest.typescript-language-server
|
||||
python311Packages.python-lsp-server
|
||||
];
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
#hsphfpd.enable = true; # HSP & HFP daemon
|
||||
|
|
|
|||
|
|
@ -1,9 +1,11 @@
|
|||
{ pkgs, config, ... }:
|
||||
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
programs.alacritty.enable = true;
|
||||
programs.alacritty.settings = {
|
||||
env = { TERM = "xterm-256color"; };
|
||||
env = {TERM = "xterm-256color";};
|
||||
colors = with config.colorScheme.colors; {
|
||||
bright = {
|
||||
black = "0x${base03}";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,12 @@
|
|||
{ config, lib, pkgs, user, devenv, inputs, ... }: {
|
||||
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
user,
|
||||
devenv,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
home.packages = with pkgs; [
|
||||
cachix
|
||||
inputs.devenv.packages.${system}.devenv
|
||||
|
|
@ -9,5 +16,4 @@
|
|||
programs.direnv.nix-direnv.enable = true;
|
||||
|
||||
programs.zsh.enable = true;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
home = {
|
||||
packages = with pkgs; [
|
||||
kitty
|
||||
|
|
@ -74,4 +77,3 @@
|
|||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
{ pkgs, config, ... }:
|
||||
|
||||
{
|
||||
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
services.mako = with config.colorScheme.colors; {
|
||||
enable = true;
|
||||
backgroundColor = "#${base01}";
|
||||
|
|
@ -11,5 +12,4 @@
|
|||
textColor = "#${base04}";
|
||||
layer = "overlay";
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
{ pkgs, config, ... }:
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
programs.thunar = {
|
||||
enable = true;
|
||||
plugins = with pkgs.xfce; [
|
||||
|
|
@ -9,5 +12,4 @@
|
|||
};
|
||||
services.gvfs.enable = true; # Mount, trash, and other functionalities
|
||||
services.tumbler.enable = true; # Thumbnail support for images
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,11 @@
|
|||
{ config, lib, pkgs, host, user, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
host,
|
||||
user,
|
||||
...
|
||||
}: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
waybar
|
||||
];
|
||||
|
|
@ -97,20 +102,19 @@
|
|||
# output = [
|
||||
# "${mainMonitor}"
|
||||
# ];
|
||||
tray = { spacing = 5; };
|
||||
tray = {spacing = 5;};
|
||||
#modules-center = [ "clock" ];
|
||||
modules-left = with config;
|
||||
if programs.hyprland.enable == true then
|
||||
[ "custom/menu" "hyprland/workspaces" ]
|
||||
else if programs.sway.enable == true then
|
||||
[ "sway/workspaces" "sway/window" "sway/mode" ]
|
||||
else [ ];
|
||||
if programs.hyprland.enable == true
|
||||
then ["custom/menu" "hyprland/workspaces"]
|
||||
else if programs.sway.enable == true
|
||||
then ["sway/workspaces" "sway/window" "sway/mode"]
|
||||
else [];
|
||||
|
||||
modules-right =
|
||||
if hostName == "desktop" then
|
||||
[ "custom/ds4" "custom/pad" "network" "cpu" "memory" "custom/pad" "pulseaudio" "custom/sink" "custom/pad" "clock" "tray" ]
|
||||
else
|
||||
[ "cpu" "memory" "custom/pad" "battery" "custom/pad" "backlight" "custom/pad" "pulseaudio" "custom/pad" "clock" "tray" ];
|
||||
if hostName == "desktop"
|
||||
then ["custom/ds4" "custom/pad" "network" "cpu" "memory" "custom/pad" "pulseaudio" "custom/sink" "custom/pad" "clock" "tray"]
|
||||
else ["cpu" "memory" "custom/pad" "battery" "custom/pad" "backlight" "custom/pad" "pulseaudio" "custom/pad" "clock" "tray"];
|
||||
|
||||
"custom/pad" = {
|
||||
format = " ";
|
||||
|
|
@ -135,11 +139,11 @@
|
|||
};
|
||||
all-outputs = true;
|
||||
persistent_workspaces = {
|
||||
"1" = [ ];
|
||||
"2" = [ ];
|
||||
"3" = [ ];
|
||||
"4" = [ ];
|
||||
"5" = [ ];
|
||||
"1" = [];
|
||||
"2" = [];
|
||||
"3" = [];
|
||||
"4" = [];
|
||||
"5" = [];
|
||||
};
|
||||
};
|
||||
"wlr/workspaces" = {
|
||||
|
|
@ -185,7 +189,7 @@
|
|||
backlight = {
|
||||
device = "intel_backlight";
|
||||
format = "{percent}% <span font='11'>{icon}</span>";
|
||||
format-icons = [ "" "" ];
|
||||
format-icons = ["" ""];
|
||||
on-scroll-down = "${pkgs.light}/bin/light -U 5";
|
||||
on-scroll-up = "${pkgs.light}/bin/light -A 5";
|
||||
};
|
||||
|
|
@ -197,7 +201,7 @@
|
|||
};
|
||||
format = "{capacity}% <span font='11'>{icon}</span>";
|
||||
format-charging = "{capacity}% <span font='11'></span>";
|
||||
format-icons = [ "" "" "" "" "" ];
|
||||
format-icons = ["" "" "" "" ""];
|
||||
max-length = 25;
|
||||
};
|
||||
network = {
|
||||
|
|
@ -219,7 +223,7 @@
|
|||
format-source = "<span font='10'></span> ";
|
||||
format-source-muted = "<span font='11'> </span> ";
|
||||
format-icons = {
|
||||
default = [ "" "" "" ];
|
||||
default = ["" "" ""];
|
||||
headphone = "";
|
||||
#hands-free = "";
|
||||
#headset = "";
|
||||
|
|
@ -249,24 +253,26 @@
|
|||
};
|
||||
};
|
||||
Sec =
|
||||
if hostName == "desktop" || hostName == "work" then {
|
||||
if hostName == "desktop" || hostName == "work"
|
||||
then {
|
||||
layer = "top";
|
||||
position = "top";
|
||||
height = 16;
|
||||
output =
|
||||
if hostName == "desktop" then [
|
||||
if hostName == "desktop"
|
||||
then [
|
||||
"${secondMonitor}"
|
||||
] else [
|
||||
]
|
||||
else [
|
||||
"${secondMonitor}"
|
||||
"${thirdMonitor}"
|
||||
];
|
||||
modules-left = [ "custom/menu" "wlr/workspaces" ];
|
||||
modules-left = ["custom/menu" "wlr/workspaces"];
|
||||
|
||||
modules-right =
|
||||
if hostName == "desktop" then
|
||||
[ "custom/ds4" "custom/pad" "pulseaudio" "custom/sink" "custom/pad" "clock" ]
|
||||
else
|
||||
[ "cpu" "memory" "custom/pad" "battery" "custom/pad" "backlight" "custom/pad" "pulseaudio" "custom/pad" "clock" ];
|
||||
if hostName == "desktop"
|
||||
then ["custom/ds4" "custom/pad" "pulseaudio" "custom/sink" "custom/pad" "clock"]
|
||||
else ["cpu" "memory" "custom/pad" "battery" "custom/pad" "backlight" "custom/pad" "pulseaudio" "custom/pad" "clock"];
|
||||
|
||||
"custom/pad" = {
|
||||
format = " ";
|
||||
|
|
@ -321,7 +327,7 @@
|
|||
backlight = {
|
||||
device = "intel_backlight";
|
||||
format = "{percent}% <span font='11'>{icon}</span>";
|
||||
format-icons = [ "" "" ];
|
||||
format-icons = ["" ""];
|
||||
on-scroll-down = "${pkgs.light}/bin/light -U 5";
|
||||
on-scroll-up = "${pkgs.light}/bin/light -A 5";
|
||||
};
|
||||
|
|
@ -333,7 +339,7 @@
|
|||
};
|
||||
format = "{capacity}% <span font='11'>{icon}</span>";
|
||||
format-charging = "{capacity}% <span font='11'></span>";
|
||||
format-icons = [ "" "" "" "" "" ];
|
||||
format-icons = ["" "" "" "" ""];
|
||||
max-length = 25;
|
||||
};
|
||||
pulseaudio = {
|
||||
|
|
@ -345,7 +351,7 @@
|
|||
format-source = "<span font='10'></span> ";
|
||||
format-source-muted = "<span font='11'></span> ";
|
||||
format-icons = {
|
||||
default = [ "" "" "" ];
|
||||
default = ["" "" ""];
|
||||
headphone = "";
|
||||
#hands-free = "";
|
||||
#headset = "";
|
||||
|
|
@ -371,7 +377,8 @@
|
|||
exec = "$HOME/.config/waybar/script/ds4.sh";
|
||||
interval = 60;
|
||||
};
|
||||
} else { };
|
||||
}
|
||||
else {};
|
||||
};
|
||||
};
|
||||
home.file = {
|
||||
|
|
|
|||
|
|
@ -1,10 +1,12 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
inherit (config.lib.formats.rasi) mkLiteral;# Theme.rasi alternative. Add Theme here
|
||||
colors = import ../themes/colors.nix;
|
||||
in
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (config.lib.formats.rasi) mkLiteral; # Theme.rasi alternative. Add Theme here
|
||||
colors = import ../themes/colors.nix;
|
||||
in {
|
||||
home = {
|
||||
packages = with pkgs; [
|
||||
wofi
|
||||
|
|
@ -99,4 +101,3 @@ in
|
|||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
{ pkgs, config, ... }:
|
||||
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
programs.zathura = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
{ config, lib, pkgs, user, ... }: {
|
||||
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
user,
|
||||
...
|
||||
}: {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "Glen Goodwin";
|
||||
|
|
@ -13,10 +18,8 @@
|
|||
|
||||
programs.zsh = {
|
||||
shellAliases = {
|
||||
|
||||
trackme = "git branch --set-upstream-to=origin/$(git symbolic-ref --short HEAD)";
|
||||
rebasemain = "git pull origin main --rebase";
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
{ config, lib, pkgs, user, ... }: {
|
||||
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
user,
|
||||
...
|
||||
}: {
|
||||
home.file."ranger_devicons" = {
|
||||
source = pkgs.fetchgit {
|
||||
url = "https://github.com/alexanderjeurissen/ranger_devicons.git";
|
||||
|
|
|
|||
|
|
@ -1,145 +1,140 @@
|
|||
{ pkgs, config, user, ... }:
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
user,
|
||||
...
|
||||
}: {
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
clock24 = true;
|
||||
plugins = with pkgs.tmuxPlugins; [
|
||||
sensible
|
||||
yank
|
||||
# {
|
||||
# plugin = power-theme;
|
||||
# extraConfig = ''
|
||||
# set -g @tmux_power_theme 'sky'
|
||||
# '';
|
||||
# }
|
||||
resurrect
|
||||
continuum
|
||||
vim-tmux-navigator
|
||||
tmux-thumbs
|
||||
];
|
||||
|
||||
extraConfig = ''
|
||||
bind -n M-r source-file ~/.config/tmux/tmux.conf
|
||||
bind -n M-r source-file ~/.config/tmux/tmux.conf
|
||||
|
||||
set -ag terminal-overrides ",xterm-256color:RGB"
|
||||
set -ag terminal-overrides ",xterm-256color:RGB"
|
||||
|
||||
|
||||
|
||||
set -g detach-on-destroy off # don't exit from tmux when closing a session
|
||||
set -g detach-on-destroy off # don't exit from tmux when closing a session
|
||||
|
||||
# New Theme
|
||||
set -g status-interval 3 # update the status bar every 3 seconds
|
||||
set -g status-left "#[fg=blue,bold,bg=#${config.colorScheme.colors.base00}] #S "
|
||||
set -g status-right "#[fg=#${config.colorScheme.colors.base07},bold,bg=#${config.colorScheme.colors.base00}]%a %Y-%m-%d %l:%M %p"
|
||||
set -ga status-right "#($HOME/.config/tmux/scripts/cal.sh)"
|
||||
set -g status-justify left
|
||||
set -g status-left-length 200 # increase length (from 10)
|
||||
set -g status-right-length 200 # increase length (from 10)
|
||||
set -g status-position top # macOS / darwin style
|
||||
set -g status-style 'bg=#${config.colorScheme.colors.base00}' # transparent
|
||||
set -g window-status-current-format '#[fg=magenta,bg=#${config.colorScheme.colors.base00}]*#I #W#{?window_zoomed_flag,(),} '
|
||||
set -g window-status-format '#[fg=gray,bg=#${config.colorScheme.colors.base00}] #I #W'
|
||||
set -g window-status-last-style 'fg=white,bg=black'
|
||||
set -g message-command-style bg=default,fg=yellow
|
||||
set -g message-style bg=default,fg=yellow
|
||||
set -g mode-style bg=default,fg=yellow
|
||||
set -g pane-active-border-style 'fg=magenta,bg=default'
|
||||
set -g pane-border-style 'fg=brightblack,bg=default'
|
||||
set -g @tmux-last-prompt-pattern ' '
|
||||
set -g @tmux-nerd-font-window-name-shell-icon ''
|
||||
set -g @tmux-nerd-font-window-name-show-name false
|
||||
# New Theme
|
||||
set -g status-interval 3 # update the status bar every 3 seconds
|
||||
set -g status-left "#[fg=blue,bold,bg=#${config.colorScheme.colors.base00}] #S "
|
||||
set -g status-right "#[fg=#${config.colorScheme.colors.base07},bold,bg=#${config.colorScheme.colors.base00}]%a %Y-%m-%d %l:%M %p"
|
||||
set -ga status-right "#($HOME/.config/tmux/scripts/cal.sh)"
|
||||
set -g status-justify left
|
||||
set -g status-left-length 200 # increase length (from 10)
|
||||
set -g status-right-length 200 # increase length (from 10)
|
||||
set -g status-position top # macOS / darwin style
|
||||
set -g status-style 'bg=#${config.colorScheme.colors.base00}' # transparent
|
||||
set -g window-status-current-format '#[fg=magenta,bg=#${config.colorScheme.colors.base00}]*#I #W#{?window_zoomed_flag,(),} '
|
||||
set -g window-status-format '#[fg=gray,bg=#${config.colorScheme.colors.base00}] #I #W'
|
||||
set -g window-status-last-style 'fg=white,bg=black'
|
||||
set -g message-command-style bg=default,fg=yellow
|
||||
set -g message-style bg=default,fg=yellow
|
||||
set -g mode-style bg=default,fg=yellow
|
||||
set -g pane-active-border-style 'fg=magenta,bg=default'
|
||||
set -g pane-border-style 'fg=brightblack,bg=default'
|
||||
set -g @tmux-last-prompt-pattern ' '
|
||||
|
||||
|
||||
|
||||
set -g mouse on
|
||||
set -g mouse on
|
||||
|
||||
set-option -g status-position top
|
||||
set-option -g status-position top
|
||||
|
||||
bind-key g display-popup -h 95% -w 95% -E 'lazygit'
|
||||
bind-key t display-popup -h 95% -w 95% -E "${pkgs.htop}/bin/htop"
|
||||
bind-key g display-popup -h 95% -w 95% -E 'lazygit'
|
||||
bind-key t display-popup -h 95% -w 95% -E "${pkgs.htop}/bin/htop"
|
||||
|
||||
bind C-g display-popup -E "tat ~/gallery"
|
||||
bind C-g display-popup -E "tat ~/gallery"
|
||||
|
||||
bind -n M-g display-popup -E "tmux new-session -A -s scratch"
|
||||
bind -n M-g display-popup -E "tmux new-session -A -s scratch"
|
||||
|
||||
bind -n M-b switch-client -l
|
||||
bind -n M-p previous-window
|
||||
bind -n M-n next-window
|
||||
bind -n M-P switch-client -p
|
||||
bind -n M-N switch-client -n
|
||||
bind -n M-b switch-client -l
|
||||
bind -n M-p previous-window
|
||||
bind -n M-n next-window
|
||||
bind -n M-P switch-client -p
|
||||
bind -n M-N switch-client -n
|
||||
|
||||
unbind f
|
||||
bind f resize-pane -Z
|
||||
unbind f
|
||||
bind f resize-pane -Z
|
||||
|
||||
# create session
|
||||
bind C-c new-session
|
||||
# create session
|
||||
bind C-c new-session
|
||||
|
||||
# split current window horizontally
|
||||
bind - split-window -v
|
||||
# split current window vertically
|
||||
bind _ split-window -h
|
||||
# split current window horizontally
|
||||
bind - split-window -v
|
||||
# split current window vertically
|
||||
bind _ split-window -h
|
||||
|
||||
# Select Layouts
|
||||
#―――――――――――――――――
|
||||
bind -n M-a select-layout main-vertical
|
||||
bind -n M-A select-layout main-horizontal
|
||||
bind -n M-E select-layout even-vertical
|
||||
bind -n M-V select-layout even-horizontal
|
||||
# Select Layouts
|
||||
#―――――――――――――――――
|
||||
bind -n M-a select-layout main-vertical
|
||||
bind -n M-A select-layout main-horizontal
|
||||
bind -n M-E select-layout even-vertical
|
||||
bind -n M-V select-layout even-horizontal
|
||||
|
||||
# pane navigation
|
||||
bind -r h select-pane -L # move left
|
||||
bind -r j select-pane -D # move down
|
||||
bind -r k select-pane -U # move up
|
||||
bind -r l select-pane -R # move right
|
||||
bind > swap-pane -D # swap current pane with the next one
|
||||
bind < swap-pane -U # swap current pane with the previous one
|
||||
# pane navigation
|
||||
bind -r h select-pane -L # move left
|
||||
bind -r j select-pane -D # move down
|
||||
bind -r k select-pane -U # move up
|
||||
bind -r l select-pane -R # move right
|
||||
bind > swap-pane -D # swap current pane with the next one
|
||||
bind < swap-pane -U # swap current pane with the previous one
|
||||
|
||||
# pane resizing
|
||||
bind -r H resize-pane -L 2
|
||||
bind -r J resize-pane -D 2
|
||||
bind -r K resize-pane -U 2
|
||||
bind -r L resize-pane -R 2
|
||||
bind -r c-f resize-pane -Z
|
||||
# pane resizing
|
||||
bind -r H resize-pane -L 2
|
||||
bind -r J resize-pane -D 2
|
||||
bind -r K resize-pane -U 2
|
||||
bind -r L resize-pane -R 2
|
||||
bind -r c-f resize-pane -Z
|
||||
|
||||
# window navigation
|
||||
unbind n
|
||||
unbind p
|
||||
# window navigation
|
||||
unbind n
|
||||
unbind p
|
||||
|
||||
setw -g mode-keys vi
|
||||
setw -g mode-keys vi
|
||||
|
||||
bind Enter copy-mode # enter copy mode
|
||||
bind Enter copy-mode # enter copy mode
|
||||
|
||||
bind -T copy-mode-vi v send -X begin-selection
|
||||
bind -T copy-mode-vi C-v send -X rectangle-toggle
|
||||
bind -T copy-mode-vi y send -X copy-selection-and-cancel
|
||||
bind -T copy-mode-vi Escape send -X cancel
|
||||
bind -T copy-mode-vi H send -X start-of-line
|
||||
bind -T copy-mode-vi L send -X end-of-line
|
||||
bind -T copy-mode-vi v send -X begin-selection
|
||||
bind -T copy-mode-vi C-v send -X rectangle-toggle
|
||||
bind -T copy-mode-vi y send -X copy-selection-and-cancel
|
||||
bind -T copy-mode-vi Escape send -X cancel
|
||||
bind -T copy-mode-vi H send -X start-of-line
|
||||
bind -T copy-mode-vi L send -X end-of-line
|
||||
|
||||
# -- buffers -------------------------------------------------------------------
|
||||
# -- buffers -------------------------------------------------------------------
|
||||
|
||||
bind b list-buffers # list paste buffers
|
||||
bind p paste-buffer -p # paste from the top paste buffer
|
||||
bind P choose-buffer # choose which buffer to paste from
|
||||
bind b list-buffers # list paste buffers
|
||||
bind p paste-buffer -p # paste from the top paste buffer
|
||||
bind P choose-buffer # choose which buffer to paste from
|
||||
|
||||
# -- display -------------------------------------------------------------------
|
||||
# -- display -------------------------------------------------------------------
|
||||
|
||||
set -g base-index 1 # start windows numbering at 1
|
||||
setw -g pane-base-index 1 # make pane numbering consistent with windows
|
||||
set -g renumber-windows on # renumber windows when a window is closed
|
||||
set -g renumber-windows on # renumber windows when a window is closed
|
||||
|
||||
bind k display-popup -E "\
|
||||
tmux list-sessions -F '#{?session_attached,,#{session_name}}' |\
|
||||
fzf --reverse -m --header=kill-session |\
|
||||
xargs -I {} tmux kill-session -t {}"
|
||||
bind k display-popup -E "\
|
||||
tmux list-sessions -F '#{?session_attached,,#{session_name}}' |\
|
||||
fzf --reverse -m --header=kill-session |\
|
||||
xargs -I {} tmux kill-session -t {}"
|
||||
|
||||
bind C-j display-popup -E "\
|
||||
tmux list-sessions -F '#{?session_attached,,#{session_name}}' |\
|
||||
sed '/^$/d' |\
|
||||
fzf --reverse --header jump-to-session --preview 'tmux capture-pane -pt {}' |\
|
||||
xargs tmux switch-client -t"
|
||||
bind C-j display-popup -E "\
|
||||
tmux list-sessions -F '#{?session_attached,,#{session_name}}' |\
|
||||
sed '/^$/d' |\
|
||||
fzf --reverse --header jump-to-session --preview 'tmux capture-pane -pt {}' |\
|
||||
xargs tmux switch-client -t"
|
||||
|
||||
|
||||
'';
|
||||
'';
|
||||
};
|
||||
|
||||
programs.tmate = {
|
||||
|
|
@ -150,13 +145,12 @@
|
|||
# Open tmux for current project.
|
||||
(pkgs.writeShellApplication {
|
||||
name = "tat";
|
||||
runtimeInputs = [ pkgs.tmux pkgs.fzf ];
|
||||
runtimeInputs = [pkgs.tmux pkgs.fzf];
|
||||
text = builtins.readFile ./ta.sh;
|
||||
})
|
||||
pkgs.fzf
|
||||
];
|
||||
|
||||
|
||||
programs.zsh = {
|
||||
shellAliases = {
|
||||
tx = "tmux new -s default";
|
||||
|
|
@ -166,9 +160,6 @@
|
|||
tl = "tmux list-sessions";
|
||||
tksv = "tmux kill-server";
|
||||
tkss = "tmux kill-session -t";
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ if [ "$DIR" = "--start" ]; then
|
|||
session_name="${path_name//./_}"
|
||||
else
|
||||
# Ask the user which directory to start in
|
||||
_session_name=$(cd "$DIR" && find -L . -maxdepth 1 -type d -printf "%f\n" | sed "s|/||g" | fzf --reverse --header="Select project from $(basename "$DIR") >")
|
||||
_session_name=$(cd "$DIR" && find -L . -maxdepth 1 -type d -printf "%f\n" | sed "s|/||g" | fzf --reverse --header="Select project from $(basename "$DIR") ")
|
||||
session_name="${_session_name//./_}"
|
||||
path_name="$DIR/$_session_name"
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
{ pkgs, config, ... }:
|
||||
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
age.secrets.env = {
|
||||
file = ../../secrets/env.age;
|
||||
owner = "glen";
|
||||
|
|
@ -17,7 +19,7 @@
|
|||
ohMyZsh = {
|
||||
# Extra plugins for zsh
|
||||
enable = true;
|
||||
plugins = [ "git" ];
|
||||
plugins = ["git"];
|
||||
};
|
||||
|
||||
shellInit = '' # Zsh theme
|
||||
|
|
|
|||
|
|
@ -1,9 +1,13 @@
|
|||
{ config, lib, pkgs, user, ... }: {
|
||||
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
user,
|
||||
...
|
||||
}: {
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
shellAliases = {
|
||||
|
||||
vim = "nvim";
|
||||
update = "sudo nixos-rebuild switch";
|
||||
clean = "nix-collect-garbage -d";
|
||||
|
|
@ -52,16 +56,15 @@
|
|||
tra = "transmission-remote -a";
|
||||
clock = "sudo ntpd -gq";
|
||||
octal = "stat -c '%a %n'";
|
||||
|
||||
};
|
||||
|
||||
zplug = {
|
||||
enable = true;
|
||||
plugins = [
|
||||
{ name = "zsh-users/zsh-autosuggestions"; }
|
||||
{ name = "zsh-users/zsh-completions"; }
|
||||
{ name = "zsh-users/zsh-syntax-highlighting"; }
|
||||
{ name = "MichaelAquilina/zsh-you-should-use"; }
|
||||
{name = "zsh-users/zsh-autosuggestions";}
|
||||
{name = "zsh-users/zsh-completions";}
|
||||
{name = "zsh-users/zsh-syntax-highlighting";}
|
||||
{name = "MichaelAquilina/zsh-you-should-use";}
|
||||
];
|
||||
};
|
||||
|
||||
|
|
@ -76,5 +79,4 @@
|
|||
eval $(thefuck --alias)
|
||||
'';
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
#
|
||||
# System themes
|
||||
#
|
||||
|
||||
{
|
||||
scheme = {
|
||||
doom = {
|
||||
|
|
@ -46,4 +45,3 @@
|
|||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,9 @@
|
|||
{ pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
imports = [ inputs.nix-colors.homeManagerModules.default ];
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
imports = [inputs.nix-colors.homeManagerModules.default];
|
||||
# choose a theme from here https://github.com/tinted-theming/base16-schemes/tree/main
|
||||
colorScheme = inputs.nix-colors.colorSchemes.tokyo-night-terminal-storm;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# This file defines overlays
|
||||
{ inputs, ... }: {
|
||||
{inputs, ...}: {
|
||||
# This one brings our custom packages from the 'pkgs' directory
|
||||
additions = final: _prev: import ../pkgs { pkgs = final; };
|
||||
additions = final: _prev: import ../pkgs {pkgs = final;};
|
||||
|
||||
# This one contains whatever you want to overlay
|
||||
# You can change versions, add patches, set compilation flags, anything really.
|
||||
|
|
|
|||
|
|
@ -1,11 +1,10 @@
|
|||
let
|
||||
user1 = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAxZoOukLwiPP4tFZ2IzI61ZQccSwudPYYPJuU3COTAf";
|
||||
users = [ user1 ];
|
||||
users = [user1];
|
||||
|
||||
system1 = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIP9LR3o//JjFpnJ5+MSJVmTTC3x47Ca8ckL8tDRtHJZv";
|
||||
systems = [ system1 ];
|
||||
in
|
||||
{
|
||||
systems = [system1];
|
||||
in {
|
||||
#"secret1.age".publicKeys = [ user1 system1 ];
|
||||
"env.age".publicKeys = users ++ systems;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue