Formatting pass with alejandra

This commit is contained in:
Evie Litherland-Smith 2023-05-17 17:10:18 +01:00
parent bd8711db77
commit 3a282dbee5
84 changed files with 259 additions and 292 deletions

View file

@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
imports = [
./home
./common.nix

View file

@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
imports = [
./home
./common.nix

View file

@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
imports = [
./home
./common.nix
@ -18,7 +17,10 @@
networking.hostName = "Vanguard"; # Define your hostname.
#networking.wireless.networks."LAN LAN Ranch".pskRaw = "d4c31e976456783b61d573ee49c94f93914a81bf1048c2f2e1e166c36bdfcd4a";
networking.nameservers = ["192.168.1.166" "9.9.9.9"];
networking.firewall = { enable = true; allowedTCPPorts = [ 22 ]; };
networking.firewall = {
enable = true;
allowedTCPPorts = [22];
};
users.users.xenia = {
isNormalUser = true;

View file

@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
nix.settings.experimental-features = ["nix-command" "flakes"];
# Allow unfree packages
nixpkgs.config.allowUnfree = true;

View file

@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
nixpkgs.overlays = [
(self: super: {
waybar = super.waybar.overrideAttrs (oldAttrs: {

View file

@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
imports = [
./xserver.nix
./sddm.nix

View file

@ -1,5 +1,7 @@
{ stdenv, fetchFromGitHub }:
{
stdenv,
fetchFromGitHub,
}: {
sddm-catppuccin-macchiato = stdenv.mkDerivation rec {
pname = "sddm-catppuccin-macchiato-theme";
version = "1.0";

View file

@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
imports = [./xserver.nix ./sddm.nix];
services.xserver.desktopManager.plasma5.enable = true;
programs.kdeconnect.enable = true;

View file

@ -1,8 +1,6 @@
{ pkgs, ... }:
let
{pkgs, ...}: let
sddm-catppuccin-macchiato = pkgs.callPackage ./pkgs/sddm-catppuccin-macchiato.nix {};
in
{
in {
environment.systemPackages = [
sddm-catppuccin-macchiato.sddm-catppuccin-macchiato
];

View file

@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
environment.systemPackages = [pkgs.mesa];
programs.gamescope.enable = true;
programs.steam = {

View file

@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
imports = [
./xserver.nix
./sddm.nix

View file

@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
imports = [
./xserver.nix
./sddm.nix

View file

@ -1,5 +1,4 @@
{ ... }:
{
{...}: {
services.xserver = {
enable = true;
layout = "gb";

View file

@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
# Enable sound with pipewire.
sound.enable = true;
hardware.pulseaudio.enable = false;

View file

@ -1,5 +1,4 @@
{ ... }:
{
{...}: {
hardware.bluetooth = {
enable = true;
powerOnBoot = true;

View file

@ -1,5 +1,4 @@
{ ... }:
{
{...}: {
imports = [
../env
../tui

View file

@ -1,5 +1,3 @@
{ ... }:
let
{...}: let
home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/master.tar.gz";
in
{ imports = [ (import "${home-manager}/nixos") ]; }
in {imports = [(import "${home-manager}/nixos")];}

View file

@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
home.packages = with pkgs; [
nitrogen
polybar
@ -37,6 +36,6 @@
"Bitwarden".desktop = "^7";
"Nxplayer.bin".desktop = "^8";
};
extraConfig = builtins.readFile (./config/bspwm/startup.sh);
extraConfig = builtins.readFile ./config/bspwm/startup.sh;
};
}

View file

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

View file

@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
home.packages = with pkgs; [
jq
socat

View file

@ -1,5 +1,8 @@
{ pkgs, config, ... }:
{
pkgs,
config,
...
}: {
gtk = {
enable = true;
cursorTheme = {

View file

@ -1,12 +1,12 @@
{ pkgs, ... }:
let
{pkgs, ...}: let
flake-compat = builtins.fetchTarball "https://github.com/edolstra/flake-compat/archive/master.tar.gz";
hyprland = (import flake-compat {
hyprland =
(import flake-compat {
src = builtins.fetchTarball "https://github.com/hyprwm/Hyprland/archive/2df0d034bc4a18fafb3524401eeeceaa6b23e753.tar.gz";
}).defaultNix;
in
{
})
.defaultNix;
in {
imports = [
hyprland.homeManagerModules.default
./swaylock.nix
@ -29,6 +29,9 @@ in
xdg.configFile."hypr/window-rules.conf".source = ./config/hypr/window-rules.conf;
wayland.windowManager.hyprland = {
enable = true;
xwayland = { enable = true; hidpi = true; };
xwayland = {
enable = true;
hidpi = true;
};
};
}

View file

@ -1,5 +1,4 @@
{ ... }:
{
{...}: {
services.picom = {
enable = true;
backend = "glx";

View file

@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
home.packages = with pkgs; [bluez];
services.polybar = {
enable = true;

View file

@ -1,9 +1,7 @@
{ pkgs, ... }:
let
{pkgs, ...}: let
powermenu = pkgs.writeShellScriptBin "powermenu" (builtins.readFile ./scripts/powermenu);
power-profiles = pkgs.writeShellScriptBin "power-profiles" (builtins.readFile ./scripts/power-profiles);
in
{
in {
imports = [../gui/foot.nix];
home.packages = with pkgs; [papirus-icon-theme powermenu power-profiles];
programs.rofi = {

View file

@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
#xdg.configFile."sway".source = ./config/sway;
home.packages = with pkgs; [brightnessctl];
wayland.windowManager.sway = {enable = true;};

View file

@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
programs.swaylock = {
enable = true;
package = pkgs.swaylock-effects;

View file

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

View file

@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
home.packages = with pkgs; [
(nerdfonts.override {fonts = ["FiraCode"];})
bluez

View file

@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
imports = [
./gtk.nix
./bspwm.nix

View file

@ -1,6 +1,6 @@
{ pkgs, ... }:
{
xresources.extraConfig = builtins.readFile
{pkgs, ...}: {
xresources.extraConfig =
builtins.readFile
(
pkgs.fetchFromGitHub
{
@ -8,14 +8,18 @@
repo = "xresources";
rev = "d82c02323e05158ad35f302771e3695affafab78";
sha256 = "irRQPjvcTH6AUC07Sm2l77CkrZQNHNJXxBDBSIhl1Fg=";
} + "/macchiato.Xresources"
) + "\n" + builtins.readFile (
}
+ "/macchiato.Xresources"
)
+ "\n"
+ builtins.readFile (
pkgs.fetchFromGitHub
{
owner = "catppuccin";
repo = "urxvt";
rev = "ccd8eb763edd0a382b5e9bbfbd9697c4d4129edf";
sha256 = "YFlSGJzWWB57eSXiUY4l/mSBbOY0an+qej6//YLSiuE=";
} + "/macchiato.Xresources"
}
+ "/macchiato.Xresources"
);
}

4
home/env/bash.nix vendored
View file

@ -1,6 +1,4 @@
{ ... }:
{
{...}: {
programs.bash = {
enable = true;
shellAliases = {

6
home/env/bat.nix vendored
View file

@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
programs.bat = {
enable = true;
config = {
@ -12,7 +11,8 @@
repo = "bat";
rev = "ba4d16880d63e656acced2b7d4e034e4a93f74b1";
sha256 = "6WVKQErGdaqb++oaXnY3i6/GuH2FhTgK0v4TN4Y0Wbw=";
} + "/Catppuccin-macchiato.tmTheme");
}
+ "/Catppuccin-macchiato.tmTheme");
};
};
}

View file

@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
imports = [
./bash.nix
./bat.nix

3
home/env/direnv.nix vendored
View file

@ -1,4 +1,3 @@
{ ... }:
{
{...}: {
programs.direnv.enable = true;
}

4
home/env/fish.nix vendored
View file

@ -1,6 +1,4 @@
{ ... }:
{
{...}: {
programs.fish = {
enable = true;
shellAbbrs = {

View file

@ -1,5 +1,4 @@
{ ... }:
{
{...}: {
programs.keychain = {
enable = true;
extraFlags = ["--quiet" "--noask" "--ignore-missing"];

View file

@ -1,4 +1,3 @@
{ ... }:
{
{...}: {
programs.nix-index.enable = true;
}

View file

@ -1,5 +1,4 @@
{ ... }:
{
{...}: {
programs.readline = {
enable = true;
includeSystemConfig = true;

View file

@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
home.packages = with pkgs; [(nerdfonts.override {fonts = ["FiraCode"];})];
xdg.configFile."starship.toml".source = ./config/starship.toml;
programs.starship.enable = true;

4
home/env/zsh.nix vendored
View file

@ -1,6 +1,4 @@
{ config, ... }:
{
{config, ...}: {
programs.zsh = {
enable = true;
shellAliases = {

View file

@ -1,5 +1,4 @@
{ ... }:
{
{...}: {
programs.git = {
enable = true;
userName = "Evie Litherland-Smith";

View file

@ -1,5 +1,4 @@
{ ... }:
{
{...}: {
imports = [./common.nix];
programs.git.userEmail = "evie@xenia.me.uk";
}

View file

@ -1,5 +1,4 @@
{ ... }:
{
{...}: {
imports = [./common.nix];
programs.git.userEmail = "evie.litherland-smith@ukaea.uk";
}

View file

@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
imports = [./wezterm.nix];
programs.firefox.enable = true;
programs.librewolf.enable = true;

View file

@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
home.packages = with pkgs; [(nerdfonts.override {fonts = ["FiraCode"];})];
programs.foot = {
enable = true;

View file

@ -1,6 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
programs.kitty = {
enable = true;
font = {

View file

@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
home.packages = with pkgs; [(nerdfonts.override {fonts = ["FiraCode"];})];
programs.urxvt = {
enable = true;

View file

@ -1,5 +1,4 @@
{ ... }:
{
{...}: {
programs.wezterm = {
enable = true;
extraConfig = ''

View file

@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
imports = [
./env
./gui

View file

@ -1,5 +1,4 @@
{ ... }:
{
{...}: {
programs.ssh = {
enable = true;
forwardAgent = true;

View file

@ -1,5 +1,4 @@
{ lib, ... }:
{
{lib, ...}: {
imports = [./common.nix];
programs.ssh.matchBlocks = {
"vanguard" = {user = "xenia";};

View file

@ -1,5 +1,8 @@
{ pkgs, lib, ... }:
{
pkgs,
lib,
...
}: {
imports = [./common.nix];
home.packages = with pkgs; [sshfs];
programs.ssh.matchBlocks = {

View file

@ -1,5 +1,4 @@
{ ... }:
{
{...}: {
imports = [
./neovim.nix
./lazygit.nix

View file

@ -1,6 +1,4 @@
{ ... }:
{
{...}: {
programs.lazygit = {
enable = true;
settings = import ./config/lazygit.nix;

View file

@ -1,17 +1,20 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
imports = [./common.nix];
programs.tmux = {
enable = true;
clock24 = true;
extraConfig = builtins.readFile (./config/tmux.conf) + "\n" + builtins.readFile (
extraConfig =
builtins.readFile ./config/tmux.conf
+ "\n"
+ builtins.readFile (
pkgs.fetchFromGitHub
{
owner = "catppuccin";
repo = "tmux";
rev = "4e48b09a76829edc7b55fbb15467cf0411f07931";
sha256 = "bXEsxt4ozl3cAzV3ZyvbPsnmy0RAdpLxHwN82gvjLdU=";
} + "/catppuccin-macchiato.tmuxtheme"
}
+ "/catppuccin-macchiato.tmuxtheme"
);
};
}

View file

@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
imports = [
./env
./gui

View file

@ -1,5 +1,8 @@
{ config, pkgs, ... }:
{
config,
pkgs,
...
}: {
# Set your time zone.
time.timeZone = "Europe/London";

View file

@ -1,5 +1,4 @@
{ ... }:
{
{...}: {
imports = [./traefik.nix];
services.adguardhome = {
enable = true;
@ -12,7 +11,11 @@
allowedUDPPorts = [53];
};
services.traefik.dynamicConfigOptions.http = {
routers.adguard = { rule = "Host(`guard.xenia.me.uk`)"; service = "adguard-webinterface"; tls = { certResolver = "default"; }; };
routers.adguard = {
rule = "Host(`guard.xenia.me.uk`)";
service = "adguard-webinterface";
tls = {certResolver = "default";};
};
services.adguard-webinterface.loadBalancer.servers = [{url = "http://localhost:3001";}];
};
}

View file

@ -1,5 +1,4 @@
{ ... }:
{
{...}: {
services.fail2ban = {
enable = true;
ignoreIP = ["127.0.0.1/8" "::1" "192.168.1.0/16"];

View file

@ -1,5 +1,4 @@
{ ... }:
{
{...}: {
imports = [./traefik.nix ./fail2ban.nix];
services.gitea = {
enable = true;
@ -15,7 +14,11 @@
};
networking.firewall.allowedTCPPorts = [80 443 2222];
services.traefik.dynamicConfigOptions.http = {
routers.gitea = { rule = "Host(`git.xenia.me.uk`)"; service = "gitea-websecure"; tls = { certResolver = "default"; }; };
routers.gitea = {
rule = "Host(`git.xenia.me.uk`)";
service = "gitea-websecure";
tls = {certResolver = "default";};
};
services.gitea-websecure.loadBalancer.servers = [{url = "http://localhost:3000";}];
};
services.fail2ban.jails.gitea = ''

View file

@ -1,5 +1,8 @@
{ pkgs, config, ... }:
{
pkgs,
config,
...
}: {
imports = [./traefik.nix ./fail2ban.nix];
services.nextcloud = {
enable = true;
@ -10,7 +13,12 @@
adminpassFile = "/secrets/nextcloud_admin.txt";
};
};
services.nginx.virtualHosts.${config.services.nextcloud.hostName}.listen = [{ addr = "localhost"; port = 8000; }];
services.nginx.virtualHosts.${config.services.nextcloud.hostName}.listen = [
{
addr = "localhost";
port = 8000;
}
];
services.traefik.dynamicConfigOptions.http = {
routers.nextcloud = {
rule = "Host(`cloud.xenia.me.uk`)";

View file

@ -1,5 +1,4 @@
{ ... }:
{
{...}: {
services.openssh = {
enable = true;
ports = [2222];

View file

@ -1,5 +1,4 @@
{ ... }:
{
{...}: {
imports = [./fail2ban.nix];
services.traefik = {
enable = true;
@ -20,11 +19,18 @@
};
};
dynamicConfigOptions.http = {
routers.traefik = { rule = "Host(`traefik.xenia.me.uk`)"; service = "traefik-webinterface"; tls = { certResolver = "default"; }; };
routers.traefik = {
rule = "Host(`traefik.xenia.me.uk`)";
service = "traefik-webinterface";
tls = {certResolver = "default";};
};
services.traefik-webinterface.loadBalancer.servers = [{url = "http://localhost:8080";}];
};
};
networking.firewall = { enable = true; allowedTCPPorts = [ 80 443 8080 ]; };
networking.firewall = {
enable = true;
allowedTCPPorts = [80 443 8080];
};
services.fail2ban.jails.traefik = ''
enabled = true
filter = traefik-auth

View file

@ -1,5 +1,4 @@
{ ... }:
{
{...}: {
imports = [./default.nix ./devices/ion.nix];
services.syncthing = {
user = "elitherl";

View file

@ -1,5 +1,4 @@
{ ... }:
{
{...}: {
imports = [
./default.nix
./devices/ion.nix

View file

@ -1,5 +1,4 @@
{ lib, ... }:
{
{lib, ...}: {
imports = [./folders];
services.syncthing = {
enable = true;

View file

@ -1,4 +1,3 @@
{ ... }:
{
{...}: {
services.syncthing.devices."H0615" = {id = "VVKKUT6-DMNEJ6J-ZI2QREG-SOLG7S5-V2V6WN3-UCQH2EN-6S2XXLS-FKN6KQF";};
}

View file

@ -1,4 +1,3 @@
{ ... }:
{
{...}: {
services.syncthing.devices."ion" = {id = "7DD4NPH-6T2ET5A-4FCLFWW-CS6UR2W-IO5XQXC-DM5B2Q4-6X7DGU2-UKKVEAB";};
}

View file

@ -1,4 +1,3 @@
{ ... }:
{
{...}: {
services.syncthing.devices."monarch" = {id = "CJSUZQY-67XBLEZ-VKVHQHI-BLEUZNF-G4237AV-AW44CGH-F3JDKXU-CWT3RQZ";};
}

View file

@ -1,4 +1,3 @@
{ ... }:
{
{...}: {
services.syncthing.devices."northstar" = {id = "DMQZNMB-BM3SSE4-5XV2GHE-IDRNFTS-QNZSICS-6JWHUCV-O3NHMWY-2OBC2QD";};
}

View file

@ -1,4 +1,3 @@
{ ... }:
{
{...}: {
services.syncthing.devices."remarkable" = {id = "GHB6JKS-JOA3HHP-TYHB3IJ-GLV26QW-RWRZAMG-XYFGFB6-QLUHDSH-GNPZVAO";};
}

View file

@ -1,4 +1,3 @@
{ ... }:
{
{...}: {
services.syncthing.devices."vanguard" = {id = "YNGBLJP-TWY6Y3C-DPPYAWL-3ZQFNQH-RDPIU5T-L54UI62-FPPA3JQ-WYXBZQZ";};
}

View file

@ -1,5 +1,4 @@
{ lib, ... }:
{
{lib, ...}: {
services.syncthing = {
folders = {
"Archive" = {

View file

@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
systemd.timers."nixos-pull-config" = {
wantedBy = ["timers.target"];
description = "Timer to update /etc/nixos/config/ repository";

View file

@ -1,10 +0,0 @@
{ pkgs ? import <nixpkgs> { } }:
let
myAppEnv = pkgs.poetry2nix.mkPoetryEnv {
projectDir = ./.;
editablePackageSources = {
my-app = ./src;
};
};
in
myAppEnv.env

View file

@ -1,4 +1,8 @@
{ pkgs ? import <nixpkgs> { }, python ? pkgs.python39, ... }:
{
pkgs ? import <nixpkgs> {},
python ? pkgs.python39,
...
}:
pkgs.mkShell {
nativeBuildInputs = with pkgs; [(python.withPackages (ps: with ps; [pip wheel])) poetry git];
shellHook = ''