diff --git a/flake.nix b/flake.nix index 42da98f..0b46cb3 100644 --- a/flake.nix +++ b/flake.nix @@ -50,44 +50,43 @@ look = import ./extras/look.nix; ws = import ./extras/workspaces.nix; - # NixOS configuration entrypoint, use 'nixos-rebuild --flake .#your-hostname' + # NixOS config entrypoint, use 'nixos-rebuild --flake .#your-hostname' nixosConfigurations = { JimDesktop = nixpkgs.lib.nixosSystem { specialArgs = {inherit inputs outputs;}; modules = [ - ./system/desktop.nix + ./system/hosts/JimDesktop/configuration.nix ]; }; JimServer = nixpkgs.lib.nixosSystem { specialArgs = {inherit inputs outputs;}; modules = [ - ./system/server.nix + ./system/hosts/JimServer/configuration.nix mailserver.nixosModule ]; }; JimPine = nixpkgs.lib.nixosSystem { specialArgs = {inherit inputs outputs;}; modules = [ - ./system/pinebook.nix + ./system/hosts/JimPine/configuration.nix hardware.nixosModules.pine64-pinebook-pro ]; }; JimLenovo = nixpkgs.lib.nixosSystem { specialArgs = {inherit inputs outputs;}; modules = [ - ./system/lenovo.nix + ./system/hosts/JimLenovo/configuration.nix ]; }; }; - # Standalone home-manager configuration - # Available through 'home-manager --flake .#your-username@your-hostname' + # Home-manager configuration, use 'home-manager --flake .#your-username@your-hostname' homeConfigurations = { "jimbo@JimDesktop" = home-manager.lib.homeManagerConfiguration { pkgs = nixpkgs.legacyPackages.x86_64-linux; extraSpecialArgs = {inherit inputs outputs;}; modules = [ - ./home/jimbo_desktop.nix + ./home/hosts/JimDesktop/home.nix nur.nixosModules.nur ]; }; @@ -95,14 +94,14 @@ pkgs = nixpkgs.legacyPackages.x86_64-linux; extraSpecialArgs = {inherit inputs outputs;}; modules = [ - ./home/jimbo_server.nix + ./home/hosts/JimServer/home.nix ]; }; "jimbo@JimPine" = home-manager.lib.homeManagerConfiguration { pkgs = nixpkgs.legacyPackages.aarch64-linux; extraSpecialArgs = {inherit inputs outputs;}; modules = [ - ./home/jimbo_pinebook.nix + ./home/hosts/JimPine/home.nix nur.nixosModules.nur ]; }; @@ -110,16 +109,16 @@ pkgs = nixpkgs.legacyPackages.x86_64-linux; extraSpecialArgs = {inherit inputs outputs;}; modules = [ - ./home/jimbo_lenovo.nix + ./home/hosts/JimLenovo/home.nix nur.nixosModules.nur ]; }; # Derivation for ssh envrionments on other people's servers - "jimbo@SSH" = home-manager.lib.homeManagerConfiguration { + "jimbo@JimTerminal" = home-manager.lib.homeManagerConfiguration { pkgs = nixpkgs.legacyPackages.x86_64-linux; extraSpecialArgs = {inherit inputs outputs;}; modules = [ - ./home/jimbo_ssh.nix + ./home/hosts/JimTerminal/home.nix ]; }; }; diff --git a/home/home.nix b/home/base.nix similarity index 100% rename from home/home.nix rename to home/base.nix diff --git a/home/hosts/JimDesktop/home.nix b/home/hosts/JimDesktop/home.nix new file mode 100644 index 0000000..3055040 --- /dev/null +++ b/home/hosts/JimDesktop/home.nix @@ -0,0 +1,46 @@ +{config, ...}: { + imports = [ + # Common modules + ./../../base.nix + ./../../users/jimbo.nix + ./../../utils/git.nix + + # GUI Apps + ./../../misc/guifiles.nix + ./../../sway/sway.nix + ./../../sway/swaylock.nix + ./../../programs/gtk.nix + ./../../programs/foot.nix + ./../../programs/librewolf.nix + ./../../programs/mangohud.nix + ./../../programs/mpv.nix + ./../../programs/obs.nix + ./../../programs/pcmanfm-qt.nix + ./../../programs/rofi.nix + ./../../programs/swappy.nix + ./../../programs/easyeffects.nix + ./../../utils/ncmpcpp.nix + + # Misc apps and tools + ./../../misc/useful.nix + ./../../misc/avtools.nix + ./../../misc/filemanager.nix + ./../../misc/production.nix + ./../../misc/gaming.nix + ./../../misc/xash3d.nix + #./../../misc/emulators.nix + #./../../misc/remotedesktop.nix + ./../../misc/school.nix + ./../../misc/variables.nix + + # Services + ./../../services/gnome-keyring.nix + ./../../services/mako.nix + ./../../services/udiskie.nix + ]; + + # Symlinks + home.file = { + "VMs".source = config.lib.file.mkOutOfStoreSymlink "/etc/libvirt/VMs"; + }; +} diff --git a/home/hosts/JimLenovo/home.nix b/home/hosts/JimLenovo/home.nix new file mode 100644 index 0000000..007f786 --- /dev/null +++ b/home/hosts/JimLenovo/home.nix @@ -0,0 +1,39 @@ +{ + imports = [ + # Common modules + ./../../base.nix + ./../../users/jimbo.nix + ./../../utils/git.nix + + # GUI Apps + ./../../misc/guifiles.nix + ./../../sway/sway.nix + ./../../sway/swaylock.nix + ./../../programs/gtk.nix + ./../../programs/foot.nix + ./../../programs/librewolf.nix + ./../../programs/mangohud.nix + ./../../programs/mpv.nix + ./../../programs/obs.nix + ./../../programs/pcmanfm-qt.nix + ./../../programs/rofi.nix + ./../../programs/swappy.nix + ./../../programs/easyeffects.nix + ./../../utils/ncmpcpp.nix + + # Misc apps and tools + ./../../misc/useful.nix + ./../../misc/avtools.nix + ./../../misc/filemanager.nix + ./../../misc/gaming.nix + ./../../misc/xash3d.nix + ./../../misc/remotedesktop.nix + ./../../misc/school.nix + ./../../misc/variables.nix + + # Services + ./../../services/gnome-keyring.nix + ./../../services/mako.nix + ./../../services/udiskie.nix + ]; +} diff --git a/home/hosts/JimPine/home.nix b/home/hosts/JimPine/home.nix new file mode 100644 index 0000000..ba5e93b --- /dev/null +++ b/home/hosts/JimPine/home.nix @@ -0,0 +1,42 @@ +{pkgs, outputs, ...}: { + imports = [ + # Common modules + ./../../base.nix + ./../../users/jimbo.nix + ./../../utils/git.nix + + # GUI Apps + ./../../misc/guifiles.nix + ./../../sway/sway.nix + ./../../sway/swaylock.nix + ./../../programs/gtk.nix + ./../../programs/foot.nix + ./../../programs/librewolf.nix + ./../../programs/mangohud.nix + ./../../programs/mpv.nix + ./../../programs/pcmanfm-qt.nix + ./../../programs/rofi.nix + ./../../programs/swappy.nix + ./../../programs/easyeffects.nix + ./../../utils/ncmpcpp.nix + + # Misc apps and tools + ./../../misc/useful.nix + ./../../misc/avtools.nix + ./../../misc/filemanager.nix + ./../../misc/remotedesktop.nix + ./../../misc/variables.nix + + # Services + ./../../services/gnome-keyring.nix + ./../../services/mako.nix + ./../../services/udiskie.nix + ]; + + # Needed to make the speaker work + home.packages = with pkgs; [ + alsa-utils + ]; + + wayland.windowManager.sway.config.output.${outputs.displays.dI}.scale = "1.3"; +} diff --git a/home/hosts/JimServer/home.nix b/home/hosts/JimServer/home.nix new file mode 100644 index 0000000..8f71646 --- /dev/null +++ b/home/hosts/JimServer/home.nix @@ -0,0 +1,8 @@ +{ + imports = [ + # Common modules + ./../../base.nix + ./../../users/jimbo.nix + ./../../utils/git.nix + ]; +} diff --git a/home/hosts/JimTerminal/home.nix b/home/hosts/JimTerminal/home.nix new file mode 100644 index 0000000..d0d54ae --- /dev/null +++ b/home/hosts/JimTerminal/home.nix @@ -0,0 +1,14 @@ +{ + imports = [ + # Common modules + ./../../base.nix + ./../../users/jimbo.nix + ]; + + # Rebuild this entire system + programs.zsh = { + shellAliases = { + termswitch = "home-manager switch --flake ~/.home-manager/.#jimbo@JimTerminal --extra-experimental-features 'nix-command flakes'"; + }; + }; +} diff --git a/home/jimbo_desktop.nix b/home/jimbo_desktop.nix deleted file mode 100644 index 59599ee..0000000 --- a/home/jimbo_desktop.nix +++ /dev/null @@ -1,46 +0,0 @@ -{config, ...}: { - imports = [ - # Common modules - ./home.nix - ./users/jimbo.nix - ./utils/git.nix - - # GUI Apps - ./misc/guifiles.nix - ./sway/sway.nix - ./sway/swaylock.nix - ./programs/gtk.nix - ./programs/foot.nix - ./programs/librewolf.nix - ./programs/mangohud.nix - ./programs/mpv.nix - ./programs/obs.nix - ./programs/pcmanfm-qt.nix - ./programs/rofi.nix - ./programs/swappy.nix - ./programs/easyeffects.nix - ./utils/ncmpcpp.nix - - # Misc apps and tools - ./misc/useful.nix - ./misc/avtools.nix - ./misc/filemanager.nix - ./misc/production.nix - ./misc/gaming.nix - ./misc/xash3d.nix - #./misc/emulators.nix - #./misc/remotedesktop.nix - ./misc/school.nix - ./misc/variables.nix - - # Services - ./services/gnome-keyring.nix - ./services/mako.nix - ./services/udiskie.nix - ]; - - # Symlinks - home.file = { - "VMs".source = config.lib.file.mkOutOfStoreSymlink "/etc/libvirt/VMs"; - }; -} diff --git a/home/jimbo_lenovo.nix b/home/jimbo_lenovo.nix deleted file mode 100644 index 118d6e7..0000000 --- a/home/jimbo_lenovo.nix +++ /dev/null @@ -1,39 +0,0 @@ -{ - imports = [ - # Common modules - ./home.nix - ./users/jimbo.nix - ./utils/git.nix - - # GUI Apps - ./misc/guifiles.nix - ./sway/sway.nix - ./sway/swaylock.nix - ./programs/gtk.nix - ./programs/foot.nix - ./programs/librewolf.nix - ./programs/mangohud.nix - ./programs/mpv.nix - ./programs/obs.nix - ./programs/pcmanfm-qt.nix - ./programs/rofi.nix - ./programs/swappy.nix - ./programs/easyeffects.nix - ./utils/ncmpcpp.nix - - # Misc apps and tools - ./misc/useful.nix - ./misc/avtools.nix - ./misc/filemanager.nix - ./misc/gaming.nix - ./misc/xash3d.nix - ./misc/remotedesktop.nix - ./misc/school.nix - ./misc/variables.nix - - # Services - ./services/gnome-keyring.nix - ./services/mako.nix - ./services/udiskie.nix - ]; -} diff --git a/home/jimbo_pinebook.nix b/home/jimbo_pinebook.nix deleted file mode 100644 index 3a07d43..0000000 --- a/home/jimbo_pinebook.nix +++ /dev/null @@ -1,42 +0,0 @@ -{pkgs, outputs, ...}: { - imports = [ - # Common modules - ./home.nix - ./users/jimbo.nix - ./utils/git.nix - - # GUI Apps - ./misc/guifiles.nix - ./sway/sway.nix - ./sway/swaylock.nix - ./programs/gtk.nix - ./programs/foot.nix - ./programs/librewolf.nix - ./programs/mangohud.nix - ./programs/mpv.nix - ./programs/pcmanfm-qt.nix - ./programs/rofi.nix - ./programs/swappy.nix - ./programs/easyeffects.nix - ./utils/ncmpcpp.nix - - # Misc apps and tools - ./misc/useful.nix - ./misc/avtools.nix - ./misc/filemanager.nix - ./misc/remotedesktop.nix - ./misc/variables.nix - - # Services - ./services/gnome-keyring.nix - ./services/mako.nix - ./services/udiskie.nix - ]; - - # Needed to make the speaker work - home.packages = with pkgs; [ - alsa-utils - ]; - - wayland.windowManager.sway.config.output.${outputs.displays.dI}.scale = "1.3"; -} diff --git a/home/jimbo_server.nix b/home/jimbo_server.nix deleted file mode 100644 index 80376cc..0000000 --- a/home/jimbo_server.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ - imports = [ - # Common modules - ./home.nix - ./users/jimbo.nix - ./utils/git.nix - ]; -} diff --git a/home/jimbo_ssh.nix b/home/jimbo_ssh.nix deleted file mode 100644 index 7fc8d44..0000000 --- a/home/jimbo_ssh.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ - imports = [ - # Common modules - ./home.nix - ./users/jimbo.nix - ]; - - # Rebuild this entire system - programs.zsh = { - shellAliases = { - sshswitch = "home-manager switch --flake ~/.home-manager/.#jimbo@SSH --extra-experimental-features 'nix-command flakes'"; - }; - }; -} diff --git a/home/utils/neovim.nix b/home/utils/neovim.nix index efa3d3f..e5f924a 100644 --- a/home/utils/neovim.nix +++ b/home/utils/neovim.nix @@ -27,6 +27,13 @@ # Hex color visualizer and color theme nvim-colorizer-lua vim-monokai-pro + + # Discord RPC + vimsence + + # Nerdtree + nerdtree + vim-nerdtree-syntax-highlight ]; extraConfig = '' lua < :bnext nmap :bprev nmap :bd + nmap :NERDTreeToggle ''; }; } diff --git a/system/base.nix b/system/base.nix index 66f5511..3e1ce6e 100644 --- a/system/base.nix +++ b/system/base.nix @@ -14,10 +14,8 @@ outputs.overlays.finalprev ]; - # Configure your nixpkgs instance - config = { - allowUnfree = true; - }; + # Allow unfree apps + config.allowUnfree = true; }; # Enable flakes and garbage collection diff --git a/system/desktop.nix b/system/desktop.nix deleted file mode 100644 index da87531..0000000 --- a/system/desktop.nix +++ /dev/null @@ -1,52 +0,0 @@ -{ - imports = [ - # Base configs - ./base.nix - - # Import users and groups - ./users/jimbo.nix - ./users/groups.nix - - # Desktop only - ./desktop/misc.nix - ./desktop/sway.nix - ./desktop/greetd-sway.nix - ./desktop/printing.nix - ./desktop/gaming.nix - ./desktop/pipewire.nix - ./desktop/bluetooth.nix - ./desktop/firewall.nix - ./desktop/fonts.nix - ./desktop/qt.nix - - # Modules - ./modules/security.nix - ./modules/legacy.nix - - # Hardware - ./hardware/machines/desktop.nix - ./hardware/systemdboot.nix - ./hardware/opengl.nix - ./hardware/filesystems.nix - ./hardware/nvidia.nix - #./hardware/nouveau.nix - - # Services - ./services/openssh.nix - ./services/gnome-keyring.nix - ./services/qemukvm.nix - #./services/waydroid.nix - ./services/udev.nix - ./services/sunshine.nix - ./services/mpd.nix - ]; - - # Set hostname - networking.hostName = "JimDesktop"; - - # Force Electron to use Wayland - environment.sessionVariables.NIXOS_OZONE_WL = "1"; - - # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion - system.stateVersion = "24.05"; -} diff --git a/system/hardware/mackeys.nix b/system/hardware/mackeys.nix deleted file mode 100644 index 5917183..0000000 --- a/system/hardware/mackeys.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ - # Forces the function keys to work right on Macbooks - boot.extraModprobeConfig = '' - options hid_apple fnmode=2 - ''; -} diff --git a/system/hosts/JimDesktop/configuration.nix b/system/hosts/JimDesktop/configuration.nix new file mode 100644 index 0000000..3e53a5c --- /dev/null +++ b/system/hosts/JimDesktop/configuration.nix @@ -0,0 +1,51 @@ +{ + imports = [ + # Base configs + ./../../base.nix + + # Import users and groups + ./../../users/jimbo.nix + ./../../users/groups.nix + + # Desktop + ./../../desktop/misc.nix + ./../../desktop/sway.nix + ./../../desktop/greetd-sway.nix + ./../../desktop/printing.nix + ./../../desktop/gaming.nix + ./../../desktop/pipewire.nix + ./../../desktop/bluetooth.nix + ./../../desktop/firewall.nix + ./../../desktop/fonts.nix + ./../../desktop/qt.nix + + # Modules + ./../../modules/security.nix + + # Hardware + ./hardware-configuration.nix + ./../../modules/systemdboot.nix + ./../../modules/opengl.nix + ./../../modules/filesystems.nix + ./../../modules/nvidia.nix + #./../../modules/nouveau.nix + + # Services + ./../../services/openssh.nix + ./../../services/gnome-keyring.nix + ./../../services/qemukvm.nix + ./../../services/udev.nix + ./../../services/sunshine.nix + ./../../services/mpd.nix + #./../../services/waydroid.nix + ]; + + # Set hostname + networking.hostName = "JimDesktop"; + + # Force Electron to use Wayland + environment.sessionVariables.NIXOS_OZONE_WL = "1"; + + # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion + system.stateVersion = "24.05"; +} diff --git a/system/hardware/machines/desktop.nix b/system/hosts/JimDesktop/hardware-configuration.nix similarity index 100% rename from system/hardware/machines/desktop.nix rename to system/hosts/JimDesktop/hardware-configuration.nix diff --git a/system/hosts/JimLenovo/configuration.nix b/system/hosts/JimLenovo/configuration.nix new file mode 100644 index 0000000..a543934 --- /dev/null +++ b/system/hosts/JimLenovo/configuration.nix @@ -0,0 +1,45 @@ +{ + imports = [ + # Base configs + ./../../base.nix + + # Import users and groups + ./../../users/jimbo.nix + ./../../users/groups.nix + + # Desktop + ./../../desktop/misc.nix + ./../../desktop/sway.nix + ./../../desktop/greetd-sway.nix + ./../../desktop/printing.nix + ./../../desktop/gaming.nix + ./../../desktop/pipewire.nix + ./../../desktop/bluetooth.nix + ./../../desktop/firewall.nix + ./../../desktop/fonts.nix + ./../../desktop/qt.nix + + # Laptop/Portable only + ./../../modules/wireless.nix + + # Modules + ./../../modules/security.nix + + # Hardware + ./hardware-configuration.nix + ./../../modules/systemdboot.nix + ./../../modules/opengl.nix + + # Services + ./../../services/openssh.nix + ./../../services/gnome-keyring.nix + ./../../services/udev.nix + ./../../services/mpd.nix + ]; + + # Set hostname + networking.hostName = "JimLenovo"; + + # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion + system.stateVersion = "24.05"; +} diff --git a/system/hardware/machines/lenovo.nix b/system/hosts/JimLenovo/hardware-configuration.nix similarity index 100% rename from system/hardware/machines/lenovo.nix rename to system/hosts/JimLenovo/hardware-configuration.nix diff --git a/system/hosts/JimPine/configuration.nix b/system/hosts/JimPine/configuration.nix new file mode 100644 index 0000000..797a8f0 --- /dev/null +++ b/system/hosts/JimPine/configuration.nix @@ -0,0 +1,49 @@ +{lib, outputs, ...}: { + imports = [ + # Base configs + ./../../base.nix + + # Import users and groups + ./../../users/jimbo.nix + ./../../users/groups.nix + + # Desktop + ./../../desktop/misc.nix + ./../../desktop/sway.nix + ./../../desktop/greetd-sway.nix + ./../../desktop/printing.nix + ./../../desktop/pipewire.nix + ./../../desktop/bluetooth.nix + ./../../desktop/firewall.nix + ./../../desktop/fonts.nix + ./../../desktop/qt.nix + ./../../desktop/wireguard.nix + + # Modules + ./../../modules/security.nix + + # Hardware + ./hardware-configuration.nix + ./../../modules/extlinux.nix + ./../../modules/opengl.nix + ./../../modules/filesystems.nix + ./../../modules/wireless.nix + + # Services + ./../../services/openssh.nix + ./../../services/gnome-keyring.nix + ./../../services/mpd.nix + ]; + + # Set hostname + networking.hostName = "JimPine"; + + # Disable 32 bit graphics + hardware.opengl.driSupport32Bit = lib.mkForce false; + + # Set the VPN IP per machine + networking.wireguard.interfaces."${outputs.ips.wgInt}".ips = [ "${outputs.ips.wgSpan}.17/24" ]; + + # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion + system.stateVersion = "24.05"; +} diff --git a/system/hardware/machines/pinebook.nix b/system/hosts/JimPine/hardware-configuration.nix similarity index 100% rename from system/hardware/machines/pinebook.nix rename to system/hosts/JimPine/hardware-configuration.nix diff --git a/system/hosts/JimServer/configuration.nix b/system/hosts/JimServer/configuration.nix new file mode 100644 index 0000000..0622a83 --- /dev/null +++ b/system/hosts/JimServer/configuration.nix @@ -0,0 +1,63 @@ +{ + imports = [ + # Base configs + ./../../base.nix + + # Import users and groups + ./../../users/jimbo.nix + ./../../users/nextcloud.nix + ./../../users/nginx.nix + ./../../users/liquidsoap.nix + ./../../users/groups.nix + + # Modules + ./../../modules/security.nix + + # Hardware + ./hardware-configuration.nix + ./../../hardware/systemdboot.nix + + # Services + ./../../services/openssh.nix + ./../../server/acme.nix + ./../../server/ddclient.nix + ./../../server/icecast.nix + ./../../server/firewall.nix + ./../../server/forgejo.nix + ./../../server/mailserver.nix + ./../../server/mariadb.nix + ./../../server/nginx.nix + ./../../server/owncast.nix + ./../../server/photoprism.nix + ./../../server/minecraft + ./../../server/vaultwarden.nix + ./../../server/transmission.nix + ./../../server/wireguard.nix + ./../../server/misc.nix + + # File server + ./../../server/nextcloud.nix + ./../../server/nfs.nix + ./../../server/samba.nix + + # Matrix + ./../../server/synapse.nix + ./../../server/element.nix + ./../../server/coturn.nix + ./../../server/matrix-discord.nix + + # Federation + ./../../server/lemmy.nix + ./../../server/mastodon.nix + ./../../server/pixelfed.nix + ]; + + # Set custom openssh port + services.openssh.ports = [ 2222 ]; + + # Set hostname + networking.hostName = "JimServer"; + + # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion + system.stateVersion = "24.05"; +} diff --git a/system/hardware/machines/server.nix b/system/hosts/JimServer/hardware-configuration.nix similarity index 100% rename from system/hardware/machines/server.nix rename to system/hosts/JimServer/hardware-configuration.nix diff --git a/system/lenovo.nix b/system/lenovo.nix deleted file mode 100644 index 57c8e65..0000000 --- a/system/lenovo.nix +++ /dev/null @@ -1,46 +0,0 @@ -{ - imports = [ - # Base configs - ./base.nix - - # Import users and groups - ./users/jimbo.nix - ./users/groups.nix - - # Desktop only - ./desktop/misc.nix - ./desktop/sway.nix - ./desktop/greetd-sway.nix - ./desktop/printing.nix - ./desktop/gaming.nix - ./desktop/pipewire.nix - ./desktop/bluetooth.nix - ./desktop/firewall.nix - ./desktop/fonts.nix - ./desktop/qt.nix - - # Laptop/Portable only - ./hardware/wireless.nix - - # Modules - ./modules/security.nix - ./modules/legacy.nix - - # Hardware - ./hardware/machines/lenovo.nix - ./hardware/systemdboot.nix - ./hardware/opengl.nix - - # Services - ./services/openssh.nix - ./services/gnome-keyring.nix - ./services/udev.nix - ./services/mpd.nix - ]; - - # Set hostname - networking.hostName = "JimLenovo"; - - # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion - system.stateVersion = "24.05"; -} diff --git a/system/hardware/extlinux.nix b/system/modules/extlinux.nix similarity index 100% rename from system/hardware/extlinux.nix rename to system/modules/extlinux.nix diff --git a/system/hardware/filesystems.nix b/system/modules/filesystems.nix similarity index 100% rename from system/hardware/filesystems.nix rename to system/modules/filesystems.nix diff --git a/system/modules/legacy.nix b/system/modules/legacy.nix deleted file mode 100644 index 8db57c7..0000000 --- a/system/modules/legacy.nix +++ /dev/null @@ -1,14 +0,0 @@ -{config, inputs, lib, ...}: { - # This will add each flake input as a registry to make nix commands consistent with your flake - nix.registry = (lib.mapAttrs (_: flake: {inherit flake;})) ((lib.filterAttrs (_: lib.isType "flake")) inputs); - - # This will add your inputs to the system's legacy channels making legacy nix commands consistent - nix.nixPath = ["/etc/nix/path"]; - environment.etc = - lib.mapAttrs' - (name: value: { - name = "nix/path/${name}"; - value.source = value.flake; - }) - config.nix.registry; -} diff --git a/system/hardware/nouveau.nix b/system/modules/nouveau.nix similarity index 100% rename from system/hardware/nouveau.nix rename to system/modules/nouveau.nix diff --git a/system/hardware/nvidia.nix b/system/modules/nvidia.nix similarity index 100% rename from system/hardware/nvidia.nix rename to system/modules/nvidia.nix diff --git a/system/hardware/opengl.nix b/system/modules/opengl.nix similarity index 100% rename from system/hardware/opengl.nix rename to system/modules/opengl.nix diff --git a/system/modules/security.nix b/system/modules/security.nix index 6dad11f..98565be 100644 --- a/system/modules/security.nix +++ b/system/modules/security.nix @@ -5,8 +5,7 @@ doas = { enable = true; extraRules = [ - # Give wheel root access, allow persistant session - { + { # Give wheel root access groups = ["wheel"]; keepEnv = true; persist = true; diff --git a/system/hardware/systemdboot.nix b/system/modules/systemdboot.nix similarity index 100% rename from system/hardware/systemdboot.nix rename to system/modules/systemdboot.nix diff --git a/system/hardware/wireless.nix b/system/modules/wireless.nix similarity index 100% rename from system/hardware/wireless.nix rename to system/modules/wireless.nix diff --git a/system/pinebook.nix b/system/pinebook.nix deleted file mode 100644 index 500c773..0000000 --- a/system/pinebook.nix +++ /dev/null @@ -1,52 +0,0 @@ -{lib, outputs, ...}: { - imports = [ - # Base configs - ./base.nix - - # Import users and groups - ./users/jimbo.nix - ./users/groups.nix - - # Desktop - ./desktop/misc.nix - ./desktop/sway.nix - ./desktop/greetd-sway.nix - ./desktop/printing.nix - ./desktop/pipewire.nix - ./desktop/bluetooth.nix - ./desktop/firewall.nix - ./desktop/fonts.nix - ./desktop/qt.nix - ./desktop/wireguard.nix - - # Laptop/Portable - ./hardware/wireless.nix - - # Modules - ./modules/security.nix - ./modules/legacy.nix - - # Hardware - ./hardware/machines/pinebook.nix - ./hardware/extlinux.nix - ./hardware/opengl.nix - ./hardware/filesystems.nix - - # Services - ./services/openssh.nix - ./services/gnome-keyring.nix - ./services/mpd.nix - ]; - - # Set hostname - networking.hostName = "JimPine"; - - # Disable 32 bit graphics - hardware.opengl.driSupport32Bit = lib.mkForce false; - - # Set the VPN IP per machine - networking.wireguard.interfaces."${outputs.ips.wgInt}".ips = [ "${outputs.ips.wgSpan}.17/24" ]; - - # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion - system.stateVersion = "24.05"; -} diff --git a/system/server.nix b/system/server.nix deleted file mode 100644 index d9de2dc..0000000 --- a/system/server.nix +++ /dev/null @@ -1,64 +0,0 @@ -{ - imports = [ - # Base configs - ./base.nix - - # Import users and groups - ./users/jimbo.nix - ./users/nextcloud.nix - ./users/nginx.nix - ./users/liquidsoap.nix - ./users/groups.nix - - # Modules - ./modules/security.nix - ./modules/legacy.nix - - # Hardware - ./hardware/machines/server.nix - ./hardware/systemdboot.nix - - # Services - ./services/openssh.nix - ./server/acme.nix - ./server/ddclient.nix - ./server/icecast.nix - ./server/firewall.nix - ./server/forgejo.nix - ./server/mailserver.nix - ./server/mariadb.nix - ./server/nginx.nix - ./server/owncast.nix - ./server/photoprism.nix - ./server/minecraft - ./server/vaultwarden.nix - ./server/transmission.nix - ./server/wireguard.nix - ./server/misc.nix - - # File server - ./server/nextcloud.nix - ./server/nfs.nix - ./server/samba.nix - - # Matrix - ./server/synapse.nix - ./server/element.nix - ./server/coturn.nix - ./server/matrix-discord.nix - - # Federation - ./server/lemmy.nix - ./server/mastodon.nix - ./server/pixelfed.nix - ]; - - # Set custom openssh port - services.openssh.ports = [ 2222 ]; - - # Set hostname - networking.hostName = "JimServer"; - - # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion - system.stateVersion = "24.05"; -}