From 48e3a85c82cee194f46d0764428e166a46186f33 Mon Sep 17 00:00:00 2001 From: Katherina Walshe-Grey Date: Wed, 29 May 2024 15:22:04 +0100 Subject: [PATCH 1/2] [tohru] set up nix formatting in IDE --- hosts/tohru/home.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hosts/tohru/home.nix b/hosts/tohru/home.nix index 843aca2..42e6d8a 100644 --- a/hosts/tohru/home.nix +++ b/hosts/tohru/home.nix @@ -45,6 +45,10 @@ "git.autofetch" = true; "nix.enableLanguageServer" = true; "nix.serverPath" = "nil"; + "nix.serverSettings".nil = { + diagnostics.ignored = [ "unused_binding" "unused_with" ]; + formatting.command = [ "nixpkgs-fmt" ]; + }; "workbench.colorTheme" = "SynthWave '84"; }; }; From f499d48194eaecb83a08eada3e0466c67ffca1ab Mon Sep 17 00:00:00 2001 From: Katherina Walshe-Grey Date: Wed, 29 May 2024 15:25:21 +0100 Subject: [PATCH 2/2] apply nixpkgs-fmt and remove unnecessary comments --- hosts/tohru/configuration.nix | 5 +--- hosts/tohru/home.nix | 42 ++++++++++++++++++---------------- hosts/yevaud/configuration.nix | 23 ++++--------------- 3 files changed, 28 insertions(+), 42 deletions(-) diff --git a/hosts/tohru/configuration.nix b/hosts/tohru/configuration.nix index 87707ea..84f046c 100644 --- a/hosts/tohru/configuration.nix +++ b/hosts/tohru/configuration.nix @@ -72,14 +72,11 @@ hardware.enableAllFirmware = true; services.fwupd.enable = true; services.fstrim.enable = true; - + boot.initrd.luks.devices = { "rpool".device = "/dev/nvme0n1p2"; }; - # This option defines the first version of NixOS you have installed on this particular machine, - # and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions. - # For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion . system.stateVersion = "23.11"; } diff --git a/hosts/tohru/home.nix b/hosts/tohru/home.nix index 42e6d8a..f04de5c 100644 --- a/hosts/tohru/home.nix +++ b/hosts/tohru/home.nix @@ -21,7 +21,7 @@ nil nixpkgs-fmt - ]; + ]; programs.git = { enable = true; @@ -29,29 +29,31 @@ userEmail = "git@katherina.rocks"; }; - programs.vscode = let - system = builtins.currentSystem; - sources = import ../../npins; - extensions = (import sources.nix-vscode-extensions).extensions.${system}; - in { - enable = true; - package = pkgs.vscodium; - extensions = (with pkgs.vscode-extensions; [ - jnoortheen.nix-ide - ]) ++ (with extensions.open-vsx; [ - robbowen.synthwave-vscode - ]); - userSettings = { - "git.autofetch" = true; - "nix.enableLanguageServer" = true; - "nix.serverPath" = "nil"; - "nix.serverSettings".nil = { + programs.vscode = + let + system = builtins.currentSystem; + sources = import ../../npins; + extensions = (import sources.nix-vscode-extensions).extensions.${system}; + in + { + enable = true; + package = pkgs.vscodium; + extensions = (with pkgs.vscode-extensions; [ + jnoortheen.nix-ide + ]) ++ (with extensions.open-vsx; [ + robbowen.synthwave-vscode + ]); + userSettings = { + "git.autofetch" = true; + "nix.enableLanguageServer" = true; + "nix.serverPath" = "nil"; + "nix.serverSettings".nil = { diagnostics.ignored = [ "unused_binding" "unused_with" ]; formatting.command = [ "nixpkgs-fmt" ]; + }; + "workbench.colorTheme" = "SynthWave '84"; }; - "workbench.colorTheme" = "SynthWave '84"; }; - }; home.stateVersion = "23.11"; }; diff --git a/hosts/yevaud/configuration.nix b/hosts/yevaud/configuration.nix index bae4bde..34e6a1e 100644 --- a/hosts/yevaud/configuration.nix +++ b/hosts/yevaud/configuration.nix @@ -1,12 +1,8 @@ -# Edit this configuration file to define what should be installed on -# your system. Help is available in the configuration.nix(5) man page, on -# https://search.nixos.org/options and in the NixOS manual (`nixos-help`). - { config, lib, pkgs, ... }: { imports = - [ # Include the results of the hardware scan. + [ ./hardware-configuration.nix ]; @@ -99,16 +95,12 @@ proxy_cookie_path / "/; secure; HttpOnly; SameSite=strict"; ''; - virtualHosts = let - base = { + virtualHosts = { + "git.katherina.rocks" = { forceSSL = true; enableACME = true; + locations."/".proxyPass = "http://[::1]:3000/"; }; - proxy = port: { - locations."/".proxyPass = "http://[::1]:${toString(port)}/"; - }; - in { - "git.katherina.rocks" = base // proxy 3000; }; }; security.acme = { @@ -139,12 +131,7 @@ }; }; - # Copy the NixOS configuration file and link it from the resulting system - # (/run/current-system/configuration.nix). This is useful in case you - # accidentally delete configuration.nix. - # system.copySystemConfiguration = true; - - system.stateVersion = "23.11"; # Did you read the comment? + system.stateVersion = "23.11"; }