diff options
Diffstat (limited to 'hosts')
-rw-r--r-- | hosts/default.nix | 22 | ||||
-rw-r--r-- | hosts/navi/default.nix | 24 | ||||
-rw-r--r-- | hosts/vps/default.nix | 50 | ||||
-rw-r--r-- | hosts/vps/hardware-configuration.nix | 36 | ||||
-rw-r--r-- | hosts/vps/services/git.nix (renamed from hosts/vps/git.nix) | 0 | ||||
-rw-r--r-- | hosts/vps/services/hydrus.nix (renamed from hosts/vps/hydrus.nix) | 0 | ||||
-rw-r--r-- | hosts/vps/services/maloja.nix (renamed from hosts/vps/maloja.nix) | 0 | ||||
-rw-r--r-- | hosts/vps/services/matrix.nix (renamed from hosts/vps/matrix.nix) | 0 | ||||
-rw-r--r-- | hosts/vps/services/website.nix (renamed from hosts/vps/website.nix) | 0 |
9 files changed, 64 insertions, 68 deletions
diff --git a/hosts/default.nix b/hosts/default.nix index 164030c..1367391 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -7,7 +7,7 @@ inputs: let ../profiles/security.nix ../profiles/ssh.nix ../profiles/network.nix - ../profiles/impermanence.nix + ../profiles/impermanence.nix ]; } inputs.agenix.nixosModules.age @@ -32,6 +32,11 @@ inputs: let hermetic = false; }; }; + + stateVersion = v: { + home-manager.users.tzlil.home.stateVersion = v; + system.stateVersion = v; + }; in { navi = inputs.nixpkgs.lib.nixosSystem { system = "x86_64-linux"; @@ -41,6 +46,21 @@ in { "${inputs.self}/hosts/navi" {networking.hostName = "navi";} (nixinate "navi") + (stateVersion "23.11") + ] + ++ commonProfiles + ++ commonHome; + }; + + vps = inputs.nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = {inherit inputs;}; + modules = + [ + "${inputs.self}/hosts/vps" + {networking.hostName = "vps";} + (nixinate "vps") + (stateVersion "22.05") ] ++ commonProfiles ++ commonHome; diff --git a/hosts/navi/default.nix b/hosts/navi/default.nix index 497f5f7..e689bc3 100644 --- a/hosts/navi/default.nix +++ b/hosts/navi/default.nix @@ -7,26 +7,22 @@ }: { imports = [ ./hardware-configuration.nix - # ../../profiles/core.nix ../../profiles/graphical.nix ../../mixins/tailscale.nix ../../mixins/cli.nix ../../mixins/greet.nix - # ../../mixins/hyprland.nix ../../mixins/sway.nix ../../mixins/pipewire.nix ../../mixins/multimedia.nix - # ../../mixins/emacs ../../mixins/syncthing.nix ]; config = { - system.stateVersion = "23.11"; boot = { tmp.cleanOnBoot = true; initrd = { supportedFilesystems = ["btrfs"]; - availableKernelModules = ["xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" "usbhid" "snd_usb_audio"]; + availableKernelModules = ["xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" "usbhid" "snd_usb_audio" "hid_logitech_dj" "hid_logitech_hidpp"]; }; supportedFilesystems = ["ntfs"]; kernelModules = ["kvm-intel" "snd-seq" "snd-rawmidi" "bridge"]; @@ -45,24 +41,6 @@ time.timeZone = lib.mkDefault "Israel"; - /* - fileSystems."/" = { - device = "none"; - fsType = "tmpfs"; - # hyprland doesnt compile with noexec root - options = ["defaults" "size=8G" "mode=755"]; - }; - - fileSystems."/boot" = { - device = "/dev/disk/by-uuid/34CB-F158"; - fsType = "vfat"; - }; - - fileSystems."/nix" = { - device = "/dev/disk/by-uuid/8a8cc550-034e-4545-a958-564779f51061"; - fsType = "btrfs"; - }; - */ zramSwap = { enable = true; algorithm = "zstd"; diff --git a/hosts/vps/default.nix b/hosts/vps/default.nix index 3597c5c..4741374 100644 --- a/hosts/vps/default.nix +++ b/hosts/vps/default.nix @@ -5,29 +5,17 @@ ... }: { imports = [ - ../../profiles/core.nix - ../../profiles/user.nix - ../../profiles/ssh.nix + ./hardware-configuration.nix ../../mixins/tailscale.nix ../../mixins/cli.nix - ./website.nix - ./git.nix - ./hydrus.nix - ./matrix.nix - ./maloja.nix + ./services/website.nix + ./services/git.nix + ./services/hydrus.nix + ./services/matrix.nix + ./services/maloja.nix ]; config = { - _module.args.nixinate = { - host = "vps"; - sshUser = "tzlil"; - buildOn = "remote"; # valid args are "local" or "remote" - substituteOnTarget = true; # if buildOn is "local" then it will substitute on the target, "-s" - hermetic = false; - }; - - networking.hostName = "vps"; - boot = { kernelPackages = lib.mkDefault pkgs.linuxPackages_latest; loader.grub.device = "/dev/vda"; @@ -41,34 +29,8 @@ networking.interfaces.ens3.useDHCP = lib.mkDefault true; - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; - virtualisation.hypervGuest.enable = true; - time.timeZone = lib.mkDefault "Frankfurt"; - fileSystems = { - "/" = { - device = "none"; - fsType = "tmpfs"; - options = ["noexec" "defaults" "size=2G" "mode=755"]; - }; - "/nix" = { - device = "/dev/disk/by-uuid/e4c4735d-bfdd-477f-bc43-d07510cb6a9a"; - fsType = "btrfs"; - }; - "/boot" = { - device = "/dev/disk/by-uuid/7ea63707-099d-4c21-90eb-a51bfa6d8ba5"; - fsType = "ext4"; - }; - }; - - swapDevices = [{device = "/dev/disk/by-uuid/00eb2d2e-4d7c-4e95-804d-e9ecb22679d4";}]; - - zramSwap = { - enable = true; - algorithm = "zstd"; - }; networking.networkmanager.enable = lib.mkForce false; diff --git a/hosts/vps/hardware-configuration.nix b/hosts/vps/hardware-configuration.nix new file mode 100644 index 0000000..2d9a5fa --- /dev/null +++ b/hosts/vps/hardware-configuration.nix @@ -0,0 +1,36 @@ +{ + inputs, + pkgs, + lib, + config, + ... +}: { + fileSystems = { + "/" = { + device = "none"; + fsType = "tmpfs"; + options = ["noexec" "defaults" "size=2G" "mode=755"]; + }; + "/nix" = { + device = "/dev/disk/by-uuid/e4c4735d-bfdd-477f-bc43-d07510cb6a9a"; + fsType = "btrfs"; + }; + "/boot" = { + device = "/dev/disk/by-uuid/7ea63707-099d-4c21-90eb-a51bfa6d8ba5"; + fsType = "ext4"; + }; + }; + + swapDevices = [{device = "/dev/disk/by-uuid/00eb2d2e-4d7c-4e95-804d-e9ecb22679d4";}]; + + zramSwap = { + enable = true; + algorithm = "zstd"; + }; + + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + virtualisation.hypervGuest.enable = true; + +} diff --git a/hosts/vps/git.nix b/hosts/vps/services/git.nix index 8bd4653..8bd4653 100644 --- a/hosts/vps/git.nix +++ b/hosts/vps/services/git.nix diff --git a/hosts/vps/hydrus.nix b/hosts/vps/services/hydrus.nix index c967fbc..c967fbc 100644 --- a/hosts/vps/hydrus.nix +++ b/hosts/vps/services/hydrus.nix diff --git a/hosts/vps/maloja.nix b/hosts/vps/services/maloja.nix index 3d4530d..3d4530d 100644 --- a/hosts/vps/maloja.nix +++ b/hosts/vps/services/maloja.nix diff --git a/hosts/vps/matrix.nix b/hosts/vps/services/matrix.nix index e2aa1a5..e2aa1a5 100644 --- a/hosts/vps/matrix.nix +++ b/hosts/vps/services/matrix.nix diff --git a/hosts/vps/website.nix b/hosts/vps/services/website.nix index 5d1d48a..5d1d48a 100644 --- a/hosts/vps/website.nix +++ b/hosts/vps/services/website.nix |