From 10224deac04ea13d2abeb7d3393ac2cc507b610b Mon Sep 17 00:00:00 2001 From: dracoling Date: Wed, 1 May 2024 16:03:18 +0000 Subject: [PATCH] update: nixos disambiguation --- changelog.md | 8 ++ configuration.nix | 12 ++ .../local.nix | 1 + machines/nixos/local.nix | 104 ++++++++++++++++++ 4 files changed, 125 insertions(+) rename machines/{bento-wsl-nixos => bento-nixos}/local.nix (86%) create mode 100644 machines/nixos/local.nix diff --git a/changelog.md b/changelog.md index 942ff3b..77c8816 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,11 @@ +## nixos disambiguation + +- merged config from `nixos` jumpbox + - enabled flakes + - added curl + - added ssh with x11 forwarding +- renamed WSL instance to `bento-nixos` + ## add eza - added `eza` to `pkgs` diff --git a/configuration.nix b/configuration.nix index 4655411..205c86f 100644 --- a/configuration.nix +++ b/configuration.nix @@ -9,10 +9,13 @@ ./programs ]; nixpkgs.config.allowUnfree = true; + nix.settings.experimental-features = ["nix-command" "flakes" ]; + environment.systemPackages = with pkgs; [ fishPlugins.tide neovim wget + curl git htop btop @@ -27,6 +30,15 @@ tree = "eza -lT"; }; + services.openssh = { + enable = true; + settings = { + X11Forwarding = true; + PermitRootLogin = "no"; + }; + openFirewall = true; + }; + programs.direnv.enable = true; users.defaultUserShell = pkgs.fish; diff --git a/machines/bento-wsl-nixos/local.nix b/machines/bento-nixos/local.nix similarity index 86% rename from machines/bento-wsl-nixos/local.nix rename to machines/bento-nixos/local.nix index 7c87428..b0a5a62 100644 --- a/machines/bento-wsl-nixos/local.nix +++ b/machines/bento-nixos/local.nix @@ -8,6 +8,7 @@ wsl.enable = true; wsl.defaultUser = "nixos"; + networking.hostName = "bento-nixos"; nix.gc = { automatic = true; diff --git a/machines/nixos/local.nix b/machines/nixos/local.nix new file mode 100644 index 0000000..87b2a02 --- /dev/null +++ b/machines/nixos/local.nix @@ -0,0 +1,104 @@ +{ ... }: + +{ + imports = [ ./hardware-configuration.nix ]; + + # Bootloader. + boot.loader.grub.enable = true; + boot.loader.grub.device = "/dev/vda"; + boot.loader.grub.useOSProber = true; + + networking.hostName = "nixos"; # Define your hostname. + # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. + + # Configure network proxy if necessary + # networking.proxy.default = "http://user:password@proxy:port/"; + # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; + + # Enable networking + networking.networkmanager.enable = true; + + # 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"; + }; + + # Enable the Hyprland windowing system. + #programs.hyprland.enable = true; + + # Enable the X11 windowing system. + services.xserver.enable = true; + + # Enable the GNOME Desktop Environment. + services.xserver.displayManager.gdm.enable = true; + services.xserver.desktopManager.gnome.enable = true; + + # Enable x2go + # services.x2goserver.enable = true; + # Enable xRDP + #services.xrdp.enable = true; + #services.xrdp.defaultWindowManager = "/run/current-system/sw/bin/gnome-session"; + #services.xrdp.openFirewall = true; + # services.gnome.gnome-remote-desktop.enable = true; + + # Configure keymap in X11 + services.xserver = { + layout = "us"; + xkbVariant = ""; + }; + + # Enable CUPS to print documents. + services.printing.enable = true; + + # Enable sound with pipewire. + sound.enable = true; + hardware.pulseaudio.enable = false; + security.rtkit.enable = true; + 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; + }; + + # Enable touchpad support (enabled default in most desktopManager). + # services.xserver.libinput.enable = true; + + # Define a user account. Don't forget to set a password with ‘passwd’. + users.users.mskelly = { + isNormalUser = true; + description = "Mike Skelly"; + extraGroups = [ "networkmanager" "wheel" ]; + packages = with pkgs; [ + firefox + # thunderbird + kitty + ]; + }; + + # fonts? fonts! + fonts.packages = with pkgs; [ + (nerdfonts.override { fonts = [ "FiraCode" "FiraMono" "NerdFontsSymbolsOnly" ]; }) + ]; + + +}