From 6c8776b68ade17715c71483f4e214e267e9e2510 Mon Sep 17 00:00:00 2001 From: Matthew Bessette Date: Thu, 25 Jul 2024 23:12:27 -0400 Subject: [PATCH] Fix ssh, added home.nix for bromine, and fix docker group --- _hosts/argon/configuration.nix | 2 +- _hosts/bromine/home.nix | 55 ++++++++++++++++++++++++++++++++++ home-manager-modules/ssh.nix | 1 + nixos-modules/main-user.nix | 1 + 4 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 _hosts/bromine/home.nix diff --git a/_hosts/argon/configuration.nix b/_hosts/argon/configuration.nix index 3ffab0d..c62fa73 100644 --- a/_hosts/argon/configuration.nix +++ b/_hosts/argon/configuration.nix @@ -16,7 +16,7 @@ system.stateVersion = "23.11"; # Did you read the comment? # Bootloader. - boot.loader.systemd-boot.enable = true; + boot.loader.systemd-boot.enable = true;e boot.loader.efi.canTouchEfiVariables = true; boot.initrd.luks.devices."luks-e9ee8166-a569-4bfc-9ada-fb2b718d9ad5".device = "/dev/disk/by-uuid/e9ee8166-a569-4bfc-9ada-fb2b718d9ad5"; diff --git a/_hosts/bromine/home.nix b/_hosts/bromine/home.nix new file mode 100644 index 0000000..3f09e9b --- /dev/null +++ b/_hosts/bromine/home.nix @@ -0,0 +1,55 @@ +{ config, pkgs, inputs, ... }: + +{ + imports = [ + ../../home-manager-modules + ]; + + firefox.enable = false; + ssh.enable = false; + vscode.enable = true; + zsh.enable = true; + + home.username = "mbessette"; + home.homeDirectory = "/home/mbessette"; + home.stateVersion = "24.05"; # Please read the comment before changing. + + # The home.packages option allows you to install Nix packages into your + # environment. + home.packages = with pkgs; []; + + # Home Manager is pretty good at managing dotfiles. The primary way to manage + # plain files is through 'home.file'. + home.file = { + # # Building this configuration will create a copy of 'dotfiles/screenrc' in + # # the Nix store. Activating the configuration will then make '~/.screenrc' a + # # symlink to the Nix store copy. + # ".screenrc".source = dotfiles/screenrc; + + # # You can also set the file content immediately. + # ".gradle/gradle.properties".text = '' + # org.gradle.console=verbose + # org.gradle.daemon.idletimeout=3600000 + # ''; + }; + + + home.sessionVariables = { + EDITOR = "vim"; + }; + + # Let Home Manager install and manage itself. + programs.home-manager.enable = true; + + nixpkgs = { + config.allowUnfreePredicate = pkg: + builtins.elem (pkgs.lib.getName pkg) [ + "1password-gui" + "1password" + "vscode" + "vscode-extension-ms-vsliveshare-vsliveshare" + "onepassword-password-manager" + "vscode-extension-ms-vscode-remote-remote-ssh" + ]; + }; +} diff --git a/home-manager-modules/ssh.nix b/home-manager-modules/ssh.nix index 7a4d0d2..810e20d 100644 --- a/home-manager-modules/ssh.nix +++ b/home-manager-modules/ssh.nix @@ -11,6 +11,7 @@ in config.programs.ssh = lib.mkIf cfg.enable { enable = true; + forwardAgent = true; extraConfig = '' Host * IdentityAgent ${agentPath} diff --git a/nixos-modules/main-user.nix b/nixos-modules/main-user.nix index 545fe6f..bd04896 100644 --- a/nixos-modules/main-user.nix +++ b/nixos-modules/main-user.nix @@ -13,6 +13,7 @@ in }; config = lib.mkIf cfg.enable { + users.groups.docker = {}; users.users.${cfg.userName} = { isNormalUser = true; initialPassword = "12345";