2022-11-14 20:56:23 +00:00
|
|
|
{ lib, pkgs, config, modulesPath, specialArgs, ... }:
|
2022-11-15 22:43:30 +00:00
|
|
|
let
|
|
|
|
hostname = specialArgs.hostname;
|
|
|
|
enableSSH = specialArgs.enableSSH or true;
|
|
|
|
networking = { hostName = hostname; } // (specialArgs.networking or { });
|
|
|
|
boot = specialArgs.boot or { };
|
|
|
|
services = specialArgs.services or { };
|
|
|
|
includeHardware = specialArgs.includeHardware or true;
|
2022-11-14 20:56:23 +00:00
|
|
|
in
|
2022-08-30 14:29:44 +00:00
|
|
|
with lib;
|
|
|
|
{
|
2022-11-15 22:43:30 +00:00
|
|
|
imports = (if includeHardware then [
|
2022-11-14 20:56:23 +00:00
|
|
|
./profiles/${hostname}/hardware-configuration.nix
|
2022-11-15 22:44:56 +00:00
|
|
|
] else [ ]) ++ [
|
|
|
|
"${modulesPath}/profiles/minimal.nix"
|
2022-08-30 14:29:44 +00:00
|
|
|
];
|
2022-11-14 22:10:46 +00:00
|
|
|
inherit networking;
|
|
|
|
inherit boot;
|
|
|
|
inherit services;
|
2022-08-30 14:29:44 +00:00
|
|
|
|
2022-11-06 10:45:45 +00:00
|
|
|
system.stateVersion = "22.05";
|
2022-08-30 14:29:44 +00:00
|
|
|
# users.users.<defaultUser>.uid = 1000;
|
2022-11-06 20:23:10 +00:00
|
|
|
# networking.hostName = "nixos";
|
2022-08-30 14:29:44 +00:00
|
|
|
|
|
|
|
# Enable nix flakes
|
|
|
|
nix.package = pkgs.nixFlakes;
|
|
|
|
nix.extraOptions = ''
|
|
|
|
experimental-features = nix-command flakes
|
|
|
|
'';
|
2022-11-14 22:10:46 +00:00
|
|
|
users.users.hungtr = {
|
2022-11-15 22:44:56 +00:00
|
|
|
isNormalUser = true;
|
|
|
|
home = "/home/hungtr";
|
|
|
|
description = "pegasust/hungtr";
|
|
|
|
extraGroups = [ "wheel" "networkmanager" ];
|
|
|
|
openssh.authorizedKeys.keys = lib.strings.splitString "\n" (builtins.readFile ../ssh/authorized_keys);
|
2022-11-14 18:01:39 +00:00
|
|
|
};
|
2022-08-30 14:29:44 +00:00
|
|
|
|
2022-11-06 20:23:10 +00:00
|
|
|
# Some basic programs
|
2022-08-30 14:29:44 +00:00
|
|
|
programs.neovim = {
|
2022-11-15 22:44:56 +00:00
|
|
|
enable = true;
|
|
|
|
defaultEditor = true;
|
2022-08-30 14:29:44 +00:00
|
|
|
};
|
2022-11-14 18:01:39 +00:00
|
|
|
|
2022-08-30 14:29:44 +00:00
|
|
|
programs.git = {
|
2022-11-15 22:44:56 +00:00
|
|
|
enable = true;
|
|
|
|
# more information should be configured under user level
|
2022-11-24 00:58:22 +00:00
|
|
|
# See other config at @/home-nix
|
2022-08-30 14:29:44 +00:00
|
|
|
};
|
2022-11-14 18:01:39 +00:00
|
|
|
|
2022-08-30 14:29:44 +00:00
|
|
|
environment.systemPackages = [
|
2022-11-15 22:44:56 +00:00
|
|
|
pkgs.gnumake
|
|
|
|
pkgs.wget
|
2022-11-24 00:58:22 +00:00
|
|
|
pkgs.inetutils # network diag
|
|
|
|
pkgs.mtr # network diag
|
|
|
|
pkgs.sysstat # sys diag
|
|
|
|
pkgs.mosh # ssh-alt; parsec-like
|
2022-08-30 14:29:44 +00:00
|
|
|
];
|
2022-11-15 22:44:56 +00:00
|
|
|
}
|
2022-11-14 18:01:39 +00:00
|
|
|
|