outsource info folderstructure
This commit is contained in:
parent
baeec4b172
commit
93a98931ef
101
common/configuration.nix
Normal file
101
common/configuration.nix
Normal file
@ -0,0 +1,101 @@
|
||||
# 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’).
|
||||
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
./modules/packages.nix
|
||||
];
|
||||
|
||||
# Bootloader.
|
||||
boot.loader = {
|
||||
systemd-boot.enable = true;
|
||||
efi.canTouchEfiVariables = true;
|
||||
};
|
||||
|
||||
# newest kernel
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
networking.hostName = "nixos"; # 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 = "Europe/Vienna";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "de_AT.UTF-8";
|
||||
LC_IDENTIFICATION = "de_AT.UTF-8";
|
||||
LC_MEASUREMENT = "de_AT.UTF-8";
|
||||
LC_MONETARY = "de_AT.UTF-8";
|
||||
LC_NAME = "de_AT.UTF-8";
|
||||
LC_NUMERIC = "de_AT.UTF-8";
|
||||
LC_PAPER = "de_AT.UTF-8";
|
||||
LC_TELEPHONE = "de_AT.UTF-8";
|
||||
LC_TIME = "de_AT.UTF-8";
|
||||
};
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
services.xserver.enable = true;
|
||||
|
||||
# Enable the GNOME Desktop Environment.
|
||||
services.xserver.displayManager.gdm.enable = true;
|
||||
services.xserver.desktopManager.gnome.enable = true;
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver = {
|
||||
layout = "at";
|
||||
xkbVariant = "";
|
||||
};
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
|
||||
# Enable sound with pipewire.
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.lukas = {
|
||||
isNormalUser = true;
|
||||
description = "Lukas Heiligenbrunner";
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
};
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
users.defaultUserShell = pkgs.zsh;
|
||||
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
|
||||
# automatically delete older generations and keep last 5
|
||||
nix.settings.auto-optimise-store = true;
|
||||
nix.gc.automatic = true;
|
||||
nix.gc.dates = "daily";
|
||||
nix.gc.options = "--delete-older-than +5";
|
||||
|
||||
# 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. It‘s 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 = "23.05"; # Did you read the comment?
|
||||
|
||||
}
|
40
common/home-root.nix
Normal file
40
common/home-root.nix
Normal file
@ -0,0 +1,40 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[];
|
||||
|
||||
home.username = "root";
|
||||
home.homeDirectory = "/root";
|
||||
home.stateVersion = "23.11";
|
||||
|
||||
# set git names
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "Lukas Heiligenbrunner";
|
||||
userEmail = "lukas.heiligenbrunner@gmail.com";
|
||||
};
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
shellAliases = {
|
||||
ll = "ls -l";
|
||||
up = "nix flake update && nixos-rebuild switch --flake .#main";
|
||||
};
|
||||
history = {
|
||||
path = "${config.xdg.dataHome}/zsh/history";
|
||||
size = 10000;
|
||||
};
|
||||
|
||||
initExtra = ''
|
||||
source /home/lukas/.p10k.zsh
|
||||
'';
|
||||
plugins = [
|
||||
{
|
||||
name = "powerlevel10k";
|
||||
src = pkgs.zsh-powerlevel10k;
|
||||
file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
133
common/home.nix
Normal file
133
common/home.nix
Normal file
@ -0,0 +1,133 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[];
|
||||
|
||||
home.username = "lukas";
|
||||
home.homeDirectory = "/home/lukas";
|
||||
home.stateVersion = "23.11";
|
||||
|
||||
# set several gnome settings options
|
||||
dconf.settings = {
|
||||
"org/gnome/desktop/interface" = {
|
||||
color-scheme = "prefer-dark";
|
||||
enable-hot-corners = true;
|
||||
clock-show-seconds = true;
|
||||
show-battery-percentage = true;
|
||||
scaling-factor = 1.25;
|
||||
};
|
||||
"org/gnome/mutter" = {
|
||||
dynamic-workspaces = true;
|
||||
edge-tiling = true;
|
||||
};
|
||||
"org/gnome/shell" = {
|
||||
favorite-apps = ["org.gnome.Nautilus.desktop" "gnome-system-monitor.desktop" "firefox.desktop" "org.gnome.Console.desktop"];
|
||||
|
||||
# set extensions
|
||||
disable-user-extensions = false;
|
||||
|
||||
# `gnome-extensions list` for a list
|
||||
enabled-extensions = [
|
||||
"Vitals@CoreCoding.com"
|
||||
"tiling-assistant@leleat-on-github"
|
||||
];
|
||||
|
||||
};
|
||||
|
||||
"org/gnome/shell/extensions/tiling-assistant" = {
|
||||
enable-tiling-popup = false;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
#sound
|
||||
dconf.settings = {
|
||||
"org/gnome/settings-daemon/plugins/media-keys" = {
|
||||
volume-step = 3;
|
||||
};
|
||||
"org/gnome/settings-daemon/plugins/power" = {
|
||||
sleep-inactive-battery-type = "nothing";
|
||||
sleep-inactive-ac-type = "nothing";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
# nautilus settings
|
||||
dconf.settings = {
|
||||
"org/gnome/nautilus/preferences" = {
|
||||
default-folder-viewer = "list-view";
|
||||
};
|
||||
"org/gnome/nautilus/list-view" = {
|
||||
default-zoom-level = "small";
|
||||
};
|
||||
};
|
||||
|
||||
# set git names
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "Lukas Heiligenbrunner";
|
||||
userEmail = "lukas.heiligenbrunner@gmail.com";
|
||||
};
|
||||
|
||||
dconf.settings = {
|
||||
"org/gnome/desktop/background" = {
|
||||
picture-uri = "/home/lukas/.background-image";
|
||||
picture-uri-dark = "/home/lukas/.background-image";
|
||||
};
|
||||
};
|
||||
|
||||
home.file.".background-image" = {
|
||||
source = ./resources/background-hogwartslegacy.png;
|
||||
};
|
||||
|
||||
# touchpad stuff
|
||||
dconf.settings = {
|
||||
"org/gnome/desktop/peripherals/touchpad" = {
|
||||
natural-scroll = false;
|
||||
tap-to-click = true;
|
||||
};
|
||||
};
|
||||
|
||||
# texteditor
|
||||
dconf.settings = {
|
||||
"org/gnome/TextEditor" = {
|
||||
show-grid = true;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
# gnome extensions
|
||||
home.packages = with pkgs; [
|
||||
gnomeExtensions.vitals
|
||||
gnomeExtensions.tiling-assistant
|
||||
];
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
shellAliases = {
|
||||
ll = "ls -l";
|
||||
};
|
||||
history = {
|
||||
path = "${config.xdg.dataHome}/zsh/history";
|
||||
size = 10000;
|
||||
};
|
||||
|
||||
initExtra = ''
|
||||
source .p10k.zsh
|
||||
'';
|
||||
plugins = [
|
||||
{
|
||||
name = "powerlevel10k";
|
||||
src = pkgs.zsh-powerlevel10k;
|
||||
file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
home.file.".p10k.zsh" = {
|
||||
source = ./resources/.p10k.zsh;
|
||||
};
|
||||
}
|
68
common/modules/packages.nix
Normal file
68
common/modules/packages.nix
Normal file
@ -0,0 +1,68 @@
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[];
|
||||
|
||||
# packages to exclude from default gnome
|
||||
environment.gnome.excludePackages = (with pkgs; [
|
||||
gnome-photos
|
||||
gnome-tour
|
||||
]) ++ (with pkgs.gnome; [
|
||||
gnome-music
|
||||
yelp # help viewer
|
||||
epiphany # web browser
|
||||
geary # email reader
|
||||
totem # video player
|
||||
tali # poker game
|
||||
iagno # go game
|
||||
hitori # sudoku game
|
||||
atomix # puzzle game
|
||||
]);
|
||||
|
||||
# disable xterm
|
||||
services.xserver.excludePackages = [ pkgs.xterm ];
|
||||
services.fwupd.enable = true;
|
||||
# For fingerprint support
|
||||
programs.steam.enable = true;
|
||||
programs.zsh.enable = true;
|
||||
|
||||
# packages in global env
|
||||
environment.systemPackages = with pkgs; [
|
||||
# system utilities
|
||||
wget
|
||||
scrcpy
|
||||
cmake
|
||||
lm_sensors
|
||||
smartmontools
|
||||
powertop
|
||||
|
||||
# web
|
||||
firefox
|
||||
|
||||
# development
|
||||
openscad
|
||||
vscode
|
||||
git
|
||||
flutter
|
||||
prusa-slicer
|
||||
rustup
|
||||
jetbrains.idea-ultimate
|
||||
kicad
|
||||
rstudio
|
||||
R
|
||||
|
||||
# multimedia
|
||||
vlc
|
||||
gimp
|
||||
zoom-us
|
||||
|
||||
# file transfer
|
||||
warp
|
||||
|
||||
# gui utilities
|
||||
pdfarranger
|
||||
diebahn
|
||||
appflowy
|
||||
];
|
||||
}
|
1732
common/resources/.p10k.zsh
Normal file
1732
common/resources/.p10k.zsh
Normal file
File diff suppressed because it is too large
Load Diff
BIN
common/resources/background-hogwartslegacy.png
Normal file
BIN
common/resources/background-hogwartslegacy.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 11 MiB |
16
flake.nix
16
flake.nix
@ -8,9 +8,12 @@
|
||||
# import homemanager
|
||||
home-manager.url = "github:nix-community/home-manager";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
#nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
||||
nixos-hardware.url = "github:kjhoerr/nixos-hardware/fw13-7040";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, home-manager }:
|
||||
outputs = { self, nixpkgs, home-manager, nixos-hardware }:
|
||||
let
|
||||
system="x86_64-linux";
|
||||
pkgs = import nixpkgs {
|
||||
@ -20,19 +23,22 @@
|
||||
lib = nixpkgs.lib;
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
main = lib.nixosSystem {
|
||||
laptop = lib.nixosSystem {
|
||||
inherit system;
|
||||
modules = [
|
||||
./configuration.nix
|
||||
nixos-hardware.nixosModules.framework-13-7040-amd
|
||||
|
||||
./common/configuration.nix
|
||||
./laptop/hardware-configuration.nix
|
||||
|
||||
home-manager.nixosModules.home-manager {
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.lukas = {
|
||||
imports = [ ./home.nix ];
|
||||
imports = [ ./common/home.nix ];
|
||||
};
|
||||
home-manager.users.root = {
|
||||
imports = [ ./home-root.nix ];
|
||||
imports = [ ./common/home-root.nix ];
|
||||
};
|
||||
}
|
||||
];
|
||||
|
38
laptop/hardware-configuration.nix
Normal file
38
laptop/hardware-configuration.nix
Normal file
@ -0,0 +1,38 @@
|
||||
# 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" "thunderbolt" "usb_storage" "usbhid" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/c4b4ecd9-d7bb-4888-9652-a57aea10e8cd";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/6F72-E139";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
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.eth0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp1s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
Loading…
Reference in New Issue
Block a user