nix config

update to 23.11

+84 -50
+4 -4
flake.nix
··· 3 3 4 4 inputs = { 5 5 # Nixpkgs 6 - nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05"; 6 + nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11"; 7 7 unstable.url = "github:nixos/nixpkgs/nixos-unstable"; 8 8 nixos-hardware.url = "github:NixOS/nixos-hardware/master"; 9 9 ··· 128 128 litePkgsFor = forAllSystems (system: import nixpkgs { 129 129 inherit system; 130 130 overlays = [ 131 - agenix.overlays.default 132 - unstableOverlay # Remove once updated to 23.05 (used for microbin on helix) 131 + ag serviceenix.overlays.default 133 132 tidalcycles.overlays.default # needed for nvim which comes pre-installed lol 134 133 ]; 135 134 }); ··· 172 171 home-manager.nixosModules.home-manager 173 172 { 174 173 nix.registry.nixpkgs.flake = nixpkgs; 174 + nix.registry.unstable.flake = unstable; 175 175 home-manager.useGlobalPkgs = true; 176 176 home-manager.useUserPackages = true; 177 177 home-manager.users.anish = import ./home/gui; ··· 188 188 agenix.nixosModules.age 189 189 self.nixosModules.backup 190 190 self.nixosModules.wireguard 191 - self.nixosModules.microbin 191 + # self.nixosModules.microbin 192 192 disko.nixosModules.disko 193 193 ]; 194 194 };
+10 -10
home/profiles/nvim/default.nix
··· 19 19 sha256 = "rs3NTZwWdsmBGXnrgUeVxUiNjbN/ULxJHifPYJD9mT4="; 20 20 }; 21 21 }; 22 - my-lspsaga = pkgs.vimUtils.buildVimPluginFrom2Nix { 22 + my-lspsaga = pkgs.vimUtils.buildVimPlugin { 23 23 name = "lspsaga.nvim"; 24 24 src = pkgs.fetchFromGitHub { 25 25 owner = "glepnir"; ··· 28 28 sha256 = "sciX/fMxzY1YOxXxjj1+ymrdMi451avcFFu+14R+/pk="; 29 29 }; 30 30 }; 31 - nvim-luapad = pkgs.vimUtils.buildVimPluginFrom2Nix { 31 + nvim-luapad = pkgs.vimUtils.buildVimPlugin { 32 32 name = "nvim-luapad"; 33 33 src = pkgs.fetchFromGitHub { 34 34 owner = "rafcamlet"; ··· 37 37 sha256 = "gMaS5YFi3+gmUIfkCMEt9vhm8XSgv54Cquv5+WCWeTo="; 38 38 }; 39 39 }; 40 - leap = pkgs.vimUtils.buildVimPluginFrom2Nix { 40 + leap = pkgs.vimUtils.buildVimPlugin { 41 41 name = "leap"; 42 42 src = pkgs.fetchFromGitHub { 43 43 owner = "ggandor"; ··· 55 55 sha256 = "vX7ZVJxgatIicmijehtaRvyHxk1i4gFfXrbPM/+VoFc="; 56 56 }; 57 57 }; 58 - my-which-key-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix { 58 + my-which-key-nvim = pkgs.vimUtils.buildVimPlugin { 59 59 pname = "which-key.nvim"; 60 60 version = "2022-05-04"; 61 61 src = pkgs.fetchFromGitHub { ··· 66 66 }; 67 67 meta.homepage = "https://github.com/folke/which-key.nvim/"; 68 68 }; 69 - scnvim = pkgs.vimUtils.buildVimPluginFrom2Nix { 69 + scnvim = pkgs.vimUtils.buildVimPlugin { 70 70 pname = "scnvim"; 71 71 version = "2022-06-04"; 72 72 src = pkgs.fetchFromGitHub { ··· 76 76 sha256 = "kvSwS6FNUY2Ue84NhWLLcm0ldLMSp4WqQ7s6TUoX6Cc="; 77 77 }; 78 78 }; 79 - yuck-vim = pkgs.vimUtils.buildVimPluginFrom2Nix { 79 + yuck-vim = pkgs.vimUtils.buildVimPlugin { 80 80 pname = "yuck.vim"; 81 81 version = "2021-08-09"; 82 82 src = pkgs.fetchFromGitHub { ··· 86 86 sha256 = "lp7qJWkvelVfoLCyI0aAiajTC+0W1BzDhmtta7tnICE="; 87 87 }; 88 88 }; 89 - nvim-parinfer = pkgs.vimUtils.buildVimPluginFrom2Nix { 89 + nvim-parinfer = pkgs.vimUtils.buildVimPlugin { 90 90 pname = "nvim-parinfer"; 91 91 version = "v1.2.0"; 92 92 src = pkgs.fetchFromGitHub { ··· 96 96 sha256 = "Dlzfp3CZTzq8zQeHByWf3ER6/Em+KNGYNI4Z17ui8Lc="; 97 97 }; 98 98 }; 99 - my-marks = pkgs.vimUtils.buildVimPluginFrom2Nix { 99 + my-marks = pkgs.vimUtils.buildVimPlugin { 100 100 pname = "marks"; 101 101 version = "2022-08-31"; 102 102 src = pkgs.fetchFromGitHub { ··· 106 106 sha256 = "XdbgIWuAHNdTfyKDrKmQVq5oSbBoi56DpwtgOqhScAk="; 107 107 }; 108 108 }; 109 - my-fterm = pkgs.vimUtils.buildVimPluginFrom2Nix { 109 + my-fterm = pkgs.vimUtils.buildVimPlugin { 110 110 pname = "fterm"; 111 111 version = "2022-07-22"; 112 112 src = pkgs.fetchFromGitHub { ··· 116 116 sha256 = "rR6KDwj58aYfyaSsoUy75536SdBhk394yspCUl/hzfE="; 117 117 }; 118 118 }; 119 - my-nvim-peekup = pkgs.vimUtils.buildVimPluginFrom2Nix { 119 + my-nvim-peekup = pkgs.vimUtils.buildVimPlugin { 120 120 pname = "nvim-peekup"; 121 121 version = "0.1.0"; 122 122 src = pkgs.fetchFromGitHub {
+20 -1
hosts/box/default.nix
··· 21 21 ../profiles/sync/website 22 22 ../profiles/grasp 23 23 # ../profiles/archivebox 24 - ../profiles/woodpecker-agent 24 + # ../profiles/woodpecker-agent 25 25 ../profiles/jellyfin 26 26 ../profiles/ulogger-server 27 27 ../profiles/photoprism ··· 49 49 "/mnt/two/postgres" # sealight postgres backups TODO remove once moved to capsul 50 50 ]; 51 51 # seafile 52 + }; 53 + 54 + services.transmission = { 55 + enable = true; 56 + settings = { 57 + rpc.bind-address = "0.0.0.0"; 58 + download-dir = "/mnt/two/new-music"; 59 + }; 60 + }; 61 + services.nginx.virtualHosts."transmission.mossnet.lan" = { 62 + enableACME = false; 63 + forceSSL = false; 64 + 65 + locations."/" = { 66 + extraConfig = '' 67 + proxy_pass http://localhost:9091/; 68 + proxy_set_header X-Forwarded-Host $host; 69 + ''; 70 + }; 52 71 }; 53 72 54 73 age.secrets.box-wg.file = "${self}/secrets/box-wg.age";
+1 -1
hosts/curve/default.nix
··· 12 12 ../profiles/mimetypes 13 13 ../profiles/syncthing 14 14 ../profiles/mossnet-hosts 15 - ../profiles/fly-wg 15 + # ../profiles/fly-wg 16 16 # ../profiles/kuberenetes 17 17 # ../profiles/mount-mossnet 18 18 ];
+2 -2
hosts/helix/default.nix
··· 6 6 ../profiles/server 7 7 # ../profiles/metrics 8 8 ../profiles/gitea 9 - ../profiles/woodpecker-server 9 + # ../profiles/woodpecker-server 10 10 ../profiles/rss-bridge 11 - ../profiles/mount-mossnet 11 + # ../profiles/mount-mossnet 12 12 ../profiles/freshrss 13 13 ../profiles/microbin 14 14 ];
+1 -1
hosts/profiles/core/default.nix
··· 5 5 imports = [ ../../users/anish ]; 6 6 7 7 fonts = { 8 - fonts = with pkgs; [ powerline-fonts dejavu_fonts ]; 8 + packages = with pkgs; [ powerline-fonts dejavu_fonts ]; 9 9 fontconfig.defaultFonts = { 10 10 monospace = [ "DejaVu Sans Mono for Powerline" ]; 11 11 sansSerif = [ "DejaVu Sans" ];
+3 -2
hosts/profiles/desktop/default.nix
··· 69 69 unstable.newsflash 70 70 unstable.liferea 71 71 unstable.gh 72 + unstable.flyctl 72 73 73 74 kooha 74 75 light ··· 122 123 }; 123 124 xserver = { 124 125 enable = true; 125 - layout = "us,dvorak"; 126 + xkb.layout = "us,dvorak"; 126 127 desktopManager.wallpaper.mode = "fill"; 127 128 displayManager = { 128 129 defaultSession = "none+bspwm"; ··· 212 213 }; 213 214 }; 214 215 215 - fonts.fonts = with pkgs; [ 216 + fonts.packages = with pkgs; [ 216 217 fira-code 217 218 fira-code-symbols 218 219 hermit
+3
hosts/profiles/dns/default.nix
··· 33 33 "paper.mossnet.lan" 34 34 "cal.mossnet.lan" 35 35 "archive.mossnet.lan" 36 + "headphones.mossnet.lan" 37 + "transmission.mossnet.lan" 36 38 "tracks.mossnet.lan" 37 39 "grasp.mossnet.lan" 38 40 "photos.mossnet.lan" 39 41 ]; 42 + 40 43 in 41 44 { 42 45 services.unbound = {
+2 -1
hosts/profiles/fly-wg/default.nix
··· 1 1 { pkgs, config, lib, ... }: 2 2 3 3 { 4 - networking.wg-quick.interfaces.fly-wg.configFile = "/home/anish/usr/fly-test/fly-wg.conf"; 4 + networking.wireguard.interfaces.fly-wg = "/home/anish/usr/fly-io-test/fly-wg.conf"; 5 + # ssh.startAgent = true; 5 6 }
+4 -3
hosts/profiles/freshrss/default.nix
··· 25 25 freshrss-users freshrss freshrss 26 26 ''; 27 27 ensureDatabases = [ "freshrss" ]; 28 - ensureUsers = [ 29 - { name = "freshrss"; ensurePermissions."DATABASE freshrss" = "ALL PRIVILEGES"; } 30 - ]; 28 + ensureUsers = [{ 29 + name = "freshrss"; 30 + ensureDBOwnership = true; 31 + }]; 31 32 # TODO 32 33 # initialScript # set password for freshrss user 33 34 };
+6 -4
hosts/profiles/gitea/default.nix
··· 54 54 gitea-users gitea gitea 55 55 ''; 56 56 ensureDatabases = [ "gitea" ]; 57 - ensureUsers = [ 58 - { name = "gitea"; ensurePermissions."DATABASE gitea" = "ALL PRIVILEGES"; } 59 - ]; 57 + ensureUsers = [{ 58 + name = "gitea"; 59 + ensureDBOwnership = true; 60 + }]; 60 61 # TODO 61 - # initialScript # set password for gitea user 62 + # initialScript 63 + # set password for gitea user 62 64 }; 63 65 64 66 services.nginx = {
+11 -2
hosts/profiles/headphones/default.nix
··· 2 2 { 3 3 services.headphones = { 4 4 enable = true; 5 - host = "192.168.1.240"; 5 + host = "0.0.0.0"; 6 6 port = 8181; 7 7 user = "headphones"; 8 8 group = "audio"; 9 9 dataDir = "/data/music"; 10 10 }; 11 - networking.firewall.allowedTCPPorts = [ 8181 ]; 11 + services.nginx.virtualHosts."headphones.mossnet.lan" = { 12 + enableACME = false; 13 + forceSSL = false; 14 + 15 + locations."/" = { 16 + extraConfig = '' 17 + proxy_pass http://127.0.0.1:8181/; 18 + ''; 19 + }; 20 + }; 12 21 }
+4
hosts/profiles/monitoring/default.nix
··· 36 36 services.postgresql = { 37 37 ensureUsers = [{ 38 38 name = "grafana"; 39 + # TODO this is deprecated 40 + # Need to translate this to 41 + # systemd.services.postgresql.postStart 42 + # or initialScript 39 43 ensurePermissions = { 40 44 "ALL TABLES IN SCHEMA public" = "SELECT"; 41 45 "DATABASE wallabag" = "CONNECT";
+2
hosts/profiles/mossnet-hosts/default.nix
··· 4 4 192.168.1.240 mossnet.lan 5 5 192.168.1.240 links.mossnet.lan 6 6 192.168.1.240 read.mossnet.lan 7 + 192.168.1.240 headphones.mossnet.lan 8 + 192.168.1.240 transmission.mossnet.lan 7 9 192.168.1.240 music.mossnet.lan 8 10 192.168.1.240 stats.mossnet.lan 9 11 192.168.1.240 file.mossnet.lan
+4 -4
hosts/profiles/music/default.nix
··· 31 31 ]; 32 32 33 33 hardware.pulseaudio.enable = lib.mkForce false; 34 - security.rtkit.enable = true; 34 + security.rtkit.enable = false; 35 35 36 36 services.pipewire = { 37 37 enable = true; 38 38 alsa.enable = true; 39 - alsa.support32Bit = true; 39 + alsa.support32Bit = false; 40 40 pulse.enable = true; 41 - jack.enable = true; 41 + jack.enable = true; 42 42 # Deprecated as of 23.05 43 43 # config = { 44 44 # pipewire."context.properties"."default.clock.rate" = "48000"; ··· 58 58 # "${config.hardware.bluetooth.package}/libexec/bluetooth/bluetoothd --noplugin=sap" 59 59 #]; 60 60 boot.kernelModules = [ "snd-seq" "snd-rawmidi" ]; # midi sequence kernel mods 61 - hardware.pulseaudio.package = pkgs.pulseaudio.override { jackaudioSupport = true; }; 61 + # hardware.pulseaudio.package = pkgs.pulseaudio.override { jackaudioSupport = true; }; 62 62 63 63 }
+1 -3
hosts/profiles/photoprism/default.nix
··· 6 6 ensureDatabases = [ "photoprism" ]; 7 7 ensureUsers = [{ 8 8 name = "photoprism"; 9 - ensurePermissions = { 10 - "DATABASE photoprism" = "ALL PRIVILEGES"; 11 - }; 9 + ensureDBOwnership = true; 12 10 }]; 13 11 }; 14 12
+1 -3
hosts/profiles/ulogger-server/default.nix
··· 6 6 ensureDatabases = [ "ulogger" ]; 7 7 ensureUsers = [{ 8 8 name = "ulogger"; 9 - ensurePermissions = { 10 - "DATABASE ulogger" = "ALL PRIVILEGES"; 11 - }; 9 + nsureDBOwnership = true; 12 10 }]; 13 11 }; 14 12
+1 -1
hosts/profiles/wallabag/default.nix
··· 14 14 ensureUsers = [ 15 15 { 16 16 name = "wallabag"; 17 - ensurePermissions."DATABASE wallabag" = "ALL PRIVILEGES"; 17 + ensureDBOwnership = true; 18 18 } 19 19 ]; 20 20 };
+1 -1
hosts/profiles/wireguard-server/default.nix
··· 18 18 peers = [ 19 19 { 20 20 # box 21 - publicKey = "Ra78mOc110K7URN5uB3m9d78iBKgeRHzT+3HkiFp9BU="; 21 + publicKey = "OnvVM1UaX0nmdohzSDyl90VKwd4VUpJZ+4oBpkkytwU="; 22 22 allowedIPs = [ "10.0.69.4/32" ]; 23 23 } 24 24 {
+1 -3
hosts/profiles/woodpecker-server/default.nix
··· 27 27 ensureDatabases = [ "woodpecker" ]; 28 28 ensureUsers = [{ 29 29 name = "woodpecker"; 30 - ensurePermissions = { 31 - "DATABASE woodpecker" = "ALL PRIVILEGES"; 32 - }; 30 + ensureDBOwnership = true; 33 31 }]; 34 32 }; 35 33
+1 -1
modules/nixos/default.nix
··· 9 9 wireguard = import ./wireguard.nix; 10 10 backup = import ./backup.nix; 11 11 ulogger-server = import ./ulogger.nix; 12 - microbin = import ./microbin.nix; 12 + # microbin = import ./microbin.nix; includide in 23.11 13 13 }
+1 -3
modules/nixos/woodpecker.nix
··· 55 55 ensureDatabases = [ droneserver ]; 56 56 ensureUsers = [{ 57 57 name = droneserver; 58 - ensurePermissions = { 59 - "DATABASE ${droneserver}" = "ALL PRIVILEGES"; 60 - }; 58 + ensureDBOwnership = true; 61 59 }]; 62 60 }; 63 61