🎨 nixpkgs-fmt
This commit is contained in:
parent
be14e0698c
commit
ea5ba53e3c
35
flake.nix
35
flake.nix
@ -14,9 +14,18 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, deploy-rs, flake-utils, home-manager, dotfiles, ... }@attrs:
|
outputs =
|
||||||
|
{ self
|
||||||
|
, nixpkgs
|
||||||
|
, deploy-rs
|
||||||
|
, flake-utils
|
||||||
|
, home-manager
|
||||||
|
, dotfiles
|
||||||
|
, ...
|
||||||
|
}@attrs:
|
||||||
let
|
let
|
||||||
mkSystem = hostName: system: modules:
|
mkSystem = hostName: system: modules:
|
||||||
|
|
||||||
nixpkgs.lib.nixosSystem {
|
nixpkgs.lib.nixosSystem {
|
||||||
system = system;
|
system = system;
|
||||||
modules = [
|
modules = [
|
||||||
@ -26,14 +35,12 @@
|
|||||||
home-manager.useGlobalPkgs = true;
|
home-manager.useGlobalPkgs = true;
|
||||||
home-manager.useUserPackages = true;
|
home-manager.useUserPackages = true;
|
||||||
})
|
})
|
||||||
]
|
] ++ modules;
|
||||||
++ modules;
|
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
flake-utils.lib.eachDefaultSystem
|
flake-utils.lib.eachDefaultSystem
|
||||||
(system:
|
(system:
|
||||||
let
|
let pkgs = nixpkgs.legacyPackages.${system};
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
devShells.default = pkgs.mkShell {
|
devShells.default = pkgs.mkShell {
|
||||||
@ -42,13 +49,19 @@
|
|||||||
}) // {
|
}) // {
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
# Aristotle
|
# Aristotle
|
||||||
agent = mkSystem "agent" "aarch64-linux" [ ./hosts/aristotle/configuration.nix ];
|
agent = mkSystem "agent" "aarch64-linux"
|
||||||
form = mkSystem "form" "aarch64-linux" [ ./hosts/aristotle/configuration.nix ];
|
[ ./hosts/aristotle/configuration.nix ];
|
||||||
matter = mkSystem "matter" "aarch64-linux" [ ./hosts/aristotle/configuration.nix ];
|
form = mkSystem "form" "aarch64-linux"
|
||||||
purpose = mkSystem "purpose" "aarch64-linux" [ ./hosts/aristotle/configuration.nix ];
|
[ ./hosts/aristotle/configuration.nix ];
|
||||||
|
matter = mkSystem "matter" "aarch64-linux"
|
||||||
|
[ ./hosts/aristotle/configuration.nix ];
|
||||||
|
purpose = mkSystem "purpose" "aarch64-linux"
|
||||||
|
[ ./hosts/aristotle/configuration.nix ];
|
||||||
|
|
||||||
plato = mkSystem "plato" "x86_64-linux" [ ./hosts/plato/configuration.nix ];
|
plato =
|
||||||
socrates = mkSystem "socrates" "x86_64-linux" [ ./hosts/socrates/configuration.nix ];
|
mkSystem "plato" "x86_64-linux" [ ./hosts/plato/configuration.nix ];
|
||||||
|
socrates = mkSystem "socrates" "x86_64-linux"
|
||||||
|
[ ./hosts/socrates/configuration.nix ];
|
||||||
};
|
};
|
||||||
|
|
||||||
deploy.nodes = {
|
deploy.nodes = {
|
||||||
|
@ -2,7 +2,8 @@
|
|||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
let cfg = config.walkah.coredns;
|
let cfg = config.walkah.coredns;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options.walkah.coredns = {
|
options.walkah.coredns = {
|
||||||
enable = mkEnableOption "";
|
enable = mkEnableOption "";
|
||||||
addr = mkOption {
|
addr = mkOption {
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
let cfg = config.services.gitea;
|
let cfg = config.services.gitea;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
users.users.git = {
|
users.users.git = {
|
||||||
description = "Gitea Service";
|
description = "Gitea Service";
|
||||||
home = cfg.stateDir;
|
home = cfg.stateDir;
|
||||||
|
@ -22,7 +22,8 @@ let
|
|||||||
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
imports = [ ./default.nix ];
|
imports = [ ./default.nix ];
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [ ipfs-migrator ];
|
environment.systemPackages = with pkgs; [ ipfs-migrator ];
|
||||||
|
@ -15,16 +15,19 @@
|
|||||||
enableACME = true;
|
enableACME = true;
|
||||||
locations."= /.well-known/matrix/server".extraConfig =
|
locations."= /.well-known/matrix/server".extraConfig =
|
||||||
let server = { "m.server" = "matrix.walkah.chat:443"; };
|
let server = { "m.server" = "matrix.walkah.chat:443"; };
|
||||||
in ''
|
in
|
||||||
|
''
|
||||||
default_type application/json;
|
default_type application/json;
|
||||||
add_header Access-Control-Allow-Origin *;
|
add_header Access-Control-Allow-Origin *;
|
||||||
return 200 '${builtins.toJSON server}';
|
return 200 '${builtins.toJSON server}';
|
||||||
'';
|
'';
|
||||||
locations."= /.well-known/matrix/client".extraConfig = let
|
locations."= /.well-known/matrix/client".extraConfig =
|
||||||
|
let
|
||||||
client = {
|
client = {
|
||||||
"m.homeserver" = { "base_url" = "https://matrix.walkah.chat"; };
|
"m.homeserver" = { "base_url" = "https://matrix.walkah.chat"; };
|
||||||
};
|
};
|
||||||
in ''
|
in
|
||||||
|
''
|
||||||
default_type application/json;
|
default_type application/json;
|
||||||
add_header Access-Control-Allow-Origin *;
|
add_header Access-Control-Allow-Origin *;
|
||||||
return 200 '${builtins.toJSON client}';
|
return 200 '${builtins.toJSON client}';
|
||||||
|
@ -149,14 +149,17 @@ let
|
|||||||
|
|
||||||
# Create the final "sources" from the config
|
# Create the final "sources" from the config
|
||||||
mkSources = config:
|
mkSources = config:
|
||||||
mapAttrs (
|
mapAttrs
|
||||||
|
(
|
||||||
name: spec:
|
name: spec:
|
||||||
if builtins.hasAttr "outPath" spec
|
if builtins.hasAttr "outPath" spec
|
||||||
then abort
|
then
|
||||||
|
abort
|
||||||
"The values in sources.json should not have an 'outPath' attribute"
|
"The values in sources.json should not have an 'outPath' attribute"
|
||||||
else
|
else
|
||||||
spec // { outPath = replace name (fetch config.pkgs name spec); }
|
spec // { outPath = replace name (fetch config.pkgs name spec); }
|
||||||
) config.sources;
|
)
|
||||||
|
config.sources;
|
||||||
|
|
||||||
# The "config" used by the fetchers
|
# The "config" used by the fetchers
|
||||||
mkConfig =
|
mkConfig =
|
||||||
|
@ -10,7 +10,8 @@ let
|
|||||||
(optionalString (cfg.initPeers != [ ]) "--peers")
|
(optionalString (cfg.initPeers != [ ]) "--peers")
|
||||||
(lib.strings.concatStringsSep "," cfg.initPeers)
|
(lib.strings.concatStringsSep "," cfg.initPeers)
|
||||||
];
|
];
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
|
|
||||||
###### interface
|
###### interface
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user