Apply treefmt
This commit is contained in:
parent
7a7ff7b1df
commit
9732e4edf1
56
flake.lock
56
flake.lock
|
@ -230,22 +230,6 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat_4": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1668681692,
|
||||
"narHash": "sha256-Ht91NGdewz8IQLtWZ9LCeNXMSXHUss+9COoqu6JLmXU=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "009399224d5e398d03b22badca40a37ac85412a1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"locked": {
|
||||
"lastModified": 1642700792,
|
||||
|
@ -311,21 +295,6 @@
|
|||
}
|
||||
},
|
||||
"flake-utils_4": {
|
||||
"locked": {
|
||||
"lastModified": 1667395993,
|
||||
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_5": {
|
||||
"locked": {
|
||||
"lastModified": 1653893745,
|
||||
"narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=",
|
||||
|
@ -546,28 +515,6 @@
|
|||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nvfetcher": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat_4",
|
||||
"flake-utils": "flake-utils_4",
|
||||
"nixpkgs": [
|
||||
"nixos"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1672979485,
|
||||
"narHash": "sha256-LrY0K1yya3nvRlGDc98wm68ozVj7E6a1EXXEr7eHp8E=",
|
||||
"owner": "berberman",
|
||||
"repo": "nvfetcher",
|
||||
"rev": "0a9ac5fd07b52467d81163b1f8c94c12e5c9aff9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "berberman",
|
||||
"repo": "nvfetcher",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"agenix": "agenix",
|
||||
|
@ -583,13 +530,12 @@
|
|||
"nixos-generators": "nixos-generators",
|
||||
"nixos-hardware": "nixos-hardware",
|
||||
"nur": "nur",
|
||||
"nvfetcher": "nvfetcher",
|
||||
"triton-vmtools": "triton-vmtools"
|
||||
}
|
||||
},
|
||||
"triton-vmtools": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_5",
|
||||
"flake-utils": "flake-utils_4",
|
||||
"nixpkgs": [
|
||||
"nixos"
|
||||
]
|
||||
|
|
38
flake.nix
38
flake.nix
|
@ -38,8 +38,6 @@
|
|||
|
||||
nixos-generators.url = "github:nix-community/nixos-generators";
|
||||
|
||||
nixos-generators.url = "github:nix-community/nixos-generators";
|
||||
|
||||
triton-vmtools.url = "git+https://git.b12f.io/pub-solar/infra?ref=main&dir=vmtools";
|
||||
triton-vmtools.inputs.nixpkgs.follows = "nixos";
|
||||
|
||||
|
@ -47,18 +45,18 @@
|
|||
keycloak-theme-pub-solar.inputs.nixpkgs.follows = "nixos";
|
||||
};
|
||||
|
||||
outputs =
|
||||
{ self
|
||||
, digga
|
||||
, nixos
|
||||
, home
|
||||
, nixos-hardware
|
||||
, nur
|
||||
, agenix
|
||||
, deploy
|
||||
, triton-vmtools
|
||||
, keycloak-theme-pub-solar
|
||||
, ...
|
||||
outputs = {
|
||||
self,
|
||||
digga,
|
||||
nixos,
|
||||
home,
|
||||
nixos-hardware,
|
||||
nur,
|
||||
agenix,
|
||||
deploy,
|
||||
triton-vmtools,
|
||||
keycloak-theme-pub-solar,
|
||||
...
|
||||
} @ inputs:
|
||||
digga.lib.mkFlake
|
||||
{
|
||||
|
@ -142,19 +140,20 @@
|
|||
anonymous = [pubsolaros users.pub-solar];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home = {
|
||||
imports = [ (digga.lib.importExportableModules ./users/modules) ];
|
||||
modules = [ ];
|
||||
imports = [(digga.lib.importExportableModules ./users/modules)];
|
||||
modules = [];
|
||||
importables = rec {
|
||||
profiles = digga.lib.rakeLeaves ./users/profiles;
|
||||
suites = with profiles; rec {
|
||||
base = [ direnv git ];
|
||||
base = [direnv git];
|
||||
};
|
||||
};
|
||||
users = {
|
||||
pub-solar = { suites, ... }: { imports = suites.base; };
|
||||
barkeeper = { suites, ... }: { imports = suites.base; };
|
||||
pub-solar = {suites, ...}: {imports = suites.base;};
|
||||
barkeeper = {suites, ...}: {imports = suites.base;};
|
||||
}; # digga.lib.importers.rakeLeaves ./users/hm;
|
||||
};
|
||||
|
||||
|
@ -169,5 +168,4 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, self
|
||||
, ...
|
||||
}:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
self,
|
||||
...
|
||||
}: {
|
||||
services.caddy = {
|
||||
enable = lib.mkForce true;
|
||||
email = "admins@pub.solar";
|
||||
|
@ -79,8 +79,7 @@
|
|||
reverse_proxy obs-portal.svc.e5756d08-36fd-424b-f8bc-acdb92ca7b82.lev-1.int.greenbaum.zone:3000
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
||||
networking.firewall.allowedTCPPorts = [80 443];
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{ ... }:
|
||||
{
|
||||
{...}: {
|
||||
imports = [
|
||||
./flora-6.nix
|
||||
];
|
||||
|
|
|
@ -1,16 +1,15 @@
|
|||
{ config
|
||||
, latestModulesPath
|
||||
, lib
|
||||
, inputs
|
||||
, pkgs
|
||||
, profiles
|
||||
, self
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
psCfg = config.pub-solar;
|
||||
in
|
||||
{
|
||||
config,
|
||||
latestModulesPath,
|
||||
lib,
|
||||
inputs,
|
||||
pkgs,
|
||||
profiles,
|
||||
self,
|
||||
...
|
||||
}: let
|
||||
psCfg = config.pub-solar;
|
||||
in {
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
|
@ -46,11 +45,11 @@ in
|
|||
# Allow sudo without a password for the barkeeper user
|
||||
security.sudo.extraRules = [
|
||||
{
|
||||
users = [ "${psCfg.user.name}" ];
|
||||
users = ["${psCfg.user.name}"];
|
||||
commands = [
|
||||
{
|
||||
command = "ALL";
|
||||
options = [ "NOPASSWD" ];
|
||||
options = ["NOPASSWD"];
|
||||
}
|
||||
];
|
||||
}
|
||||
|
@ -65,7 +64,7 @@ in
|
|||
isSystemUser = true;
|
||||
};
|
||||
|
||||
users.groups.hakkonaut = { };
|
||||
users.groups.hakkonaut = {};
|
||||
|
||||
# # #
|
||||
# # # Triton host specific options
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, self
|
||||
, ...
|
||||
}:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
self,
|
||||
...
|
||||
}: {
|
||||
age.secrets.gitea-database-password = {
|
||||
file = "${self}/secrets/gitea-database-password.age";
|
||||
mode = "600";
|
||||
|
|
|
@ -1,31 +1,32 @@
|
|||
# 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 = [ ];
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "ahci" "virtio_pci" "xhci_pci" "sr_mod" "virtio_blk" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
boot.initrd.availableKernelModules = ["ahci" "virtio_pci" "xhci_pci" "sr_mod" "virtio_blk"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = [];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
fileSystems."/" =
|
||||
{
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-label/nixos";
|
||||
autoResize = true;
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-label/boot";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
fileSystems."/data" =
|
||||
{
|
||||
fileSystems."/data" = {
|
||||
device = "/dev/disk/by-label/ephemeral0";
|
||||
fsType = "ext4";
|
||||
options = [
|
||||
|
@ -34,7 +35,7 @@
|
|||
];
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
swapDevices = [];
|
||||
|
||||
networking.useDHCP = lib.mkDefault false;
|
||||
networking.networkmanager.enable = lib.mkForce false;
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
{ config
|
||||
, lib
|
||||
, inputs
|
||||
, pkgs
|
||||
, self
|
||||
, ...
|
||||
}:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
inputs,
|
||||
pkgs,
|
||||
self,
|
||||
...
|
||||
}: {
|
||||
age.secrets.keycloak-database-password = {
|
||||
file = "${self}/secrets/keycloak-database-password.age";
|
||||
mode = "700";
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
{ pkgs, inputs, ... }:
|
||||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
inputs.triton-vmtools.packages.${pkgs.system}.default
|
||||
];
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{ config
|
||||
, pkgs
|
||||
, lib
|
||||
, ...
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.pub-solar.core;
|
||||
in
|
||||
{
|
||||
in {
|
||||
options.pub-solar.core = {
|
||||
enableCaddy = mkOption {
|
||||
type = types.bool;
|
||||
|
@ -19,12 +19,12 @@ in
|
|||
|
||||
binaryCaches = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [ ];
|
||||
default = [];
|
||||
description = "Binary caches to use.";
|
||||
};
|
||||
publicKeys = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [ ];
|
||||
default = [];
|
||||
description = "Public keys of binary caches.";
|
||||
};
|
||||
};
|
||||
|
@ -48,10 +48,10 @@ in
|
|||
# These entries get added to /etc/hosts
|
||||
networking.hosts = {
|
||||
"127.0.0.1" =
|
||||
[ ]
|
||||
++ lib.optionals cfg.enableCaddy [ "caddy.local" ]
|
||||
++ lib.optionals config.pub-solar.printing.enable [ "cups.local" ]
|
||||
++ lib.optionals cfg.enableHelp [ "help.local" ];
|
||||
[]
|
||||
++ lib.optionals cfg.enableCaddy ["caddy.local"]
|
||||
++ lib.optionals config.pub-solar.printing.enable ["cups.local"]
|
||||
++ lib.optionals cfg.enableHelp ["help.local"];
|
||||
};
|
||||
|
||||
# Caddy reverse proxy for local services like cups
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
{ config
|
||||
, pkgs
|
||||
, lib
|
||||
, inputs
|
||||
, ...
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
nix = {
|
||||
# Use default version alias for nix package
|
||||
|
@ -15,9 +16,9 @@
|
|||
# Prevents impurities in builds
|
||||
sandbox = true;
|
||||
# give root and @wheel special privileges with nix
|
||||
trusted-users = [ "root" "@wheel" ];
|
||||
trusted-users = ["root" "@wheel"];
|
||||
# This is just a representation of the nix default
|
||||
system-features = [ "nixos-test" "benchmark" "big-parallel" "kvm" ];
|
||||
system-features = ["nixos-test" "benchmark" "big-parallel" "kvm"];
|
||||
};
|
||||
# Generally useful nix option defaults
|
||||
extraOptions = ''
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
{ lib
|
||||
, config
|
||||
, pkgs
|
||||
, ...
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
psCfg = config.pub-solar;
|
||||
cfg = config.pub-solar.docker;
|
||||
in
|
||||
{
|
||||
in {
|
||||
options.pub-solar.docker = {
|
||||
enable = mkEnableOption "Life in metal boxes";
|
||||
};
|
||||
|
@ -15,8 +15,8 @@ in
|
|||
config = mkIf cfg.enable {
|
||||
virtualisation.docker.enable = true;
|
||||
users.users = with pkgs;
|
||||
pkgs.lib.setAttrByPath [ psCfg.user.name ] {
|
||||
extraGroups = [ "docker" ];
|
||||
pkgs.lib.setAttrByPath [psCfg.user.name] {
|
||||
extraGroups = ["docker"];
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{ lib
|
||||
, config
|
||||
, pkgs
|
||||
, ...
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
psCfg = config.pub-solar;
|
||||
in
|
||||
{
|
||||
in {
|
||||
options.pub-solar.sway = {
|
||||
enable = mkEnableOption "Life in boxes";
|
||||
|
||||
|
@ -25,8 +25,8 @@ in
|
|||
|
||||
config = mkIf psCfg.sway.enable (mkMerge [
|
||||
(mkIf (psCfg.sway.v4l2loopback.enable) {
|
||||
boot.extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ];
|
||||
boot.kernelModules = [ "v4l2loopback" ];
|
||||
boot.extraModulePackages = with config.boot.kernelPackages; [v4l2loopback];
|
||||
boot.kernelModules = ["v4l2loopback"];
|
||||
boot.extraModprobeConfig = ''
|
||||
options v4l2loopback exclusive_caps=1 devices=3
|
||||
'';
|
||||
|
@ -51,13 +51,13 @@ in
|
|||
};
|
||||
};
|
||||
};
|
||||
extraPortals = with pkgs; [ xdg-desktop-portal-gtk ];
|
||||
extraPortals = with pkgs; [xdg-desktop-portal-gtk];
|
||||
};
|
||||
|
||||
services.pipewire.enable = true;
|
||||
|
||||
home-manager = with pkgs;
|
||||
pkgs.lib.setAttrByPath [ "users" psCfg.user.name ] {
|
||||
pkgs.lib.setAttrByPath ["users" psCfg.user.name] {
|
||||
home.packages = with pkgs; [
|
||||
sway
|
||||
grim
|
||||
|
@ -96,12 +96,12 @@ in
|
|||
systemd.user.services.waybar = import ./waybar.service.nix {inherit pkgs psCfg;};
|
||||
systemd.user.targets.sway-session = import ./sway-session.target.nix {inherit pkgs psCfg;};
|
||||
|
||||
xdg.configFile."sway/config".text = import ./config/config.nix { inherit config pkgs; };
|
||||
xdg.configFile."sway/config".text = import ./config/config.nix {inherit config pkgs;};
|
||||
xdg.configFile."sway/config.d/colorscheme.conf".source = ./config/config.d/colorscheme.conf;
|
||||
xdg.configFile."sway/config.d/theme.conf".source = ./config/config.d/theme.conf;
|
||||
xdg.configFile."sway/config.d/gaps.conf".source = ./config/config.d/gaps.conf;
|
||||
xdg.configFile."sway/config.d/custom-keybindings.conf".source = ./config/config.d/custom-keybindings.conf;
|
||||
xdg.configFile."sway/config.d/mode_system.conf".text = import ./config/config.d/mode_system.conf.nix { inherit pkgs psCfg; };
|
||||
xdg.configFile."sway/config.d/mode_system.conf".text = import ./config/config.d/mode_system.conf.nix {inherit pkgs psCfg;};
|
||||
xdg.configFile."sway/config.d/applications.conf".source = ./config/config.d/applications.conf;
|
||||
xdg.configFile."sway/config.d/systemd.conf".source = ./config/config.d/systemd.conf;
|
||||
};
|
||||
|
|
|
@ -40,7 +40,8 @@ in {
|
|||
screen
|
||||
];
|
||||
|
||||
home-manager = with pkgs; pkgs.lib.setAttrByPath [ "users" psCfg.user.name ] {
|
||||
home-manager = with pkgs;
|
||||
pkgs.lib.setAttrByPath ["users" psCfg.user.name] {
|
||||
home.packages = [
|
||||
ack
|
||||
asciinema
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
self: with self; let
|
||||
self:
|
||||
with self; let
|
||||
looking-glass-client = self.looking-glass-client.overrideAttrs (old: {
|
||||
meta.platforms = ["x86_64-linux" "aarch64-linux"];
|
||||
});
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
self: with self; let
|
||||
self:
|
||||
with self; let
|
||||
websocket-client = python39.pkgs.buildPythonPackage rec {
|
||||
pname = "websocket-client";
|
||||
version = "1.2.1";
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
self: with self; let
|
||||
self:
|
||||
with self; let
|
||||
uhk-agent-bin = stdenv.mkDerivation rec {
|
||||
pname = "uhk-agent-bin";
|
||||
version = "1.5.14";
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
{ pkgs
|
||||
, lib
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
folder = ./.;
|
||||
toImport = name: value: folder + ("/" + name);
|
||||
filterCaches = key: value: value == "regular" && lib.hasSuffix ".nix" key && key != "default.nix";
|
||||
imports = lib.mapAttrsToList toImport (lib.filterAttrs filterCaches (builtins.readDir folder));
|
||||
in
|
||||
{
|
||||
in {
|
||||
inherit imports;
|
||||
nix.settings.substituters = [ "https://cache.nixos.org/" ];
|
||||
nix.settings.substituters = ["https://cache.nixos.org/"];
|
||||
}
|
||||
|
|
|
@ -2,10 +2,9 @@ let
|
|||
# set ssh public keys here for your system and user
|
||||
teutat3s = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHcU6KPy4b1MQXd6EJhcYwbJu7E+0IrBZF/IP6T7gbMf teutat3s@dumpyourvms";
|
||||
flora-6 = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGP1InpTBN4AlF/4V8HHumAMLJzeO8DpzjUv9Co/+J09 root@pub-solar-infra-vm-1";
|
||||
allKeys = [ flora-6 teutat3s ];
|
||||
deployKeys = [ flora-6 teutat3s ];
|
||||
in
|
||||
{
|
||||
allKeys = [flora-6 teutat3s];
|
||||
deployKeys = [flora-6 teutat3s];
|
||||
in {
|
||||
"gitea-database-password.age".publicKeys = deployKeys;
|
||||
"gitea-mailer-password.age".publicKeys = deployKeys;
|
||||
"keycloak-database-password.age".publicKeys = deployKeys;
|
||||
|
|
|
@ -1,10 +1,14 @@
|
|||
{ config, hmUsers, pkgs, lib, ... }:
|
||||
let
|
||||
psCfg = config.pub-solar;
|
||||
in
|
||||
{
|
||||
config,
|
||||
hmUsers,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
psCfg = config.pub-solar;
|
||||
in {
|
||||
config = {
|
||||
home-manager.users = { inherit (hmUsers) barkeeper; };
|
||||
home-manager.users = {inherit (hmUsers) barkeeper;};
|
||||
|
||||
pub-solar = {
|
||||
# These are your personal settings
|
||||
|
|
Loading…
Reference in a new issue