From dbb8efeec25bbec015a9dc07b3846552453a2b35 Mon Sep 17 00:00:00 2001 From: osbm Date: Tue, 29 Jul 2025 00:51:26 +0300 Subject: [PATCH] formatting --- flake.nix | 46 +++++++---- hosts/ymir/configuration.nix | 1 - modules/services/glance.nix | 150 +++++++++++++++++------------------ modules/services/hydra.nix | 2 +- 4 files changed, 105 insertions(+), 94 deletions(-) diff --git a/flake.nix b/flake.nix index e8000a7..6fa0ab3 100644 --- a/flake.nix +++ b/flake.nix @@ -59,10 +59,12 @@ ]; forAllSystems = f: nixpkgs.lib.genAttrs supportedSystems (system: f system); makePkgs = system: import nixpkgs { inherit system; }; - makeNixosConfig = configName: nixpkgs.lib.nixosSystem { - specialArgs = { inherit inputs outputs; }; - modules = [ ./hosts/${configName}/configuration.nix ]; - }; + makeNixosConfig = + configName: + nixpkgs.lib.nixosSystem { + specialArgs = { inherit inputs outputs; }; + modules = [ ./hosts/${configName}/configuration.nix ]; + }; configNames = builtins.attrNames (builtins.readDir ./hosts); in { @@ -82,21 +84,31 @@ path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.harmonica; }; }; - packages = forAllSystems (system: + packages = forAllSystems ( + system: let - makeNixosConfigWithSystemOverride = configName: nixpkgs.lib.nixosSystem { - specialArgs = { inherit inputs outputs; }; - modules = [ - ./hosts/${configName}/configuration.nix - { nixpkgs.hostPlatform = nixpkgs.lib.mkForce system; } - ]; - }; - dotfilesMachineNames = [ "ymir" "pochita" "tartarus" "wallfacer" ]; + makeNixosConfigWithSystemOverride = + configName: + nixpkgs.lib.nixosSystem { + specialArgs = { inherit inputs outputs; }; + modules = [ + ./hosts/${configName}/configuration.nix + { nixpkgs.hostPlatform = nixpkgs.lib.mkForce system; } + ]; + }; + dotfilesMachineNames = [ + "ymir" + "pochita" + "tartarus" + "wallfacer" + ]; in - builtins.listToAttrs (map (name: { - name = "${name}-dotfiles"; - value = (makeNixosConfigWithSystemOverride name).config.home-manager.users.osbm.home-files; - }) dotfilesMachineNames) + builtins.listToAttrs ( + map (name: { + name = "${name}-dotfiles"; + value = (makeNixosConfigWithSystemOverride name).config.home-manager.users.osbm.home-files; + }) dotfilesMachineNames + ) ); }; } diff --git a/hosts/ymir/configuration.nix b/hosts/ymir/configuration.nix index be87341..b97b4a6 100644 --- a/hosts/ymir/configuration.nix +++ b/hosts/ymir/configuration.nix @@ -30,7 +30,6 @@ networking.hostName = "ymir"; # Define your hostname. - networking.firewall.allowedTCPPorts = [ 8889 8000 diff --git a/modules/services/glance.nix b/modules/services/glance.nix index eb9f937..c59cb3a 100644 --- a/modules/services/glance.nix +++ b/modules/services/glance.nix @@ -14,90 +14,90 @@ config = lib.mkMerge [ (lib.mkIf config.myModules.enableGlance { - services.glance = { - enable = true; - openFirewall = true; - settings = { - server = { - port = 3838; - host = "0.0.0.0"; - }; - pages = [ - { - columns = [ + services.glance = { + enable = true; + openFirewall = true; + settings = { + server = { + port = 3838; + host = "0.0.0.0"; + }; + pages = [ { - size = "small"; - widgets = [ - {type = "calendar";} + columns = [ { - type = "repository"; - repository = "NixOS/nixpkgs"; - } - ]; - } - { - size = "full"; - widgets = [ - { - type = "repository"; - repository = "NixOS/nixpkgs"; - } - { - cache = "1m"; - sites = [ + size = "small"; + widgets = [ + { type = "calendar"; } { - icon = "sh:forgejo"; - title = "Forgejo git server"; - url = "https://git.osbm.dev"; - } - { - icon = "si:ollama"; - title = "Open Webui"; - url = "http://ymir.curl-boga.ts.net:7070/"; - } - { - icon = "sh:jellyfin"; - title = "Jellyfin"; - url = "http://ymir.curl-boga.ts.net:8096/"; - } - { - icon = "sh:nixos"; - title = "Hydra"; - url = "http://wallfacer.curl-boga.ts.net:3000"; - } - { - icon = "sh:nixos"; - title = "Attix Binary Cache"; - url = "https://cache.osbm.dev"; - } - { - icon = "sh:visual-studio-code"; - title = "Ymir Remote VSCode"; - url = "http://ymir.curl-boga.ts.net:4444/"; - } - { - icon = "sh:visual-studio-code"; - title = "Tartarus Remote VSCode"; - url = "http://tartarus.curl-boga.ts.net:4444/"; - } - { - icon = "sh:visual-studio-code"; - title = "Wallfacer Remote VSCode"; - url = "http://wallfacer.curl-boga.ts.net:4444/"; + type = "repository"; + repository = "NixOS/nixpkgs"; + } + ]; + } + { + size = "full"; + widgets = [ + { + type = "repository"; + repository = "NixOS/nixpkgs"; + } + { + cache = "1m"; + sites = [ + { + icon = "sh:forgejo"; + title = "Forgejo git server"; + url = "https://git.osbm.dev"; + } + { + icon = "si:ollama"; + title = "Open Webui"; + url = "http://ymir.curl-boga.ts.net:7070/"; + } + { + icon = "sh:jellyfin"; + title = "Jellyfin"; + url = "http://ymir.curl-boga.ts.net:8096/"; + } + { + icon = "sh:nixos"; + title = "Hydra"; + url = "http://wallfacer.curl-boga.ts.net:3000"; + } + { + icon = "sh:nixos"; + title = "Attix Binary Cache"; + url = "https://cache.osbm.dev"; + } + { + icon = "sh:visual-studio-code"; + title = "Ymir Remote VSCode"; + url = "http://ymir.curl-boga.ts.net:4444/"; + } + { + icon = "sh:visual-studio-code"; + title = "Tartarus Remote VSCode"; + url = "http://tartarus.curl-boga.ts.net:4444/"; + } + { + icon = "sh:visual-studio-code"; + title = "Wallfacer Remote VSCode"; + url = "http://wallfacer.curl-boga.ts.net:4444/"; + } + ]; + title = "Services"; + type = "monitor"; } ]; - title = "Services"; - type = "monitor"; } ]; + name = "Home"; + content = "Welcome to Pochita's home page!"; } ]; - name = "Home"; - content = "Welcome to Pochita's home page!"; - } - ]; - }; - }; + }; + }; networking.firewall.allowedTCPPorts = [ config.services.glance.settings.server.port ]; services.cloudflared.tunnels = { "91b13f9b-81be-46e1-bca0-db2640bf2d0a" = { diff --git a/modules/services/hydra.nix b/modules/services/hydra.nix index febcb37..73ba924 100644 --- a/modules/services/hydra.nix +++ b/modules/services/hydra.nix @@ -19,7 +19,7 @@ port = 3000; hydraURL = "http://${config.networking.hostName}.curl-boga.ts.net/hydra/"; notificationSender = "hydra@localhost"; - buildMachinesFiles = []; + buildMachinesFiles = [ ]; useSubstitutes = true; }; networking.firewall.allowedTCPPorts = [