Refactoring

This commit is contained in:
Matthew Bessette 2024-07-25 22:09:33 -04:00
parent 5ead141a35
commit 1945dbbdda
4 changed files with 69 additions and 78 deletions

View File

@ -7,6 +7,14 @@
../../nixos-modules
];
# 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. Its 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?
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
@ -83,10 +91,14 @@
# packages = with pkgs; [];
# };
main-user.enable = true;
main-user.userName = "mbessette";
###########
# MUTABLE #
###########
_1password.enable = true;
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
nix.settings.experimental-features = [ "nix-command" "flakes" ];
home-manager = {
extraSpecialArgs = { inherit inputs; inherit system; };
@ -94,46 +106,31 @@
users.mbessette = import ./home.nix;
};
programs.zsh.enable = true;
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
nix.settings.experimental-features = [ "nix-command" "flakes" ];
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
vim
nodejs_22
# wget
];
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
# programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
# };
##################
# CUSTOM MODULES #
##################
# List services that you want to enable:
main-user.enable = true;
main-user.userName = "mbessette";
# Enable the OpenSSH daemon.
# services.openssh.enable = true;
_1password.enable = true;
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
############
# PROGRAMS #
############
# 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. Its 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?
programs.zsh.enable = true;
############
# SERVICES #
############
# ...
}

View File

@ -1,15 +1,19 @@
# 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, inputs, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
inputs.vscode-server.nixosModules.default
];
imports = [
./hardware-configuration.nix
../../nixos-modules
inputs.vscode-server.nixosModules.default
];
# 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. Its 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?
# Bootloader.
boot.loader.systemd-boot.enable = true;
@ -49,17 +53,9 @@
xkbVariant = "";
};
# Define a user account. Don't forget to set a password with passwd.
users.users.mbessette = {
isNormalUser = true;
description = "Matthew Bessette";
extraGroups = [ "networkmanager" "wheel" ];
packages = with pkgs; [];
openssh.authorizedKeys.keys = [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCxwgo35pdtk5dJKYBNLk723yvxmaJzN87KW3L2U82nY5HTYkMP6eoLN2S71RRN0deSE9//1xE3Pj1RXUates5Bq42csEa0s791VEC3zWdTlYeVaHbGgyRIOtNv6s5celwvqYZkMERbvbz/7cmTbOuQf5bdvopS7tofzj83s5iwOO8pmayavZ/xWSOfau07z0Sj2KuJSjqGkLtFD9P4o9BeNc3ZxghaMidZtpUNgSq/n06aph+dZOCLQpAQlQPIxqowGX/gQSailYId0SfAtuTesFvdgi9xkokia2erxv0RVbnblSZuucYoNdEm/sAX3bMxG9mLGxpyeIRfZjNynhzQh6jk4xLNsNszWVhmh49nrBADwmjXS6vO/QT8aaByKwJNmkPZxRMOquy18bZeEOl+Qya/Ui0g9diL3c6Mqmz4SwrWiROo70nFiInEMPAl/sXZSfpWsiFsAqqV2WyFKTNBzIM+XYE8wZf5h8thh8YuE3uGduR86u9HH7IU+fNCPR0="
];
};
###########
# MUTABLE #
###########
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
@ -72,15 +68,22 @@
vim
];
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
# programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
# };
##################
# CUSTOM MODULES #
##################
# List services that you want to enable:
main-user.enable = true;
main-user.userName = "mbessette";
############
# PROGRAMS #
############
programs.zsh.enable = true;
############
# SERVICES #
############
# Enable the OpenSSH daemon.
services.openssh = {
@ -88,19 +91,5 @@
};
services.vscode-server.enable = true;
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# 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. Its 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?
virtualisation.docker.enable = true;
}

View File

@ -11,7 +11,7 @@ in
config.programs.vscode = lib.mkIf cfg.enable {
enable = true;
# package = pkgs.vscodium;
extensions = with pkgs.vscode-extensions; [
bbenoist.nix
# rokoroku.vscode-theme-darcula
@ -23,6 +23,8 @@ in
userSettings = {
editor.tabSize = 2;
terminal.integrated.defaultProfile.linux = "zsh";
terminal.integrated.defaultProfile.osx = "zsh";
};
};
}

View File

@ -18,8 +18,11 @@ in
initialPassword = "12345";
description = "main user";
shell = pkgs.zsh;
extraGroups = [ "networkmanager" "wheel" ];
extraGroups = [ "networkmanager" "wheel" "docker"];
packages = with pkgs; [];
openssh.authorizedKeys.keys = [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCxwgo35pdtk5dJKYBNLk723yvxmaJzN87KW3L2U82nY5HTYkMP6eoLN2S71RRN0deSE9//1xE3Pj1RXUates5Bq42csEa0s791VEC3zWdTlYeVaHbGgyRIOtNv6s5celwvqYZkMERbvbz/7cmTbOuQf5bdvopS7tofzj83s5iwOO8pmayavZ/xWSOfau07z0Sj2KuJSjqGkLtFD9P4o9BeNc3ZxghaMidZtpUNgSq/n06aph+dZOCLQpAQlQPIxqowGX/gQSailYId0SfAtuTesFvdgi9xkokia2erxv0RVbnblSZuucYoNdEm/sAX3bMxG9mLGxpyeIRfZjNynhzQh6jk4xLNsNszWVhmh49nrBADwmjXS6vO/QT8aaByKwJNmkPZxRMOquy18bZeEOl+Qya/Ui0g9diL3c6Mqmz4SwrWiROo70nFiInEMPAl/sXZSfpWsiFsAqqV2WyFKTNBzIM+XYE8wZf5h8thh8YuE3uGduR86u9HH7IU+fNCPR0="
];
};
};
}