diff --git a/flake.nix b/flake.nix index dc54511..1dddd79 100644 --- a/flake.nix +++ b/flake.nix @@ -76,6 +76,9 @@ virt-nix = import ./hosts/virt-nix { inherit inputs globals; }; + steven = import ./hosts/steven { + inherit inputs globals; + }; }; homeConfigurations = { @@ -83,6 +86,7 @@ envy = nixosConfigurations.envy.config.home-manager.users.${globals.user}.home; parents = nixosConfigurations.parents.config.home-manager.users.${globals.user}.home; virt-nix = nixosConfigurations.virt-nix.config.home-manager.users.${globals.user}.home; + steven = nixosConfigurations.virt-nix.config.home-manager.users.${globals.user}.home; }; permittedInsecurePackages = [ diff --git a/hosts/steven/default.nix b/hosts/steven/default.nix new file mode 100644 index 0000000..3395ff7 --- /dev/null +++ b/hosts/steven/default.nix @@ -0,0 +1,108 @@ +# virt-nix +# System configuration for a vm on my desktop + +{ inputs, globals, ... }: + +with inputs; + +inputs.nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + globals + lix-module.nixosModules.default + home-manager.nixosModules.home-manager + sops-nix.nixosModules.sops + ./hardware-configuration.nix + ../../modules/common + ../../modules/nixos + { + # something with overlays, I don't get those yet. + + # Hardware + physical = true; + networking.hostName = "steven"; + + networking.useDHCP = nixpkgs.lib.mkDefault true; + + # TODO: identityFile = "/home/${globals.user}/.ssh/id_ed2519"; + # TODO: passwordHash = nixpkgs.lib.fileContents ../../password.sha512; + + # Theming? + + sops = { + defaultSopsFile = ../../secrets/secrets.yaml; + defaultSopsFormat = "yaml"; + age.keyFile = "/home/annika/.config/sops/age/keys.txt"; + age.sshKeyPaths = [ + "/etc/ssh/ssh_host_ed25519_key" + ]; + }; + + # TODO: Temporary, remove eventually! + time.timeZone = "America/New_York"; + nix.settings.experimental-features = [ "nix-command" "flakes" ]; + + nixpkgs.config.allowUnfree = true; + system.stateVersion = "23.11"; + home-manager.backupFileExtension = "backup"; + hardware.bluetooth.enable = true; + hardware.bluetooth.powerOnBoot = true; + + # Enable hardware features + audio.enable = true; + gui.enable = true; + + services.openssh.enable = true; + services.flatpak.enable = true; + # Apps + discord.enable = true; + element.enable = true; + firefox.enable = true; + kitty.enable = true; + # netbird.enable = true; See netbird.nix (I can't access the sops stuff from here?) + openrgb.enable = true; + prusa-slicer.enable = true; + spotifyd.enable = true; + thunderbird.enable = true; + # Gaming + steam.enable = true; + # Programming Stuff + nixpkgs-fmt.enable = true; + python3.enable = true; + vscode.enable = true; + # Utilities + # git is not optional + docker.enable = true; + yubikey.enable = true; + kdeconnect.enable = true; + tailscale.enable = true; + + # TODO: Move this out + home-manager.users.annika = { + programs = { + direnv = { + enable = true; + enableBashIntegration = true; + nix-direnv.enable = true; + }; + bash = { + enable = true; + shellAliases = { + s = "kitten ssh"; + la = "ls -a"; + ll = "ls -l"; + lal = "ls -la"; + cls = "clear && ls"; + }; + }; + }; + }; + + nix.gc = { + automatic = true; + randomizedDelaySec = "14m"; + options = "--delete-older-than 10d"; + }; + } + ]; +} diff --git a/hosts/steven/hardware-configuration.nix b/hosts/steven/hardware-configuration.nix new file mode 100644 index 0000000..dd3df05 --- /dev/null +++ b/hosts/steven/hardware-configuration.nix @@ -0,0 +1,40 @@ +# 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 = [ "ahci" "xhci_pci" "usb_storage" "sd_mod" "sdhci_pci" "rtsx_usb_sdmmc" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/fad4b5f4-b316-411e-ad44-fe48c4f50313"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/DE67-DFD6"; + fsType = "vfat"; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/1832b450-9f1d-4953-bdd4-18d38e90f903"; } + ]; + + # 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.bnep0.useDHCP = lib.mkDefault true; + # networking.interfaces.wwp0s21f0u3i4.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}