diff --git a/hosts/hades/configuration.nix b/hosts/hades/configuration.nix deleted file mode 100644 index 0c6c632..0000000 --- a/hosts/hades/configuration.nix +++ /dev/null @@ -1,103 +0,0 @@ -{ inputs, outputs, config, pkgs, lib, ... }: - -{ - imports = - [ - # Include the results of the hardware scan. - "${builtins.fetchTarball "https://github.com/nix-community/disko/archive/master.tar.gz"}/module.nix" - ./disko-config.nix - ./hardware-configuration.nix - ../../configuration.nix - ]; - - # Enable swap on luks - boot = { - loader = { - systemd-boot = { - enable = true; - configurationLimit = 10; - }; - efi = { - canTouchEfiVariables = true; - # efiSysMountPoint = "/boot/efi"; - }; - }; - initrd = { - systemd.enable = true; - secrets = { - # "crypto_keyfile.bin" = null; - }; - luks = { - # devices."luks-DISK_UUID" = { - # device = "/dev/disk/by-uuid/DISK_UUID"; - # keyfile = "/crypto_keyfile.bin"; - # }; - }; - }; - }; - - services.fstrim.enable = true; - - powerManagement.cpuFreqGovernor = lib.mkDefault "performance"; - - hardware = { - - cpu.intel.updateMicrocode = true; - enableAllFirmware = false; - bluetooth.enable = false; - - opengl = { - enable = true; - extraPackages = with pkgs; [ - intel-compute-runtime - intel-media-driver - vaapiIntel - vaapiVdpau - libvdpau-va-gl - ]; - }; - - }; - - nix = { - # settings = { - # }; - gc = { - automatic = true; - dates = "daily"; - options = "--delete-older-than 7d"; - persistent = true; - }; - }; - - networking = { - hostName = "hades"; # Define your hostname - }; - - services = { - - syncthing = { - enable = false; - dataDir = "/home/serenity/"; - configDir = "/home/serenity/.config/syncthing"; - user = "serenity"; - settings = { - - devices = { - # hades.id = "$DEVICE_ID"; - # hecate.id = "$DEVICE_ID"; - # proserpina.id = "$DEVICE_ID"; - }; - - folders = { - # "$FOLDER_ID" = { - # path = "/home/serenity/Documents/Notes"; - # devices = [ "hecate" "hades" ]; - # }; - - }; - }; - }; - }; - -} diff --git a/hosts/hades/disko-config.nix b/hosts/hades/disko-config.nix deleted file mode 100644 index ecc32ac..0000000 --- a/hosts/hades/disko-config.nix +++ /dev/null @@ -1,59 +0,0 @@ -{ - disko.devices = { - disk = { - sda = { - type = "disk"; - device = "/dev/sda"; - content = { - type = "gpt"; - partitions = { - ESP = { - size = "512M"; - type = "EF00"; - content = { - type = "filesystem"; - format = "vfat"; - mountpoint = "/boot"; - mountOptions = [ - "defaults" - ]; - }; - }; - luks = { - size = "100%"; - content = { - type = "luks"; - name = "pomegranate"; - # disable settings.keyFile if you want to use interactive password entry - #passwordFile = "/tmp/secret.key"; # Interactive - settings = { - allowDiscards = true; - #keyFile = "/tmp/secret.key"; - }; - # additionalKeyFiles = [ "/tmp/additionalSecret.key" ]; - content = { - type = "btrfs"; - extraArgs = [ "-f" ]; - subvolumes = { - "/root" = { - mountpoint = "/"; - mountOptions = [ "compress=zstd" "noatime" ]; - }; - "/home" = { - mountpoint = "/home"; - mountOptions = [ "compress=zstd" "noatime" ]; - }; - "/nix" = { - mountpoint = "/nix"; - mountOptions = [ "compress=zstd" "noatime" ]; - }; - }; - }; - }; - }; - }; - }; - }; - }; - }; -} diff --git a/hosts/hades/hardware-configuration.nix b/hosts/hades/hardware-configuration.nix deleted file mode 100644 index 47a61f8..0000000 --- a/hosts/hades/hardware-configuration.nix +++ /dev/null @@ -1,26 +0,0 @@ -# Do not modify this file! It was generated by ‘nixos-generate-config’ -# and may be overwritten by future invocations. Please make changes -# to /etc/nixos/configuration.nix instead. -{ config, lib, pkgs, modulesPath, ... }: - -{ - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; - - boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "sd_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; - - # Enables DHCP on each ethernet and wireless interface. In case of scripted networking - # (the default) this is the recommended approach. When using systemd-networkd it's - # still possible to use this option, but it's recommended to use it in conjunction - # with explicit per-interface declarations with `networking.interfaces..useDHCP`. - networking.useDHCP = lib.mkDefault true; - # networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true; - # networking.interfaces.wlp58s0.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; -} diff --git a/hosts/proserpina/configuration.nix b/hosts/proserpina/configuration.nix index 065a776..691150a 100644 --- a/hosts/proserpina/configuration.nix +++ b/hosts/proserpina/configuration.nix @@ -6,6 +6,7 @@ "${builtins.fetchTarball "https://github.com/nix-community/disko/archive/master.tar.gz"}/module.nix" ./disko-config.nix ./hardware-configuration.nix + ./network-configuration.nix ../../modules ]; @@ -69,34 +70,4 @@ }; }; - networking = { - hostName = "proserpina"; # Define your hostname - }; - - services = { - - syncthing = { - enable = false; - dataDir = "/home/serenity/"; - configDir = "/home/serenity/.config/syncthing"; - user = "serenity"; - settings = { - - devices = { - # hades.id = "$DEVICE_ID"; - # hecate.id = "$DEVICE_ID"; - # proserpina.id = "$DEVICE_ID"; - }; - - folders = { - # "$FOLDER_ID" = { - # path = "/home/serenity/Documents/Notes"; - # devices = [ "hecate" "hades" ]; - # }; - - }; - }; - }; - }; - } diff --git a/hosts/proserpina/hardware-configuration.nix b/hosts/proserpina/hardware-configuration.nix index 947d0b6..1e02223 100644 --- a/hosts/proserpina/hardware-configuration.nix +++ b/hosts/proserpina/hardware-configuration.nix @@ -7,7 +7,8 @@ imports = [ (modulesPath + "/installer/scan/not-detected.nix") - ./disko-config.sh + # ./disko-config.sh + ./disko-config.nix ]; boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "sd_mod" ]; diff --git a/hosts/proserpina/network-configuration.nix b/hosts/proserpina/network-configuration.nix new file mode 100644 index 0000000..6d641e2 --- /dev/null +++ b/hosts/proserpina/network-configuration.nix @@ -0,0 +1,69 @@ +{ pkgs, lib, config, ... }: + +{ + + imports = [ + # ./file.nix + ]; + + networking = { + hostname = "proserpina"; + wireless.enable = false; + networkmanager = { + enable = true; + }; + }; + + # networking.proxy = { + # default = "https://user:password@proxy:port/"; + # noProxy = "127.0.0.1, localhost, internal.comain"; + # }; + + networking.firewall = { + enable = false; + # checkReversePath = "loose"; + # allowedTCPPorts = [ 22000 21027 25565 ]; + # allowedUDPPorts = [ 22000 21027 41641 51820 ]; + # allowedTCPPortRanges = [ + # { from = 9999; to = 9999; } # KDE COnnect + # { from = 9999; to = 9999; } # Nicotine+ + # ]; + # allowedUDPPortRanges = [ + # { from = 9999; to = 9999; } # KDE COnnect + # ]; + # interfaces."DEVICENAME".allowedTCPPorts = [ 22999 ] + }; + + services.syncthing = { + enable = false; + dataDir = "/home/serenity/"; + configDir = "/home/serenity/.config/syncthing"; + user = "serenity"; + settings.devices = { + + # hades.id = "DEVICE_ID"; + # proserpina.id = "DEVICE_ID"; + # hecate.id = "DEVICE_ID"; + + }; + settings.folders = { + + # "FOLDER_ID" = { + # path = "/home/serenity/Documents/Notes"; + # devices = [ "hecate" "hades" "proserpina" ]; + # }; + + # "FOLDER_ID" = { + # path = "/home/serenity/Documents/Notes"; + # devices = [ "hecate" "hades" "proserpina" ]; + # }; + + # "FOLDER_ID" = { + # path = "/home/serenity/Documents/Notes"; + # devices = [ "hecate" "hades" "proserpina" ]; + # }; + + }; + }; + +} diff --git a/modules/core/configuration.nix b/modules/core/configuration.nix index 39b4503..c4c3fab 100755 --- a/modules/core/configuration.nix +++ b/modules/core/configuration.nix @@ -2,41 +2,17 @@ { imports = [ + + ./display.nix + ./services.nix + ./packages + ]; security = { sudo.execWheelOnly = true; }; - # Enable networking - networking = { - wireless.enable = false; - networkmanager = { - enable = true; - # insertNameServers = [ - # "10.7.0.1" - # ]; - }; - proxy = { - # default = "https://user:password@proxy:port/"; - # noProxy = "127.0.0.1, localhost,internal.domain"; - }; - firewall = { - enable = false; - # allowedTCPPorts = [ 22000 21027 25565 ]; - # allowedUDPPorts = [ 41641 22000 21027 51820 ]; - # allowedTCPPortRanges = [ - # { from = 1714; to = 1764; } # KDE Connect - # { from = 2234; to = 2239; } # Nicotine+ - # ]; - # allowedUDPPortRanges = [ - # { from = 1714; to = 1764; } # KDE Connect - # ]; - # checkReversePath = "loose"; - # interfaces."tun0".allowedTCPPorts = [ 28996 ]; - }; - }; - # Set your time zone. time.timeZone = "Australia/Brisbane"; @@ -46,8 +22,6 @@ # Enable X11 services.xserver = { enable = true; - # displayManager.gdm.enable = true; - # desktopManager.gnome.enable = true; layout = "us"; xkbVariant = ""; }; @@ -147,10 +121,10 @@ }; # Disable these cuz they cause problems. see: https://github.com/NixOS/nixpkgs/issues/180175 - systemd.services = { - NetworkManager-wait-online.enable = lib.mkForce false; - systemd-networkd-wait-online.enable = lib.mkForce false; - }; + # systemd.services = { + # NetworkManager-wait-online.enable = lib.mkForce false; + # systemd-networkd-wait-online.enable = lib.mkForce false; + # }; # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions diff --git a/modules/core/default.nix b/modules/core/default.nix deleted file mode 100644 index 36d74a3..0000000 --- a/modules/core/default.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ - - imports = [ - ./configuration.nix - ./services - ./packages - ./network - ]; - -} diff --git a/modules/core/network/default.nix b/modules/core/network/default.nix deleted file mode 100644 index 532a0d0..0000000 --- a/modules/core/network/default.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - import = [ - # - ]; - - # INSERT NETWORKING CONFIG HERE - -} diff --git a/modules/core/services/default.nix b/modules/core/services.nix similarity index 63% rename from modules/core/services/default.nix rename to modules/core/services.nix index db4a754..46938a5 100644 --- a/modules/core/services/default.nix +++ b/modules/core/services.nix @@ -3,7 +3,6 @@ { imports = [ - # file.nix ]; @@ -27,5 +26,12 @@ }; + systemd.services = { + networkManager-wait-online.enable = lib.mkForce false; + systemd-networkd-wait-online.enable = lib.mkForce false; + }; + + + system.stateVersion = "23.11"; }