diff --git a/flake.nix b/flake.nix index 0102453a..6246cd7b 100644 --- a/flake.nix +++ b/flake.nix @@ -148,7 +148,8 @@ }; suites = with profiles; rec { base = [ core users.root users.anish ]; - sealight = [ base server metrics gitea sealight-website backup rss-bridge mount-mossnet ]; # matrix + sealight = [ base server metrics gitea rss-bridge mount-mossnet ]; # matrix + lituus = [ base server metrics sealight-website matrix ]; mossnet = [ base server taskd shaarli dns monitoring nfs gonic headphones radicale seafile syncthing dhyan calibre wallabag finance ]; # hpi sync.music cube = [ base site server ]; graphical = [ base bluetooth music sync.kitaab sync.website sync.cal wifi desktop mimetypes ]; diff --git a/hardware-configuration.nix b/hardware-configuration.nix new file mode 100644 index 00000000..403ff39d --- /dev/null +++ b/hardware-configuration.nix @@ -0,0 +1,26 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, ... }: + +{ + imports = + [ + + ]; + + boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "sr_mod" "virtio_blk" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { + device = "/dev/disk/by-uuid/3b8b2c4b-835e-4822-8ac8-0effdc8270d6"; + fsType = "btrfs"; + }; + + swapDevices = [ ]; + + nix.maxJobs = lib.mkDefault 1; +} diff --git a/hosts/lituus/configuration.nix b/hosts/lituus/configuration.nix new file mode 100644 index 00000000..1b75091d --- /dev/null +++ b/hosts/lituus/configuration.nix @@ -0,0 +1,31 @@ +{ config, pkgs, ... }: +{ + imports = + [ + # Include the results of the hardware scan. + ./hardware-configuration.nix + ]; + + # Use the GRUB 2 boot loader. + boot.loader.grub.enable = true; + boot.loader.grub.version = 2; + boot.loader.grub.device = "/dev/vda"; # or "nodev" for efi only + + networking.hostName = "lituus"; # Define your hostname. + + networking.useDHCP = false; + networking.interfaces.ens3.useDHCP = true; + + # Configure network proxy if necessary + # networking.proxy.default = "http://user:password@proxy:port/"; + # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; + + sound.enable = false; + + # Define a user account. Don't forget to set a password with ‘passwd’. + # This value determines the NixOS release with which your system is to be + # compatible, in order to avoid breaking some software such as database + # servers. You should change this only after NixOS release notes say you + # should. + system.stateVersion = "19.09"; # Did you read the comment? +} diff --git a/hosts/lituus/default.nix b/hosts/lituus/default.nix new file mode 100644 index 00000000..87a66990 --- /dev/null +++ b/hosts/lituus/default.nix @@ -0,0 +1,11 @@ +{ self, profiles, suites, ... }: +{ + imports = [ + ./configuration.nix + ] ++ suites.lituus; + + home-manager.users.anish = { self, suites, ... }: { + imports = [ ] ++ suites.hmBase; + }; + +} diff --git a/hosts/lituus/hardware-configuration.nix b/hosts/lituus/hardware-configuration.nix new file mode 100644 index 00000000..403ff39d --- /dev/null +++ b/hosts/lituus/hardware-configuration.nix @@ -0,0 +1,26 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, ... }: + +{ + imports = + [ + + ]; + + boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "sr_mod" "virtio_blk" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { + device = "/dev/disk/by-uuid/3b8b2c4b-835e-4822-8ac8-0effdc8270d6"; + fsType = "btrfs"; + }; + + swapDevices = [ ]; + + nix.maxJobs = lib.mkDefault 1; +} diff --git a/modules/heisenbridge.nix.bak b/modules/heisenbridge.nix similarity index 94% rename from modules/heisenbridge.nix.bak rename to modules/heisenbridge.nix index 3a74bb47..6f4e1d6b 100644 --- a/modules/heisenbridge.nix.bak +++ b/modules/heisenbridge.nix @@ -1,5 +1,6 @@ +# TODO too lazy to figure out how the official module works so i use this one lol { config, lib, pkgs, ... }: with lib; let - cfg = config.services.heisenbridge; + cfg = config.services.sealight.heisenbridge; heisenbridgeAppserviceConfig = { id = "heisenbridge"; @@ -20,7 +21,7 @@ in { options = { - services.heisenbridge = { + services.sealight.heisenbridge = { enable = mkEnableOption "heisenbridge, a bouncer-style Matrix IRC bridge."; identd.enable = mkEnableOption "identd for heisenbridge" // { default = true; @@ -87,7 +88,7 @@ in # Open ports for identd. networking.firewall.allowedTCPPorts = mkIf cfg.identd.enable [ 113 ]; - systemd.services.heisenbridge = { + systemd.services.heisenbridge-sealight = { description = "Heisenbridge Matrix IRC bridge"; after = [ "matrix-synapse.service" ]; wantedBy = [ "multi-user.target" ]; diff --git a/profiles/matrix/default.nix b/profiles/matrix/default.nix index b7ca7b32..e4e7578f 100644 --- a/profiles/matrix/default.nix +++ b/profiles/matrix/default.nix @@ -60,7 +60,7 @@ services.coturn = { enable = true; use-auth-secret = true; - static-auth-secret = "jXW1ohIq6wM3NB00xeME3uBihY85xjpkhGoyzBIdwhOpj7gjyxXZu1fwp1lUiYwJ"; + static-auth-secret = "jXW1ohIq6wM3NB00xeME3uBihY85xjpkhGoyzBIdwhOpj7gjyxXZu1fwp1lUiYwJ"; # TODO agenix realm = "turn.sealight.xyz"; min-port = 49111; max-port = 51111; @@ -254,13 +254,13 @@ }; }; - # services.heisenbridge = { - # enable = true; - # homeserver = "https://sealight.xyz"; - # listenPort = 14456; - # appServiceToken = "wyujLh8kjpmk2bfKeEE3sZ2gWOEUBKK5"; - # homeserverToken = "yEHs7lthD2ZHUibJOAv1APaFhEjxN5PT"; - # }; + services.sealight.heisenbridge = { + enable = true; + homeserver = "https://sealight.xyz"; + listenPort = 14456; + appServiceToken = "wyujLh8kjpmk2bfKeEE3sZ2gWOEUBKK5"; + homeserverToken = "yEHs7lthD2ZHUibJOAv1APaFhEjxN5PT"; + }; # environment.systemPackages = with pkgs; [ matrix-appservice-slack ];