diff --git a/flake.nix b/flake.nix index 659c618..c5eb652 100644 --- a/flake.nix +++ b/flake.nix @@ -98,6 +98,24 @@ specialArgs = {inherit inputs;}; }; + thinkcentre = nixpkgs.lib.nixosSystem { + system = utils.lib.system.x86_64-linux; + modules = [ + self.overlaysModule + home-manager.nixosModules.home-manager + ./modules/common.nix + ./modules/containers.nix + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.michael = import ./user/environments/nixos/home.nix; + } + + ./machines/thinkcentre/configuration.nix + ]; + specialArgs = {inherit inputs;}; + }; + # WSL environment work = inputs.nixpkgs.lib.nixosSystem { system = utils.lib.system.x86_64-linux; diff --git a/machines/kitchen/configuration.nix b/machines/kitchen/configuration.nix index 19b7d29..54d32b8 100644 --- a/machines/kitchen/configuration.nix +++ b/machines/kitchen/configuration.nix @@ -1,11 +1,4 @@ -# 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, - ... -}: { +{pkgs, ...}: { imports = [ # Include the results of the hardware scan. ./hardware-configuration.nix diff --git a/machines/thinkcentre/configuration.nix b/machines/thinkcentre/configuration.nix new file mode 100644 index 0000000..04459d7 --- /dev/null +++ b/machines/thinkcentre/configuration.nix @@ -0,0 +1,58 @@ +{pkgs, ...}: { + imports = [ + # Include the results of the hardware scan. + ./hardware-configuration.nix + ]; + + networking.hostName = "venus"; # Define your hostname. + + # Set your time zone. + time.timeZone = "America/New_York"; + + # Select internationalisation properties. + i18n.defaultLocale = "en_US.UTF-8"; + + i18n.extraLocaleSettings = { + LC_ADDRESS = "en_US.UTF-8"; + LC_IDENTIFICATION = "en_US.UTF-8"; + LC_MEASUREMENT = "en_US.UTF-8"; + LC_MONETARY = "en_US.UTF-8"; + LC_NAME = "en_US.UTF-8"; + LC_NUMERIC = "en_US.UTF-8"; + LC_PAPER = "en_US.UTF-8"; + LC_TELEPHONE = "en_US.UTF-8"; + LC_TIME = "en_US.UTF-8"; + }; + + # Configure keymap in X11 + services.xserver = { + layout = "us"; + xkbVariant = ""; + }; + + swapDevices = [ + { + device = "/swapfile"; + priority = 0; + size = 16384; + } + ]; + + programs.zsh.enable = true; + + # Define a user account. Don't forget to set a password with ‘passwd’. + users.users.michael = { + isNormalUser = true; + description = "Michael Thomas"; + extraGroups = ["wheel" "docker" "podman" "adbusers" "dialout"]; + shell = pkgs.zsh; + }; + + # 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/machines/thinkcentre/hardware-configuration.nix b/machines/thinkcentre/hardware-configuration.nix new file mode 100644 index 0000000..3a46158 --- /dev/null +++ b/machines/thinkcentre/hardware-configuration.nix @@ -0,0 +1,37 @@ +# 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" "nvme" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/2b1793d6-feff-48df-9180-03e8c2bef7bf"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/2082-08EF"; + 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.enp0s31f6.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/modules/bootloader.nix b/modules/bootloader.nix index b8c0550..760e6d2 100644 --- a/modules/bootloader.nix +++ b/modules/bootloader.nix @@ -4,4 +4,5 @@ boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = false; boot.plymouth.enable = true; + boot.kernelParams = ["quiet"]; } diff --git a/modules/sound.nix b/modules/sound.nix index 8c32227..e0f7994 100644 --- a/modules/sound.nix +++ b/modules/sound.nix @@ -1,5 +1,20 @@ { # Enable sound. sound.enable = true; - hardware.pulseaudio.enable = true; + hardware.pulseaudio.enable = false; + security.rtkit.enable = true; + + # Enable pipewire + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + # If you want to use JACK applications, uncomment this + #jack.enable = true; + + # use the example session manager (no others are packaged yet so this is enabled by default, + # no need to redefine it in your config for now) + #media-session.enable = true; + }; } diff --git a/user/modules/git_nixos.nix b/user/modules/git_nixos.nix index c48e043..81d9dd7 100644 --- a/user/modules/git_nixos.nix +++ b/user/modules/git_nixos.nix @@ -1,9 +1,12 @@ {pkgs, ...}: { - # Use pkgs.gitAndTools.gitFull in order to get libsecret support programs.git = { package = pkgs.gitAndTools.gitFull; extraConfig = { - credential.helper = "libsecret"; + credential.helper = "oauth"; }; }; + + home.packages = with pkgs; [ + git-credential-oauth + ]; }