mirror of
https://github.com/Nickiel12/nicks-nix-config.git
synced 2024-11-22 20:59:32 -08:00
feat: added the scaffold for a future server
This commit is contained in:
parent
b9f6175bf0
commit
ab16f394b7
4 changed files with 99 additions and 0 deletions
|
@ -42,6 +42,18 @@ in {
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
NixsServer = lib.nixosSystem {
|
||||||
|
inherit system;
|
||||||
|
specialArgs = { inherit user; };
|
||||||
|
modules = [
|
||||||
|
./nixsserver
|
||||||
|
./nixsserver/configuration.nix
|
||||||
|
{
|
||||||
|
networking.hostName = "NicksServer";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
NicksNixVMBox = lib.nixosSystem {
|
NicksNixVMBox = lib.nixosSystem {
|
||||||
inherit system;
|
inherit system;
|
||||||
specialArgs = { inherit user; };
|
specialArgs = { inherit user; };
|
||||||
|
|
63
hosts/nixsserver/configuration.nix
Normal file
63
hosts/nixsserver/configuration.nix
Normal file
|
@ -0,0 +1,63 @@
|
||||||
|
# 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, lib, pkgs, user, inputs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
boot.supportedFilesystems = [ "nfts" ];
|
||||||
|
|
||||||
|
boot.loader.systemd-boot.configurationLimit = 5;
|
||||||
|
|
||||||
|
nix.settings.auto-optimise-store = true;
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
system.autoUpgrade.enable = true;
|
||||||
|
nix.gc = {
|
||||||
|
automatic = true;
|
||||||
|
options = "--delete-generations 8d";
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.zsh.enable = true;
|
||||||
|
users.users.${user} = {
|
||||||
|
isNormalUser = true;
|
||||||
|
extraGroups = [ "wheel" "video" "audio" "networkmanager" "lp" "scanner" "input" "uinput" ];
|
||||||
|
shell = pkgs.zsh;
|
||||||
|
password = "password";
|
||||||
|
};
|
||||||
|
|
||||||
|
time.timeZone = "America/Los_Angeles";
|
||||||
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
|
console = {
|
||||||
|
font = "Lat2-Terminus16";
|
||||||
|
useXkbConfig = true; # use xkbOptions in tty.
|
||||||
|
};
|
||||||
|
|
||||||
|
sound = {
|
||||||
|
enable = false;
|
||||||
|
mediaKeys.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
security.rtkit.enable = true;
|
||||||
|
services.pipewire = {
|
||||||
|
enable = true;
|
||||||
|
alsa.enable = true;
|
||||||
|
alsa.support32Bit = true;
|
||||||
|
pulse.enable = true;
|
||||||
|
#jack.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
nix = {
|
||||||
|
package = pkgs.nixVersions.stable;
|
||||||
|
extraOptions = "experimental-features = nix-command flakes";
|
||||||
|
};
|
||||||
|
|
||||||
|
# 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. It‘s 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 = "22.05"; # Did you read the comment?
|
||||||
|
|
||||||
|
}
|
5
hosts/nixsserver/containers/default.nix
Normal file
5
hosts/nixsserver/containers/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
19
hosts/nixsserver/default.nix
Normal file
19
hosts/nixsserver/default.nix
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [ (import ./hardware-configuration.nix) ];
|
||||||
|
|
||||||
|
boot.loader = {
|
||||||
|
efi = {
|
||||||
|
canTouchEfiVariables = true;
|
||||||
|
efiSysMountPoint = "/boot";
|
||||||
|
};
|
||||||
|
grub = {
|
||||||
|
devices = [ "nodev" ];
|
||||||
|
efiSupport = true;
|
||||||
|
enable = true;
|
||||||
|
version = 2;
|
||||||
|
useOSProber = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue