Format using nixfmt
This commit is contained in:
parent
a33c74c580
commit
b1421c97e1
27
flake.nix
27
flake.nix
|
@ -10,29 +10,20 @@
|
|||
# opdavies-nvim.url = "path:/home/opdavies/Code/github.com/opdavies/opdavies.nvim";
|
||||
};
|
||||
|
||||
outputs = inputs @ {
|
||||
flake-parts,
|
||||
self,
|
||||
...
|
||||
}: let
|
||||
outputs = inputs@{ flake-parts, self, ... }:
|
||||
let
|
||||
username = "opdavies";
|
||||
|
||||
mkNixos = import ./lib/nixos { inherit inputs self username; };
|
||||
mkWsl = import ./lib/wsl2 { inherit inputs self username; };
|
||||
in
|
||||
flake-parts.lib.mkFlake {inherit inputs;} {
|
||||
in flake-parts.lib.mkFlake { inherit inputs; } {
|
||||
systems = [ "x86_64-linux" ];
|
||||
|
||||
perSystem = {
|
||||
pkgs,
|
||||
self',
|
||||
...
|
||||
}: {
|
||||
packages.default = pkgs.mkShell {
|
||||
nativeBuildInputs = [pkgs.just];
|
||||
};
|
||||
perSystem = { pkgs, self', ... }: {
|
||||
packages.default =
|
||||
pkgs.mkShell { nativeBuildInputs = [ pkgs.nixfmt pkgs.just ]; };
|
||||
|
||||
formatter = pkgs.alejandra;
|
||||
formatter = pkgs.nixfmt;
|
||||
};
|
||||
|
||||
flake = {
|
||||
|
@ -43,9 +34,7 @@
|
|||
nixedo = mkNixos { desktop = true; };
|
||||
};
|
||||
|
||||
homeConfigurations = {
|
||||
wsl2 = mkWsl;
|
||||
};
|
||||
homeConfigurations = { wsl2 = mkWsl; };
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
{
|
||||
inputs,
|
||||
desktop ? false,
|
||||
self,
|
||||
}: {pkgs, ...}: let
|
||||
{ inputs, desktop ? false, self, }:
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
configure-gtk = pkgs.writeTextFile {
|
||||
name = "configure-gtk";
|
||||
destination = "/bin/configure-gtk";
|
||||
|
@ -128,8 +126,7 @@ in {
|
|||
xfce.thunar
|
||||
xfce.thunar-volman
|
||||
xfce.tumbler
|
||||
]
|
||||
++ pkgs.lib.optionals desktop [
|
||||
] ++ pkgs.lib.optionals desktop [
|
||||
acpi
|
||||
arandr
|
||||
dunst
|
||||
|
@ -190,9 +187,7 @@ in {
|
|||
fonts = {
|
||||
fontconfig = {
|
||||
enable = true;
|
||||
defaultFonts = {
|
||||
monospace = ["JetBrainsMono Nerd Font Mono"];
|
||||
};
|
||||
defaultFonts = { monospace = [ "JetBrainsMono Nerd Font Mono" ]; };
|
||||
};
|
||||
|
||||
packages = with pkgs;
|
||||
|
@ -207,10 +202,7 @@ in {
|
|||
"JetBrainsMono"
|
||||
];
|
||||
})
|
||||
]
|
||||
++ [
|
||||
theme.fonts.monospace.package
|
||||
];
|
||||
] ++ [ theme.fonts.monospace.package ];
|
||||
};
|
||||
|
||||
zramSwap.enable = true;
|
||||
|
@ -241,7 +233,8 @@ in {
|
|||
'';
|
||||
in {
|
||||
enable = true;
|
||||
plugins = pkgs.lib.mkForce [pkgs.interception-tools-plugins.dual-function-keys];
|
||||
plugins =
|
||||
pkgs.lib.mkForce [ pkgs.interception-tools-plugins.dual-function-keys ];
|
||||
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"
|
||||
DEVICE:
|
||||
|
@ -286,9 +279,8 @@ in {
|
|||
services.cron = {
|
||||
enable = true;
|
||||
|
||||
systemCronJobs = [
|
||||
"* * * * * opdavies /home/opdavies/.config/bin/notify-battery.sh"
|
||||
];
|
||||
systemCronJobs =
|
||||
[ "* * * * * opdavies /home/opdavies/.config/bin/notify-battery.sh" ];
|
||||
};
|
||||
|
||||
services.auto-cpufreq.enable = true;
|
||||
|
|
|
@ -1,14 +1,9 @@
|
|||
{
|
||||
inputs,
|
||||
self,
|
||||
username,
|
||||
}: {
|
||||
desktop ? false,
|
||||
}: let
|
||||
{ inputs, self, username, }:
|
||||
{ desktop ? false, }:
|
||||
let
|
||||
configuration = import ./configuration.nix { inherit desktop inputs self; };
|
||||
hardwareConfiguration = import ./hardware-configuration.nix;
|
||||
in
|
||||
inputs.nixpkgs.lib.nixosSystem {
|
||||
in inputs.nixpkgs.lib.nixosSystem {
|
||||
modules = [
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
{
|
||||
|
|
|
@ -1,13 +1,8 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
{ config, lib, pkgs, modulesPath, ... }: {
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
boot.initrd.availableKernelModules = ["xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod"];
|
||||
boot.initrd.availableKernelModules =
|
||||
[ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.kernelParams = [ "i8042.reset" ];
|
||||
|
|
|
@ -1,26 +1,20 @@
|
|||
{
|
||||
config,
|
||||
desktop,
|
||||
inputs,
|
||||
pkgs,
|
||||
self,
|
||||
username,
|
||||
...
|
||||
}: let
|
||||
desktop-config = import ./desktop.nix {inherit config inputs pkgs username;};
|
||||
shared-config = import "${self}/lib/shared/home-manager.nix" {inherit inputs pkgs self username;};
|
||||
shared-packages = import "${self}/lib/shared/home-manager-packages.nix" {inherit inputs pkgs;};
|
||||
{ config, desktop, inputs, pkgs, self, username, ... }:
|
||||
let
|
||||
desktop-config =
|
||||
import ./desktop.nix { inherit config inputs pkgs username; };
|
||||
shared-config = import "${self}/lib/shared/home-manager.nix" {
|
||||
inherit inputs pkgs self username;
|
||||
};
|
||||
shared-packages = import "${self}/lib/shared/home-manager-packages.nix" {
|
||||
inherit inputs pkgs;
|
||||
};
|
||||
|
||||
pkgs-2311 = inputs.nixpkgs-2311.legacyPackages.${pkgs.system};
|
||||
in {
|
||||
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.gimp
|
||||
pkgs.gscan2pdf
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
{
|
||||
config,
|
||||
inputs,
|
||||
pkgs,
|
||||
username,
|
||||
}: {
|
||||
{ config, inputs, pkgs, username, }: {
|
||||
imports = [
|
||||
./modules/alacritty.nix
|
||||
./modules/autorandr.nix
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
self,
|
||||
...
|
||||
}: let
|
||||
{ lib, pkgs, self, ... }:
|
||||
let
|
||||
inherit (lib) strings;
|
||||
inherit (strings) toInt;
|
||||
|
||||
|
|
|
@ -14,8 +14,10 @@
|
|||
enable = true;
|
||||
|
||||
profiles = let
|
||||
laptop = "00ffffffffffff000daef21400000000161c0104a51f117802ee95a3544c99260f505400000001010101010101010101010101010101363680a0703820402e1e240035ad10000018000000fe004e3134304843472d4751320a20000000fe00434d4e0a202020202020202020000000fe004e3134304843472d4751320a2000bb";
|
||||
monitor = "00ffffffffffff004c2d1710424e58432b1f0103803f24782ac8b5ad50449e250f5054bfef80714f810081c081809500a9c0b300010108e80030f2705a80b0588a0078682100001e000000fd00324b1e873c000a202020202020000000fc004c5532385235350a2020202020000000ff0048345a524130303132380a20200183020335f04961120313041f10605f2309070783010000e305c0006b030c002000b83c2000200167d85dc401788003e20f81e3060501023a801871382d40582c450078682100001e023a80d072382d40102c458078682100001e04740030f2705a80b0588a0078682100001e565e00a0a0a029503020350078682100001a000049";
|
||||
laptop =
|
||||
"00ffffffffffff000daef21400000000161c0104a51f117802ee95a3544c99260f505400000001010101010101010101010101010101363680a0703820402e1e240035ad10000018000000fe004e3134304843472d4751320a20000000fe00434d4e0a202020202020202020000000fe004e3134304843472d4751320a2000bb";
|
||||
monitor =
|
||||
"00ffffffffffff004c2d1710424e58432b1f0103803f24782ac8b5ad50449e250f5054bfef80714f810081c081809500a9c0b300010108e80030f2705a80b0588a0078682100001e000000fd00324b1e873c000a202020202020000000fc004c5532385235350a2020202020000000ff0048345a524130303132380a20200183020335f04961120313041f10605f2309070783010000e305c0006b030c002000b83c2000200167d85dc401788003e20f81e3060501023a801871382d40582c450078682100001e023a80d072382d40102c458078682100001e04740030f2705a80b0588a0078682100001e565e00a0a0a029503020350078682100001a000049";
|
||||
in {
|
||||
laptop = {
|
||||
config.eDP-1 = {
|
||||
|
|
|
@ -1,3 +1 @@
|
|||
{
|
||||
services.copyq.enable = true;
|
||||
}
|
||||
{ services.copyq.enable = true; }
|
||||
|
|
|
@ -2,10 +2,6 @@
|
|||
services.dunst = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
global = {
|
||||
follow = "keyboard";
|
||||
};
|
||||
};
|
||||
settings = { global = { follow = "keyboard"; }; };
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,14 +1,9 @@
|
|||
let
|
||||
baseUrl = "https://www.oliverdavies.uk";
|
||||
let baseUrl = "https://www.oliverdavies.uk";
|
||||
in {
|
||||
services.espanso = {
|
||||
enable = true;
|
||||
|
||||
configs = {
|
||||
default = {
|
||||
show_notifications = false;
|
||||
};
|
||||
};
|
||||
configs = { default = { show_notifications = false; }; };
|
||||
|
||||
matches = {
|
||||
base = {
|
||||
|
|
|
@ -1,3 +1 @@
|
|||
{
|
||||
programs.feh.enable = true;
|
||||
}
|
||||
{ programs.feh.enable = true; }
|
||||
|
|
|
@ -1,11 +1,7 @@
|
|||
{
|
||||
config,
|
||||
inputs,
|
||||
self,
|
||||
username,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
{ config, inputs, pkgs, self, username, ... }:
|
||||
let
|
||||
theme = import "${self}/lib/theme" { inherit pkgs; };
|
||||
|
||||
modifier = "Mod4";
|
||||
in {
|
||||
xsession.windowManager.i3 = {
|
||||
|
@ -15,10 +11,7 @@ in {
|
|||
assigns = {
|
||||
"7" = [{ class = "vlc"; }];
|
||||
"8" = [{ class = "0ad"; }];
|
||||
"9" = [
|
||||
{class = "Slack";}
|
||||
{class = "discord";}
|
||||
];
|
||||
"9" = [ { class = "Slack"; } { class = "discord"; } ];
|
||||
};
|
||||
|
||||
defaultWorkspace = "workspace number 1";
|
||||
|
@ -52,10 +45,13 @@ in {
|
|||
|
||||
"XF86AudioRaiseVolume" = "exec pamixer -ui 2 && pamixer --get-volume";
|
||||
"XF86AudioLowerVolume" = "exec pamixer -ud 2 && pamixer --get-volume";
|
||||
"XF86AudioMute" = "exec pamixer --toggle-mute && ( [ \"$(pamixer --get-mute)\" = \"true\" ] && echo 0";
|
||||
"XF86AudioMute" = ''
|
||||
exec pamixer --toggle-mute && ( [ "$(pamixer --get-mute)" = "true" ] && echo 0'';
|
||||
|
||||
"XF86MonBrightnessDown" = "exec brightnessctl set 5%- | sed -En 's/.*\(([0-9]+)%\).*/\1/p'";
|
||||
"XF86MonBrightnessUp" = "exec brightnessctl set +5% | sed -En 's/.*\(([0-9]+)%\).*/\1/p'";
|
||||
"XF86MonBrightnessDown" =
|
||||
"exec brightnessctl set 5%- | sed -En 's/.*(([0-9]+)%).*/1/p'";
|
||||
"XF86MonBrightnessUp" =
|
||||
"exec brightnessctl set +5% | sed -En 's/.*(([0-9]+)%).*/1/p'";
|
||||
};
|
||||
|
||||
terminal = "alacritty";
|
||||
|
@ -80,14 +76,12 @@ in {
|
|||
'';
|
||||
|
||||
config = {
|
||||
bars = [
|
||||
{
|
||||
bars = [{
|
||||
position = "bottom";
|
||||
statusCommand = "${pkgs.i3status}/bin/i3status";
|
||||
}
|
||||
];
|
||||
}];
|
||||
|
||||
fonts.names = ["GeistMono"];
|
||||
fonts.names = [ "${theme.fonts.monospace.name}" ];
|
||||
|
||||
gaps = {
|
||||
smartBorders = "on";
|
||||
|
|
|
@ -1,3 +1 @@
|
|||
{
|
||||
programs.rofi.enable = true;
|
||||
}
|
||||
{ programs.rofi.enable = true; }
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{ inputs, pkgs, ... }:
|
||||
with pkgs; [
|
||||
awscli2
|
||||
bitwarden-cli
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
username,
|
||||
self,
|
||||
}: {
|
||||
{ inputs, pkgs, username, self, }: {
|
||||
home.username = "${username}";
|
||||
home.homeDirectory = "/home/${username}";
|
||||
|
||||
|
|
|
@ -1,3 +1 @@
|
|||
{
|
||||
programs.bat.enable = true;
|
||||
}
|
||||
{ programs.bat.enable = true; }
|
||||
|
|
|
@ -54,10 +54,12 @@
|
|||
current-branch = "rev-parse --abbrev-ref HEAD";
|
||||
dc = "diff --color --word-diff --cached";
|
||||
df = "diff --color --word-diff";
|
||||
dup = "!git checkout develop && git fetch origin && echo && git sl develop..origin/develop && echo && git pull --quiet && git checkout -";
|
||||
dup =
|
||||
"!git checkout develop && git fetch origin && echo && git sl develop..origin/develop && echo && git pull --quiet && git checkout -";
|
||||
fixup = "commit --fixup";
|
||||
issues = "!gh issue list --web";
|
||||
mup = "!git master-to-main-wrapper checkout %BRANCH% && git fetch origin && echo && git sl %BRANCH%..origin/%BRANCH% && echo && git pull --quiet && git checkout -";
|
||||
mup =
|
||||
"!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";
|
||||
pl = "pull";
|
||||
prune = "remote prune origin";
|
||||
|
@ -69,10 +71,12 @@
|
|||
repush = "!git pull --rebase && git push";
|
||||
ri = "rebase --interactive";
|
||||
rid = "!git rebase -i $(git merge-base develop HEAD)";
|
||||
rim = "!git rebase -i $(git master-to-main-wrapper merge-base %BRANCH% HEAD)";
|
||||
rim =
|
||||
"!git rebase -i $(git master-to-main-wrapper merge-base %BRANCH% HEAD)";
|
||||
rip = "!git rebase -i $(git merge-base production HEAD)";
|
||||
ris = "!git rebase -i $(git merge-base staging HEAD)";
|
||||
riu = "!git rebase -i $(git rev-parse --abbrev-ref --symbolic-full-name @{u})";
|
||||
riu =
|
||||
"!git rebase -i $(git rev-parse --abbrev-ref --symbolic-full-name @{u})";
|
||||
rmup = "!git mup && git master-to-main-wrapper rebase %BRANCH%";
|
||||
sl = "log --oneline --decorate -20";
|
||||
sla = "log --oneline --decorate --graph --all -20";
|
||||
|
|
|
@ -1,3 +1 @@
|
|||
{
|
||||
programs.lsd.enable = true;
|
||||
}
|
||||
{ programs.lsd.enable = true; }
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{inputs}: {pkgs, ...}: let
|
||||
system = pkgs.system;
|
||||
{ inputs }:
|
||||
{ pkgs, ... }:
|
||||
let system = pkgs.system;
|
||||
in {
|
||||
programs.neovim = inputs.opdavies-nvim.lib.mkHomeManager { inherit system; };
|
||||
|
||||
|
|
|
@ -1,3 +1 @@
|
|||
{
|
||||
programs.nnn.enable = true;
|
||||
}
|
||||
{ programs.nnn.enable = true; }
|
||||
|
|
|
@ -1,3 +1 @@
|
|||
{
|
||||
programs.starship.enable = true;
|
||||
}
|
||||
{ programs.starship.enable = true; }
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{pkgs, ...}: let
|
||||
inherit (pkgs) tmuxPlugins;
|
||||
{ pkgs, ... }:
|
||||
let inherit (pkgs) tmuxPlugins;
|
||||
in {
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
|
@ -102,10 +102,7 @@ in {
|
|||
set -g @resurrect-strategy-nvim 'session'
|
||||
'';
|
||||
|
||||
plugins = [
|
||||
tmuxPlugins.resurrect
|
||||
tmuxPlugins.vim-tmux-navigator
|
||||
tmuxPlugins.yank
|
||||
];
|
||||
plugins =
|
||||
[ tmuxPlugins.resurrect tmuxPlugins.vim-tmux-navigator tmuxPlugins.yank ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
{ pkgs, ... }: {
|
||||
fonts = {
|
||||
monospace = {
|
||||
name = "MesloLGSDZ Nerd Font Mono";
|
||||
name = "JetBrainsMono Nerd Font Mono";
|
||||
# fc-list : family | sort | grep "Nerd Font"
|
||||
|
||||
package = pkgs.nerdfonts.override {fonts = ["Meslo"];};
|
||||
size = "10";
|
||||
package = pkgs.nerdfonts.override { fonts = [ "JetBrainsMono" ]; };
|
||||
size = "8";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,19 +1,17 @@
|
|||
{
|
||||
inputs,
|
||||
self,
|
||||
system,
|
||||
username,
|
||||
}: let
|
||||
{ inputs, self, system, username, }:
|
||||
let
|
||||
pkgs = inputs.nixpkgs.legacyPackages.${system};
|
||||
|
||||
shared-config = import "${self}/lib/shared/home-manager.nix" {inherit inputs pkgs self username;};
|
||||
shared-packages = import "${self}/lib/shared/home-manager-packages.nix" {inherit inputs pkgs;};
|
||||
in
|
||||
inputs.home-manager.lib.homeManagerConfiguration {
|
||||
shared-config = import "${self}/lib/shared/home-manager.nix" {
|
||||
inherit inputs pkgs self username;
|
||||
};
|
||||
shared-packages = import "${self}/lib/shared/home-manager-packages.nix" {
|
||||
inherit inputs pkgs;
|
||||
};
|
||||
in inputs.home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
|
||||
modules = [
|
||||
{
|
||||
modules = [{
|
||||
imports = [ shared-config ];
|
||||
|
||||
home.packages = shared-packages;
|
||||
|
@ -24,6 +22,5 @@ in
|
|||
PULUMI_SKIP_UPDATE_CHECK = "true";
|
||||
RIPGREP_CONFIG_PATH = "$HOME/.config/ripgrep/config";
|
||||
};
|
||||
}
|
||||
];
|
||||
}];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue