mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-04-25 06:19:10 +00:00
chore: reformat codebase
This commit is contained in:
parent
d9e7f7c67e
commit
4c34a87366
16
flake.nix
16
flake.nix
@ -340,9 +340,12 @@
|
|||||||
networking.hostName = lib.mkOverride 2000 host';
|
networking.hostName = lib.mkOverride 2000 host';
|
||||||
})
|
})
|
||||||
(lib'.optionalAttrs (lib'.hasAttr host' images)
|
(lib'.optionalAttrs (lib'.hasAttr host' images)
|
||||||
(let
|
(
|
||||||
|
let
|
||||||
imageFormat = images.${host'}.format;
|
imageFormat = images.${host'}.format;
|
||||||
in inputs.nixos-generators.nixosModules.${imageFormat}))
|
in
|
||||||
|
inputs.nixos-generators.nixosModules.${imageFormat}
|
||||||
|
))
|
||||||
hostSharedConfig
|
hostSharedConfig
|
||||||
path
|
path
|
||||||
];
|
];
|
||||||
@ -388,7 +391,8 @@
|
|||||||
|
|
||||||
# My custom packages, available in here as well. Though, I mainly support
|
# My custom packages, available in here as well. Though, I mainly support
|
||||||
# "x86_64-linux". I just want to try out supporting other systems.
|
# "x86_64-linux". I just want to try out supporting other systems.
|
||||||
packages = forAllSystems (system: let
|
packages = forAllSystems (system:
|
||||||
|
let
|
||||||
pkgs = import nixpkgs { inherit system overlays; };
|
pkgs = import nixpkgs { inherit system overlays; };
|
||||||
in
|
in
|
||||||
inputs.flake-utils.lib.flattenTree (import ./pkgs { inherit pkgs; })
|
inputs.flake-utils.lib.flattenTree (import ./pkgs { inherit pkgs; })
|
||||||
@ -445,7 +449,8 @@
|
|||||||
# sensitive info such as the hostname and such. A helpful tip would be
|
# sensitive info such as the hostname and such. A helpful tip would be
|
||||||
# ignoring the shell entry by simply prefixing it with a space which most
|
# ignoring the shell entry by simply prefixing it with a space which most
|
||||||
# command-line shells have support for (e.g., Bash, zsh, fish).
|
# command-line shells have support for (e.g., Bash, zsh, fish).
|
||||||
deploy.nodes = let
|
deploy.nodes =
|
||||||
|
let
|
||||||
nixosConfigurations = lib'.mapAttrs'
|
nixosConfigurations = lib'.mapAttrs'
|
||||||
(name: value:
|
(name: value:
|
||||||
lib'.nameValuePair "nixos-${name}" {
|
lib'.nameValuePair "nixos-${name}" {
|
||||||
@ -469,7 +474,8 @@
|
|||||||
};
|
};
|
||||||
})
|
})
|
||||||
self.homeManagerConfigurations;
|
self.homeManagerConfigurations;
|
||||||
in nixosConfigurations // homeManagerConfigurations;
|
in
|
||||||
|
nixosConfigurations // homeManagerConfigurations;
|
||||||
|
|
||||||
# How to make yourself slightly saner than before. So far the main checks
|
# How to make yourself slightly saner than before. So far the main checks
|
||||||
# are for deploy nodes.
|
# are for deploy nodes.
|
||||||
|
@ -27,7 +27,8 @@
|
|||||||
type = "ed25519";
|
type = "ed25519";
|
||||||
}];
|
}];
|
||||||
|
|
||||||
sops.secrets = let
|
sops.secrets =
|
||||||
|
let
|
||||||
getKey = key: {
|
getKey = key: {
|
||||||
inherit key;
|
inherit key;
|
||||||
sopsFile = ./secrets/secrets.yaml;
|
sopsFile = ./secrets/secrets.yaml;
|
||||||
|
@ -220,7 +220,8 @@ in
|
|||||||
CREATE SCHEMA AUTHORIZATION ${user.name};
|
CREATE SCHEMA AUTHORIZATION ${user.name};
|
||||||
'')
|
'')
|
||||||
config.services.postgresql.ensureUsers;
|
config.services.postgresql.ensureUsers;
|
||||||
in pkgs.writeText "plover-initial-postgresql-script" ''
|
in
|
||||||
|
pkgs.writeText "plover-initial-postgresql-script" ''
|
||||||
${lib.concatStringsSep "\n" perUserSchemas}
|
${lib.concatStringsSep "\n" perUserSchemas}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
@ -554,10 +555,12 @@ in
|
|||||||
IdentityFile ${config.sops.secrets."plover/borg/ssh-key".path}
|
IdentityFile ${config.sops.secrets."plover/borg/ssh-key".path}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
systemd.tmpfiles.rules = let
|
systemd.tmpfiles.rules =
|
||||||
|
let
|
||||||
# To be used similarly to $GITEA_CUSTOM variable.
|
# To be used similarly to $GITEA_CUSTOM variable.
|
||||||
giteaCustomDir = "${config.services.gitea.stateDir}/custom";
|
giteaCustomDir = "${config.services.gitea.stateDir}/custom";
|
||||||
in [
|
in
|
||||||
|
[
|
||||||
"L+ ${giteaCustomDir}/templates/home.tmpl - - - - ${./files/gitea/home.tmpl}"
|
"L+ ${giteaCustomDir}/templates/home.tmpl - - - - ${./files/gitea/home.tmpl}"
|
||||||
"L+ ${giteaCustomDir}/public/img/logo.svg - - - - ${./files/gitea/logo.svg}"
|
"L+ ${giteaCustomDir}/public/img/logo.svg - - - - ${./files/gitea/logo.svg}"
|
||||||
"L+ ${giteaCustomDir}/public/img/logo.png - - - - ${./files/gitea/logo.png}"
|
"L+ ${giteaCustomDir}/public/img/logo.png - - - - ${./files/gitea/logo.png}"
|
||||||
|
@ -126,7 +126,8 @@ in
|
|||||||
withDependencies = true;
|
withDependencies = true;
|
||||||
webserver.enable = true;
|
webserver.enable = true;
|
||||||
|
|
||||||
jobs = mkJobs {
|
jobs = mkJobs
|
||||||
|
{
|
||||||
db = lib.importJSON ./data/jobs.archivebox.json;
|
db = lib.importJSON ./data/jobs.archivebox.json;
|
||||||
} // {
|
} // {
|
||||||
computer = {
|
computer = {
|
||||||
|
@ -170,7 +170,9 @@ class Outline(object):
|
|||||||
if not category:
|
if not category:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
category_hierarchy = filter(lambda split: split.strip(), category.split("/"))
|
category_hierarchy = filter(
|
||||||
|
lambda split: split.strip(), category.split("/")
|
||||||
|
)
|
||||||
first_category_split = first(None, category_hierarchy)
|
first_category_split = first(None, category_hierarchy)
|
||||||
if first_category_split is None:
|
if first_category_split is None:
|
||||||
continue
|
continue
|
||||||
@ -231,10 +233,7 @@ def create_jobs_from_outline(root_outline: Outline, categories=[]):
|
|||||||
for subscription in outline.subscriptions:
|
for subscription in outline.subscriptions:
|
||||||
# There are some things that are meant not to be shown (i.e.,
|
# There are some things that are meant not to be shown (i.e.,
|
||||||
# `categories`) so we're putting it in a data template.
|
# `categories`) so we're putting it in a data template.
|
||||||
subscription_data = {
|
subscription_data = {"name": subscription.name, "url": subscription.url}
|
||||||
"name": subscription.name,
|
|
||||||
"url": subscription.url
|
|
||||||
}
|
|
||||||
|
|
||||||
if subscription.description:
|
if subscription.description:
|
||||||
subscription_data["description"] = subscription.description
|
subscription_data["description"] = subscription.description
|
||||||
|
@ -26,7 +26,8 @@ stdenv.mkDerivation rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = with qt5; [
|
nativeBuildInputs = with qt5; [
|
||||||
autoreconfHook pkg-config
|
autoreconfHook
|
||||||
|
pkg-config
|
||||||
wrapQtAppsHook
|
wrapQtAppsHook
|
||||||
qtbase
|
qtbase
|
||||||
qtwebchannel
|
qtwebchannel
|
||||||
|
@ -36,6 +36,6 @@ in
|
|||||||
|
|
||||||
# Allow the user to easily enter into several services such as the database
|
# Allow the user to easily enter into several services such as the database
|
||||||
# services to allowing some debugging.
|
# services to allowing some debugging.
|
||||||
services.postgresql.ensureUsers = [ { inherit name; } ];
|
services.postgresql.ensureUsers = [{ inherit name; }];
|
||||||
services.mysql.ensureUsers = [ { inherit name; } ];
|
services.mysql.ensureUsers = [{ inherit name; }];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user