From 6dc0d91f0df7f07c0888e03f6a4a2ff3954e7b40 Mon Sep 17 00:00:00 2001 From: dadada Date: Fri, 27 Aug 2021 17:49:14 +0200 Subject: [PATCH] fix homepage --- flake.nix | 1 - home/modules/emacs/doom.d/init.el | 2 +- nixos/configurations.nix | 23 +++++++++++++---------- nixos/gorgon/configuration.nix | 2 +- nixos/modules/default.nix | 2 +- nixos/modules/homepage.nix | 4 +--- nixos/surgat/configuration.nix | 2 +- outputs.nix | 5 ++--- overlays/default.nix | 3 --- 9 files changed, 20 insertions(+), 24 deletions(-) diff --git a/flake.nix b/flake.nix index b8dffc9..8558ff4 100644 --- a/flake.nix +++ b/flake.nix @@ -28,7 +28,6 @@ inputs.nixpkgs.follows = "myNixpkgs"; }; homePage = { - flake = false; url = github:dadada/dadada.li; }; }; diff --git a/home/modules/emacs/doom.d/init.el b/home/modules/emacs/doom.d/init.el index cf543a7..f8e10f6 100644 --- a/home/modules/emacs/doom.d/init.el +++ b/home/modules/emacs/doom.d/init.el @@ -158,7 +158,7 @@ ;;rest ; Emacs as a REST client rst ; ReST in peace ;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"} - rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap() + rust (+lsp) ; Fe2O3.unwrap().unwrap().unwrap().unwrap() ;;scala ; java, but good ;;(scheme +guile) ; a fully conniving family of lisps sh ; she sells {ba,z,fi}sh shells on the C xor diff --git a/nixos/configurations.nix b/nixos/configurations.nix index f4ed6c3..9aa5c01 100644 --- a/nixos/configurations.nix +++ b/nixos/configurations.nix @@ -2,9 +2,10 @@ , nixpkgs , nixosSystem , home-manager +, homePage , nixos-hardware }: -let adapterModule = { +let adapterModule = system: { nix.nixPath = [ "home-manager=${home-manager}" "nixpkgs=${nixpkgs}" @@ -26,14 +27,16 @@ let adapterModule = { ]; nix.requireSignedBinaryCaches = true; nix.useSandbox = true; - nixpkgs.overlays = (nixpkgs.lib.attrValues self.overlays); + nixpkgs.overlays = (nixpkgs.lib.attrValues self.overlays) ++ [ + (final: prev: { homePage = homePage.defaultPackage.${system}; }) + ]; }; in { - gorgon = nixosSystem { + gorgon = nixosSystem rec { system = "x86_64-linux"; modules = (nixpkgs.lib.attrValues self.nixosModules) ++ [ - adapterModule + (adapterModule system) nixos-hardware.nixosModules.lenovo-thinkpad-t14s-amd-gen1 #home-manager.nixosModules.home-manager #{ @@ -45,27 +48,27 @@ in ./gorgon/configuration.nix ]; }; - ifrit = nixosSystem { + ifrit = nixosSystem rec { system = "x86_64-linux"; modules = (nixpkgs.lib.attrValues self.nixosModules) ++ [ - adapterModule + (adapterModule system) ./modules/profiles/server.nix ./ifrit/configuration.nix ]; }; - surgat = nixosSystem { + surgat = nixosSystem rec { system = "x86_64-linux"; modules = (nixpkgs.lib.attrValues self.nixosModules) ++ [ - adapterModule + (adapterModule system) ./modules/profiles/server.nix ./surgat/configuration.nix ]; }; - pruflas = nixosSystem { + pruflas = nixosSystem rec { system = "x86_64-linux"; modules = (nixpkgs.lib.attrValues self.nixosModules) ++ [ - adapterModule + (adapterModule system) ./modules/profiles/server.nix ./pruflas/configuration.nix ]; diff --git a/nixos/gorgon/configuration.nix b/nixos/gorgon/configuration.nix index 72af629..5f1c6b8 100644 --- a/nixos/gorgon/configuration.nix +++ b/nixos/gorgon/configuration.nix @@ -56,7 +56,7 @@ in # Enable CUPS to print documents. services.printing = { - enable = false; + enable = true; browsing = true; drivers = with pkgs; [ hplip diff --git a/nixos/modules/default.nix b/nixos/modules/default.nix index fef39fb..7f06ed9 100644 --- a/nixos/modules/default.nix +++ b/nixos/modules/default.nix @@ -9,7 +9,7 @@ fileShare = import ./fileShare.nix; gitea = import ./gitea.nix; headphones = import ./headphones.nix; - homepage = import ./homepage.nix { inherit homePage; }; + homepage = import ./homepage.nix; networking = import ./networking.nix; share = import ./share.nix; steam = import ./steam.nix; diff --git a/nixos/modules/homepage.nix b/nixos/modules/homepage.nix index 279fce6..ed03c0b 100644 --- a/nixos/modules/homepage.nix +++ b/nixos/modules/homepage.nix @@ -1,8 +1,6 @@ -{ homePage }: { config, pkgs, lib, ... }: let cfg = config.dadada.homePage; - homePagePkg = pkgs.callPackage homePage { }; in with lib; { options.dadada.homePage = { @@ -14,7 +12,7 @@ with lib; { services.nginx.virtualHosts."dadada.li" = { enableACME = true; forceSSL = true; - root = "${homePagePkg}"; + root = "${pkgs.homePage}"; }; }; } diff --git a/nixos/surgat/configuration.nix b/nixos/surgat/configuration.nix index d5de97d..63611ae 100644 --- a/nixos/surgat/configuration.nix +++ b/nixos/surgat/configuration.nix @@ -15,7 +15,7 @@ in recommendedGzipSettings = true; recommendedProxySettings = true; - logError = "/dev/null"; + #logError = "/dev/null"; appendHttpConfig = '' access_log off; ''; diff --git a/outputs.nix b/outputs.nix index e6a8e00..29c2530 100644 --- a/outputs.nix +++ b/outputs.nix @@ -1,13 +1,13 @@ # Adapted from Mic92/dotfiles { self , flake-utils +, homePage , nixpkgs , home-manager , nix-doom-emacs , nixos-hardware , nvd , scripts -, homePage , ... }@inputs: (flake-utils.lib.eachDefaultSystem (system: @@ -54,7 +54,6 @@ packages = flake-utils.lib.flattenTree { deploy = pkgs.callPackage ./pkgs/deploy.nix { }; keys = pkgs.callPackage ./pkgs/keys { }; - homePage = pkgs.callPackage ./pkgs/homePage { }; recipemd = pkgs.python3Packages.toPythonApplication python3Packages.recipemd; }; })) // { @@ -64,7 +63,7 @@ hmModules = import ./home/modules inputs; nixosConfigurations = import ./nixos/configurations.nix { nixosSystem = nixpkgs.lib.nixosSystem; - inherit self nixpkgs home-manager nixos-hardware; + inherit self nixpkgs home-manager nixos-hardware homePage; }; nixosModules = import ./nixos/modules inputs; overlays = import ./overlays; diff --git a/overlays/default.nix b/overlays/default.nix index d4caaa0..4ac07d5 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -6,9 +6,6 @@ in keys = final: prev: { keys = prev.callPackage ../pkgs/keys { }; }; - homePage = final: prev: { - homePage = prev.callPackage ../pkgs/homePage { }; - }; recipemd = final: prev: { recipemd = prev.python3Packages.toPythonApplication prev.python3Packages.recipemd; };