From affdf52f2327244d04736594121e8b6ad4c15302 Mon Sep 17 00:00:00 2001 From: System administrator Date: Wed, 20 Apr 2022 09:53:28 +0100 Subject: [PATCH] refactoring --- config/neovim/coc-settings.nix | 5 ++ flake.lock | 37 +------------- flake.nix | 11 +--- hosts/firepit/default.nix | 12 ++++- hosts/firepit/hardware-configuration.nix | 47 ++++++++++++++++++ hosts/firepit/interfaces/default.nix | 3 ++ hosts/firepit/secrets/secrets.nix | 19 ++++--- hosts/subsurface/default.nix | 10 ++-- hosts/subsurface/hardware-configuration.nix | 10 ++++ hosts/subsurface/secrets/firepitAccess.age | Bin 0 -> 3356 bytes hosts/subsurface/secrets/secrets.nix | 2 +- lib/modules.nix | 4 +- modules/agenix.nix | 18 +++---- modules/desktop/apps/firefox.nix | 2 - modules/desktop/apps/mpc.nix | 4 +- modules/desktop/apps/obs.nix | 2 - modules/desktop/{default.nix => desktop.nix} | 0 modules/desktop/editors/neovim.nix | 4 +- modules/desktop/gaming/minecraft.nix | 2 +- modules/desktop/river.nix | 28 +++++++++++ modules/desktop/sway.nix | 8 +-- modules/dev/c.nix | 2 +- modules/dev/{default.nix => dev.nix} | 0 modules/dev/haskell.nix | 2 +- modules/dev/rust.nix | 22 ++++++++ modules/dev/zig.nix | 20 ++++++++ modules/services/geoclue2.nix | 2 +- modules/services/wiregaurd.nix | 47 ++++++++++++++++++ modules/shell/fish.nix | 2 +- modules/{theme/default.nix => theme.nix} | 0 .../{theme => themes}/still/background.png | Bin .../still/config/nwggrid/style.css | 0 .../still/config/sway/config | 0 .../still/config/waybar/style.css | 0 .../default.nix => themes/still/theme.nix} | 0 modules/users.nix | 15 ++---- packages/soundux.nix | 33 ++++++++++++ 37 files changed, 274 insertions(+), 99 deletions(-) create mode 100644 hosts/firepit/hardware-configuration.nix create mode 100644 hosts/firepit/interfaces/default.nix create mode 100644 hosts/subsurface/secrets/firepitAccess.age rename modules/desktop/{default.nix => desktop.nix} (100%) create mode 100644 modules/desktop/river.nix rename modules/dev/{default.nix => dev.nix} (100%) create mode 100644 modules/dev/rust.nix create mode 100644 modules/dev/zig.nix create mode 100644 modules/services/wiregaurd.nix rename modules/{theme/default.nix => theme.nix} (100%) rename modules/{theme => themes}/still/background.png (100%) rename modules/{theme => themes}/still/config/nwggrid/style.css (100%) rename modules/{theme => themes}/still/config/sway/config (100%) rename modules/{theme => themes}/still/config/waybar/style.css (100%) rename modules/{theme/still/default.nix => themes/still/theme.nix} (100%) create mode 100644 packages/soundux.nix diff --git a/config/neovim/coc-settings.nix b/config/neovim/coc-settings.nix index 0bd9218..65f9d1c 100644 --- a/config/neovim/coc-settings.nix +++ b/config/neovim/coc-settings.nix @@ -24,6 +24,11 @@ command = "rnix-lsp"; filetypes = [ "nix" ]; }; + + zig = { + command = "zls"; + filetypes = [ "zig" ]; + }; }; "yank.highlight.duration" = 700; diff --git a/flake.lock b/flake.lock index 1e1c46d..3b3278e 100755 --- a/flake.lock +++ b/flake.lock @@ -88,23 +88,6 @@ "type": "github" } }, - "meson": { - "flake": false, - "locked": { - "lastModified": 1640155612, - "narHash": "sha256-XrEIlf0W8mKEa97Uyc0w/187KBGEZOD+dJFNsn3UeNg=", - "owner": "mesonbuild", - "repo": "meson", - "rev": "06aad5233e6bec97bfe21ae79c85aa7171089d3b", - "type": "github" - }, - "original": { - "owner": "mesonbuild", - "ref": "0.60", - "repo": "meson", - "type": "github" - } - }, "nixos-hardware": { "locked": { "lastModified": 1639986101, @@ -208,28 +191,10 @@ "inputs": { "agenix": "agenix", "home-manager": "home-manager", - "meson": "meson", "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs", "nixpkgs-unstable": "nixpkgs-unstable", - "polymc": "polymc", - "sway-borders": "sway-borders" - } - }, - "sway-borders": { - "flake": false, - "locked": { - "lastModified": 1640037473, - "narHash": "sha256-gCdnim7excF11GEoni5YbIGTWSIx+wjHc8NO8lVNFts=", - "owner": "fluix-dev", - "repo": "sway-borders", - "rev": "5f4162f449b19f6d198b365fc6d3dd0febc065e2", - "type": "github" - }, - "original": { - "owner": "fluix-dev", - "repo": "sway-borders", - "type": "github" + "polymc": "polymc" } } }, diff --git a/flake.nix b/flake.nix index 3b3e880..4cad7bc 100755 --- a/flake.nix +++ b/flake.nix @@ -29,11 +29,6 @@ asyncrun-vim.url = "github:skywind3000/asyncrun.vim"; asyncrun-vim.flake = false; */ - meson.url = "github:mesonbuild/meson/0.60"; - meson.flake = false; - - sway-borders.url = "github:fluix-dev/sway-borders"; - sway-borders.flake = false; # blender-30.url = "github:blender/blender/blender-v3.0-release"; # blender-30.flake = false; @@ -59,15 +54,11 @@ packages."${system}" = mapModules ./packages (p: pkgs.callPackage p {}); overlay = final: prev: { _ = self.packages."${system}"; -# meson = inputs.meson; -# sway-unwrapped = inputs.sway-borders; -# blender = inputs.blender-30; unstable = mkPkgs nixpkgs-unstable []; }; overlays = mapModules ./overlays import; nixosModules = mapModulesRec ./modules import; nixosConfigurations = mapModules ./hosts (mkHost system); - devShell."${system}" = - import ./shell.nix { inherit pkgs; }; + devShell."${system}" = import ./shell.nix { inherit pkgs; }; }; } diff --git a/hosts/firepit/default.nix b/hosts/firepit/default.nix index 8d154e5..0d915f5 100644 --- a/hosts/firepit/default.nix +++ b/hosts/firepit/default.nix @@ -14,7 +14,7 @@ defaultUsers = { aether = { packages = [ ]; - shell = "zsh"; + shell = "fish"; extraGroups = [ "wheel" ]; }; oatmealine = { @@ -22,6 +22,11 @@ shell = "zsh"; extraGroups = [ "wheel" ]; }; + skye = { + packages = [ ]; + shell = "fish"; + extraGroups = [ "wheel" ]; + }; }; keyboard = { @@ -49,6 +54,11 @@ enable = true; site = "git.oat.zone"; }; + wireguard = { + enable = true; + server = true; + interfaces = mkMerge (import ./interfaces); + }; }; }; diff --git a/hosts/firepit/hardware-configuration.nix b/hosts/firepit/hardware-configuration.nix new file mode 100644 index 0000000..0a460ea --- /dev/null +++ b/hosts/firepit/hardware-configuration.nix @@ -0,0 +1,47 @@ +{ config, lib, pkgs, inputs, modulesPath, ... }: + +{ + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot = { + initrd.availableKernelModules = [ "xhci_pci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; + initrd.kernelModules = [ ]; + kernelPackages = pkgs.linuxPackages_hardened; + kernelModules = [ "kvm-intel" ]; + loader = { + systemd-boot = { + enable = true; + configurationLimit = 10; + }; + efi.canTouchEfiVariables = true; + }; + }; + + modules.hardware.fs = { + enable = true; + ssd.enable = true; + }; + + extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ]; + + fileSystems = { + "/" = { + device = "/dev/disk/by-uuid/?"; + fsType = "?"; + options = [ "defaults" "noatime" "nodiratime" ]; + }; + + "/etc/dotfiles" = { + device = "/dev/disk/by-uuid/?"; + fsType = "f2fs"; + options = [ "defaults" "noatime" "nodiratime" ]; + }; + + "/boot" = { + device = "/dev/disk/by-uuid/?"; + fsType = "vfat"; + }; + }; +} diff --git a/hosts/firepit/interfaces/default.nix b/hosts/firepit/interfaces/default.nix new file mode 100644 index 0000000..41b42e6 --- /dev/null +++ b/hosts/firepit/interfaces/default.nix @@ -0,0 +1,3 @@ +[ + +] diff --git a/hosts/firepit/secrets/secrets.nix b/hosts/firepit/secrets/secrets.nix index 814c36d..f91db83 100644 --- a/hosts/firepit/secrets/secrets.nix +++ b/hosts/firepit/secrets/secrets.nix @@ -1,11 +1,14 @@ let - userAether = "<...>"; - userOatmealine = "<...>"; + subsurface.Access = "<...>"; + void-defragmented.Access = "<...>"; + userSkye.Access = "<...>"; in { - "aether" = { - "userAether.age".publicKeys = [ userAether ]; - }; - "oatmealine" = { - "userOatmealine.age".publicKeys = [ userOatmealine ]; - }; + "subsurface.age".publicKeys = attrValues subsurface; + "subsurface.age".owner = "aether"; + + "void-defragmented.age".publicKeys = attrValues void-defragmented; + "void-defragmented.age".owner = "oatmealine"; + + "skye.age".publicKeys = attrValues userSkye; + "skye.age".owner = "skye"; } diff --git a/hosts/subsurface/default.nix b/hosts/subsurface/default.nix index 556b41d..d90434c 100644 --- a/hosts/subsurface/default.nix +++ b/hosts/subsurface/default.nix @@ -7,7 +7,7 @@ defaultUsers = { aether = { - packages = with pkgs; [ htop curl mpc_cli gammastep discord obs-studio youtube-dl inkscape audacity dolphin firefox-wayland wl-clipboard steam bitwarden blender neofetch krita celluloid imv firefox zathura ]; + packages = with pkgs; with pkgs._; [ htop discord youtube-dl inkscape audacity dolphin steam bitwarden blender neofetch krita celluloid imv firefox zathura zip unzip ffmpeg pijul pavucontrol killall ripcord steam-run appimage-run openjdk11 ]; uid = 1024; isNormalUser = true; shell = "zsh"; @@ -44,11 +44,9 @@ neovim.enable = true; codium.enable = true; }; -/* gaming = { minecraft.enable = true; }; -*/ }; dev = { llvm.enable = true; @@ -57,14 +55,16 @@ version = "ghc902"; }; c.enable = true; + rust.enable = true; + zig.enable = true; }; services = { ssh.enable = true; mpd = { enable = true; # TODO: Make this more dynamic? - musicDir = "/home/aether/Music"; - user = "aether"; + musicDir = "/home/aether/Music"; + user = "aether"; }; geoclue2.enable = true; }; diff --git a/hosts/subsurface/hardware-configuration.nix b/hosts/subsurface/hardware-configuration.nix index 092756a..9d8622c 100644 --- a/hosts/subsurface/hardware-configuration.nix +++ b/hosts/subsurface/hardware-configuration.nix @@ -110,6 +110,16 @@ device = "/run/media/aether/bf2d91f1-a6b3-4629-8755-76301b3f6f56/home delta/home delta delta/Music"; options = [ "bind" ]; }; + + "/home/aether/Textures" = { + device = "/run/media/aether/bf2d91f1-a6b3-4629-8755-76301b3f6f56/home\ delta/Textures"; + options = [ "bind" ]; + }; + + "/home/aether/Porn" = { + device = "/run/media/aether/bf2d91f1-a6b3-4629-8755-76301b3f6f56/home\ delta/Porn"; + options = [ "bind" ]; + }; }; swapDevices = [{ device = "/dev/disk/by-uuid/e4a7edca-2c4e-4979-8368-377bc067b8bd"; }]; diff --git a/hosts/subsurface/secrets/firepitAccess.age b/hosts/subsurface/secrets/firepitAccess.age new file mode 100644 index 0000000000000000000000000000000000000000..712fb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