Run nix fmt
Format using `nixfmt-rfc-style`.
This commit is contained in:
parent
14a1f177a0
commit
7f2df5f726
15
flake.nix
15
flake.nix
|
@ -15,7 +15,8 @@
|
||||||
# build-configs.url = "github:OliverDaviesLtd/build-configs";
|
# build-configs.url = "github:OliverDaviesLtd/build-configs";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { nixpkgs, self, ... }@inputs:
|
outputs =
|
||||||
|
{ nixpkgs, self, ... }@inputs:
|
||||||
let
|
let
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
@ -26,11 +27,11 @@
|
||||||
mkWsl = import ./lib/wsl2 { inherit inputs self username; };
|
mkWsl = import ./lib/wsl2 { inherit inputs self username; };
|
||||||
|
|
||||||
inherit (pkgs) mkShell;
|
inherit (pkgs) mkShell;
|
||||||
in {
|
in
|
||||||
packages.${system}.default =
|
{
|
||||||
mkShell { buildInputs = with pkgs; [ just ]; };
|
packages.${system}.default = mkShell { buildInputs = with pkgs; [ just ]; };
|
||||||
|
|
||||||
formatter.${system} = pkgs.nixfmt-classic;
|
formatter.${system} = pkgs.nixfmt-rfc-style;
|
||||||
|
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
apollo = mkNixos {
|
apollo = mkNixos {
|
||||||
|
@ -44,6 +45,8 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
homeConfigurations = { wsl2 = mkWsl { system = "x86_64-linux"; }; };
|
homeConfigurations = {
|
||||||
|
wsl2 = mkWsl { system = "x86_64-linux"; };
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
3
justfile
3
justfile
|
@ -4,6 +4,9 @@ _default:
|
||||||
check:
|
check:
|
||||||
nix flake check
|
nix flake check
|
||||||
|
|
||||||
|
fmt:
|
||||||
|
nix fmt flake.nix lib
|
||||||
|
|
||||||
nixos-build *args:
|
nixos-build *args:
|
||||||
sudo nixos-rebuild build --flake . {{ args }}
|
sudo nixos-rebuild build --flake . {{ args }}
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,21 @@
|
||||||
{ inputs, desktop ? false, hostname, self }:
|
{
|
||||||
|
inputs,
|
||||||
|
desktop ? false,
|
||||||
|
hostname,
|
||||||
|
self,
|
||||||
|
}:
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
let
|
let
|
||||||
configure-gtk = pkgs.writeTextFile {
|
configure-gtk = pkgs.writeTextFile {
|
||||||
name = "configure-gtk";
|
name = "configure-gtk";
|
||||||
destination = "/bin/configure-gtk";
|
destination = "/bin/configure-gtk";
|
||||||
executable = true;
|
executable = true;
|
||||||
text = let
|
text =
|
||||||
|
let
|
||||||
schema = pkgs.gsettings-desktop-schemas;
|
schema = pkgs.gsettings-desktop-schemas;
|
||||||
datadir = "${schema}/share/gsettings-schemas/${schema.name}";
|
datadir = "${schema}/share/gsettings-schemas/${schema.name}";
|
||||||
in ''
|
in
|
||||||
|
''
|
||||||
export XDG_DATA_DIRS=${datadir}:$XDG_DATA_DIRS
|
export XDG_DATA_DIRS=${datadir}:$XDG_DATA_DIRS
|
||||||
gnome_schema=org.gnome.desktop.interface
|
gnome_schema=org.gnome.desktop.interface
|
||||||
gsettings set $gnome_schema gtk-theme 'Breeze Dark'
|
gsettings set $gnome_schema gtk-theme 'Breeze Dark'
|
||||||
|
@ -18,7 +25,8 @@ let
|
||||||
theme = import "${self}/lib/theme" { inherit pkgs; };
|
theme = import "${self}/lib/theme" { inherit pkgs; };
|
||||||
|
|
||||||
username = "opdavies";
|
username = "opdavies";
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
# Bootloader.
|
# Bootloader.
|
||||||
|
@ -126,7 +134,11 @@ in {
|
||||||
users.users.${username} = {
|
users.users.${username} = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
description = "Oliver Davies";
|
description = "Oliver Davies";
|
||||||
extraGroups = [ "docker" "networkmanager" "wheel" ];
|
extraGroups = [
|
||||||
|
"docker"
|
||||||
|
"networkmanager"
|
||||||
|
"wheel"
|
||||||
|
];
|
||||||
packages = with pkgs; [ ];
|
packages = with pkgs; [ ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -216,10 +228,13 @@ in {
|
||||||
fonts = {
|
fonts = {
|
||||||
fontconfig = {
|
fontconfig = {
|
||||||
enable = true;
|
enable = true;
|
||||||
defaultFonts = { monospace = [ theme.fonts.monospace.name ]; };
|
defaultFonts = {
|
||||||
|
monospace = [ theme.fonts.monospace.name ];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
packages = with pkgs;
|
packages =
|
||||||
|
with pkgs;
|
||||||
[
|
[
|
||||||
(nerdfonts.override {
|
(nerdfonts.override {
|
||||||
fonts = [
|
fonts = [
|
||||||
|
@ -231,7 +246,8 @@ in {
|
||||||
"JetBrainsMono"
|
"JetBrainsMono"
|
||||||
];
|
];
|
||||||
})
|
})
|
||||||
] ++ [ theme.fonts.monospace.package ];
|
]
|
||||||
|
++ [ theme.fonts.monospace.package ];
|
||||||
};
|
};
|
||||||
|
|
||||||
zramSwap.enable = true;
|
zramSwap.enable = true;
|
||||||
|
@ -247,23 +263,27 @@ in {
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
auto-optimise-store = true;
|
auto-optimise-store = true;
|
||||||
experimental-features = [ "nix-command" "flakes" ];
|
experimental-features = [
|
||||||
|
"nix-command"
|
||||||
|
"flakes"
|
||||||
|
];
|
||||||
warn-dirty = false;
|
warn-dirty = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Make Caps lock work as an Escape key on press and Ctrl on hold.
|
# Make Caps lock work as an Escape key on press and Ctrl on hold.
|
||||||
services.interception-tools = let
|
services.interception-tools =
|
||||||
|
let
|
||||||
dfkConfig = pkgs.writeText "dual-function-keys.yaml" ''
|
dfkConfig = pkgs.writeText "dual-function-keys.yaml" ''
|
||||||
MAPPINGS:
|
MAPPINGS:
|
||||||
- KEY: KEY_CAPSLOCK
|
- KEY: KEY_CAPSLOCK
|
||||||
TAP: KEY_ESC
|
TAP: KEY_ESC
|
||||||
HOLD: KEY_LEFTCTRL
|
HOLD: KEY_LEFTCTRL
|
||||||
'';
|
'';
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
enable = true;
|
enable = true;
|
||||||
plugins =
|
plugins = pkgs.lib.mkForce [ pkgs.interception-tools-plugins.dual-function-keys ];
|
||||||
pkgs.lib.mkForce [ pkgs.interception-tools-plugins.dual-function-keys ];
|
|
||||||
udevmonConfig = ''
|
udevmonConfig = ''
|
||||||
- JOB: "${pkgs.interception-tools}/bin/intercept -g $DEVNODE | ${pkgs.interception-tools-plugins.dual-function-keys}/bin/dual-function-keys -c ${dfkConfig} | ${pkgs.interception-tools}/bin/uinput -d $DEVNODE"
|
- JOB: "${pkgs.interception-tools}/bin/intercept -g $DEVNODE | ${pkgs.interception-tools-plugins.dual-function-keys}/bin/dual-function-keys -c ${dfkConfig} | ${pkgs.interception-tools}/bin/uinput -d $DEVNODE"
|
||||||
DEVICE:
|
DEVICE:
|
||||||
|
@ -308,8 +328,7 @@ in {
|
||||||
services.cron = {
|
services.cron = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
systemCronJobs =
|
systemCronJobs = [ "* * * * * opdavies /home/opdavies/.config/bin/notify-battery.sh" ];
|
||||||
[ "* * * * * opdavies /home/opdavies/.config/bin/notify-battery.sh" ];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
services.auto-cpufreq.enable = true;
|
services.auto-cpufreq.enable = true;
|
||||||
|
|
|
@ -1,15 +1,36 @@
|
||||||
{ inputs, self, username }:
|
{
|
||||||
{ desktop ? false, hostname }:
|
inputs,
|
||||||
|
self,
|
||||||
|
username,
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
desktop ? false,
|
||||||
|
hostname,
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
configuration =
|
configuration = import ./configuration.nix {
|
||||||
import ./configuration.nix { inherit desktop hostname inputs self; };
|
inherit
|
||||||
|
desktop
|
||||||
|
hostname
|
||||||
|
inputs
|
||||||
|
self
|
||||||
|
;
|
||||||
|
};
|
||||||
hardwareConfiguration = import ./hardware-configuration.nix;
|
hardwareConfiguration = import ./hardware-configuration.nix;
|
||||||
in inputs.nixpkgs.lib.nixosSystem {
|
in
|
||||||
|
inputs.nixpkgs.lib.nixosSystem {
|
||||||
modules = [
|
modules = [
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
{
|
{
|
||||||
home-manager = {
|
home-manager = {
|
||||||
extraSpecialArgs = { inherit inputs desktop self username; };
|
extraSpecialArgs = {
|
||||||
|
inherit
|
||||||
|
inputs
|
||||||
|
desktop
|
||||||
|
self
|
||||||
|
username
|
||||||
|
;
|
||||||
|
};
|
||||||
useGlobalPkgs = true;
|
useGlobalPkgs = true;
|
||||||
useUserPackages = true;
|
useUserPackages = true;
|
||||||
users."${username}" = import ./home-manager;
|
users."${username}" = import ./home-manager;
|
||||||
|
|
|
@ -1,8 +1,20 @@
|
||||||
{ config, lib, pkgs, modulesPath, ... }: {
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules =
|
boot.initrd.availableKernelModules = [
|
||||||
[ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" ];
|
"xhci_pci"
|
||||||
|
"thunderbolt"
|
||||||
|
"nvme"
|
||||||
|
"usb_storage"
|
||||||
|
"sd_mod"
|
||||||
|
];
|
||||||
boot.initrd.kernelModules = [ ];
|
boot.initrd.kernelModules = [ ];
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
boot.kernelParams = [
|
boot.kernelParams = [
|
||||||
|
@ -28,7 +40,7 @@
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [{ device = "/dev/disk/by-label/swap"; }];
|
swapDevices = [ { device = "/dev/disk/by-label/swap"; } ];
|
||||||
|
|
||||||
# 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
|
||||||
|
@ -41,6 +53,5 @@
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||||
hardware.bluetooth.enable = true;
|
hardware.bluetooth.enable = true;
|
||||||
hardware.cpu.intel.updateMicrocode =
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,18 +1,44 @@
|
||||||
{ config, desktop, inputs, pkgs, self, username, ... }:
|
{
|
||||||
|
config,
|
||||||
|
desktop,
|
||||||
|
inputs,
|
||||||
|
pkgs,
|
||||||
|
self,
|
||||||
|
username,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
desktop-config =
|
desktop-config = import ./desktop.nix {
|
||||||
import ./desktop.nix { inherit config inputs pkgs username; };
|
inherit
|
||||||
|
config
|
||||||
|
inputs
|
||||||
|
pkgs
|
||||||
|
username
|
||||||
|
;
|
||||||
|
};
|
||||||
shared-config = import "${self}/lib/shared/home-manager.nix" {
|
shared-config = import "${self}/lib/shared/home-manager.nix" {
|
||||||
inherit inputs pkgs self username;
|
inherit
|
||||||
|
inputs
|
||||||
|
pkgs
|
||||||
|
self
|
||||||
|
username
|
||||||
|
;
|
||||||
};
|
};
|
||||||
shared-packages = import "${self}/lib/shared/home-manager-packages.nix" {
|
shared-packages = import "${self}/lib/shared/home-manager-packages.nix" { inherit inputs pkgs; };
|
||||||
inherit inputs pkgs;
|
in
|
||||||
};
|
{
|
||||||
in {
|
|
||||||
imports =
|
imports =
|
||||||
if desktop then [ desktop-config shared-config ] else [ shared-config ];
|
if desktop then
|
||||||
|
[
|
||||||
|
desktop-config
|
||||||
|
shared-config
|
||||||
|
]
|
||||||
|
else
|
||||||
|
[ shared-config ];
|
||||||
|
|
||||||
home.packages = shared-packages ++ pkgs.lib.optionals desktop [
|
home.packages =
|
||||||
|
shared-packages
|
||||||
|
++ pkgs.lib.optionals desktop [
|
||||||
pkgs.discord
|
pkgs.discord
|
||||||
pkgs.gimp
|
pkgs.gimp
|
||||||
pkgs.gscan2pdf
|
pkgs.gscan2pdf
|
||||||
|
|
|
@ -1,4 +1,10 @@
|
||||||
{ config, inputs, pkgs, username, }: {
|
{
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
pkgs,
|
||||||
|
username,
|
||||||
|
}:
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./modules/copyq.nix
|
./modules/copyq.nix
|
||||||
./modules/dunst.nix
|
./modules/dunst.nix
|
||||||
|
|
|
@ -2,6 +2,10 @@
|
||||||
services.dunst = {
|
services.dunst = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
settings = { global = { follow = "keyboard"; }; };
|
settings = {
|
||||||
|
global = {
|
||||||
|
follow = "keyboard";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,15 @@
|
||||||
let baseUrl = "https://www.oliverdavies.uk";
|
let
|
||||||
in {
|
baseUrl = "https://www.oliverdavies.uk";
|
||||||
|
in
|
||||||
|
{
|
||||||
services.espanso = {
|
services.espanso = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
configs = { default = { show_notifications = false; }; };
|
configs = {
|
||||||
|
default = {
|
||||||
|
show_notifications = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
matches = {
|
matches = {
|
||||||
base = {
|
base = {
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{ username, ... }: {
|
{ username, ... }:
|
||||||
|
{
|
||||||
services.flameshot = {
|
services.flameshot = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
{ config, inputs, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
programs.i3status-rust = {
|
programs.i3status-rust = {
|
||||||
|
@ -64,7 +69,8 @@
|
||||||
xwayland = true;
|
xwayland = true;
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
bars = [{
|
bars = [
|
||||||
|
{
|
||||||
colors.background = "#111111";
|
colors.background = "#111111";
|
||||||
|
|
||||||
fonts = {
|
fonts = {
|
||||||
|
@ -72,10 +78,10 @@
|
||||||
size = 12.0;
|
size = 12.0;
|
||||||
};
|
};
|
||||||
|
|
||||||
statusCommand =
|
statusCommand = "i3status-rs ~/.config/i3status-rust/config-default.toml";
|
||||||
"i3status-rs ~/.config/i3status-rust/config-default.toml";
|
|
||||||
trayPadding = 5;
|
trayPadding = 5;
|
||||||
}];
|
}
|
||||||
|
];
|
||||||
|
|
||||||
defaultWorkspace = "workspace number 1";
|
defaultWorkspace = "workspace number 1";
|
||||||
|
|
||||||
|
@ -85,7 +91,9 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
input = {
|
input = {
|
||||||
"*" = { xkb_layout = "gb"; };
|
"*" = {
|
||||||
|
xkb_layout = "gb";
|
||||||
|
};
|
||||||
|
|
||||||
"type:touchpad" = {
|
"type:touchpad" = {
|
||||||
dwt = "enabled";
|
dwt = "enabled";
|
||||||
|
@ -94,8 +102,10 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
keybindings =
|
keybindings =
|
||||||
let modifier = config.wayland.windowManager.sway.config.modifier;
|
let
|
||||||
in inputs.nixpkgs.lib.mkOptionDefault {
|
modifier = config.wayland.windowManager.sway.config.modifier;
|
||||||
|
in
|
||||||
|
inputs.nixpkgs.lib.mkOptionDefault {
|
||||||
"${modifier}+Escape" = "exec swaylock --daemonize";
|
"${modifier}+Escape" = "exec swaylock --daemonize";
|
||||||
"${modifier}+Shift+b" = "exec ${pkgs.firefox}/bin/firefox";
|
"${modifier}+Shift+b" = "exec ${pkgs.firefox}/bin/firefox";
|
||||||
"${modifier}+Shift+f" = "exec ${pkgs.xfce.thunar}/bin/thunar";
|
"${modifier}+Shift+f" = "exec ${pkgs.xfce.thunar}/bin/thunar";
|
||||||
|
@ -112,7 +122,9 @@
|
||||||
# bg = "~/.config/wallpaper/wallpaper.jpg fill";
|
# bg = "~/.config/wallpaper/wallpaper.jpg fill";
|
||||||
# };
|
# };
|
||||||
|
|
||||||
eDP-1 = { scale = "1.0"; };
|
eDP-1 = {
|
||||||
|
scale = "1.0";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
terminal = "wezterm";
|
terminal = "wezterm";
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{ inputs, username, ... }:
|
{ inputs, username, ... }:
|
||||||
{ pkgs, ... }: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
services.displayManager.defaultSession = "sway";
|
services.displayManager.defaultSession = "sway";
|
||||||
|
|
||||||
programs.sway.enable = true;
|
programs.sway.enable = true;
|
||||||
|
@ -9,7 +10,9 @@
|
||||||
extraPortals = with pkgs; [ xdg-desktop-portal-wlr ];
|
extraPortals = with pkgs; [ xdg-desktop-portal-wlr ];
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager.users.${username} = { pkgs, ... }: {
|
home-manager.users.${username} =
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
MOZ_ENABLE_WAYLAND = "1";
|
MOZ_ENABLE_WAYLAND = "1";
|
||||||
MOZ_USE_XINPUT2 = "1";
|
MOZ_USE_XINPUT2 = "1";
|
||||||
|
@ -19,6 +22,12 @@
|
||||||
XDG_SESSION_TYPE = "wayland";
|
XDG_SESSION_TYPE = "wayland";
|
||||||
};
|
};
|
||||||
|
|
||||||
home.packages = with pkgs; [ i3status swaybg wdisplays wl-clipboard wofi ];
|
home.packages = with pkgs; [
|
||||||
|
i3status
|
||||||
|
swaybg
|
||||||
|
wdisplays
|
||||||
|
wl-clipboard
|
||||||
|
wofi
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,9 @@
|
||||||
let
|
let
|
||||||
php = pkgs.php82;
|
php = pkgs.php82;
|
||||||
phpPackages = pkgs.php82Packages;
|
phpPackages = pkgs.php82Packages;
|
||||||
in with pkgs; [
|
in
|
||||||
|
with pkgs;
|
||||||
|
[
|
||||||
inputs.build-configs.packages.${pkgs.system}.default
|
inputs.build-configs.packages.${pkgs.system}.default
|
||||||
|
|
||||||
awscli2
|
awscli2
|
||||||
|
|
|
@ -1,4 +1,10 @@
|
||||||
{ inputs, pkgs, username, self, }: {
|
{
|
||||||
|
inputs,
|
||||||
|
pkgs,
|
||||||
|
username,
|
||||||
|
self,
|
||||||
|
}:
|
||||||
|
{
|
||||||
home.username = "${username}";
|
home.username = "${username}";
|
||||||
home.homeDirectory = "/home/${username}";
|
home.homeDirectory = "/home/${username}";
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{ self, ... }: {
|
{ self, ... }:
|
||||||
|
{
|
||||||
home.sessionPath = [ "$HOME/.local/bin" ];
|
home.sessionPath = [ "$HOME/.local/bin" ];
|
||||||
|
|
||||||
home.file.".local/bin" = {
|
home.file.".local/bin" = {
|
||||||
|
|
|
@ -34,10 +34,12 @@
|
||||||
userName = "Oliver Davies";
|
userName = "Oliver Davies";
|
||||||
userEmail = "oliver@oliverdavies.dev";
|
userEmail = "oliver@oliverdavies.dev";
|
||||||
|
|
||||||
includes = [{
|
includes = [
|
||||||
|
{
|
||||||
condition = "gitdir:~/Code/bitbucket.org/transportforwales/";
|
condition = "gitdir:~/Code/bitbucket.org/transportforwales/";
|
||||||
contents.user.email = "oliver.davies@tfw.wales";
|
contents.user.email = "oliver.davies@tfw.wales";
|
||||||
}];
|
}
|
||||||
|
];
|
||||||
|
|
||||||
aliases = {
|
aliases = {
|
||||||
aa = "add --all";
|
aa = "add --all";
|
||||||
|
@ -54,12 +56,10 @@
|
||||||
current-branch = "rev-parse --abbrev-ref HEAD";
|
current-branch = "rev-parse --abbrev-ref HEAD";
|
||||||
dc = "diff --color --word-diff --cached";
|
dc = "diff --color --word-diff --cached";
|
||||||
df = "diff --color --word-diff";
|
df = "diff --color --word-diff";
|
||||||
dup =
|
dup = "!git checkout develop && git fetch origin && echo && git sl develop..origin/develop && echo && git pull --quiet && git checkout -";
|
||||||
"!git checkout develop && git fetch origin && echo && git sl develop..origin/develop && echo && git pull --quiet && git checkout -";
|
|
||||||
fixup = "commit --fixup";
|
fixup = "commit --fixup";
|
||||||
issues = "!gh issue list --web";
|
issues = "!gh issue list --web";
|
||||||
mup =
|
mup = "!git master-to-main-wrapper checkout %BRANCH% && git fetch origin && echo && git sl %BRANCH%..origin/%BRANCH% && echo && git pull --quiet && git checkout -";
|
||||||
"!git master-to-main-wrapper checkout %BRANCH% && git fetch origin && echo && git sl %BRANCH%..origin/%BRANCH% && echo && git pull --quiet && git checkout -";
|
|
||||||
no-ff = "merge --no-ff";
|
no-ff = "merge --no-ff";
|
||||||
pl = "pull";
|
pl = "pull";
|
||||||
prune = "remote prune origin";
|
prune = "remote prune origin";
|
||||||
|
@ -71,12 +71,10 @@
|
||||||
repush = "!git pull --rebase && git push";
|
repush = "!git pull --rebase && git push";
|
||||||
ri = "rebase --interactive";
|
ri = "rebase --interactive";
|
||||||
rid = "!git rebase -i $(git merge-base develop HEAD)";
|
rid = "!git rebase -i $(git merge-base develop HEAD)";
|
||||||
rim =
|
rim = "!git rebase -i $(git master-to-main-wrapper merge-base %BRANCH% HEAD)";
|
||||||
"!git rebase -i $(git master-to-main-wrapper merge-base %BRANCH% HEAD)";
|
|
||||||
rip = "!git rebase -i $(git merge-base production HEAD)";
|
rip = "!git rebase -i $(git merge-base production HEAD)";
|
||||||
ris = "!git rebase -i $(git merge-base staging HEAD)";
|
ris = "!git rebase -i $(git merge-base staging HEAD)";
|
||||||
riu =
|
riu = "!git rebase -i $(git rev-parse --abbrev-ref --symbolic-full-name @{u})";
|
||||||
"!git rebase -i $(git rev-parse --abbrev-ref --symbolic-full-name @{u})";
|
|
||||||
rmup = "!git mup && git master-to-main-wrapper rebase %BRANCH%";
|
rmup = "!git mup && git master-to-main-wrapper rebase %BRANCH%";
|
||||||
sl = "log --oneline --decorate -20";
|
sl = "log --oneline --decorate -20";
|
||||||
sla = "log --oneline --decorate --graph --all -20";
|
sla = "log --oneline --decorate --graph --all -20";
|
||||||
|
@ -87,8 +85,7 @@
|
||||||
unassume = "update-index --no-assume-unchanged";
|
unassume = "update-index --no-assume-unchanged";
|
||||||
uncommit = "reset --soft HEAD^";
|
uncommit = "reset --soft HEAD^";
|
||||||
unstage = "reset";
|
unstage = "reset";
|
||||||
update =
|
update = "!git fetch --all --jobs=4 --prune --progress && git rebase --autostash --stat";
|
||||||
"!git fetch --all --jobs=4 --prune --progress && git rebase --autostash --stat";
|
|
||||||
upstream = "rev-parse --abbrev-ref --symbolic-full-name @{u}";
|
upstream = "rev-parse --abbrev-ref --symbolic-full-name @{u}";
|
||||||
ureset = "!git reset --hard $(git upstream)";
|
ureset = "!git reset --hard $(git upstream)";
|
||||||
worktrees = "worktree list";
|
worktrees = "worktree list";
|
||||||
|
@ -103,7 +100,9 @@
|
||||||
checkout.defaultRemote = "origin";
|
checkout.defaultRemote = "origin";
|
||||||
color.ui = true;
|
color.ui = true;
|
||||||
column.ui = "auto";
|
column.ui = "auto";
|
||||||
commit = { template = "~/.gitmessage"; };
|
commit = {
|
||||||
|
template = "~/.gitmessage";
|
||||||
|
};
|
||||||
core = {
|
core = {
|
||||||
editor = "nvim";
|
editor = "nvim";
|
||||||
excludesFile = "~/.config/git/ignore";
|
excludesFile = "~/.config/git/ignore";
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
{ inputs }:
|
{ inputs }:
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
let system = pkgs.system;
|
let
|
||||||
in {
|
system = pkgs.system;
|
||||||
|
in
|
||||||
|
{
|
||||||
programs.neovim = inputs.opdavies-nvim.lib.mkHomeManager { inherit system; };
|
programs.neovim = inputs.opdavies-nvim.lib.mkHomeManager { inherit system; };
|
||||||
|
|
||||||
home.file.".markdownlint.yaml".text = ''
|
home.file.".markdownlint.yaml".text = ''
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{ self, ... }: {
|
{ self, ... }:
|
||||||
|
{
|
||||||
xdg.configFile.phpactor = {
|
xdg.configFile.phpactor = {
|
||||||
source = "${self}/config/phpactor";
|
source = "${self}/config/phpactor";
|
||||||
recursive = true;
|
recursive = true;
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{ pkgs, ... }: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
home.packages = with pkgs; [ ripgrep ];
|
home.packages = with pkgs; [ ripgrep ];
|
||||||
|
|
||||||
xdg.configFile."ripgrep/config".text = ''
|
xdg.configFile."ripgrep/config".text = ''
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
let inherit (pkgs) tmuxPlugins;
|
let
|
||||||
in {
|
inherit (pkgs) tmuxPlugins;
|
||||||
|
in
|
||||||
|
{
|
||||||
programs.tmux = {
|
programs.tmux = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
@ -106,7 +108,10 @@ in {
|
||||||
if-shell "[ -f ~/.tmux.conf.local ]" 'source ~/.tmux.conf.local'
|
if-shell "[ -f ~/.tmux.conf.local ]" 'source ~/.tmux.conf.local'
|
||||||
'';
|
'';
|
||||||
|
|
||||||
plugins =
|
plugins = [
|
||||||
[ tmuxPlugins.resurrect tmuxPlugins.vim-tmux-navigator tmuxPlugins.yank ];
|
tmuxPlugins.resurrect
|
||||||
|
tmuxPlugins.vim-tmux-navigator
|
||||||
|
tmuxPlugins.yank
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
{ pkgs, self, ... }:
|
{ pkgs, self, ... }:
|
||||||
let
|
let
|
||||||
theme = import "${self}/lib/theme" { inherit pkgs; };
|
theme = import "${self}/lib/theme" { inherit pkgs; };
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
programs.wezterm = {
|
programs.wezterm = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableZshIntegration = true;
|
enableZshIntegration = true;
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
ls = "lsd";
|
ls = "lsd";
|
||||||
run = "./run";
|
run = "./run";
|
||||||
s = "secrets";
|
s = "secrets";
|
||||||
secrets = "doppler --project \"$(whoami)\" run";
|
secrets = ''doppler --project "$(whoami)" run'';
|
||||||
switch = "run nixos nixedo switch";
|
switch = "run nixos nixedo switch";
|
||||||
sz = "source ~/.config/zsh/.zshrc";
|
sz = "source ~/.config/zsh/.zshrc";
|
||||||
tag = "tag-release";
|
tag = "tag-release";
|
||||||
|
@ -62,7 +62,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
shellGlobalAliases = {
|
shellGlobalAliases = {
|
||||||
A1 = "| awk '{print \$1}'";
|
A1 = "| awk '{print $1}'";
|
||||||
Fj = "| jq .";
|
Fj = "| jq .";
|
||||||
Fy = "| yq .";
|
Fy = "| yq .";
|
||||||
G = "| grep";
|
G = "| grep";
|
||||||
|
@ -175,7 +175,10 @@
|
||||||
plugins = [
|
plugins = [
|
||||||
{
|
{
|
||||||
name = "themes/robbyrussell";
|
name = "themes/robbyrussell";
|
||||||
tags = [ "from:oh-my-zsh" "as:theme" ];
|
tags = [
|
||||||
|
"from:oh-my-zsh"
|
||||||
|
"as:theme"
|
||||||
|
];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
name = "plugin/git";
|
name = "plugin/git";
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{ pkgs, ... }: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
fonts = {
|
fonts = {
|
||||||
monospace = {
|
monospace = {
|
||||||
name = "MesloLGSDZ Nerd Font Mono";
|
name = "MesloLGSDZ Nerd Font Mono";
|
||||||
|
|
|
@ -1,21 +1,32 @@
|
||||||
{ inputs, self, username }:
|
{
|
||||||
|
inputs,
|
||||||
|
self,
|
||||||
|
username,
|
||||||
|
}:
|
||||||
{ system }:
|
{ system }:
|
||||||
|
|
||||||
let
|
let
|
||||||
pkgs = inputs.nixpkgs.legacyPackages.${system};
|
pkgs = inputs.nixpkgs.legacyPackages.${system};
|
||||||
|
|
||||||
shared-config = import "${self}/lib/shared/home-manager.nix" {
|
shared-config = import "${self}/lib/shared/home-manager.nix" {
|
||||||
inherit inputs pkgs self username;
|
inherit
|
||||||
|
inputs
|
||||||
|
pkgs
|
||||||
|
self
|
||||||
|
username
|
||||||
|
;
|
||||||
};
|
};
|
||||||
shared-packages = import "${self}/lib/shared/home-manager-packages.nix" {
|
shared-packages = import "${self}/lib/shared/home-manager-packages.nix" { inherit inputs pkgs; };
|
||||||
inherit inputs pkgs;
|
in
|
||||||
};
|
inputs.home-manager.lib.homeManagerConfiguration {
|
||||||
in inputs.home-manager.lib.homeManagerConfiguration {
|
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
|
|
||||||
extraSpecialArgs = { inherit self; };
|
extraSpecialArgs = {
|
||||||
|
inherit self;
|
||||||
|
};
|
||||||
|
|
||||||
modules = [{
|
modules = [
|
||||||
|
{
|
||||||
imports = [ shared-config ];
|
imports = [ shared-config ];
|
||||||
|
|
||||||
home.packages = shared-packages;
|
home.packages = shared-packages;
|
||||||
|
@ -27,5 +38,6 @@ in inputs.home-manager.lib.homeManagerConfiguration {
|
||||||
REPOS = "$HOME/Code";
|
REPOS = "$HOME/Code";
|
||||||
RIPGREP_CONFIG_PATH = "$HOME/.config/ripgrep/config";
|
RIPGREP_CONFIG_PATH = "$HOME/.config/ripgrep/config";
|
||||||
};
|
};
|
||||||
}];
|
}
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue