diff --git a/flake.nix b/flake.nix index 50c81a2..aadabc0 100755 --- a/flake.nix +++ b/flake.nix @@ -51,6 +51,21 @@ } ]; }; + sutakku = lib.nixosSystem { + inherit system; + modules = [ + ./hosts/sutakku + home-manager.nixosModules.home-manager { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.oh = { + imports = [ + ./hosts/sutakku/home.nix + ]; + }; + } + ]; + }; }; }; } diff --git a/hosts/sutakku/default.nix b/hosts/sutakku/default.nix new file mode 100644 index 0000000..6790b7e --- /dev/null +++ b/hosts/sutakku/default.nix @@ -0,0 +1,76 @@ +{ config, pkgs, ... }: + +{ + imports = + [ + ./hardware-configuration.nix + ]; + + boot.loader.grub.enable = true; + boot.loader.grub.device = "/dev/sda"; + boot.loader.grub.useOSProber = true; + + networking.hostName = "sutakku"; + networking.networkmanager.enable = true; + + time.timeZone = "America/New_York"; + + 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"; + }; + + services.xserver = { + layout = "us"; + xkbVariant = ""; + }; + + users.users.oh = { + isNormalUser = true; + description = "oh"; + extraGroups = [ "networkmanager" "wheel" ]; + packages = with pkgs; []; + }; + + nixpkgs.config.allowUnfree = true; + + environment.systemPackages = with pkgs; [ + helix + wget + git + gh + lazygit + nfs-utils + pinentry-curses + ]; + + programs.gnupg.agent = { + enable = true; + enableSSHSupport = true; + pinentryFlavor = "curses"; + }; + + services.openssh.enable = true; + + networking.firewall.enable = true; + networking.nameservers = [ "192.168.1.45" ]; + + nix = { + package = pkgs.nixFlakes; + extraOptions = '' + experimental-features = nix-command flakes + warn-dirty = false + ''; + }; + + system.stateVersion = "23.05"; +} diff --git a/hosts/sutakku/hardware-configuration.nix b/hosts/sutakku/hardware-configuration.nix new file mode 100644 index 0000000..06d2ee7 --- /dev/null +++ b/hosts/sutakku/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 + "/profiles/qemu-guest.nix") + ]; + + boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/dae21f73-2c6b-4959-90cc-07fb77c2a880"; + fsType = "ext4"; + }; + fileSystems."/media" = + { + device = "192.168.1.71:/volume1/media"; + fsType = "nfs"; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/990dd47b-fa78-4636-844e-83cc638052dc"; } + ]; + + # 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.ens18.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/hosts/sutakku/home.nix b/hosts/sutakku/home.nix new file mode 100644 index 0000000..58b63d0 --- /dev/null +++ b/hosts/sutakku/home.nix @@ -0,0 +1,16 @@ +{config, pkgs, ...}: + +{ + +imports = [ + ../../modules/common.nix +]; + systemd.user.startServices = "sd-switch"; + programs.home-manager.enable = true; + + home = { + username = "oh"; + homeDirectory = "/home/oh"; + stateVersion = "23.05"; + }; +} \ No newline at end of file