Reformat. Small changes.

Ran nixfmt on the whole project. Added an alias for doing that. Changed
some SSH aliases.
This commit is contained in:
kat witch 2021-02-22 05:40:19 +00:00 committed by kat
parent 6dcbea4918
commit fdf7cb9e98
9 changed files with 62 additions and 65 deletions

View file

@ -4,11 +4,7 @@ let
sources = import ../../nix/sources.nix;
unstable = import sources.nixpkgs-unstable { };
in {
imports = [
../../modules
../users
(sources.home-manager + "/nixos")
];
imports = [ ../../modules ../users (sources.home-manager + "/nixos") ];
#boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
#boot.kernelParams = [ "quiet" ];
@ -49,6 +45,7 @@ in {
ripgrep
git
kitty.terminfo
nixfmt
mprime
wget
rsync

View file

@ -8,51 +8,49 @@ let
secrets = (import ../../../../secrets.nix);
in {
services.nginx.virtualHosts = {
"kittywit.ch" = {
root = "/var/www/kittywitch";
locations = {
"/_matrix" = { proxyPass = "http://[::1]:8008"; };
"= /.well-known/matrix/server".extraConfig =
let server = { "m.server" = "kittywit.ch:443"; };
in ''
add_header Content-Type application/json;
return 200 '${builtins.toJSON server}';
'';
"= /.well-known/matrix/client".extraConfig = let
client = {
"m.homeserver" = { "base_url" = "https://kittywit.ch"; };
"m.identity_server" = { "base_url" = "https://vector.im"; };
};
"kittywit.ch" = {
root = "/var/www/kittywitch";
locations = {
"/_matrix" = { proxyPass = "http://[::1]:8008"; };
"= /.well-known/matrix/server".extraConfig =
let server = { "m.server" = "kittywit.ch:443"; };
in ''
add_header Content-Type application/json;
add_header Access-Control-Allow-Origin *;
return 200 '${builtins.toJSON client}';
return 200 '${builtins.toJSON server}';
'';
};
} // common;
"vault.kittywit.ch" = {
locations = {
"/".proxyPass = "http://127.0.0.1:4000";
"/notifications/hub".proxyPass = "http://127.0.0.1:3012";
"/notifications/hub/negotiate".proxyPass = "http://127.0.0.1:80";
};
} // common;
"git.kittywit.ch" = {
locations = {
"/".proxyPass = "http://127.0.0.1:3000";
};
} // common;
"znc.kittywit.ch" = {
locations = { "/".proxyPass = "http://127.0.0.1:5000"; };
} // common;
"irc.kittywit.ch" = {
locations = {
"/" = { root = pkgs.glowing-bear; };
"^~ /weechat" = {
proxyPass = "http://127.0.0.1:9000";
proxyWebsockets = true;
"= /.well-known/matrix/client".extraConfig = let
client = {
"m.homeserver" = { "base_url" = "https://kittywit.ch"; };
"m.identity_server" = { "base_url" = "https://vector.im"; };
};
in ''
add_header Content-Type application/json;
add_header Access-Control-Allow-Origin *;
return 200 '${builtins.toJSON client}';
'';
};
} // common;
"vault.kittywit.ch" = {
locations = {
"/".proxyPass = "http://127.0.0.1:4000";
"/notifications/hub".proxyPass = "http://127.0.0.1:3012";
"/notifications/hub/negotiate".proxyPass = "http://127.0.0.1:80";
};
} // common;
"git.kittywit.ch" = {
locations = { "/".proxyPass = "http://127.0.0.1:3000"; };
} // common;
"znc.kittywit.ch" = {
locations = { "/".proxyPass = "http://127.0.0.1:5000"; };
} // common;
"irc.kittywit.ch" = {
locations = {
"/" = { root = pkgs.glowing-bear; };
"^~ /weechat" = {
proxyPass = "http://127.0.0.1:9000";
proxyWebsockets = true;
};
} // common;
} // secrets.virtualHosts.athame;
}
};
} // common;
} // secrets.virtualHosts.athame;
}

View file

@ -18,7 +18,7 @@
domain = "kittywit.ch";
hostId = "0417b551";
useDHCP = false;
interfaces.ens3.ipv4.addresses = [{
interfaces.ens3.ipv4.addresses = [{
address = "104.244.73.10";
prefixLength = 24;
}];

View file

@ -9,8 +9,7 @@
./torrenting.nix
];
meta.deploy.profiles =
[ "desktop" "development" "sway" "gaming" "network" ];
meta.deploy.profiles = [ "desktop" "development" "sway" "gaming" "network" ];
meta.deploy.ssh.host = "192.168.1.135";
# libvirtd is used for our virtual machine

View file

@ -1,13 +1,9 @@
{ config, pkgs, ... }:
{
imports = [
./hardware.nix
../../services/zfs.nix
];
imports = [ ./hardware.nix ../../services/zfs.nix ];
meta.deploy.profiles =
[ "desktop" "development" "sway" "gaming" "network" ];
meta.deploy.profiles = [ "desktop" "development" "sway" "gaming" "network" ];
meta.deploy.ssh.host = "192.168.1.92";
boot.loader.systemd-boot.enable = true;

View file

@ -1,7 +1,15 @@
{ config, pkgs, ... }:
{
imports = [ ./desktop.nix ./gaming.nix ./network.nix ./sway.nix ./waybar.nix ./kitty.nix ./emacs.nix ];
imports = [
./desktop.nix
./gaming.nix
./network.nix
./sway.nix
./waybar.nix
./kitty.nix
./emacs.nix
];
users.users.kat = {
uid = 1000;
@ -18,6 +26,7 @@
home-manager.users.kat = {
programs.fish = {
enable = true;
shellAliases = { nixdirfmt = "fd --color=never .nix | xargs nixfmt"; };
plugins = [{
name = "bass";
src = pkgs.fetchFromGitHub {
@ -55,11 +64,9 @@
port = 62954;
};
in {
"athame" = { hostname = "kittywit.ch"; } // kat;
"athame" = { hostname = "athame.kittywit.ch"; } // kat;
"samhain" = { hostname = "192.168.1.135"; } // kat;
"litha" = { hostname = "192.168.1.240"; } // kat;
"yule" = { hostname = "192.168.1.92"; } // kat;
"mabon" = { hostname = "192.168.1.218"; } // kat;
"boline" = { hostname = "boline.kittywit.ch"; } // kat;
};
};

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ config, lib, pkgs, ... }:
{
config = lib.mkIf (lib.elem "gaming" config.meta.deploy.profiles) {

View file

@ -1,6 +1,7 @@
{ config, lib, pkgs, ... }:
let style = import ./style.nix; in {
let style = import ./style.nix;
in {
config = lib.mkIf (lib.elem "desktop" config.meta.deploy.profiles) {
home-manager.users.kat = {

View file

@ -1,6 +1,5 @@
{ pkgs, hostsDir ? ../config/hosts
, commonImports ? [ ../config/common ../modules ], pkgsPath ? ../pkgs
}:
, commonImports ? [ ../config/common ../modules ], pkgsPath ? ../pkgs }:
with pkgs.lib;