modularized hosts creatorforge.nix

This commit is contained in:
specCon18 2023-04-18 02:42:12 -04:00
parent 38d653d2ff
commit 43ed213a93
14 changed files with 146 additions and 123 deletions

View file

@ -80,7 +80,9 @@
[
nixos-hardware.nixosModules.framework-12th-gen-intel
disko.nixosModules.disko
./hosts/creatorforge.nix
./hosts/creatorforge/creatorforge.nix
./hosts/creatorforge/networkd.nix
./hosts/creatorforge/system-pkgs.nix
./modules/system/services/docker.nix
./modules/system/services/openssh.nix
./modules/system/desktop-environments/gnome.nix
@ -92,6 +94,14 @@
./modules/home-manager/vscode.nix
./modules/home-manager/zsh.nix
./modules/home-manager/git.nix
./modules/home-manager/zoxide.nix
./modules/home-manager/ncspot.nix
./modules/home-manager/zellij.nix
./modules/home-manager/nushell.nix
./modules/home-manager/direnv.nix
./modules/home-manager/home-manager.nix
./modules/home-manager/starship.nix
./modules/home-manager/dconf-settings.nix
]; #extra modules to be loaded by home-manager
};
};

View file

@ -1,64 +0,0 @@
{ modulesPath, config, pkgs, lib, self, ... }:
{
system.stateVersion = "22.11";
time.timeZone = "America/Detroit";
# Allow non opensource software to be installed
nixpkgs.config.allowUnfree = true;
nix = {
## NIX FLAKES ##
package = pkgs.nixUnstable; # or versioned attributes like nix_2_4
# enable flakes
extraOptions = ''experimental-features = nix-command flakes'';
# auto maintainence
settings.auto-optimise-store = lib.mkDefault true;
# prevent tampering
readOnlyStore = true;
# garbage collections
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d";
};
};
# base packages
environment.systemPackages = with pkgs; [
ripgrep
tree
cargo
feh
unrar
unzip
gzip
p7zip
bzip2
dconf2nix
rustc
bat
exa
mdbook
uutils-coreutils
htop
zsh
tailscale
dig #dns lookup
rage #file encryption
age-plugin-yubikey #plugin for rage to manage yubi-2fa
sops #file based secrets operations
direnv #used for development environments
python39
] ++ [self.inputs.devenv.packages.x86_64-linux.devenv];
networking = {
hostName = "creatorforge"; # Define your hostname.
useDHCP = lib.mkForce true;
firewall = {
enable = true;
allowedTCPPorts = [];
allowedUDPPorts = [];
checkReversePath = "loose";
};
};
}

View file

@ -0,0 +1,27 @@
{ modulesPath, config, pkgs, lib, self, ... }:
{
# Sets the default version to track for system-pkgs
system.stateVersion = "22.11";
# Set the default timezone
time.timeZone = lib.mkDefault "America/Detroit";
# Allow non opensource software to be installed
nixpkgs.config.allowUnfree = true;
# NixOS Settings
nix = {
# Sets flakes to unstable track instead of stable #
package = pkgs.nixUnstable; # or versioned attributes like nix_2_4
# Enable flakes and nix-command
extraOptions = ''experimental-features = nix-command flakes'';
# Auto maintainence
settings.auto-optimise-store = lib.mkDefault true;
# Prevent tampering of the pkgstore
readOnlyStore = true;
# Garbage collection
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d";
};
};
}

View file

@ -0,0 +1,13 @@
{ modulesPath, config, pkgs, lib, self, ... }:
{
networking = {
hostName = "creatorforge"; # Define your hostname.
useDHCP = lib.mkForce true;
firewall = {
enable = true;
allowedTCPPorts = [];
allowedUDPPorts = [];
checkReversePath = "loose";
};
};
}

View file

@ -0,0 +1,29 @@
{ modulesPath, config, pkgs, lib, self, ... }:
{
environment.systemPackages = with pkgs; [
ripgrep
tree
cargo
feh
unrar
unzip
gzip
p7zip
bzip2
dconf2nix
rustc
bat
exa
mdbook
uutils-coreutils
htop
zsh
tailscale
dig #dns lookup
rage #file encryption
age-plugin-yubikey #plugin for rage to manage yubi-2fa
sops #file based secrets operations
direnv #used for development environments
python39
];
}

View file

@ -0,0 +1,16 @@
{ pkgs, config, lib, ...}:
{
dconf = {
enable = true;
settings = {
"org/gnome/mutter" = {
attach-modal-dialogs = true;
dynamic-workspaces = true;
edge-tiling = false;
experimental-features = [ "scale-monitor-framebuffer" ];
focus-change-on-pointer-rest = true;
workspaces-only-on-primary = true;
};
};
};
}

View file

@ -0,0 +1,7 @@
{ pkgs, config, lib, ...}:
{
programs.direnv = {
enable = true;
enableZshIntegration = lib.mkDefault true;
};
}

View file

@ -0,0 +1,6 @@
{ pkgs, config, lib, ...}:
{
programs.home-manager = {
enable = true;
};
}

View file

@ -0,0 +1,7 @@
{ pkgs, config, lib, ...}:
{
programs.ncspot = {
enable = true;
package = pkgs.ncspot;
};
}

View file

@ -0,0 +1,6 @@
{ pkgs, config, lib, ...}:
{
programs.nushell = {
enable = false;
};
}

View file

@ -0,0 +1,8 @@
{ pkgs, config, lib, ...}:
{
programs.starship = {
enable = true;
enableZshIntegration = true;
enableNushellIntegration = false;
};
}

View file

@ -0,0 +1,7 @@
{ pkgs, config, lib, ...}:
{
programs.zellij = {
enable = true;
package = pkgs.zellij;
};
}

View file

@ -0,0 +1,8 @@
{ pkgs, config, lib, ...}:
{
programs.zoxide = {
enable = true;
enableZshIntegration = lib.mkDefault true;
# enableNushellIntegration = false;
};
}

View file

@ -31,62 +31,5 @@
xplr
broot
];
};
programs = {
zoxide = {
enable = true;
enableZshIntegration = lib.mkDefault true;
# enableNushellIntegration = false;
};
ncspot = {
enable = true;
package = pkgs.ncspot;
};
zellij = {
enable = true;
package = pkgs.zellij;
};
nushell = {
enable = false;
};
starship = {
enable = true;
enableZshIntegration = true;
enableNushellIntegration = false;
};
direnv = {
enable = true;
enableZshIntegration = lib.mkDefault true;
};
home-manager = {
enable = true;
};
git = {
enable = true;
userName = "specCon18";
userEmail = "steven.carpenter@skdevstudios.com";
extraConfig = {
init = {
defaultBranch = "main";
};
};
};
};
dconf = {
enable = true;
settings = {
"org/gnome/mutter" = {
attach-modal-dialogs = true;
dynamic-workspaces = true;
edge-tiling = false;
experimental-features = [ "scale-monitor-framebuffer" ];
focus-change-on-pointer-rest = true;
workspaces-only-on-primary = true;
};
};
};
};
}