new formatter

This commit is contained in:
Glen Goodwin 2023-11-06 02:01:49 -05:00
parent 85aa90c2ac
commit 9fa59c1ba2
39 changed files with 556 additions and 405 deletions

119
flake.lock generated
View file

@ -159,6 +159,22 @@
"type": "github" "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": { "flake-utils": {
"inputs": { "inputs": {
"systems": "systems" "systems": "systems"
@ -249,6 +265,24 @@
"type": "github" "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": { "gitignore": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -294,6 +328,27 @@
"type": "github" "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": { "gtk-nix": {
"inputs": { "inputs": {
"banner": "banner", "banner": "banner",
@ -582,6 +637,22 @@
"type": "github" "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": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1699034771, "lastModified": 1699034771,
@ -645,11 +716,11 @@
}, },
"nixpkgs_5": { "nixpkgs_5": {
"locked": { "locked": {
"lastModified": 1698924604, "lastModified": 1699099776,
"narHash": "sha256-GCFbkl2tj8fEZBZCw3Tc0AkGo0v+YrQlohhEGJ/X4s0=", "narHash": "sha256-X09iKJ27mGsGambGfkKzqvw5esP1L/Rf8H3u3fCqIiU=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "fa804edfb7869c9fb230e174182a8a1a7e512c40", "rev": "85f1ba3e51676fa8cc604a3d863d729026a6b8eb",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -763,6 +834,30 @@
"type": "github" "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": { "root": {
"inputs": { "inputs": {
"agenix": "agenix", "agenix": "agenix",
@ -774,7 +869,8 @@
"nix-colors": "nix-colors", "nix-colors": "nix-colors",
"nix-index-database": "nix-index-database", "nix-index-database": "nix-index-database",
"nixpkgs": "nixpkgs_5", "nixpkgs": "nixpkgs_5",
"nixpkgs-unstable": "nixpkgs-unstable" "nixpkgs-unstable": "nixpkgs-unstable",
"pre-commit-hooks": "pre-commit-hooks_3"
} }
}, },
"systems": { "systems": {
@ -867,6 +963,21 @@
"type": "github" "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": { "utils": {
"locked": { "locked": {
"lastModified": 1678901627, "lastModified": 1678901627,

View file

@ -28,33 +28,53 @@
agenix.url = "github:ryantm/agenix"; agenix.url = "github:ryantm/agenix";
neovim-config.url = "github:gwg313/nvim-nix"; 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 pkgs = import nixpkgs {
system = "x86_64-linux"; inherit system;
user = "glen"; config.allowUnfree = true;
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;
}
);
}; };
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;
};
};
};
};
} }

View file

@ -1,12 +1,15 @@
# Edit this configuration file to define what should be installed on # Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page # your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help). # and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, inputs, ... }:
{ {
imports = (import ../modules/editors) ++ config,
(import ../modules/shell); pkgs,
inputs,
...
}: {
imports =
(import ../modules/editors)
++ (import ../modules/shell);
# Bootloader. # Bootloader.
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
@ -41,9 +44,9 @@
users.users.glen = { users.users.glen = {
isNormalUser = true; isNormalUser = true;
description = "Glen"; description = "Glen";
extraGroups = [ "networkmanager" "wheel" "video" "docker" "audio" ]; extraGroups = ["networkmanager" "wheel" "video" "docker" "audio"];
shell = pkgs.zsh; # Default shell shell = pkgs.zsh; # Default shell
packages = with pkgs; [ ]; packages = with pkgs; [];
}; };
# Allow unfree packages # Allow unfree packages
@ -110,15 +113,13 @@
# enable firewall and block all ports # enable firewall and block all ports
networking.firewall.enable = true; networking.firewall.enable = true;
networking.firewall.allowedTCPPorts = [ ]; networking.firewall.allowedTCPPorts = [];
networking.firewall.allowedUDPPorts = [ ]; networking.firewall.allowedUDPPorts = [];
# only members of wheel can interact with the nix daemon # only members of wheel can interact with the nix daemon
nix.settings.allowed-users = [ "@wheel" ]; nix.settings.allowed-users = ["@wheel"];
security.sudo.execWheelOnly = true; security.sudo.execWheelOnly = true;
# enable antivirus clamav and # enable antivirus clamav and
# keep the signatures' database updated # keep the signatures' database updated
services.clamav.daemon.enable = true; services.clamav.daemon.enable = true;
@ -136,5 +137,4 @@
package = pkgs.nixFlakes; package = pkgs.nixFlakes;
extraOptions = "experimental-features = nix-command flakes"; extraOptions = "experimental-features = nix-command flakes";
}; };
} }

View file

@ -1,7 +1,10 @@
{ lib, inputs, system, user, ... }:
{ {
lib,
inputs,
system,
user,
...
}: {
thinkpad = lib.nixosSystem { thinkpad = lib.nixosSystem {
inherit system; inherit system;
specialArgs = { specialArgs = {
@ -22,18 +25,11 @@
{ {
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = { inherit user inputs; }; home-manager.extraSpecialArgs = {inherit user inputs;};
home-manager.users.${user} = { home-manager.users.${user} = {
imports = [ (import ./home.nix) ] ++ [ (import ./thinkpad/home.nix) ]; imports = [(import ./home.nix)] ++ [(import ./thinkpad/home.nix)];
}; };
} }
]; ];
}; };
} }

View file

@ -1,20 +1,27 @@
{ config, lib, pkgs, stable, user, devenv, inputs, ... }:
{ {
imports = # Home Manager Modules config,
[ (import ../modules/shell/git/home.nix) ] ++ lib,
[ (import ../modules/programs/wofi.nix) ] ++ pkgs,
[ (import ../modules/programs/devenv/home.nix) ] ++ stable,
[ (import ../modules/programs/kitty.nix) ] ++ user,
[ (import ../modules/shell/tmux/home.nix) ] ++ devenv,
[ (import ../modules/shell/ranger/home.nix) ] ++ inputs,
[ (import ../modules/themes/home.nix) ] ++ ...
[ (import ../modules/programs/mako.nix) ] ++ }: {
[ (import ../modules/programs/alacritty.nix) ] ++ imports =
[ (import ../modules/programs/zathura.nix) ] ++ # Home Manager Modules
[ (import ../modules/desktop/gtk.nix) ] ++ [(import ../modules/shell/git/home.nix)]
[ (import ../modules/shell/zsh/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 #Add support for ./local/bin
#home.sessionPath = [ #home.sessionPath = [
@ -81,8 +88,6 @@
navi navi
git-crypt git-crypt
# Video/Audio # Video/Audio
feh # Image Viewer feh # Image Viewer
#mpv # Media Player #mpv # Media Player

View file

@ -1,5 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
security.apparmor.enable = true; security.apparmor.enable = true;
security.apparmor.killUnconfinedConfinables = true; security.apparmor.killUnconfinedConfinables = true;
} }

View file

@ -1,5 +1,4 @@
{ ... }: {...}: {
{
security.auditd.enable = true; security.auditd.enable = true;
security.audit.enable = true; security.audit.enable = true;
security.audit.rules = [ security.audit.rules = [

View file

@ -1,23 +1,29 @@
{ config, pkgs, user, ... }:
{ {
imports = # For now, if applying to other system, swap files config,
[ (import ./hardware-configuration.nix) ] ++ # Current system hardware config @ /etc/nixos/hardware-configuration.nix pkgs,
(import ../../modules/desktop/virtualisation/default.nix) ++ user,
(import ../../modules/hardware/default.nix) ++ ...
}: {
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 ./auditd.nix) ++
[ (import ./sysctl.nix) ] ++ [(import ./sysctl.nix)]
[ (import ./kernel.nix) ] ++ ++ [(import ./kernel.nix)]
[ (import ./auditd.nix) ] ++ ++ [(import ./auditd.nix)]
[ (import ./openssh.nix) ] ++ ++ [(import ./openssh.nix)]
[ (import ./apparmor.nix) ] ++ ++ [(import ./apparmor.nix)]
[ (import ../../modules/programs/thunar.nix) ] ++ ++ [(import ../../modules/programs/thunar.nix)]
[ (import ../../modules/desktop/hyprland/default.nix) ]; # Window Manager ++ [(import ../../modules/desktop/hyprland/default.nix)]; # Window Manager
hardware.sane = { hardware.sane = {
# Used for scanning with Xsane # Used for scanning with Xsane
enable = true; enable = true;
extraBackends = [ pkgs.sane-airscan ]; extraBackends = [pkgs.sane-airscan];
}; };
environment = { environment = {
@ -42,11 +48,11 @@
tailscale.enable = true; tailscale.enable = true;
}; };
networking.firewall.trustedInterfaces = [ "tailscale0" ]; networking.firewall.trustedInterfaces = ["tailscale0"];
#temporary bluetooth fix #temporary bluetooth fix
systemd.tmpfiles.rules = [ systemd.tmpfiles.rules = [
"d /var/lib/bluetooth 700 root root - -" "d /var/lib/bluetooth 700 root root - -"
]; ];
systemd.targets."bluetooth".after = [ "systemd-tmpfiles-setup.service" ]; systemd.targets."bluetooth".after = ["systemd-tmpfiles-setup.service"];
} }

View file

@ -1,62 +1,59 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{ {
imports = config,
[ lib,
(modulesPath + "/installer/scan/not-detected.nix") pkgs,
]; modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [];
boot.kernelModules = [ "kvm-amd" ]; boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/88ae54e9-a47f-4ef0-acae-256803662304";
device = "/dev/disk/by-uuid/88ae54e9-a47f-4ef0-acae-256803662304"; fsType = "ext4";
fsType = "ext4"; };
};
fileSystems."/media" = fileSystems."/media" = {
{ device = "192.168.10.2:/mnt/tank/media";
device = "192.168.10.2:/mnt/tank/media"; fsType = "nfs";
fsType = "nfs"; options = ["x-systemd.automount" "noauto" "x-systemd.after=network-online.target" "x-systemd.mount-timeout=90"];
options = [ "x-systemd.automount" "noauto" "x-systemd.after=network-online.target" "x-systemd.mount-timeout=90" ]; };
};
fileSystems."/books" = fileSystems."/books" = {
{ device = "192.168.10.2:/mnt/tank/books";
device = "192.168.10.2:/mnt/tank/books"; fsType = "nfs";
fsType = "nfs"; options = ["x-systemd.automount" "noauto" "x-systemd.after=network-online.target" "x-systemd.mount-timeout=90"];
options = [ "x-systemd.automount" "noauto" "x-systemd.after=network-online.target" "x-systemd.mount-timeout=90" ]; };
};
fileSystems."/music" = fileSystems."/music" = {
{ device = "192.168.10.2:/mnt/tank/music";
device = "192.168.10.2:/mnt/tank/music"; fsType = "nfs";
fsType = "nfs"; options = ["x-systemd.automount" "noauto" "x-systemd.after=network-online.target" "x-systemd.mount-timeout=90"];
options = [ "x-systemd.automount" "noauto" "x-systemd.after=network-online.target" "x-systemd.mount-timeout=90" ]; };
};
fileSystems."/projects" = fileSystems."/projects" = {
{ device = "192.168.10.2:/mnt/tank/projects";
device = "192.168.10.2:/mnt/tank/projects"; fsType = "nfs";
fsType = "nfs"; options = ["x-systemd.automount" "noauto" "x-systemd.after=network-online.target" "x-systemd.mount-timeout=90"];
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"; boot.initrd.luks.devices."luks-9d4b251f-b7d5-4a28-8e5d-6df09b434e47".device = "/dev/disk/by-uuid/9d4b251f-b7d5-4a28-8e5d-6df09b434e47";
fileSystems."/boot/efi" = fileSystems."/boot/efi" = {
{ device = "/dev/disk/by-uuid/C3A8-F13F";
device = "/dev/disk/by-uuid/C3A8-F13F"; fsType = "vfat";
fsType = "vfat"; };
};
swapDevices = [ ]; swapDevices = [];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's # (the default) this is the recommended approach. When using systemd-networkd it's

View file

@ -1,11 +1,8 @@
{ pkgs, ... }: {pkgs, ...}: {
imports = [
{ ../../modules/shell/git/home.nix
imports = ../../modules/desktop/hyprland/home.nix
[ ];
../../modules/shell/git/home.nix
../../modules/desktop/hyprland/home.nix
];
home = { home = {
# Specific packages for laptop # Specific packages for laptop

View file

@ -1,6 +1,9 @@
{ config, pkgs, stdenv, ... }:
{ {
config,
pkgs,
stdenv,
...
}: {
boot.kernelPackages = pkgs.linuxPackages_hardened; boot.kernelPackages = pkgs.linuxPackages_hardened;
boot.kernelParams = [ boot.kernelParams = [
# Disable slab merging to prevent heap exploitation # Disable slab merging to prevent heap exploitation
@ -20,5 +23,4 @@
# Enable lockdown LSM # Enable lockdown LSM
"lockdown=confidentiality" "lockdown=confidentiality"
]; ];
} }

View file

@ -1,5 +1,4 @@
{ ... }: {...}: {
{
services.openssh = { services.openssh = {
enable = true; enable = true;
settings = { settings = {

View file

@ -1,6 +1,8 @@
{ config, pkgs, ... }:
{ {
config,
pkgs,
...
}: {
boot.kernel.sysctl = { boot.kernel.sysctl = {
# Restrict kernel pointers # Restrict kernel pointers
"kernel.kptr_restrict" = 2; "kernel.kptr_restrict" = 2;

View file

@ -1,50 +1,35 @@
{ inputs {
, pkgs inputs,
, ... pkgs,
...
}: { }: {
gtk = { gtk = {
cursorTheme = { cursorTheme = {
name = "Catppuccin-Mocha-Dark-Cursors"; name = "Catppuccin-Mocha-Dark-Cursors";
package = pkgs.catppuccin-cursors.mochaDark; package = pkgs.catppuccin-cursors.mochaDark;
}; };
enable = true; enable = true;
iconTheme = { iconTheme = {
package = pkgs.catppuccin-papirus-folders.override { package = pkgs.catppuccin-papirus-folders.override {
flavor = "mocha"; flavor = "mocha";
accent = "blue"; accent = "blue";
}; };
name = "Papirus-Dark"; name = "Papirus-Dark";
}; };
theme = { theme = {
package = pkgs.catppuccin-gtk.override { package = pkgs.catppuccin-gtk.override {
size = "compact"; size = "compact";
variant = "mocha"; variant = "mocha";
}; };
name = "Catppuccin-Mocha-Compact-Blue-Dark"; name = "Catppuccin-Mocha-Compact-Blue-Dark";
}; };
}; };
} }

View file

@ -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 = { environment = {
loginShellInit = '' loginShellInit = ''
@ -55,7 +60,6 @@ in
xdg.portal = { xdg.portal = {
# Required for flatpak with window managers and for file browsing # Required for flatpak with window managers and for file browsing
enable = true; enable = true;
extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; extraPortals = [pkgs.xdg-desktop-portal-gtk];
}; };
} }

View file

@ -1,6 +1,8 @@
{ pkgs, config, ... }: {
pkgs,
let config,
...
}: let
hyprlandConf = '' hyprlandConf = ''
monitor=,preferred,auto,1 monitor=,preferred,auto,1
#monitor=,preferred,auto,auto #monitor=,preferred,auto,auto
@ -153,8 +155,7 @@ let
exec-once=${pkgs.blueman}/bin/blueman-applet exec-once=${pkgs.blueman}/bin/blueman-applet
exec-once=${pkgs.swaybg}/bin/swaybg -m fill -i $HOME/.config/wall exec-once=${pkgs.swaybg}/bin/swaybg -m fill -i $HOME/.config/wall
''; '';
in in {
{
xdg.configFile."hypr/hyprland.conf".text = hyprlandConf; xdg.configFile."hypr/hyprland.conf".text = hyprlandConf;
programs.swaylock.settings = { programs.swaylock.settings = {
@ -186,11 +187,20 @@ in
services.swayidle = { services.swayidle = {
enable = true; enable = true;
events = [ 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 = [ timeouts = [
{ timeout = 300; command = "${pkgs.swaylock}/bin/swaylock -f"; } {
timeout = 300;
command = "${pkgs.swaylock}/bin/swaylock -f";
}
]; ];
systemdTarget = "xdg-desktop-portal-hyprland.service"; systemdTarget = "xdg-desktop-portal-hyprland.service";
}; };
@ -198,7 +208,7 @@ in
home.packages = [ home.packages = [
(pkgs.writeShellApplication { (pkgs.writeShellApplication {
name = "displayswitch"; name = "displayswitch";
runtimeInputs = [ ]; runtimeInputs = [];
text = builtins.readFile ./displayswitch.sh; text = builtins.readFile ./displayswitch.sh;
}) })
]; ];

View file

@ -1,11 +1,14 @@
{ config, pkgs, user, ... }:
{ {
config,
pkgs,
user,
...
}: {
virtualisation = { virtualisation = {
docker.enable = true; docker.enable = true;
}; };
users.groups.docker.members = [ "${user}" ]; users.groups.docker.members = ["${user}"];
#environment = { #environment = {
# interactiveShellInit = '' # interactiveShellInit = ''
@ -19,4 +22,3 @@
kind kind
]; ];
} }

View file

@ -1,9 +1,11 @@
{ config, pkgs, user, ... }:
{ {
boot.kernelModules = [ "kvm-amd" ]; config,
environment.systemPackages = with pkgs; [ virt-manager ]; pkgs,
user,
...
}: {
boot.kernelModules = ["kvm-amd"];
environment.systemPackages = with pkgs; [virt-manager];
virtualisation.libvirtd.enable = true; virtualisation.libvirtd.enable = true;
users.extraGroups.libvirtd.members = [ "${user}" ]; users.extraGroups.libvirtd.members = ["${user}"];
} }

View file

@ -1,12 +1,13 @@
{ config, pkgs, user, ... }:
{ {
config,
pkgs,
user,
...
}: {
virtualisation.virtualbox.host.enable = true; virtualisation.virtualbox.host.enable = true;
users.extraGroups.vboxusers.members = [ "${user}" ]; users.extraGroups.vboxusers.members = ["${user}"];
virtualisation.virtualbox.host.enableExtensionPack = true; virtualisation.virtualbox.host.enableExtensionPack = true;
#environment = { #environment = {
# interactiveShellInit = '' # interactiveShellInit = ''
# alias rtmp='docker start nginx-rtmp' # alias rtmp='docker start nginx-rtmp'
@ -17,4 +18,3 @@
vagrant vagrant
]; ];
} }

View file

@ -1,12 +1,9 @@
{ pkgs, ... }: {pkgs, ...}: {
{
programs = { 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; [ home.packages = with pkgs; [
pyright pyright
@ -21,5 +18,4 @@
nodePackages_latest.typescript-language-server nodePackages_latest.typescript-language-server
python311Packages.python-lsp-server python311Packages.python-lsp-server
]; ];
} }

View file

@ -1,6 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
hardware.bluetooth = { hardware.bluetooth = {
enable = true; enable = true;
#hsphfpd.enable = true; # HSP & HFP daemon #hsphfpd.enable = true; # HSP & HFP daemon

View file

@ -1,9 +1,11 @@
{ pkgs, config, ... }:
{ {
pkgs,
config,
...
}: {
programs.alacritty.enable = true; programs.alacritty.enable = true;
programs.alacritty.settings = { programs.alacritty.settings = {
env = { TERM = "xterm-256color"; }; env = {TERM = "xterm-256color";};
colors = with config.colorScheme.colors; { colors = with config.colorScheme.colors; {
bright = { bright = {
black = "0x${base03}"; black = "0x${base03}";

View file

@ -1,5 +1,12 @@
{ config, lib, pkgs, user, devenv, inputs, ... }: { {
config,
lib,
pkgs,
user,
devenv,
inputs,
...
}: {
home.packages = with pkgs; [ home.packages = with pkgs; [
cachix cachix
inputs.devenv.packages.${system}.devenv inputs.devenv.packages.${system}.devenv
@ -9,5 +16,4 @@
programs.direnv.nix-direnv.enable = true; programs.direnv.nix-direnv.enable = true;
programs.zsh.enable = true; programs.zsh.enable = true;
} }

View file

@ -1,6 +1,9 @@
{ config, lib, pkgs, ... }:
{ {
config,
lib,
pkgs,
...
}: {
home = { home = {
packages = with pkgs; [ packages = with pkgs; [
kitty kitty
@ -74,4 +77,3 @@
}; };
}; };
} }

View file

@ -1,7 +1,8 @@
{ pkgs, config, ... }:
{ {
pkgs,
config,
...
}: {
services.mako = with config.colorScheme.colors; { services.mako = with config.colorScheme.colors; {
enable = true; enable = true;
backgroundColor = "#${base01}"; backgroundColor = "#${base01}";
@ -11,5 +12,4 @@
textColor = "#${base04}"; textColor = "#${base04}";
layer = "overlay"; layer = "overlay";
}; };
} }

View file

@ -1,5 +1,8 @@
{ pkgs, config, ... }:
{ {
pkgs,
config,
...
}: {
programs.thunar = { programs.thunar = {
enable = true; enable = true;
plugins = with pkgs.xfce; [ plugins = with pkgs.xfce; [
@ -9,5 +12,4 @@
}; };
services.gvfs.enable = true; # Mount, trash, and other functionalities services.gvfs.enable = true; # Mount, trash, and other functionalities
services.tumbler.enable = true; # Thumbnail support for images services.tumbler.enable = true; # Thumbnail support for images
} }

View file

@ -1,6 +1,11 @@
{ config, lib, pkgs, host, user, ... }:
{ {
config,
lib,
pkgs,
host,
user,
...
}: {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
waybar waybar
]; ];
@ -97,20 +102,19 @@
# output = [ # output = [
# "${mainMonitor}" # "${mainMonitor}"
# ]; # ];
tray = { spacing = 5; }; tray = {spacing = 5;};
#modules-center = [ "clock" ]; #modules-center = [ "clock" ];
modules-left = with config; modules-left = with config;
if programs.hyprland.enable == true then if programs.hyprland.enable == true
[ "custom/menu" "hyprland/workspaces" ] then ["custom/menu" "hyprland/workspaces"]
else if programs.sway.enable == true then else if programs.sway.enable == true
[ "sway/workspaces" "sway/window" "sway/mode" ] then ["sway/workspaces" "sway/window" "sway/mode"]
else [ ]; else [];
modules-right = modules-right =
if hostName == "desktop" then if hostName == "desktop"
[ "custom/ds4" "custom/pad" "network" "cpu" "memory" "custom/pad" "pulseaudio" "custom/sink" "custom/pad" "clock" "tray" ] then ["custom/ds4" "custom/pad" "network" "cpu" "memory" "custom/pad" "pulseaudio" "custom/sink" "custom/pad" "clock" "tray"]
else else ["cpu" "memory" "custom/pad" "battery" "custom/pad" "backlight" "custom/pad" "pulseaudio" "custom/pad" "clock" "tray"];
[ "cpu" "memory" "custom/pad" "battery" "custom/pad" "backlight" "custom/pad" "pulseaudio" "custom/pad" "clock" "tray" ];
"custom/pad" = { "custom/pad" = {
format = " "; format = " ";
@ -135,11 +139,11 @@
}; };
all-outputs = true; all-outputs = true;
persistent_workspaces = { persistent_workspaces = {
"1" = [ ]; "1" = [];
"2" = [ ]; "2" = [];
"3" = [ ]; "3" = [];
"4" = [ ]; "4" = [];
"5" = [ ]; "5" = [];
}; };
}; };
"wlr/workspaces" = { "wlr/workspaces" = {
@ -185,7 +189,7 @@
backlight = { backlight = {
device = "intel_backlight"; device = "intel_backlight";
format = "{percent}% <span font='11'>{icon}</span>"; format = "{percent}% <span font='11'>{icon}</span>";
format-icons = [ "" "" ]; format-icons = ["" ""];
on-scroll-down = "${pkgs.light}/bin/light -U 5"; on-scroll-down = "${pkgs.light}/bin/light -U 5";
on-scroll-up = "${pkgs.light}/bin/light -A 5"; on-scroll-up = "${pkgs.light}/bin/light -A 5";
}; };
@ -197,7 +201,7 @@
}; };
format = "{capacity}% <span font='11'>{icon}</span>"; format = "{capacity}% <span font='11'>{icon}</span>";
format-charging = "{capacity}% <span font='11'></span>"; format-charging = "{capacity}% <span font='11'></span>";
format-icons = [ "" "" "" "" "" ]; format-icons = ["" "" "" "" ""];
max-length = 25; max-length = 25;
}; };
network = { network = {
@ -219,7 +223,7 @@
format-source = "<span font='10'></span> "; format-source = "<span font='10'></span> ";
format-source-muted = "<span font='11'> </span> "; format-source-muted = "<span font='11'> </span> ";
format-icons = { format-icons = {
default = [ "" "" "" ]; default = ["" "" ""];
headphone = ""; headphone = "";
#hands-free = ""; #hands-free = "";
#headset = ""; #headset = "";
@ -249,24 +253,26 @@
}; };
}; };
Sec = Sec =
if hostName == "desktop" || hostName == "work" then { if hostName == "desktop" || hostName == "work"
then {
layer = "top"; layer = "top";
position = "top"; position = "top";
height = 16; height = 16;
output = output =
if hostName == "desktop" then [ if hostName == "desktop"
then [
"${secondMonitor}" "${secondMonitor}"
] else [ ]
else [
"${secondMonitor}" "${secondMonitor}"
"${thirdMonitor}" "${thirdMonitor}"
]; ];
modules-left = [ "custom/menu" "wlr/workspaces" ]; modules-left = ["custom/menu" "wlr/workspaces"];
modules-right = modules-right =
if hostName == "desktop" then if hostName == "desktop"
[ "custom/ds4" "custom/pad" "pulseaudio" "custom/sink" "custom/pad" "clock" ] then ["custom/ds4" "custom/pad" "pulseaudio" "custom/sink" "custom/pad" "clock"]
else else ["cpu" "memory" "custom/pad" "battery" "custom/pad" "backlight" "custom/pad" "pulseaudio" "custom/pad" "clock"];
[ "cpu" "memory" "custom/pad" "battery" "custom/pad" "backlight" "custom/pad" "pulseaudio" "custom/pad" "clock" ];
"custom/pad" = { "custom/pad" = {
format = " "; format = " ";
@ -321,7 +327,7 @@
backlight = { backlight = {
device = "intel_backlight"; device = "intel_backlight";
format = "{percent}% <span font='11'>{icon}</span>"; format = "{percent}% <span font='11'>{icon}</span>";
format-icons = [ "" "" ]; format-icons = ["" ""];
on-scroll-down = "${pkgs.light}/bin/light -U 5"; on-scroll-down = "${pkgs.light}/bin/light -U 5";
on-scroll-up = "${pkgs.light}/bin/light -A 5"; on-scroll-up = "${pkgs.light}/bin/light -A 5";
}; };
@ -333,7 +339,7 @@
}; };
format = "{capacity}% <span font='11'>{icon}</span>"; format = "{capacity}% <span font='11'>{icon}</span>";
format-charging = "{capacity}% <span font='11'></span>"; format-charging = "{capacity}% <span font='11'></span>";
format-icons = [ "" "" "" "" "" ]; format-icons = ["" "" "" "" ""];
max-length = 25; max-length = 25;
}; };
pulseaudio = { pulseaudio = {
@ -345,7 +351,7 @@
format-source = "<span font='10'></span> "; format-source = "<span font='10'></span> ";
format-source-muted = "<span font='11'></span> "; format-source-muted = "<span font='11'></span> ";
format-icons = { format-icons = {
default = [ "" "" "" ]; default = ["" "" ""];
headphone = ""; headphone = "";
#hands-free = ""; #hands-free = "";
#headset = ""; #headset = "";
@ -371,7 +377,8 @@
exec = "$HOME/.config/waybar/script/ds4.sh"; exec = "$HOME/.config/waybar/script/ds4.sh";
interval = 60; interval = 60;
}; };
} else { }; }
else {};
}; };
}; };
home.file = { home.file = {

View 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 = { home = {
packages = with pkgs; [ packages = with pkgs; [
wofi wofi
@ -99,4 +101,3 @@ in
}; };
}; };
} }

View file

@ -1,6 +1,8 @@
{ pkgs, config, ... }:
{ {
pkgs,
config,
...
}: {
programs.zathura = { programs.zathura = {
enable = true; enable = true;
extraConfig = '' extraConfig = ''

View file

@ -1,5 +1,10 @@
{ config, lib, pkgs, user, ... }: { {
config,
lib,
pkgs,
user,
...
}: {
programs.git = { programs.git = {
enable = true; enable = true;
userName = "Glen Goodwin"; userName = "Glen Goodwin";
@ -13,10 +18,8 @@
programs.zsh = { programs.zsh = {
shellAliases = { shellAliases = {
trackme = "git branch --set-upstream-to=origin/$(git symbolic-ref --short HEAD)"; trackme = "git branch --set-upstream-to=origin/$(git symbolic-ref --short HEAD)";
rebasemain = "git pull origin main --rebase"; rebasemain = "git pull origin main --rebase";
}; };
}; };

View file

@ -1,5 +1,10 @@
{ config, lib, pkgs, user, ... }: { {
config,
lib,
pkgs,
user,
...
}: {
home.file."ranger_devicons" = { home.file."ranger_devicons" = {
source = pkgs.fetchgit { source = pkgs.fetchgit {
url = "https://github.com/alexanderjeurissen/ranger_devicons.git"; url = "https://github.com/alexanderjeurissen/ranger_devicons.git";

View file

@ -1,145 +1,140 @@
{ pkgs, config, user, ... }:
{ {
pkgs,
config,
user,
...
}: {
programs.tmux = { programs.tmux = {
enable = true; enable = true;
clock24 = true; clock24 = true;
plugins = with pkgs.tmuxPlugins; [ plugins = with pkgs.tmuxPlugins; [
sensible sensible
yank yank
# {
# plugin = power-theme;
# extraConfig = ''
# set -g @tmux_power_theme 'sky'
# '';
# }
resurrect resurrect
continuum continuum
vim-tmux-navigator vim-tmux-navigator
tmux-thumbs
]; ];
extraConfig = '' 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 # New Theme
set -g status-interval 3 # update the status bar every 3 seconds 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-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 -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 -ga status-right "#($HOME/.config/tmux/scripts/cal.sh)"
set -g status-justify left set -g status-justify left
set -g status-left-length 200 # increase length (from 10) set -g status-left-length 200 # increase length (from 10)
set -g status-right-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-position top # macOS / darwin style
set -g status-style 'bg=#${config.colorScheme.colors.base00}' # transparent 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-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-format '#[fg=gray,bg=#${config.colorScheme.colors.base00}] #I #W'
set -g window-status-last-style 'fg=white,bg=black' set -g window-status-last-style 'fg=white,bg=black'
set -g message-command-style bg=default,fg=yellow set -g message-command-style bg=default,fg=yellow
set -g message-style bg=default,fg=yellow set -g message-style bg=default,fg=yellow
set -g mode-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-active-border-style 'fg=magenta,bg=default'
set -g pane-border-style 'fg=brightblack,bg=default' set -g pane-border-style 'fg=brightblack,bg=default'
set -g @tmux-last-prompt-pattern ' ' 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
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 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 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-b switch-client -l
bind -n M-p previous-window bind -n M-p previous-window
bind -n M-n next-window bind -n M-n next-window
bind -n M-P switch-client -p bind -n M-P switch-client -p
bind -n M-N switch-client -n bind -n M-N switch-client -n
unbind f unbind f
bind f resize-pane -Z bind f resize-pane -Z
# create session # create session
bind C-c new-session bind C-c new-session
# split current window horizontally # split current window horizontally
bind - split-window -v bind - split-window -v
# split current window vertically # split current window vertically
bind _ split-window -h bind _ split-window -h
# Select Layouts # Select Layouts
#――――――――――――――――― #―――――――――――――――――
bind -n M-a select-layout main-vertical bind -n M-a select-layout main-vertical
bind -n M-A select-layout main-horizontal bind -n M-A select-layout main-horizontal
bind -n M-E select-layout even-vertical bind -n M-E select-layout even-vertical
bind -n M-V select-layout even-horizontal bind -n M-V select-layout even-horizontal
# pane navigation # pane navigation
bind -r h select-pane -L # move left bind -r h select-pane -L # move left
bind -r j select-pane -D # move down bind -r j select-pane -D # move down
bind -r k select-pane -U # move up bind -r k select-pane -U # move up
bind -r l select-pane -R # move right bind -r l select-pane -R # move right
bind > swap-pane -D # swap current pane with the next one bind > swap-pane -D # swap current pane with the next one
bind < swap-pane -U # swap current pane with the previous one bind < swap-pane -U # swap current pane with the previous one
# pane resizing # pane resizing
bind -r H resize-pane -L 2 bind -r H resize-pane -L 2
bind -r J resize-pane -D 2 bind -r J resize-pane -D 2
bind -r K resize-pane -U 2 bind -r K resize-pane -U 2
bind -r L resize-pane -R 2 bind -r L resize-pane -R 2
bind -r c-f resize-pane -Z bind -r c-f resize-pane -Z
# window navigation # window navigation
unbind n unbind n
unbind p 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 v send -X begin-selection
bind -T copy-mode-vi C-v send -X rectangle-toggle 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 y send -X copy-selection-and-cancel
bind -T copy-mode-vi Escape send -X 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 H send -X start-of-line
bind -T copy-mode-vi L send -X end-of-line bind -T copy-mode-vi L send -X end-of-line
# -- buffers ------------------------------------------------------------------- # -- buffers -------------------------------------------------------------------
bind b list-buffers # list paste buffers bind b list-buffers # list paste buffers
bind p paste-buffer -p # paste from the top paste buffer bind p paste-buffer -p # paste from the top paste buffer
bind P choose-buffer # choose which buffer to paste from bind P choose-buffer # choose which buffer to paste from
# -- display ------------------------------------------------------------------- # -- display -------------------------------------------------------------------
set -g base-index 1 # start windows numbering at 1 set -g renumber-windows on # renumber windows when a window is closed
setw -g pane-base-index 1 # make pane numbering consistent with windows
set -g renumber-windows on # renumber windows when a window is closed
bind k display-popup -E "\ bind k display-popup -E "\
tmux list-sessions -F '#{?session_attached,,#{session_name}}' |\ tmux list-sessions -F '#{?session_attached,,#{session_name}}' |\
fzf --reverse -m --header=kill-session |\ fzf --reverse -m --header=kill-session |\
xargs -I {} tmux kill-session -t {}" xargs -I {} tmux kill-session -t {}"
bind C-j display-popup -E "\ bind C-j display-popup -E "\
tmux list-sessions -F '#{?session_attached,,#{session_name}}' |\ tmux list-sessions -F '#{?session_attached,,#{session_name}}' |\
sed '/^$/d' |\ sed '/^$/d' |\
fzf --reverse --header jump-to-session --preview 'tmux capture-pane -pt {}' |\ fzf --reverse --header jump-to-session --preview 'tmux capture-pane -pt {}' |\
xargs tmux switch-client -t" xargs tmux switch-client -t"
''; '';
}; };
programs.tmate = { programs.tmate = {
@ -150,13 +145,12 @@
# Open tmux for current project. # Open tmux for current project.
(pkgs.writeShellApplication { (pkgs.writeShellApplication {
name = "tat"; name = "tat";
runtimeInputs = [ pkgs.tmux pkgs.fzf ]; runtimeInputs = [pkgs.tmux pkgs.fzf];
text = builtins.readFile ./ta.sh; text = builtins.readFile ./ta.sh;
}) })
pkgs.fzf pkgs.fzf
]; ];
programs.zsh = { programs.zsh = {
shellAliases = { shellAliases = {
tx = "tmux new -s default"; tx = "tmux new -s default";
@ -166,9 +160,6 @@
tl = "tmux list-sessions"; tl = "tmux list-sessions";
tksv = "tmux kill-server"; tksv = "tmux kill-server";
tkss = "tmux kill-session -t"; tkss = "tmux kill-session -t";
}; };
}; };
} }

View file

@ -23,7 +23,7 @@ if [ "$DIR" = "--start" ]; then
session_name="${path_name//./_}" session_name="${path_name//./_}"
else else
# Ask the user which directory to start in # 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//./_}" session_name="${_session_name//./_}"
path_name="$DIR/$_session_name" path_name="$DIR/$_session_name"
fi fi

View file

@ -1,6 +1,8 @@
{ pkgs, config, ... }:
{ {
pkgs,
config,
...
}: {
age.secrets.env = { age.secrets.env = {
file = ../../secrets/env.age; file = ../../secrets/env.age;
owner = "glen"; owner = "glen";
@ -17,7 +19,7 @@
ohMyZsh = { ohMyZsh = {
# Extra plugins for zsh # Extra plugins for zsh
enable = true; enable = true;
plugins = [ "git" ]; plugins = ["git"];
}; };
shellInit = '' # Zsh theme shellInit = '' # Zsh theme

View file

@ -1,9 +1,13 @@
{ config, lib, pkgs, user, ... }: { {
config,
lib,
pkgs,
user,
...
}: {
programs.zsh = { programs.zsh = {
enable = true; enable = true;
shellAliases = { shellAliases = {
vim = "nvim"; vim = "nvim";
update = "sudo nixos-rebuild switch"; update = "sudo nixos-rebuild switch";
clean = "nix-collect-garbage -d"; clean = "nix-collect-garbage -d";
@ -52,16 +56,15 @@
tra = "transmission-remote -a"; tra = "transmission-remote -a";
clock = "sudo ntpd -gq"; clock = "sudo ntpd -gq";
octal = "stat -c '%a %n'"; octal = "stat -c '%a %n'";
}; };
zplug = { zplug = {
enable = true; enable = true;
plugins = [ plugins = [
{ name = "zsh-users/zsh-autosuggestions"; } {name = "zsh-users/zsh-autosuggestions";}
{ name = "zsh-users/zsh-completions"; } {name = "zsh-users/zsh-completions";}
{ name = "zsh-users/zsh-syntax-highlighting"; } {name = "zsh-users/zsh-syntax-highlighting";}
{ name = "MichaelAquilina/zsh-you-should-use"; } {name = "MichaelAquilina/zsh-you-should-use";}
]; ];
}; };
@ -76,5 +79,4 @@
eval $(thefuck --alias) eval $(thefuck --alias)
''; '';
}; };
} }

View file

@ -1,7 +1,6 @@
# #
# System themes # System themes
# #
{ {
scheme = { scheme = {
doom = { doom = {
@ -46,4 +45,3 @@
}; };
}; };
} }

View file

@ -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 # choose a theme from here https://github.com/tinted-theming/base16-schemes/tree/main
colorScheme = inputs.nix-colors.colorSchemes.tokyo-night-terminal-storm; colorScheme = inputs.nix-colors.colorSchemes.tokyo-night-terminal-storm;
} }

View file

@ -1,7 +1,7 @@
# This file defines overlays # This file defines overlays
{ inputs, ... }: { {inputs, ...}: {
# This one brings our custom packages from the 'pkgs' directory # 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 # This one contains whatever you want to overlay
# You can change versions, add patches, set compilation flags, anything really. # You can change versions, add patches, set compilation flags, anything really.

View file

@ -1,11 +1,10 @@
let let
user1 = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAxZoOukLwiPP4tFZ2IzI61ZQccSwudPYYPJuU3COTAf"; user1 = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAxZoOukLwiPP4tFZ2IzI61ZQccSwudPYYPJuU3COTAf";
users = [ user1 ]; users = [user1];
system1 = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIP9LR3o//JjFpnJ5+MSJVmTTC3x47Ca8ckL8tDRtHJZv"; system1 = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIP9LR3o//JjFpnJ5+MSJVmTTC3x47Ca8ckL8tDRtHJZv";
systems = [ system1 ]; systems = [system1];
in in {
{
#"secret1.age".publicKeys = [ user1 system1 ]; #"secret1.age".publicKeys = [ user1 system1 ];
"env.age".publicKeys = users ++ systems; "env.age".publicKeys = users ++ systems;
} }