mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
The comma is a lie.
This commit is contained in:
parent
e6b215cefd
commit
2c6230dd63
14 changed files with 58 additions and 38 deletions
|
|
@ -8,4 +8,4 @@ To provision a new host:
|
|||
|
||||
To rebuild a host:
|
||||
|
||||
* run `,/nyx build <hostname> <method>` where method is optional, can be... switch or boot or such.
|
||||
* run `./nyx build <hostname> <method>` where method is optional, can be... switch or boot or such.
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
services.nextcloud = {
|
||||
enable = true;
|
||||
hostName = "files.kittywit.ch";
|
||||
package = pkgs.nextcloud20;
|
||||
package = pkgs.nextcloud21;
|
||||
https = true;
|
||||
config = {
|
||||
dbtype = "pgsql";
|
||||
|
|
|
|||
|
|
@ -7,15 +7,16 @@
|
|||
nixpkgs.config = { allowUnfree = true; };
|
||||
nix = {
|
||||
nixPath = [
|
||||
"nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos"
|
||||
"nixpkgs=${sources.nixpkgs}"
|
||||
"nixpkgs-unstable=${sources.nixpkgs-unstable}"
|
||||
"nixpkgs-mozilla=${sources.nixpkgs-mozilla}"
|
||||
"NUR=${sources.NUR}"
|
||||
"arc=${sources.arc-nixexprs}"
|
||||
];
|
||||
binaryCaches = [ "https://cache.nixos.org" "https://arc.cachix.org" ];
|
||||
binaryCaches = [ "https://arc.cachix.org" ];
|
||||
binaryCachePublicKeys =
|
||||
[ "arc.cachix.org-1:DZmhclLkB6UO0rc0rBzNpwFbbaeLfyn+fYccuAy7YVY=" ];
|
||||
};
|
||||
gc.automatic = lib.mkDefault true;
|
||||
gc.options = lib.mkDefault "--delete-older-than 1w";
|
||||
trustedUsers = [ "root" "@wheel" ];
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@
|
|||
cachix
|
||||
ripgrep
|
||||
git
|
||||
kitty.terminfo
|
||||
nixfmt
|
||||
mprime
|
||||
wget
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@
|
|||
|
||||
{
|
||||
config = lib.mkIf config.deploy.profile.gui {
|
||||
home.sessionVariables.TERMINFO_DIRS =
|
||||
"${pkgs.kitty.terminfo.outPath}/share/terminfo";
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
font.name = witch.style.font.name;
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
element-desktop
|
||||
mumble
|
||||
obs-studio
|
||||
niv
|
||||
xfce.ristretto
|
||||
audacity
|
||||
avidemux
|
||||
|
|
@ -23,7 +24,7 @@
|
|||
lm_sensors
|
||||
baresip
|
||||
psmisc
|
||||
unstable.discord
|
||||
discord
|
||||
tdesktop
|
||||
yubikey-manager
|
||||
pinentry.gtk2
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [ ./shell.nix ./git.nix ./tmux.nix ./ssh.nix ./emacs ];
|
||||
imports = [ ./shell.nix ./git.nix ./tmux.nix ./ssh.nix ./emacs ./packages.nix ];
|
||||
}
|
||||
|
|
|
|||
9
config/profiles/kat/home/packages.nix
Normal file
9
config/profiles/kat/home/packages.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
config = lib.mkIf config.deploy.profile.kat {
|
||||
home.packages = with pkgs; [
|
||||
kitty.terminfo
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
};
|
||||
settings = [{
|
||||
modules-left = [ "sway/workspaces" "sway/mode" "sway/window" ];
|
||||
modules-center = [ "clock" ]; # "custom/weather"
|
||||
modules-center = [ "clock" "custom/weather" ];
|
||||
modules-right = [
|
||||
"pulseaudio"
|
||||
"network"
|
||||
|
|
@ -29,6 +29,12 @@
|
|||
# on-click = "xdg-open 'https://google.com/search?q=weather'";
|
||||
# exec = "nix-shell --command 'python ${../../../../../scripts/weather/weather.py} ${witch.secrets.profiles.sway.city} ${witch.secrets.profiles.sway.api_key}' ${../../../../../scripts/weather}";
|
||||
#};
|
||||
"custom/weather" = {
|
||||
format = "{}";
|
||||
interval = 3600;
|
||||
on-click = "xdg-open 'https://google.com/search?q=weather'";
|
||||
exec = "${pkgs.kat-weather}/bin/kat-weather ${witch.secrets.profiles.sway.city} ${witch.secrets.profiles.sway.api_key}";
|
||||
};
|
||||
cpu = { format = " {usage}%"; };
|
||||
memory = { format = " {percentage}%"; };
|
||||
temperature = { format = "﨎 {temperatureC}°C"; };
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@
|
|||
"homepage": "https://nur.nix-community.org/",
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"rev": "1e426b00352d686ed9f9b94910b54b0036474bdd",
|
||||
"sha256": "0gb5arxjm9shilvg0h410gwppbmf7l3bijrc0ydnlki70ab40v8k",
|
||||
"rev": "94e3d90e9d8c642e2a2eb484aa4e595406ec181d",
|
||||
"sha256": "1nricxq1z81k9zff1npapw68z5a68h8flj925b86djkx0d4faki2",
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/nix-community/NUR/archive/1e426b00352d686ed9f9b94910b54b0036474bdd.tar.gz",
|
||||
"url": "https://github.com/nix-community/NUR/archive/94e3d90e9d8c642e2a2eb484aa4e595406ec181d.tar.gz",
|
||||
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
|
||||
},
|
||||
"arc-nixexprs": {
|
||||
|
|
@ -69,15 +69,15 @@
|
|||
"url_template": "<repo>/-/archive/<rev>.tar.gz"
|
||||
},
|
||||
"nixpkgs": {
|
||||
"branch": "release-20.09",
|
||||
"branch": "nixos-20.09",
|
||||
"description": "Nix Packages collection",
|
||||
"homepage": "",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "d284abb4df2ed8903cc8133de89cc327fb42b50b",
|
||||
"sha256": "0hpdx2lc6cs5yl7qa1w55g4w1d492ga9xm0qsn42r2lm89d628ym",
|
||||
"rev": "1ac507ba981970c8e864624542e31eb1f4049751",
|
||||
"sha256": "1r05lrkvmjhygpmxj4h0rmvz53c7zmy5lff5az09bi1nwqm1xr42",
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/nixos/nixpkgs/archive/d284abb4df2ed8903cc8133de89cc327fb42b50b.tar.gz",
|
||||
"url": "https://github.com/nixos/nixpkgs/archive/1ac507ba981970c8e864624542e31eb1f4049751.tar.gz",
|
||||
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
|
||||
},
|
||||
"nixpkgs-mozilla": {
|
||||
|
|
@ -98,10 +98,10 @@
|
|||
"homepage": "",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "e061350a361df9667490c5914fb72a58dd927bca",
|
||||
"sha256": "04lqpi25fkyzqflih3hixrrrbjv733mh1izgw4n03ar08w6dnm4k",
|
||||
"rev": "8edfe0a2e8bfc750f7ac2818b2a4f364124806b6",
|
||||
"sha256": "0ya2j4wg4v8j99rf98yfzsswqf3ydl49cdsm779z778cak4g7d7f",
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/nixos/nixpkgs/archive/e061350a361df9667490c5914fb72a58dd927bca.tar.gz",
|
||||
"url": "https://github.com/nixos/nixpkgs/archive/8edfe0a2e8bfc750f7ac2818b2a4f364124806b6.tar.gz",
|
||||
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
|
||||
},
|
||||
"pbb-nixfiles": {
|
||||
|
|
|
|||
|
|
@ -1,13 +1,14 @@
|
|||
{ config ? { }, sources, system ? builtins.currentSystem, ... }@args:
|
||||
|
||||
let
|
||||
pkgs = import sources.nixpkgs args;
|
||||
pkgs = import sources.nixpkgs { inherit config; };
|
||||
|
||||
overlay = self: super: rec {
|
||||
dino = super.callPackage "${sources.qyliss-nixlib}/overlays/patches/dino" {
|
||||
inherit (super) dino;
|
||||
};
|
||||
|
||||
discord = super.discord.override { nss = self.nss_latest; };
|
||||
|
||||
discord = unstable.discord.override { nss = self.nss_latest; };
|
||||
|
||||
arc = import sources.arc-nixexprs { pkgs = super; };
|
||||
unstable = import sources.nixpkgs-unstable { inherit (self) config; };
|
||||
|
|
@ -18,6 +19,8 @@ let
|
|||
|
||||
screenstub = unstable.callPackage ./screenstub { };
|
||||
|
||||
kat-weather = super.callPackage ./kat-weather { };
|
||||
|
||||
linuxPackagesFor = kernel:
|
||||
(super.linuxPackagesFor kernel).extend (_: ksuper: {
|
||||
vendor-reset =
|
||||
|
|
|
|||
16
pkgs/kat-weather/default.nix
Normal file
16
pkgs/kat-weather/default.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{ lib, stdenv, fetchurl, python36, pythonPackages, installShellFiles }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "kat-weather";
|
||||
buildInputs = [
|
||||
(python36.withPackages (pythonPackages: with pythonPackages; [
|
||||
requests
|
||||
]))
|
||||
];
|
||||
unpackPhase = "true";
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp ${./weather.py} $out/bin/kat-weather
|
||||
chmod +x $out/bin/kat-weather
|
||||
'';
|
||||
}
|
||||
|
|
@ -1,3 +1,5 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import requests
|
||||
import json
|
||||
import sys
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
{ pkgs ? import <nixpkgs> { } }:
|
||||
|
||||
with pkgs;
|
||||
|
||||
mkShell {
|
||||
buildInputs = [ pkgs.python3 pkgs.python3.pkgs.requests ];
|
||||
shellHook = ''
|
||||
# Tells pip to put packages into $PIP_PREFIX instead of the usual locations.
|
||||
# See https://pip.pypa.io/en/stable/user_guide/#environment-variables.
|
||||
export PIP_PREFIX=$(pwd)/_build/pip_packages
|
||||
export PYTHONPATH="$PIP_PREFIX/${pkgs.python3.sitePackages}:$PYTHONPATH"
|
||||
export PATH="$PIP_PREFIX/bin:$PATH"
|
||||
unset SOURCE_DATE_EPOCH
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue