diff --git a/configs/nvim.nix b/configs/nvim.nix index 0a32aad..6470aca 100644 --- a/configs/nvim.nix +++ b/configs/nvim.nix @@ -10,7 +10,6 @@ start = [ auto-pairs vim-floaterm - vim-rooter vim-closetag vim-floaterm nerdcommenter @@ -20,8 +19,8 @@ barbar-nvim nvim-web-devicons vim-polyglot + coc-explorer (gruvbox.overrideAttrs (oa: { patches = [ ./nvim/gruvbox.patch ]; })) - # (gruvbox.overrideAttrs (oa: { src = pkgs.fetchFromGitHub{} })) ]; }; }; diff --git a/configs/nvim/init.lua b/configs/nvim/init.lua index a2507fb..ccd29d4 100644 --- a/configs/nvim/init.lua +++ b/configs/nvim/init.lua @@ -79,6 +79,8 @@ bind('n', "", "h", {noremap=true}) bind('n', "", "j", {noremap=true}) bind('n', "", "k", {noremap=true}) bind('n', "", "l", {noremap=true}) +bind('n', "", ":vsplit", {noremap=true, silent=true}) +bind('n', "", ":split", {noremap=true, silent=true}) --RUN AND REPL (using vim-floaterm) diff --git a/flake.lock b/flake.lock index 8f01bb6..a8f24e7 100644 --- a/flake.lock +++ b/flake.lock @@ -85,6 +85,25 @@ "type": "github" } }, + "mailserver": { + "inputs": { + "nixpkgs": "nixpkgs_2", + "utils": "utils" + }, + "locked": { + "lastModified": 1622699922, + "narHash": "sha256-KJ2R+URPXVCdignP9v2eCA+/YwiNYY5HSQ0/Szv47KM=", + "owner": "simple-nixos-mailserver", + "repo": "nixos-mailserver", + "rev": "49074b7835c6d40846cb23953c04a03e1d2a4a9e", + "type": "gitlab" + }, + "original": { + "owner": "simple-nixos-mailserver", + "repo": "nixos-mailserver", + "type": "gitlab" + } + }, "neovim-flake": { "inputs": { "flake-utils": "flake-utils_2", @@ -123,6 +142,21 @@ } }, "nixpkgs_2": { + "locked": { + "lastModified": 1607522989, + "narHash": "sha256-o/jWhOSAlaK7y2M57OIriRt6whuVVocS/T0mG7fd1TI=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e9158eca70ae59e73fae23be5d13d3fa0cfc78b4", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixos-unstable", + "type": "indirect" + } + }, + "nixpkgs_3": { "locked": { "lastModified": 1619464443, "narHash": "sha256-R7WAb8EnkIJxxaF6GTHUPytjonhB4Zm0iatyWoW169A=", @@ -138,7 +172,7 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs_4": { "locked": { "lastModified": 1621840840, "narHash": "sha256-o6h6+d5ZwrFmOTe+ma9s1Z9kyHsCW1C84IA8RZ9/fIU=", @@ -173,7 +207,7 @@ "inputs": { "flake-compat": "flake-compat", "neovim-flake": "neovim-flake", - "nixpkgs": "nixpkgs_3" + "nixpkgs": "nixpkgs_4" }, "locked": { "lastModified": 1622104855, @@ -193,11 +227,12 @@ "inputs": { "agenix": "agenix", "home-manager": "home-manager", - "nixpkgs": "nixpkgs_2", + "mailserver": "mailserver", + "nixpkgs": "nixpkgs_3", "nur": "nur", "nvim": "nvim", "stable": "stable", - "utils": "utils" + "utils": "utils_2" } }, "stable": { @@ -217,6 +252,21 @@ } }, "utils": { + "locked": { + "lastModified": 1605370193, + "narHash": "sha256-YyMTf3URDL/otKdKgtoMChu4vfVL3vCMkRqpGifhUn0=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "5021eac20303a61fafe17224c087f5519baed54d", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "utils_2": { "locked": { "lastModified": 1620759905, "narHash": "sha256-WiyWawrgmyN0EdmiHyG2V+fqReiVi8bM9cRdMaKQOFg=", diff --git a/flake.nix b/flake.nix index 69d6ef9..6a61b7f 100644 --- a/flake.nix +++ b/flake.nix @@ -13,6 +13,7 @@ agenix.url = github:ryantm/agenix; utils.url = github:numtide/flake-utils; nvim.url = github:nix-community/neovim-nightly-overlay; + mailserver.url = gitlab:simple-nixos-mailserver/nixos-mailserver; }; outputs = inputs@{self, nixpkgs, stable, ... }: @@ -26,7 +27,10 @@ { packages = import nixpkgs { inherit system; - overlays = overlays ++ [ inputs.nur.overlay inputs.nvim.overlay ]; + overlays = overlays ++ [ + inputs.nur.overlay + inputs.nvim.overlay + ]; config.allowUnfree = true; config.allowBroken = true; }; @@ -67,6 +71,7 @@ system = "aarch64-linux"; modules = [ ./hosts/servers/marisa.nix + inputs.mailserver.nixosModules.mailserver { nixpkgs.pkgs = self.packages.aarch64-linux; } diff --git a/home/natto.nix b/home/natto.nix index 93ec0a1..c8a34d5 100644 --- a/home/natto.nix +++ b/home/natto.nix @@ -71,7 +71,6 @@ in glxinfo sxiv vim - w3m feh dwm dmenu diff --git a/home/secrets/.zshrc.age b/home/secrets/.zshrc.age index bf3e9f5..20ad216 100644 Binary files a/home/secrets/.zshrc.age and b/home/secrets/.zshrc.age differ diff --git a/home/stuff/programs.nix b/home/stuff/programs.nix index 8d6e462..d2d1bc0 100644 --- a/home/stuff/programs.nix +++ b/home/stuff/programs.nix @@ -10,8 +10,8 @@ package = pkgs.firefox-bin; profiles.natto = { name = "natto"; - userChrome = builtins.readFile ../config/firefox/userChrome.css; - userContent = builtins.readFile ../config/firefox/userContent.css; + # userChrome = builtins.readFile ../config/firefox/userChrome.css; + # userContent = builtins.readFile ../config/firefox/userContent.css; }; }; zathura = { diff --git a/common/colemak-dh.xkb b/hosts/personal/common/colemak-dh.xkb similarity index 100% rename from common/colemak-dh.xkb rename to hosts/personal/common/colemak-dh.xkb diff --git a/common/nvidia-offload.nix b/hosts/personal/common/nvidia-offload.nix similarity index 100% rename from common/nvidia-offload.nix rename to hosts/personal/common/nvidia-offload.nix diff --git a/common/pipewire.nix b/hosts/personal/common/pipewire.nix similarity index 100% rename from common/pipewire.nix rename to hosts/personal/common/pipewire.nix diff --git a/common/xorg.nix b/hosts/personal/common/xorg.nix similarity index 100% rename from common/xorg.nix rename to hosts/personal/common/xorg.nix diff --git a/hosts/personal/networking.nix b/hosts/personal/networking.nix deleted file mode 100644 index 5caec17..0000000 --- a/hosts/personal/networking.nix +++ /dev/null @@ -1,21 +0,0 @@ -{config, ... }: - -{ - networking = { - hostName = "Satori"; - wireless.enable = true; # Enables wireless support via wpa_supplicant. - firewall.allowedTCPPorts = [ 22 ]; - interfaces = { - enp7s0.useDHCP = true; - wlp0s20f3 = { - useDHCP = true; - ipv4.addresses = [ { - prefixLength = 24; - address = "192.168.0.109"; - } ]; - }; - }; - defaultGateway = "192.168.0.1"; - nameservers = [ "1.1.1.1" "8.8.8.8" ]; - }; -} diff --git a/hosts/personal/satori.nix b/hosts/personal/satori.nix index d116b5c..bcc6be7 100644 --- a/hosts/personal/satori.nix +++ b/hosts/personal/satori.nix @@ -11,7 +11,7 @@ ./common/nvidia-offload.nix ./common/pipewire.nix ./common/xorg.nix - ./configs/nvim.nix + ../../configs/nvim.nix ]; system.stateVersion = "20.09"; } diff --git a/hosts/personal/boot.nix b/hosts/personal/satori/boot.nix similarity index 96% rename from hosts/personal/boot.nix rename to hosts/personal/satori/boot.nix index 9500a97..5c519d6 100644 --- a/hosts/personal/boot.nix +++ b/hosts/personal/satori/boot.nix @@ -21,7 +21,7 @@ }; grub = { enable = true; - useOSProber = true; + # useOSProber = true; efiSupport = true; device = "nodev"; splashImage = ./cirno.png; diff --git a/hosts/personal/cirno.png b/hosts/personal/satori/cirno.png similarity index 100% rename from hosts/personal/cirno.png rename to hosts/personal/satori/cirno.png diff --git a/hosts/personal/hardware.nix b/hosts/personal/satori/hardware.nix similarity index 100% rename from hosts/personal/hardware.nix rename to hosts/personal/satori/hardware.nix diff --git a/hosts/personal/satori/networking.nix b/hosts/personal/satori/networking.nix new file mode 100644 index 0000000..7b3c4f6 --- /dev/null +++ b/hosts/personal/satori/networking.nix @@ -0,0 +1,37 @@ +{config, pkgs, ... }: + +{ + networking = { + hostName = "Satori"; + wireless.enable = true; + firewall = { + allowedTCPPorts = [ 22 ]; + allowedUDPPorts = [ 17840 ]; + }; + interfaces = { + enp7s0.useDHCP = true; + wlp0s20f3 = { + useDHCP = true; + ipv4.addresses = [ { + prefixLength = 24; + address = "192.168.0.109"; + } ]; + }; + }; + wireguard.interfaces.wg0 = { + ips = [ "100.0.0.3/32" ]; + listenPort = 17840; + privateKeyFile = "/var/secrets/wg"; + peers = [ + { + #Oracle VM1 + publicKey = "z0Y2VNEWcyVQVSqRHiwmiJ5/0MgSPM+HZfEcwIccSxM="; + allowedIPs = [ "100.0.0.0/24" ]; + endpoint = "140.238.230.155:17840"; + persistentKeepalive = 25; + } + ]; + }; + nameservers = [ "1.1.1.1" "8.8.8.8" ]; + }; +} diff --git a/hosts/personal/pkgs.nix b/hosts/personal/satori/pkgs.nix similarity index 100% rename from hosts/personal/pkgs.nix rename to hosts/personal/satori/pkgs.nix diff --git a/hosts/personal/services.nix b/hosts/personal/satori/services.nix similarity index 89% rename from hosts/personal/services.nix rename to hosts/personal/satori/services.nix index e916a9f..0555088 100644 --- a/hosts/personal/services.nix +++ b/hosts/personal/satori/services.nix @@ -20,7 +20,10 @@ package = pkgs.mysql; dataDir = "/var/db"; }; - sshd.enable = true; + openssh = { + enable = true; + permitRootLogin = "yes"; + }; /* vault = { enable = true; storageBackend = "mysql"; @@ -30,7 +33,7 @@ systemd.services = { tor.wantedBy = lib.mkForce []; logmein-hamachi.wantedBy = lib.mkForce []; - sshd.wantedBy = lib.mkForce []; + openssh.wantedBy = lib.mkForce []; mysql.wantedBy = lib.mkForce []; #printing.wantedBy = lib.mkForce []; #vault.wantedBy = lib.mkForce []; diff --git a/hosts/personal/stuff.nix b/hosts/personal/satori/stuff.nix similarity index 100% rename from hosts/personal/stuff.nix rename to hosts/personal/satori/stuff.nix diff --git a/overlays/customscripts/src/agecrypt b/overlays/customscripts/src/agecrypt index fef292c..a8eca9c 100644 --- a/overlays/customscripts/src/agecrypt +++ b/overlays/customscripts/src/agecrypt @@ -13,7 +13,6 @@ fi keys="" for x in ~/.ssh/*.pub do - keys= "$keys -r $(cat 'x')" + keys="$keys -r \"$(cat "$x")\"" done -echo "Encrypting with \n'$keys'" -rage -o "$TARGET" "$keys" "$1" +echo rage -o $TARGET $keys $FILE