mirror of
https://github.com/zephrynis/nix-flake.git
synced 2026-02-18 20:21:53 +00:00
Add initial Nix flake configuration for PC and Laptop with Home Manager support
- Create flake.nix to define NixOS configurations for PC and Laptop - Add README.md with setup instructions and layout overview - Implement common NixOS settings in modules/common.nix - Configure Home Manager for user-specific settings in home/users/user/home.nix - Set up hardware configurations for both PC and Laptop - Enable Home Manager integration in host configurations - Introduce Zen Browser package definition
This commit is contained in:
61
modules/common.nix
Normal file
61
modules/common.nix
Normal file
@@ -0,0 +1,61 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
nix = {
|
||||
settings = {
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
auto-optimise-store = true;
|
||||
};
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 14d";
|
||||
};
|
||||
};
|
||||
|
||||
time.timeZone = "UTC";
|
||||
|
||||
i18n = {
|
||||
defaultLocale = "en_US.UTF-8";
|
||||
extraLocaleSettings = {
|
||||
LC_TIME = "en_US.UTF-8";
|
||||
LC_MONETARY = "en_US.UTF-8";
|
||||
LC_NUMERIC = "en_US.UTF-8";
|
||||
LC_MEASUREMENT = "en_US.UTF-8";
|
||||
LC_PAPER = "en_US.UTF-8";
|
||||
};
|
||||
};
|
||||
|
||||
console = {
|
||||
keyMap = "us";
|
||||
earlySetup = true;
|
||||
};
|
||||
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
PasswordAuthentication = false;
|
||||
KbdInteractiveAuthentication = false;
|
||||
PermitRootLogin = "no";
|
||||
};
|
||||
};
|
||||
|
||||
security.sudo.wheelNeedsPassword = false;
|
||||
|
||||
users.defaultUserShell = pkgs.bashInteractive; # change to zsh if preferred
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
alakritty
|
||||
# Custom Zen Browser package (defined in ../packages/zen-browser.nix)
|
||||
(pkgs.callPackage ../packages/zen-browser.nix { inherit (pkgs) buildMozillaMach buildNpmPackage fetchFromGitHub lib fetchurl git pkg-config python3 vips runtimeShell writeScriptBin; })
|
||||
];
|
||||
|
||||
# Allow proprietary software if needed
|
||||
nixpkgs.config = {
|
||||
allowUnfree = true;
|
||||
};
|
||||
|
||||
# Set the minimal stateVersion. When you upgrade, bump per host.
|
||||
system.stateVersion = "24.05"; # do not change without reading the manual
|
||||
}
|
||||
Reference in New Issue
Block a user