initial nix setum with Nina :3

This commit is contained in:
CDaut 2024-02-23 00:18:39 +01:00
commit e0b88992f5
Signed by: clara
GPG key ID: 223391B52FAD4463
6 changed files with 212 additions and 0 deletions

95
configuration.nix Normal file
View file

@ -0,0 +1,95 @@
{ config, pkgs, ... }:
{
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
imports =
[ # Include the results of the hardware scan.
./vm_hardware-configuration.nix
];
# Bootloader.
boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/sda";
boot.loader.grub.useOSProber = true;
networking.hostName = "nixpad"; # Define your hostname.
# Enable networking
networking.networkmanager.enable = true;
# Set your time zone.
time.timeZone = "Europe/Berlin";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "de_DE.UTF-8";
LC_IDENTIFICATION = "de_DE.UTF-8";
LC_MEASUREMENT = "de_DE.UTF-8";
LC_MONETARY = "de_DE.UTF-8";
LC_NAME = "de_DE.UTF-8";
LC_NUMERIC = "de_DE.UTF-8";
LC_PAPER = "de_DE.UTF-8";
LC_TELEPHONE = "de_DE.UTF-8";
LC_TIME = "de_DE.UTF-8";
};
# Configure keymap in X11
services.xserver = {
layout = "de";
xkbVariant = "";
enable = true;
displayManager = {
defaultSession = "none+i3";
};
windowManager.i3 = {
enable = true;
package = pkgs.i3-gaps;
extraPackages = with pkgs; [
dmenu
];
};
};
# Configure console keymap
console.keyMap = "de";
# Define a user account. Don't forget to set a password with passwd.
users.users.clemens = {
isNormalUser = true;
description = "clemens";
initialPassword = "123456";
extraGroups = [ "networkmanager" "wheel" ];
packages = with pkgs; [];
};
# home manager
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.clemens = import ./home.nix;
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# systemwide packages
environment.systemPackages = with pkgs; [
vim
wget
];
# 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.05"; # Did you read the comment?
}

21
flake.nix Normal file
View file

@ -0,0 +1,21 @@
{
description = "Flake to manage local systems";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = inputs@{ nixpkgs, home-manager, ... }: {
nixosConfigurations = {
laptop = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./configuration.nix
home-manager.nixosModules.home-manager
];
};
};
};
}

7
git.nix Normal file
View file

@ -0,0 +1,7 @@
{pkgs, ...}: {
programs.git = {
enable = true;
userName = "CDaut";
userEmail = "git@cdaut.de";
};
}

47
home.nix Normal file
View file

@ -0,0 +1,47 @@
{ config, pkgs, ... }:
let
tex = (pkgs.texlive.combine {
inherit (pkgs.texlive) scheme-full;
});
in
{
# Home Manager needs a bit of information about you and the paths it should
# manage.
home.username = "clemens";
home.homeDirectory = "/home/clemens";
# This value determines the Home Manager release that your configuration is
# compatible with. This helps avoid breakage when a new Home Manager release
# introduces backwards incompatible changes.
#
# You should not change this value, even if you update Home Manager. If you do
# want to update the value, then make sure to first check the Home Manager
# release notes.
home.stateVersion = "24.05"; # Please read the comment before changing.
imports = [
./git.nix
./vscode.nix
];
# The home.packages option allows you to install Nix packages into your
# environment.
home.packages = with pkgs; [
zsh
alacritty
polybar
firefox
tex
jetbrains.idea-ultimate
];
# dotfiles
home.file = {
};
# envars
home.sessionVariables = {
EDITOR = "vim";
};
}

View file

@ -0,0 +1,31 @@
# 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, ... }:
{
imports = [ ];
boot.initrd.availableKernelModules = [ "ata_piix" "ohci_pci" "ehci_pci" "sd_mod" "sr_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/1874c90c-9363-4f50-a82d-1883862123c8";
fsType = "ext4";
};
swapDevices = [ ];
# 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.enp0s3.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
virtualisation.virtualbox.guest.enable = true;
virtualisation.virtualbox.guest.x11 = true;
}

11
vscode.nix Normal file
View file

@ -0,0 +1,11 @@
{pkgs, ...} :
{
programs.vscode = {
enable = true;
package = pkgs.vscodium;
extensions = with pkgs.vscode-extensions; [
bbenoist.nix
james-yu.latex-workshop
];
};
}