Initial commit of new configuration
This commit is contained in:
commit
3f3ec1c47c
17 changed files with 278 additions and 0 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
nixos/result
|
43
configuration.nix
Normal file
43
configuration.nix
Normal file
|
@ -0,0 +1,43 @@
|
|||
# Master configuration file
|
||||
{ config, pkgs, ... }:
|
||||
let
|
||||
# User configurations are stored under ./user/[username].nix
|
||||
# Set the corresponding value in ./username.nix
|
||||
user = import ./username.nix;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./users/${user}.nix
|
||||
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
|
||||
# Uncomment the profile you want to use
|
||||
./profiles/workstation.nix
|
||||
];
|
||||
|
||||
# General NixOS configuration
|
||||
nix = {
|
||||
settings.auto-optimise-store = true;
|
||||
# Automatically remove generations older than a week
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 7d";
|
||||
};
|
||||
};
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# Use the unstable channel
|
||||
system.autoUpgrade = {
|
||||
enable = true;
|
||||
channel = "https://nixos.org/channels/nixos-unstable";
|
||||
};
|
||||
|
||||
# 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";
|
||||
}
|
||||
|
11
environments/plasma.nix
Normal file
11
environments/plasma.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../sets/base/plasma.nix
|
||||
];
|
||||
|
||||
services.xserver.enable = true;
|
||||
services.xserver.displayManager.sddm.enable = true;
|
||||
services.xserver.desktopManager.plasma5.enable = true;
|
||||
}
|
43
hardware-configuration.nix
Normal file
43
hardware-configuration.nix
Normal file
|
@ -0,0 +1,43 @@
|
|||
# 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 =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/56ec7666-a2ea-4e77-9015-00151b9b7884";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@" ];
|
||||
};
|
||||
|
||||
fileSystems."/boot/efi" =
|
||||
{ device = "/dev/disk/by-uuid/F076-283D";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
fileSystems."/mnt/vault" = {
|
||||
device = "/dev/disk/by-uuid/048d175b-0e3e-4ec7-955b-3d9a45f9f237";
|
||||
fsType = "xfs";
|
||||
};
|
||||
|
||||
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.enp34s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
2
profile.nix
Normal file
2
profile.nix
Normal file
|
@ -0,0 +1,2 @@
|
|||
# Select profile from ./profiles/ directory
|
||||
"workstation"
|
69
profiles/workstation.nix
Normal file
69
profiles/workstation.nix
Normal file
|
@ -0,0 +1,69 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
# Environments
|
||||
../environments/plasma.nix # KDE/Plasma
|
||||
# ../environments/hyprland.nix # Todo
|
||||
|
||||
# Package sets
|
||||
../sets/base/common.nix
|
||||
../sets/drivers/nvidia.nix
|
||||
../sets/drivers/tablet.nix
|
||||
../sets/base/devel.nix
|
||||
../sets/graphics/art.nix
|
||||
../sets/graphics/video.nix
|
||||
];
|
||||
|
||||
# Bootloader
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.loader.efi.efiSysMountPoint = "/boot/efi";
|
||||
|
||||
# Hostname
|
||||
networking.hostName = "nixos";
|
||||
|
||||
# Networking
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# Timezone
|
||||
time.timeZone = "Europe/Berlin";
|
||||
|
||||
# Locale
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
console.keyMap = "uk";
|
||||
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";
|
||||
};
|
||||
|
||||
services.xserver = {
|
||||
layout = "gb";
|
||||
xkbVariant = "";
|
||||
};
|
||||
|
||||
# Nvidia
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
hardware.opengl.enable = true;
|
||||
hardware.nvidia.modesetting.enable = true;
|
||||
|
||||
# Enable audio
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
};
|
||||
}
|
||||
|
11
sets/base/common.nix
Normal file
11
sets/base/common.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
neovim
|
||||
firefox
|
||||
neofetch
|
||||
tree
|
||||
];
|
||||
}
|
||||
|
9
sets/base/devel.nix
Normal file
9
sets/base/devel.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../devel/git.nix
|
||||
../devel/c.nix
|
||||
];
|
||||
}
|
||||
|
7
sets/base/plasma.nix
Normal file
7
sets/base/plasma.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
kate
|
||||
];
|
||||
}
|
11
sets/devel/c.nix
Normal file
11
sets/devel/c.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
gcc
|
||||
clang
|
||||
clang-tools
|
||||
gnumake
|
||||
];
|
||||
}
|
||||
|
7
sets/devel/git.nix
Normal file
7
sets/devel/git.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
git
|
||||
];
|
||||
}
|
8
sets/drivers/nvidia.nix
Normal file
8
sets/drivers/nvidia.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
hardware.opengl.enable = true;
|
||||
hardware.nvidia.modesetting.enable = true;
|
||||
}
|
||||
|
7
sets/drivers/tablet.nix
Normal file
7
sets/drivers/tablet.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
hardware.opentabletdriver.enable = true;
|
||||
hardware.opentabletdriver.daemon.enable = true;
|
||||
}
|
||||
|
9
sets/graphics/art.nix
Normal file
9
sets/graphics/art.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
krita
|
||||
gimp
|
||||
];
|
||||
}
|
||||
|
8
sets/graphics/video.nix
Normal file
8
sets/graphics/video.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
kdenlive
|
||||
];
|
||||
}
|
||||
|
2
username.nix
Normal file
2
username.nix
Normal file
|
@ -0,0 +1,2 @@
|
|||
# Select user from the ./users/ directory
|
||||
"user"
|
30
users/user.nix
Normal file
30
users/user.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
];
|
||||
|
||||
users.users.user = {
|
||||
isNormalUser = true;
|
||||
description = "user";
|
||||
extraGroups = [
|
||||
"wheel"
|
||||
"networkmanager"
|
||||
"audio"
|
||||
"video"
|
||||
"docker"
|
||||
"plugdev"
|
||||
];
|
||||
};
|
||||
|
||||
# Set to false to disable sudo password prompt
|
||||
security = {
|
||||
sudo.wheelNeedsPassword = true;
|
||||
};
|
||||
|
||||
# home-manager.users.user = {
|
||||
# home.stateVersion = "22.11";
|
||||
# };
|
||||
|
||||
# programs.home-manager.enable = true;
|
||||
}
|
||||
|
Loading…
Reference in a new issue