add bin scripts
This commit is contained in:
parent
d37834a164
commit
211ba8a0b0
16 changed files with 349 additions and 53 deletions
|
|
@ -1,19 +1,7 @@
|
|||
{ packages, host, ... }:
|
||||
{ packages, host, system, ... }:
|
||||
{
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
users.groups.plugdev = {}; # Create plugdev group
|
||||
|
||||
networking.hostName = host.hostName;
|
||||
networking.firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [11111];
|
||||
allowedUDPPorts = [];
|
||||
logRefusedConnections = true;
|
||||
};
|
||||
users.users.${host.username} = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [
|
||||
|
|
@ -22,7 +10,6 @@
|
|||
"video"
|
||||
];
|
||||
};
|
||||
security.pam.services.swaylock = {};
|
||||
time.timeZone = "America/Chicago";
|
||||
|
||||
# Enable flakes and unfree packages
|
||||
|
|
@ -35,6 +22,4 @@
|
|||
dates = "00:00";
|
||||
options = "--delete-older-than 14d";
|
||||
};
|
||||
|
||||
system.stateVersion = "22.11";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,21 +1,30 @@
|
|||
{ inputs, ... }:
|
||||
let
|
||||
in
|
||||
{ t14 = inputs.nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inherit inputs;
|
||||
system = "x86_64-linux";
|
||||
host = {
|
||||
hostName = "t14";
|
||||
username = "e";
|
||||
};
|
||||
{ inputs, pkgs, attrs, system, ... }:
|
||||
{
|
||||
t14 = inputs.nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inherit inputs system pkgs;
|
||||
host = {
|
||||
hostName = "t14";
|
||||
username = attrs.username;
|
||||
};
|
||||
modules = [
|
||||
./configuration.nix
|
||||
./t14/configuration.nix
|
||||
inputs.nixos-hardware.nixosModules.lenovo-thinkpad-t14-amd-gen1
|
||||
];
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
modules = [
|
||||
./configuration.nix
|
||||
./t14/configuration.nix
|
||||
inputs.nixos-hardware.nixosModules.lenovo-thinkpad-t14-amd-gen1
|
||||
];
|
||||
};
|
||||
rknrd = inputs.nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inherit inputs system pkgs;
|
||||
host = {
|
||||
hostName = "rknrd";
|
||||
username = attrs.username;
|
||||
};
|
||||
};
|
||||
modules = [
|
||||
./configuration.nix
|
||||
./racknerd/configuration.nix
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
37
nixos/racknerd/configuration.nix
Normal file
37
nixos/racknerd/configuration.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{ inputs, pkgs, system, ... }: {
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
environment.systemPackages = with pkgs; [
|
||||
nfs-utils
|
||||
];
|
||||
boot.tmp.cleanOnBoot = true;
|
||||
zramSwap.enable = false;
|
||||
networking.hostName = "rknrd";
|
||||
networking.domain = "";
|
||||
networking.firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [22];
|
||||
allowedUDPPorts = [];
|
||||
logRefusedConnections = true;
|
||||
};
|
||||
services.openssh.enable = true;
|
||||
users.users = {
|
||||
root = {
|
||||
openssh.authorizedKeys.keys = [''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILU2TUxKyGKoZ68IG4hw23RmxVf72u5K9W0StkgTr0b2 e@t14'' ];
|
||||
};
|
||||
e = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ];
|
||||
packages = with pkgs; [
|
||||
vim
|
||||
htop
|
||||
tree
|
||||
];
|
||||
openssh.authorizedKeys.keys = [''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILU2TUxKyGKoZ68IG4hw23RmxVf72u5K9W0StkgTr0b2 e@t14'' ];
|
||||
};
|
||||
};
|
||||
security.sudo.wheelNeedsPassword = false;
|
||||
nix.settings.trusted-users = ["e"];
|
||||
system.stateVersion = "22.11";
|
||||
}
|
||||
10
nixos/racknerd/hardware-configuration.nix
Executable file
10
nixos/racknerd/hardware-configuration.nix
Executable file
|
|
@ -0,0 +1,10 @@
|
|||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
{
|
||||
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
boot.loader.grub.device = "/dev/vda";
|
||||
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "xen_blkfront" "vmw_pvscsi" ];
|
||||
boot.initrd.kernelModules = [ "nvme" ];
|
||||
fileSystems."/" = { device = "/dev/vda1"; fsType = "ext4"; };
|
||||
swapDevices = [ { device = "/dev/vda2"; } ];
|
||||
}
|
||||
|
|
@ -5,6 +5,16 @@
|
|||
./hardware-configuration.nix
|
||||
./nano.nix
|
||||
];
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
networking.networkmanager.enable = true;
|
||||
networking.firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [11111];
|
||||
allowedUDPPorts = [];
|
||||
logRefusedConnections = true;
|
||||
};
|
||||
environment.systemPackages = with pkgs; [
|
||||
cryptsetup
|
||||
nfs-utils
|
||||
|
|
@ -15,6 +25,7 @@
|
|||
};
|
||||
|
||||
programs.light.enable = true;
|
||||
security.pam.services.swaylock = {};
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue