Format code with alejandra
This commit is contained in:
40
flake.nix
40
flake.nix
@@ -11,8 +11,12 @@
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
outputs = { nixpkgs, home-manager, i3utils, ... }@inputs:
|
||||
let
|
||||
outputs = {
|
||||
nixpkgs,
|
||||
home-manager,
|
||||
i3utils,
|
||||
...
|
||||
} @ inputs: let
|
||||
system = "x86_64-linux";
|
||||
|
||||
pkgs = import nixpkgs {
|
||||
@@ -21,7 +25,11 @@
|
||||
|
||||
lib = nixpkgs.lib;
|
||||
|
||||
hostSystem = { hostname, headless }: lib.nixosSystem {
|
||||
hostSystem = {
|
||||
hostname,
|
||||
headless,
|
||||
}:
|
||||
lib.nixosSystem {
|
||||
inherit system;
|
||||
|
||||
modules = [
|
||||
@@ -32,20 +40,34 @@
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
users = import ./users;
|
||||
extraSpecialArgs = {inherit hostname; inherit headless;};
|
||||
extraSpecialArgs = {
|
||||
inherit hostname;
|
||||
inherit headless;
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
specialArgs = {inherit inputs;};
|
||||
};
|
||||
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
dingbox = hostSystem { hostname = "dingbox"; headless = false; };
|
||||
miniding = hostSystem { hostname = "miniding"; headless = false; };
|
||||
pingbox = hostSystem { hostname = "pingbox"; headless = false; };
|
||||
dingserver = hostSystem { hostname = "dingserver"; headless = true; };
|
||||
dingbox = hostSystem {
|
||||
hostname = "dingbox";
|
||||
headless = false;
|
||||
};
|
||||
miniding = hostSystem {
|
||||
hostname = "miniding";
|
||||
headless = false;
|
||||
};
|
||||
pingbox = hostSystem {
|
||||
hostname = "pingbox";
|
||||
headless = false;
|
||||
};
|
||||
dingserver = hostSystem {
|
||||
hostname = "dingserver";
|
||||
headless = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
{ config, pkgs, lib, ...}:
|
||||
{
|
||||
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
boot.loader.systemd-boot.enable = lib.mkDefault true;
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
{ config, pkgs, inputs, ...}:
|
||||
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
security.pam.services.gdm.enableGnomeKeyring = true;
|
||||
# Enable the X11 windowing system.
|
||||
hardware.opengl.driSupport32Bit = true;
|
||||
@@ -9,7 +12,6 @@
|
||||
networking.networkmanager.enable = true;
|
||||
programs.nm-applet.enable = true;
|
||||
|
||||
|
||||
services = {
|
||||
gnome.gnome-keyring.enable = true;
|
||||
|
||||
@@ -46,4 +48,3 @@
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
../common
|
||||
../common/graphical
|
||||
];
|
||||
|
||||
services.xserver = {
|
||||
|
||||
dpi = 144;
|
||||
videoDrivers = ["nvidia"];
|
||||
screenSection = ''
|
||||
@@ -21,7 +21,6 @@
|
||||
Option "AllowIndirectGLXProtocol" "off"
|
||||
Option "TripleBuffer" "on"
|
||||
'';
|
||||
|
||||
};
|
||||
|
||||
hardware.nvidia.modesetting.enable = true;
|
||||
@@ -38,4 +37,3 @@
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "21.05"; # Did you read the comment?
|
||||
}
|
||||
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = ["xhci_pci" "ehci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod"];
|
||||
@@ -13,13 +17,13 @@
|
||||
boot.kernelModules = ["kvm-intel"];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/1c0e1988-4420-4485-bf16-ffb8ec854c69";
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/1c0e1988-4420-4485-bf16-ffb8ec854c69";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/F5EA-A9CB";
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/F5EA-A9CB";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
{ pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
networking.firewall.allowedTCPPorts = [80 8448 443];
|
||||
|
||||
services.caddy = {
|
||||
enable = true;
|
||||
virtualHosts = {
|
||||
|
||||
"matrix.broccoli.town" = {
|
||||
extraConfig = ''
|
||||
reverse_proxy /_matrix/* http://localhost:8008
|
||||
@@ -37,7 +38,8 @@
|
||||
X-Content-Type-Options "nosniff"
|
||||
X-Robots-Tag "noindex, noarchive, nofollow"
|
||||
}
|
||||
root * ${pkgs.element-web.override {
|
||||
root * ${
|
||||
pkgs.element-web.override {
|
||||
conf = {
|
||||
default_server_config."m.homeserver" = {
|
||||
"base_url" = "https://broccoli.town";
|
||||
@@ -57,7 +59,6 @@
|
||||
file_server
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
../common
|
||||
./hardware-configuration.nix
|
||||
./caddy.nix
|
||||
@@ -29,6 +32,4 @@
|
||||
];
|
||||
|
||||
system.stateVersion = "21.11"; # Did you read the comment?
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/profiles/qemu-guest.nix")
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod"];
|
||||
@@ -13,8 +17,8 @@
|
||||
boot.kernelModules = [];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/f91229ad-de6b-49ad-8858-e49fea85e8a1";
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/f91229ad-de6b-49ad-8858-e49fea85e8a1";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
services.grafana = {
|
||||
enable = true;
|
||||
};
|
||||
@@ -14,9 +17,11 @@
|
||||
{
|
||||
job_name = "synapse";
|
||||
metrics_path = "/_synapse/metrics";
|
||||
static_configs = [{
|
||||
static_configs = [
|
||||
{
|
||||
targets = ["localhost:9000"];
|
||||
}];
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
fqdn = "matrix.broccoli.town";
|
||||
in {
|
||||
services.matrix-synapse = {
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
../common
|
||||
../common/graphical
|
||||
@@ -30,4 +31,3 @@
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "21.05"; # Did you read the comment?
|
||||
}
|
||||
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "usb_storage" "sd_mod"];
|
||||
@@ -13,16 +17,15 @@
|
||||
boot.kernelModules = ["kvm-intel"];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/6a362ee7-854b-4a5b-8989-e65af01b9b99";
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/6a362ee7-854b-4a5b-8989-e65af01b9b99";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/C103-FFC1";
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/C103-FFC1";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [];
|
||||
|
||||
}
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
../common
|
||||
../common/graphical
|
||||
@@ -55,6 +56,4 @@
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "21.05"; # Did you read the comment?
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = ["xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod"];
|
||||
@@ -13,13 +17,13 @@
|
||||
boot.kernelModules = ["kvm-intel"];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/3d0e0831-a08a-4d97-ad5b-d07448346dee";
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/3d0e0831-a08a-4d97-ad5b-d07448346dee";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/C4F1-BE4C";
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/C4F1-BE4C";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
{ config, lib, pkgs, ...}:
|
||||
|
||||
let
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
mod = "Mod4";
|
||||
in {
|
||||
|
||||
home.file = {
|
||||
"bin/scripts/goup" = {
|
||||
source = ./goup;
|
||||
@@ -171,8 +173,14 @@ in {
|
||||
modifier = mod;
|
||||
|
||||
startup = [
|
||||
{ command = "$HOME/bin/scripts/flower"; always = true; }
|
||||
{ command = "feh --bg-fill $HOME/wallpapers/wallpaper.jpg"; always = false; }
|
||||
{
|
||||
command = "$HOME/bin/scripts/flower";
|
||||
always = true;
|
||||
}
|
||||
{
|
||||
command = "feh --bg-fill $HOME/wallpapers/wallpaper.jpg";
|
||||
always = false;
|
||||
}
|
||||
];
|
||||
|
||||
terminal = "kitty";
|
||||
@@ -181,11 +189,16 @@ in {
|
||||
border = lib.mkDefault 2;
|
||||
titlebar = false;
|
||||
commands = [
|
||||
{ command = "move position center #2116 46"; criteria = { class = "jetbrains-toolbox"; }; }
|
||||
{ command = "move scratchpad"; criteria = { instance = "spotify"; }; }
|
||||
{
|
||||
command = "move position center #2116 46";
|
||||
criteria = {class = "jetbrains-toolbox";};
|
||||
}
|
||||
{
|
||||
command = "move scratchpad";
|
||||
criteria = {instance = "spotify";};
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
programs.i3status-rust = {
|
||||
enable = true;
|
||||
bars = {
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
{pkgs, ...}:
|
||||
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
services.polybar = {
|
||||
enable = true;
|
||||
|
||||
@@ -14,7 +12,5 @@
|
||||
'';
|
||||
|
||||
config = ./config;
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
theme = ./colour.rasi;
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
programs.alacritty = {
|
||||
enable = false;
|
||||
settings = {
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
{...}:
|
||||
{
|
||||
{...}: {
|
||||
home.file.".config/helix" = {
|
||||
source = ./config;
|
||||
recursive = true;
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
font = {
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
(nvim-treesitter.withPlugins (
|
||||
plugins: with plugins; [
|
||||
plugins:
|
||||
with plugins; [
|
||||
#tree-sitter-nix
|
||||
tree-sitter-go
|
||||
tree-sitter-c
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
{ pkgs, lib, fetchurl, hostname, headless, ... }:
|
||||
let
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
fetchurl,
|
||||
hostname,
|
||||
headless,
|
||||
...
|
||||
}: let
|
||||
cliPackages = with pkgs; [
|
||||
aerc
|
||||
entr
|
||||
@@ -9,7 +15,8 @@ let
|
||||
oh-my-zsh
|
||||
(
|
||||
let
|
||||
my-python-packages = python-packages: with python-packages; [
|
||||
my-python-packages = python-packages:
|
||||
with python-packages; [
|
||||
tkinter
|
||||
requests
|
||||
];
|
||||
@@ -38,20 +45,16 @@ let
|
||||
spotify
|
||||
xclip
|
||||
];
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
|
||||
in {
|
||||
imports =
|
||||
[
|
||||
./configs/system
|
||||
|
||||
] ++ lib.optionals (!headless) [
|
||||
|
||||
]
|
||||
++ lib.optionals (!headless) [
|
||||
./configs/desktop
|
||||
|
||||
] ++ lib.optionals (builtins.pathExists ./host-specific/${hostname}) [
|
||||
|
||||
]
|
||||
++ lib.optionals (builtins.pathExists ./host-specific/${hostname}) [
|
||||
./host-specific/${hostname}
|
||||
|
||||
];
|
||||
|
||||
home = {
|
||||
@@ -88,7 +91,6 @@ in
|
||||
};
|
||||
|
||||
programs = {
|
||||
|
||||
# Let Home Manager install and manage itself.
|
||||
home-manager.enable = true;
|
||||
|
||||
@@ -152,5 +154,4 @@ in
|
||||
inactiveInterval = 60;
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
{ config, lib, pkgs, ...}:
|
||||
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
home.file = {
|
||||
"wallpapers" = {
|
||||
source = ./wallpapers;
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
{ config, lib, pkgs, ...}:
|
||||
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
services.picom = {
|
||||
enable = true;
|
||||
vSync = true;
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
{ config, lib, pkgs, ...}:
|
||||
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
home = {
|
||||
file = {
|
||||
"wallpapers" = {
|
||||
|
||||
Reference in New Issue
Block a user