diff --git a/config/hosts/rinnosuke/nixos.nix b/config/hosts/rinnosuke/nixos.nix index 6878942f..40d1f516 100644 --- a/config/hosts/rinnosuke/nixos.nix +++ b/config/hosts/rinnosuke/nixos.nix @@ -1,57 +1,59 @@ { config, tf, meta, kw, pkgs, lib, sources, ... }: with lib; let oci-root = meta.deploy.targets.oci-root.tf; - addr_ipv6_nix = let - prefix = head (splitString "/" (oci-root.resources.oci_kw_subnet.importAttr "ipv6cidr_block")); - in assert hasSuffix "::" prefix; prefix + "7"; + addr_ipv6_nix = + let + prefix = head (splitString "/" (oci-root.resources.oci_kw_subnet.importAttr "ipv6cidr_block")); + in + assert hasSuffix "::" prefix; prefix + "7"; in - { - imports = (with (import (sources.tf-nix + "/modules")); [ - nixos.ubuntu-linux - nixos.oracle - ./oracle.nix - ]) ++ (with meta; [ - services.knot - services.nginx - ]); +{ + imports = (with (import (sources.tf-nix + "/modules")); [ + nixos.ubuntu-linux + nixos.oracle + ./oracle.nix + ]) ++ (with meta; [ + services.knot + services.nginx + ]); - services.nginx.virtualHosts = - let - splashy = pkgs.host-splash-site config.networking.hostName; - in - kw.virtualHostGen { - networkFilter = [ "public" ]; - block.locations."/" = { root = splashy; }; - }; + services.nginx.virtualHosts = + let + splashy = pkgs.host-splash-site config.networking.hostName; + in + kw.virtualHostGen { + networkFilter = [ "public" ]; + block.locations."/" = { root = splashy; }; + }; - networking = { - useDHCP = false; - hostName = "rinnosuke"; - interfaces.ens3 = { - useDHCP = true; - ipv6 = { - addresses = mkIf (config.network.addresses.public.ipv6.enable) [{ - address = config.network.addresses.public.ipv6.address; - prefixLength = 64; - }]; - routes = [{ - address = "::"; - prefixLength = 0; - }]; - }; - }; + networking = { + useDHCP = false; + hostName = "rinnosuke"; + interfaces.ens3 = { + useDHCP = true; + ipv6 = { + addresses = mkIf (config.network.addresses.public.ipv6.enable) [{ + address = config.network.addresses.public.ipv6.address; + prefixLength = 64; + }]; + routes = [{ + address = "::"; + prefixLength = 0; + }]; }; + }; + }; - network = { - addresses = { - public = { - enable = true; - ipv6.address = mkIf (tf.state.resources ? ${tf.resources.${config.networking.hostName}.out.reference}) addr_ipv6_nix; - }; - }; - firewall.public.interfaces = singleton "ens3"; - tf = { - enable = true; - ipv4_attr = "public_ip"; - }; + network = { + addresses = { + public = { + enable = true; + ipv6.address = mkIf (tf.state.resources ? ${tf.resources.${config.networking.hostName}.out.reference}) addr_ipv6_nix; }; - } + }; + firewall.public.interfaces = singleton "ens3"; + tf = { + enable = true; + ipv4_attr = "public_ip"; + }; + }; +} diff --git a/config/services/knot/default.nix b/config/services/knot/default.nix index 227c1fc5..bbed73ca 100644 --- a/config/services/knot/default.nix +++ b/config/services/knot/default.nix @@ -14,9 +14,9 @@ group = "knot"; }; -/* environment.etc."katdns/zones/kittywit.ch.zone".text = let + /* environment.etc."katdns/zones/kittywit.ch.zone".text = let dns = pkgs.dns; - in dns.lib.toString "kittywit.ch." (import ./kittywit.ch.nix {inherit dns; }); */ + in dns.lib.toString "kittywit.ch." (import ./kittywit.ch.nix {inherit dns; }); */ services.knot = { enable = true; diff --git a/config/users/kat/base/shell.nix b/config/users/kat/base/shell.nix index 768d2cf7..b382ccee 100644 --- a/config/users/kat/base/shell.nix +++ b/config/users/kat/base/shell.nix @@ -20,6 +20,9 @@ in nano = '' ${pkgs.kitty}/bin/kitty +kitten icat ${./nano.png} ''; + getAlias = '' + printf '%s\n' $aliases[$1] + ''; } // shellFunAliases { sed = "sd"; find = "fd"; @@ -55,7 +58,7 @@ in "autolist" "listrowsfirst" ]; in - '' + '' ${if config.anicca.enabled then '' HISTFILE=/persist/home/.zsh_history '' else '' diff --git a/config/users/kat/dev/vim/default.nix b/config/users/kat/dev/vim/default.nix index 95d38159..d70c49cb 100644 --- a/config/users/kat/dev/vim/default.nix +++ b/config/users/kat/dev/vim/default.nix @@ -1,34 +1,35 @@ { config, pkgs, ... }: -let initvim = pkgs.callPackage - ({ stdenv, elinks, nodejs }: stdenv.mkDerivation { - name = "init.vim"; - src = ./init.vim; - inherit nodejs elinks; - buildInputs = [ - elinks - nodejs - ]; - phases = [ "buildPhase" ]; - buildPhase = '' - substituteAll $src $out - ''; - }) - { }; +let + initvim = pkgs.callPackage + ({ stdenv, elinks, nodejs }: stdenv.mkDerivation { + name = "init.vim"; + src = ./init.vim; + inherit nodejs elinks; + buildInputs = [ + elinks + nodejs + ]; + phases = [ "buildPhase" ]; + buildPhase = '' + substituteAll $src $out + ''; + }) + { }; cocvim = pkgs.callPackage - ({ stdenv, elinks, nodejs }: stdenv.mkDerivation { - name = "coc.vim"; - src = ./coc.vim; - inherit nodejs; - buildInputs = [ - nodejs - ]; - phases = [ "buildPhase" ]; - buildPhase = '' - substituteAll $src $out - ''; - }) - { }; + ({ stdenv, elinks, nodejs }: stdenv.mkDerivation { + name = "coc.vim"; + src = ./coc.vim; + inherit nodejs; + buildInputs = [ + nodejs + ]; + phases = [ "buildPhase" ]; + buildPhase = '' + substituteAll $src $out + ''; + }) + { }; in { programs.neovim = { diff --git a/config/users/kat/gui/kitty.nix b/config/users/kat/gui/kitty.nix index a70b7524..51edb8a4 100644 --- a/config/users/kat/gui/kitty.nix +++ b/config/users/kat/gui/kitty.nix @@ -2,7 +2,7 @@ { wayland.windowManager.sway.extraSessionCommands = '' - export KITTY_CACHE_DIRECTORY="/tmp/kitty"; + export KITTY_CACHE_DIRECTORY="/tmp/kitty"; ''; programs.kitty = { enable = true; diff --git a/default.nix b/default.nix index ac4cd8ad..897be254 100644 --- a/default.nix +++ b/default.nix @@ -1,6 +1,6 @@ let # we don't have lib without sources, so we need optionalAttrs - optionalAttrs = cond: as: if cond then as else {}; + optionalAttrs = cond: as: if cond then as else { }; # Sources are from niv. sources = import ./nix/sources.nix // optionalAttrs (builtins.pathExists ./overlays/exprs/default.nix) { katexprs = ./overlays/exprs; diff --git a/overlays/dns/default.nix b/overlays/dns/default.nix index bcd67cc3..5498cc53 100644 --- a/overlays/dns/default.nix +++ b/overlays/dns/default.nix @@ -1,3 +1,3 @@ { sources, ... }: final: prev: { - dns = import ( sources.kirelagin + "/dns") { pkgs = final; }; + dns = import (sources.kirelagin + "/dns") { pkgs = final; }; }