This commit is contained in:
2025-04-20 02:52:50 +03:00
parent bc2da7b287
commit d3e1c8712d
27 changed files with 265 additions and 93 deletions
Regular → Executable
View File
+83
View File
@@ -0,0 +1,83 @@
{
inputs,
outputs,
lib,
config,
pkgs,
...
}: {
imports = [
./hardware-configuration.nix
];
nixpkgs = {
overlays = [
# outputs.overlays.additions
outputs.overlays.modifications
outputs.overlays.unstable-packages
];
# Configure your nixpkgs instance
config = {
# Disable if you don't want unfree packages
allowUnfree = true;
};
};
# This will add each flake input as a registry
# To make nix3 commands consistent with your flake
nix.registry = (lib.mapAttrs (_: flake: {inherit flake;})) ((lib.filterAttrs (_: lib.isType "flake")) inputs);
# This will additionally add your inputs to the system's legacy channels
# Making legacy nix commands consistent as well, awesome!
nix.nixPath = ["/etc/nix/path"];
environment.etc =
lib.mapAttrs'
(name: value: {
name = "nix/path/${name}";
value.source = value.flake;
})
config.nix.registry;
nix.settings = {
experimental-features = "nix-command flakes";
auto-optimise-store = true;
};
# TODO: Set your hostname
networking.hostName = "your-hostname";
# TODO: This is just an example, be sure to use whatever bootloader you prefer
boot.loader.systemd-boot.enable = true;
users.users = {
# FIXME: Replace with your username
your-username = {
# TODO: You can set an initial password for your user.
# If you do, you can skip setting a root password by passing '--no-root-passwd' to nixos-install.
# Be sure to change it (using passwd) after rebooting!
initialPassword = "correcthorsebatterystaple";
isNormalUser = true;
openssh.authorizedKeys.keys = [
# TODO: Add your SSH public key(s) here, if you plan on using SSH to connect
];
# TODO: Be sure to add any other groups you need (such as networkmanager, audio, docker, etc)
extraGroups = ["wheel"];
};
};
# This setups a SSH server. Very important if you're setting up a headless system.
# Feel free to remove if you don't need it.
services.openssh = {
enable = true;
settings = {
# Forbid root login through SSH.
PermitRootLogin = "no";
# Use keys only. Remove if you want to SSH using password (not recommended)
PasswordAuthentication = false;
};
};
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
system.stateVersion = "23.05";
}
+106 -64
View File
@@ -1,83 +1,125 @@
{
inputs,
outputs,
lib,
config,
pkgs,
...
}: {
imports = [
./hardware-configuration.nix
];
# 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).
nixpkgs = {
overlays = [
# outputs.overlays.additions
outputs.overlays.modifications
outputs.overlays.unstable-packages
{ inputs, outputs, lib, config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
inputs.nixos-hardware.nixosModules.lenovo-thinkpad-t480
inputs.home-manager.nixosModules.home-manager
outputs.nixosModules
];
# Configure your nixpkgs instance
config = {
# Disable if you don't want unfree packages
allowUnfree = true;
};
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
nixpkgs = {
overlays = [
outputs.overlays.modifications
outputs.overlays.unstable-packages
inputs.azos-core.overlays.addpkgs
];
config = {
allowUnfree = true;
};
};
# This will add each flake input as a registry
# To make nix3 commands consistent with your flake
nix.registry = (lib.mapAttrs (_: flake: {inherit flake;})) ((lib.filterAttrs (_: lib.isType "flake")) inputs);
# This will additionally add your inputs to the system's legacy channels
# Making legacy nix commands consistent as well, awesome!
nix.nixPath = ["/etc/nix/path"];
environment.etc =
lib.mapAttrs'
(name: value: {
name = "nix/path/${name}";
value.source = value.flake;
})
config.nix.registry;
networking.hostName = "lauretta"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# Enable networking
networking.networkmanager.enable = true;
# Set your time zone.
time.timeZone = "Asia/Jerusalem";
# Select internationalisation properties.
i18n.defaultLocale = "en_IL";
i18n.extraLocaleSettings = {
LC_ADDRESS = "he_IL.UTF-8";
LC_IDENTIFICATION = "he_IL.UTF-8";
LC_MEASUREMENT = "he_IL.UTF-8";
LC_MONETARY = "he_IL.UTF-8";
LC_NAME = "he_IL.UTF-8";
LC_NUMERIC = "he_IL.UTF-8";
LC_PAPER = "he_IL.UTF-8";
LC_TELEPHONE = "he_IL.UTF-8";
LC_TIME = "he_IL.UTF-8";
};
# Configure keymap in X11
services.xserver.xkb = {
layout = "us,il";
variant = "";
};
# Configure console keymap
console.keyMap = "il";
# Define a user account. Don't forget to set a password with passwd.
users.users.aner = {
isNormalUser = true;
description = "Aner Zakobar";
extraGroups = [ "networkmanager" "wheel" ];
packages = with pkgs; [];
};
nix.settings = {
experimental-features = "nix-command flakes";
auto-optimise-store = true;
};
# TODO: Set your hostname
networking.hostName = "your-hostname";
# TODO: This is just an example, be sure to use whatever bootloader you prefer
boot.loader.systemd-boot.enable = true;
users.users = {
# FIXME: Replace with your username
your-username = {
# TODO: You can set an initial password for your user.
# If you do, you can skip setting a root password by passing '--no-root-passwd' to nixos-install.
# Be sure to change it (using passwd) after rebooting!
initialPassword = "correcthorsebatterystaple";
isNormalUser = true;
openssh.authorizedKeys.keys = [
# TODO: Add your SSH public key(s) here, if you plan on using SSH to connect
];
# TODO: Be sure to add any other groups you need (such as networkmanager, audio, docker, etc)
extraGroups = ["wheel"];
home-manager = {
extraSpecialArgs = {inherit inputs outputs; };
users = {
aner = import ../home-manager/home.nix;
};
};
# This setups a SSH server. Very important if you're setting up a headless system.
# Feel free to remove if you don't need it.
services.openssh = {
enable = true;
settings = {
# Forbid root login through SSH.
PermitRootLogin = "no";
# Use keys only. Remove if you want to SSH using password (not recommended)
PasswordAuthentication = false;
};
};
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
vim
git
tmux
];
fonts.enableDefaultPackages = true;
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
# programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
# };
# List services that you want to enable:
# Enable the OpenSSH daemon.
# services.openssh.enable = true;
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# 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. Its 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 = "24.11"; # Did you read the comment?
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
system.stateVersion = "23.05";
}
Regular → Executable
+40 -8
View File
@@ -1,10 +1,42 @@
# This is just an example, you should generate yours with nixos-generate-config and put it in here.
{
fileSystems."/" = {
device = "/dev/sda1";
fsType = "ext4";
};
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
# Set your system kind (needed for flakes)
nixpkgs.hostPlatform = "x86_64-linux";
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/d28f6c1d-f7ec-44a1-a59b-a598c7f136f7";
fsType = "btrfs";
options = [ "subvol=@" ];
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/BF2B-E467";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices =
[ { device = "/dev/disk/by-uuid/cea8ee1e-925c-4f5f-9ec8-7e39103d40da"; }
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}