update to 23.11

This commit is contained in:
Anish Lakhwara 2024-01-05 23:44:08 -08:00
parent b59ad9f485
commit 6fb6d4ca75
22 changed files with 84 additions and 50 deletions

View file

@ -3,7 +3,7 @@
inputs = { inputs = {
# Nixpkgs # Nixpkgs
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05"; nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
unstable.url = "github:nixos/nixpkgs/nixos-unstable"; unstable.url = "github:nixos/nixpkgs/nixos-unstable";
nixos-hardware.url = "github:NixOS/nixos-hardware/master"; nixos-hardware.url = "github:NixOS/nixos-hardware/master";
@ -128,8 +128,7 @@
litePkgsFor = forAllSystems (system: import nixpkgs { litePkgsFor = forAllSystems (system: import nixpkgs {
inherit system; inherit system;
overlays = [ overlays = [
agenix.overlays.default ag serviceenix.overlays.default
unstableOverlay # Remove once updated to 23.05 (used for microbin on helix)
tidalcycles.overlays.default # needed for nvim which comes pre-installed lol tidalcycles.overlays.default # needed for nvim which comes pre-installed lol
]; ];
}); });
@ -172,6 +171,7 @@
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
{ {
nix.registry.nixpkgs.flake = nixpkgs; nix.registry.nixpkgs.flake = nixpkgs;
nix.registry.unstable.flake = unstable;
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
home-manager.users.anish = import ./home/gui; home-manager.users.anish = import ./home/gui;
@ -188,7 +188,7 @@
agenix.nixosModules.age agenix.nixosModules.age
self.nixosModules.backup self.nixosModules.backup
self.nixosModules.wireguard self.nixosModules.wireguard
self.nixosModules.microbin # self.nixosModules.microbin
disko.nixosModules.disko disko.nixosModules.disko
]; ];
}; };

View file

@ -19,7 +19,7 @@ let
sha256 = "rs3NTZwWdsmBGXnrgUeVxUiNjbN/ULxJHifPYJD9mT4="; sha256 = "rs3NTZwWdsmBGXnrgUeVxUiNjbN/ULxJHifPYJD9mT4=";
}; };
}; };
my-lspsaga = pkgs.vimUtils.buildVimPluginFrom2Nix { my-lspsaga = pkgs.vimUtils.buildVimPlugin {
name = "lspsaga.nvim"; name = "lspsaga.nvim";
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {
owner = "glepnir"; owner = "glepnir";
@ -28,7 +28,7 @@ let
sha256 = "sciX/fMxzY1YOxXxjj1+ymrdMi451avcFFu+14R+/pk="; sha256 = "sciX/fMxzY1YOxXxjj1+ymrdMi451avcFFu+14R+/pk=";
}; };
}; };
nvim-luapad = pkgs.vimUtils.buildVimPluginFrom2Nix { nvim-luapad = pkgs.vimUtils.buildVimPlugin {
name = "nvim-luapad"; name = "nvim-luapad";
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {
owner = "rafcamlet"; owner = "rafcamlet";
@ -37,7 +37,7 @@ let
sha256 = "gMaS5YFi3+gmUIfkCMEt9vhm8XSgv54Cquv5+WCWeTo="; sha256 = "gMaS5YFi3+gmUIfkCMEt9vhm8XSgv54Cquv5+WCWeTo=";
}; };
}; };
leap = pkgs.vimUtils.buildVimPluginFrom2Nix { leap = pkgs.vimUtils.buildVimPlugin {
name = "leap"; name = "leap";
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {
owner = "ggandor"; owner = "ggandor";
@ -55,7 +55,7 @@ let
sha256 = "vX7ZVJxgatIicmijehtaRvyHxk1i4gFfXrbPM/+VoFc="; sha256 = "vX7ZVJxgatIicmijehtaRvyHxk1i4gFfXrbPM/+VoFc=";
}; };
}; };
my-which-key-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix { my-which-key-nvim = pkgs.vimUtils.buildVimPlugin {
pname = "which-key.nvim"; pname = "which-key.nvim";
version = "2022-05-04"; version = "2022-05-04";
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {
@ -66,7 +66,7 @@ let
}; };
meta.homepage = "https://github.com/folke/which-key.nvim/"; meta.homepage = "https://github.com/folke/which-key.nvim/";
}; };
scnvim = pkgs.vimUtils.buildVimPluginFrom2Nix { scnvim = pkgs.vimUtils.buildVimPlugin {
pname = "scnvim"; pname = "scnvim";
version = "2022-06-04"; version = "2022-06-04";
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {
@ -76,7 +76,7 @@ let
sha256 = "kvSwS6FNUY2Ue84NhWLLcm0ldLMSp4WqQ7s6TUoX6Cc="; sha256 = "kvSwS6FNUY2Ue84NhWLLcm0ldLMSp4WqQ7s6TUoX6Cc=";
}; };
}; };
yuck-vim = pkgs.vimUtils.buildVimPluginFrom2Nix { yuck-vim = pkgs.vimUtils.buildVimPlugin {
pname = "yuck.vim"; pname = "yuck.vim";
version = "2021-08-09"; version = "2021-08-09";
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {
@ -86,7 +86,7 @@ let
sha256 = "lp7qJWkvelVfoLCyI0aAiajTC+0W1BzDhmtta7tnICE="; sha256 = "lp7qJWkvelVfoLCyI0aAiajTC+0W1BzDhmtta7tnICE=";
}; };
}; };
nvim-parinfer = pkgs.vimUtils.buildVimPluginFrom2Nix { nvim-parinfer = pkgs.vimUtils.buildVimPlugin {
pname = "nvim-parinfer"; pname = "nvim-parinfer";
version = "v1.2.0"; version = "v1.2.0";
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {
@ -96,7 +96,7 @@ let
sha256 = "Dlzfp3CZTzq8zQeHByWf3ER6/Em+KNGYNI4Z17ui8Lc="; sha256 = "Dlzfp3CZTzq8zQeHByWf3ER6/Em+KNGYNI4Z17ui8Lc=";
}; };
}; };
my-marks = pkgs.vimUtils.buildVimPluginFrom2Nix { my-marks = pkgs.vimUtils.buildVimPlugin {
pname = "marks"; pname = "marks";
version = "2022-08-31"; version = "2022-08-31";
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {
@ -106,7 +106,7 @@ let
sha256 = "XdbgIWuAHNdTfyKDrKmQVq5oSbBoi56DpwtgOqhScAk="; sha256 = "XdbgIWuAHNdTfyKDrKmQVq5oSbBoi56DpwtgOqhScAk=";
}; };
}; };
my-fterm = pkgs.vimUtils.buildVimPluginFrom2Nix { my-fterm = pkgs.vimUtils.buildVimPlugin {
pname = "fterm"; pname = "fterm";
version = "2022-07-22"; version = "2022-07-22";
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {
@ -116,7 +116,7 @@ let
sha256 = "rR6KDwj58aYfyaSsoUy75536SdBhk394yspCUl/hzfE="; sha256 = "rR6KDwj58aYfyaSsoUy75536SdBhk394yspCUl/hzfE=";
}; };
}; };
my-nvim-peekup = pkgs.vimUtils.buildVimPluginFrom2Nix { my-nvim-peekup = pkgs.vimUtils.buildVimPlugin {
pname = "nvim-peekup"; pname = "nvim-peekup";
version = "0.1.0"; version = "0.1.0";
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {

View file

@ -21,7 +21,7 @@
../profiles/sync/website ../profiles/sync/website
../profiles/grasp ../profiles/grasp
# ../profiles/archivebox # ../profiles/archivebox
../profiles/woodpecker-agent # ../profiles/woodpecker-agent
../profiles/jellyfin ../profiles/jellyfin
../profiles/ulogger-server ../profiles/ulogger-server
../profiles/photoprism ../profiles/photoprism
@ -51,6 +51,25 @@
# seafile # seafile
}; };
services.transmission = {
enable = true;
settings = {
rpc.bind-address = "0.0.0.0";
download-dir = "/mnt/two/new-music";
};
};
services.nginx.virtualHosts."transmission.mossnet.lan" = {
enableACME = false;
forceSSL = false;
locations."/" = {
extraConfig = ''
proxy_pass http://localhost:9091/;
proxy_set_header X-Forwarded-Host $host;
'';
};
};
age.secrets.box-wg.file = "${self}/secrets/box-wg.age"; age.secrets.box-wg.file = "${self}/secrets/box-wg.age";
age.secrets.box-wg.owner = "anish"; age.secrets.box-wg.owner = "anish";
age.secrets.borg-key.file = "${self}/secrets/borg-key.age"; age.secrets.borg-key.file = "${self}/secrets/borg-key.age";

View file

@ -12,7 +12,7 @@
../profiles/mimetypes ../profiles/mimetypes
../profiles/syncthing ../profiles/syncthing
../profiles/mossnet-hosts ../profiles/mossnet-hosts
../profiles/fly-wg # ../profiles/fly-wg
# ../profiles/kuberenetes # ../profiles/kuberenetes
# ../profiles/mount-mossnet # ../profiles/mount-mossnet
]; ];

View file

@ -6,9 +6,9 @@
../profiles/server ../profiles/server
# ../profiles/metrics # ../profiles/metrics
../profiles/gitea ../profiles/gitea
../profiles/woodpecker-server # ../profiles/woodpecker-server
../profiles/rss-bridge ../profiles/rss-bridge
../profiles/mount-mossnet # ../profiles/mount-mossnet
../profiles/freshrss ../profiles/freshrss
../profiles/microbin ../profiles/microbin
]; ];

View file

@ -5,7 +5,7 @@ in
imports = [ ../../users/anish ]; imports = [ ../../users/anish ];
fonts = { fonts = {
fonts = with pkgs; [ powerline-fonts dejavu_fonts ]; packages = with pkgs; [ powerline-fonts dejavu_fonts ];
fontconfig.defaultFonts = { fontconfig.defaultFonts = {
monospace = [ "DejaVu Sans Mono for Powerline" ]; monospace = [ "DejaVu Sans Mono for Powerline" ];
sansSerif = [ "DejaVu Sans" ]; sansSerif = [ "DejaVu Sans" ];

View file

@ -69,6 +69,7 @@ in
unstable.newsflash unstable.newsflash
unstable.liferea unstable.liferea
unstable.gh unstable.gh
unstable.flyctl
kooha kooha
light light
@ -122,7 +123,7 @@ in
}; };
xserver = { xserver = {
enable = true; enable = true;
layout = "us,dvorak"; xkb.layout = "us,dvorak";
desktopManager.wallpaper.mode = "fill"; desktopManager.wallpaper.mode = "fill";
displayManager = { displayManager = {
defaultSession = "none+bspwm"; defaultSession = "none+bspwm";
@ -212,7 +213,7 @@ in
}; };
}; };
fonts.fonts = with pkgs; [ fonts.packages = with pkgs; [
fira-code fira-code
fira-code-symbols fira-code-symbols
hermit hermit

View file

@ -33,10 +33,13 @@ let
"paper.mossnet.lan" "paper.mossnet.lan"
"cal.mossnet.lan" "cal.mossnet.lan"
"archive.mossnet.lan" "archive.mossnet.lan"
"headphones.mossnet.lan"
"transmission.mossnet.lan"
"tracks.mossnet.lan" "tracks.mossnet.lan"
"grasp.mossnet.lan" "grasp.mossnet.lan"
"photos.mossnet.lan" "photos.mossnet.lan"
]; ];
in in
{ {
services.unbound = { services.unbound = {

View file

@ -1,5 +1,6 @@
{ pkgs, config, lib, ... }: { pkgs, config, lib, ... }:
{ {
networking.wg-quick.interfaces.fly-wg.configFile = "/home/anish/usr/fly-test/fly-wg.conf"; networking.wireguard.interfaces.fly-wg = "/home/anish/usr/fly-io-test/fly-wg.conf";
# ssh.startAgent = true;
} }

View file

@ -25,9 +25,10 @@
freshrss-users freshrss freshrss freshrss-users freshrss freshrss
''; '';
ensureDatabases = [ "freshrss" ]; ensureDatabases = [ "freshrss" ];
ensureUsers = [ ensureUsers = [{
{ name = "freshrss"; ensurePermissions."DATABASE freshrss" = "ALL PRIVILEGES"; } name = "freshrss";
]; ensureDBOwnership = true;
}];
# TODO # TODO
# initialScript # set password for freshrss user # initialScript # set password for freshrss user
}; };

View file

@ -54,11 +54,13 @@
gitea-users gitea gitea gitea-users gitea gitea
''; '';
ensureDatabases = [ "gitea" ]; ensureDatabases = [ "gitea" ];
ensureUsers = [ ensureUsers = [{
{ name = "gitea"; ensurePermissions."DATABASE gitea" = "ALL PRIVILEGES"; } name = "gitea";
]; ensureDBOwnership = true;
}];
# TODO # TODO
# initialScript # set password for gitea user # initialScript
# set password for gitea user
}; };
services.nginx = { services.nginx = {

View file

@ -2,11 +2,20 @@
{ {
services.headphones = { services.headphones = {
enable = true; enable = true;
host = "192.168.1.240"; host = "0.0.0.0";
port = 8181; port = 8181;
user = "headphones"; user = "headphones";
group = "audio"; group = "audio";
dataDir = "/data/music"; dataDir = "/data/music";
}; };
networking.firewall.allowedTCPPorts = [ 8181 ]; services.nginx.virtualHosts."headphones.mossnet.lan" = {
enableACME = false;
forceSSL = false;
locations."/" = {
extraConfig = ''
proxy_pass http://127.0.0.1:8181/;
'';
};
};
} }

View file

@ -36,6 +36,10 @@
services.postgresql = { services.postgresql = {
ensureUsers = [{ ensureUsers = [{
name = "grafana"; name = "grafana";
# TODO this is deprecated
# Need to translate this to
# systemd.services.postgresql.postStart
# or initialScript
ensurePermissions = { ensurePermissions = {
"ALL TABLES IN SCHEMA public" = "SELECT"; "ALL TABLES IN SCHEMA public" = "SELECT";
"DATABASE wallabag" = "CONNECT"; "DATABASE wallabag" = "CONNECT";

View file

@ -4,6 +4,8 @@
192.168.1.240 mossnet.lan 192.168.1.240 mossnet.lan
192.168.1.240 links.mossnet.lan 192.168.1.240 links.mossnet.lan
192.168.1.240 read.mossnet.lan 192.168.1.240 read.mossnet.lan
192.168.1.240 headphones.mossnet.lan
192.168.1.240 transmission.mossnet.lan
192.168.1.240 music.mossnet.lan 192.168.1.240 music.mossnet.lan
192.168.1.240 stats.mossnet.lan 192.168.1.240 stats.mossnet.lan
192.168.1.240 file.mossnet.lan 192.168.1.240 file.mossnet.lan

View file

@ -31,12 +31,12 @@
]; ];
hardware.pulseaudio.enable = lib.mkForce false; hardware.pulseaudio.enable = lib.mkForce false;
security.rtkit.enable = true; security.rtkit.enable = false;
services.pipewire = { services.pipewire = {
enable = true; enable = true;
alsa.enable = true; alsa.enable = true;
alsa.support32Bit = true; alsa.support32Bit = false;
pulse.enable = true; pulse.enable = true;
jack.enable = true; jack.enable = true;
# Deprecated as of 23.05 # Deprecated as of 23.05
@ -58,6 +58,6 @@
# "${config.hardware.bluetooth.package}/libexec/bluetooth/bluetoothd --noplugin=sap" # "${config.hardware.bluetooth.package}/libexec/bluetooth/bluetoothd --noplugin=sap"
#]; #];
boot.kernelModules = [ "snd-seq" "snd-rawmidi" ]; # midi sequence kernel mods boot.kernelModules = [ "snd-seq" "snd-rawmidi" ]; # midi sequence kernel mods
hardware.pulseaudio.package = pkgs.pulseaudio.override { jackaudioSupport = true; }; # hardware.pulseaudio.package = pkgs.pulseaudio.override { jackaudioSupport = true; };
} }

View file

@ -6,9 +6,7 @@
ensureDatabases = [ "photoprism" ]; ensureDatabases = [ "photoprism" ];
ensureUsers = [{ ensureUsers = [{
name = "photoprism"; name = "photoprism";
ensurePermissions = { ensureDBOwnership = true;
"DATABASE photoprism" = "ALL PRIVILEGES";
};
}]; }];
}; };

View file

@ -6,9 +6,7 @@
ensureDatabases = [ "ulogger" ]; ensureDatabases = [ "ulogger" ];
ensureUsers = [{ ensureUsers = [{
name = "ulogger"; name = "ulogger";
ensurePermissions = { nsureDBOwnership = true;
"DATABASE ulogger" = "ALL PRIVILEGES";
};
}]; }];
}; };

View file

@ -14,7 +14,7 @@
ensureUsers = [ ensureUsers = [
{ {
name = "wallabag"; name = "wallabag";
ensurePermissions."DATABASE wallabag" = "ALL PRIVILEGES"; ensureDBOwnership = true;
} }
]; ];
}; };

View file

@ -18,7 +18,7 @@
peers = [ peers = [
{ {
# box # box
publicKey = "Ra78mOc110K7URN5uB3m9d78iBKgeRHzT+3HkiFp9BU="; publicKey = "OnvVM1UaX0nmdohzSDyl90VKwd4VUpJZ+4oBpkkytwU=";
allowedIPs = [ "10.0.69.4/32" ]; allowedIPs = [ "10.0.69.4/32" ];
} }
{ {

View file

@ -27,9 +27,7 @@
ensureDatabases = [ "woodpecker" ]; ensureDatabases = [ "woodpecker" ];
ensureUsers = [{ ensureUsers = [{
name = "woodpecker"; name = "woodpecker";
ensurePermissions = { ensureDBOwnership = true;
"DATABASE woodpecker" = "ALL PRIVILEGES";
};
}]; }];
}; };

View file

@ -9,5 +9,5 @@
wireguard = import ./wireguard.nix; wireguard = import ./wireguard.nix;
backup = import ./backup.nix; backup = import ./backup.nix;
ulogger-server = import ./ulogger.nix; ulogger-server = import ./ulogger.nix;
microbin = import ./microbin.nix; # microbin = import ./microbin.nix; includide in 23.11
} }

View file

@ -55,9 +55,7 @@ in
ensureDatabases = [ droneserver ]; ensureDatabases = [ droneserver ];
ensureUsers = [{ ensureUsers = [{
name = droneserver; name = droneserver;
ensurePermissions = { ensureDBOwnership = true;
"DATABASE ${droneserver}" = "ALL PRIVILEGES";
};
}]; }];
}; };