diff --git a/auth/authorized_keys.nix b/auth/authorized_keys.nix index fc65c980..4f39a0fc 100644 --- a/auth/authorized_keys.nix +++ b/auth/authorized_keys.nix @@ -4,4 +4,5 @@ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAII1tJFdbiyJApuVZFvo9E9kjlBwvXZeySqVuS2qGdxha tux@monarch" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDI44C35I2x9tqzeZDmIpbzmGJWXfATn/Wp5KzVRdlCi root@debian" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKMVEXJTqWkrpmvinPJGsSvome9bCd0CM4iu13aVG6UZ elitherl@Ronin" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ/ZSSCN5sqrA+tdoIZr5EUm5DRuBV4dQ7J+QBEtUwUU xenia@Northstar" ] diff --git a/flake.nix b/flake.nix index 303c69ec..ad0ea909 100644 --- a/flake.nix +++ b/flake.nix @@ -89,6 +89,7 @@ shell = pkgs.${shell}; openssh.authorizedKeys.keys = import ./auth/authorized_keys.nix; }; + programs.${shell}.enable = true; } home-manager.nixosModules.home-manager { @@ -123,6 +124,7 @@ system = "x86_64-linux"; shell = "zsh"; }; + Northstar = systemConfig {hostName = "Northstar"; user = "xenia"; system = "x86_64-linux"; shell = "zsh";}; Ronin = systemConfig { hostName = "Ronin"; user = "elitherl"; diff --git a/hosts/Northstar/configuration.nix b/hosts/Northstar/configuration.nix new file mode 100644 index 00000000..b96dafc6 --- /dev/null +++ b/hosts/Northstar/configuration.nix @@ -0,0 +1,27 @@ +# Edit this configuration file to define what should be installed on +# your system. Help is available in the configuration.nix(5) man page +# and in the NixOS manual (accessible by running `nixos-help`). + +{ config, pkgs, ... }: + +{ + imports = + [ # Include the results of the hardware scan. + ./hardware-configuration.nix + ../hyprland.nix + ]; + + # Use the systemd-boot EFI boot loader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + # This value determines the NixOS release from which the default + # settings for stateful data, like file locations and database versions + # on your system were taken. It's perfectly fine and recommended to leave + # this value at the release version of the first install of this system. + # Before changing this value read the documentation for this option + # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). + system.stateVersion = "23.05"; # Did you read the comment? + +} + diff --git a/hosts/Northstar/hardware-configuration.nix b/hosts/Northstar/hardware-configuration.nix new file mode 100644 index 00000000..9314a582 --- /dev/null +++ b/hosts/Northstar/hardware-configuration.nix @@ -0,0 +1,39 @@ +# 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 = [ "nvme" "xhci_pci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/f4c91844-b4a2-45dc-8ba9-c532a352a8ce"; + fsType = "btrfs"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/F6B7-E162"; + fsType = "vfat"; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/b85989dd-a91c-41ac-a32d-65aa7e572248"; } + ]; + + # 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.wlo1.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/hosts/Northstar/home.nix b/hosts/Northstar/home.nix new file mode 100644 index 00000000..c0477ebe --- /dev/null +++ b/hosts/Northstar/home.nix @@ -0,0 +1,10 @@ +{ pkgs, lib, user, shellConfig, ... }: +let homeDirectory = "/home/${user}"; +in { + imports = [ shellConfig ../../home/default.nix ]; + home = { + inherit homeDirectory; + username = user; + stateVersion = "23.05"; + }; +} diff --git a/services/Northstar.nix b/services/Northstar.nix new file mode 100644 index 00000000..b79ca1d4 --- /dev/null +++ b/services/Northstar.nix @@ -0,0 +1,18 @@ +{ ... }: +let + user = "xenia"; + group = "users"; + dataDir = "/home/${user}"; +in { + imports = [ ./sshd ./syncthing ]; + services.syncthing = { + inherit user group dataDir; + settings.folders = { + "Archive".enable = false; + "Books".enable = false; + "Comics".enable = false; + "Exports".enable = false; + "Pictures".enable = false; + }; + }; +}