diff --git a/flake.nix b/flake.nix index e0c12e4..1be7027 100644 --- a/flake.nix +++ b/flake.nix @@ -57,12 +57,22 @@ ./common/default.nix ]; in { - nixosConfigurations.wim = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - specialArgs = attrs; - modules = [ - ./hosts/wim/configuration.nix - ] ++ defaultModules; + nixosConfigurations = { + wim = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = attrs; + modules = [ + ./hosts/wim/configuration.nix + ] ++ defaultModules; + }; + + binto = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = attrs; + modules = [ + ./hosts/binto/configuration.nix + ] ++ defaultModules; + }; }; }; } diff --git a/hosts/binto/binto.nix b/hosts/binto/binto.nix new file mode 100644 index 0000000..d4b1d98 --- /dev/null +++ b/hosts/binto/binto.nix @@ -0,0 +1,23 @@ +{ ... }: + +{ + users.users.matt = { + isNormalUser = true; + extraGroups = [ "wheel" "input" "uinput" "adm" "mlocate" "video" "libvirtd" ]; + }; + + programs.dconf.enable = true; + + # TODO: use hm for tmux + home-manager.users = { + matt = { + + imports = [ + ../wim/home/dconf.nix + ../wim/home/firefox/main.nix + ]; + + home.stateVersion = "23.11"; + }; + }; +} diff --git a/hosts/binto/configuration.nix b/hosts/binto/configuration.nix new file mode 100644 index 0000000..11100ef --- /dev/null +++ b/hosts/binto/configuration.nix @@ -0,0 +1,60 @@ +# 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’). + +{ ... }: { + imports = [ + ./hardware-configuration.nix + + ../../modules/audio.nix + ../../modules/kmscon.nix + ../../modules/printer.nix + + ./binto.nix + ]; + + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + boot.supportedFilesystems = [ "ntfs" ]; + + networking = { + hostName = "binto"; + networkmanager.enable = true; + firewall.enable = false; + }; + + # Set your time zone. + time.timeZone = "America/Toronto"; + + # Enable the X11 windowing system. + services.xserver.enable = true; + + # Enable the KDE Plasma Desktop Environment. + services.xserver.displayManager.sddm.enable = true; + services.xserver.desktopManager.plasma5.enable = true; + + # Configure keymap in X11 + services.xserver = { + layout = "ca"; + xkbVariant = "multix"; + }; + + services.tailscale = { + enable = true; + extraUpFlags = [ + "--login-server https://headscale.nelim.org" + "--operator=matt" + ]; + }; + + # Enable the OpenSSH daemon. + services.openssh.enable = 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.11"; # Did you read the comment? +} diff --git a/hosts/binto/hardware-configuration.nix b/hosts/binto/hardware-configuration.nix new file mode 100644 index 0000000..af42408 --- /dev/null +++ b/hosts/binto/hardware-configuration.nix @@ -0,0 +1,38 @@ +# 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, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/560976b6-85e0-44ca-bb73-e15a78e9c449"; + fsType = "btrfs"; + options = [ "subvol=@" ]; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/1407-A10C"; + fsType = "vfat"; + }; + + swapDevices = [ ]; + + # 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.enp6s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}