Whatever
This commit is contained in:
parent
3d0a294785
commit
347b20d668
17 changed files with 298 additions and 16 deletions
33
README.md
Normal file
33
README.md
Normal file
|
@ -0,0 +1,33 @@
|
|||
Structure:
|
||||
|
||||
|-.nix-config
|
||||
|-hosts
|
||||
|
|
||||
|-home
|
||||
|
|
||||
|-willifan
|
||||
|-default.nix
|
||||
|-git.nix
|
||||
|-ssh.nix
|
||||
|-zsh.nix
|
||||
|
|
||||
|-graphical
|
||||
|-default.nix
|
||||
|-firefox.nix
|
||||
|-kitty.nix
|
||||
|-thunderbird.nix
|
||||
|
|
||||
|-dev
|
||||
| |-default.nix
|
||||
| |-vscodium.nix
|
||||
|
|
||||
|-hyprland
|
||||
| |-default.nix
|
||||
| |-hypridle.nix
|
||||
| |-hyprland.nix
|
||||
| |-kanshi.nix
|
||||
|
|
||||
|-theme
|
||||
|-default.nix
|
||||
|-gtk.nix
|
||||
|-qt.nix
|
|
@ -35,8 +35,8 @@
|
|||
modules = [
|
||||
# Import the previous configuration.nix we used,
|
||||
# so the old configuration file still takes effect
|
||||
./configuration.nix
|
||||
|
||||
./hosts/common
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
|
@ -47,7 +47,6 @@
|
|||
# Optionally, use home-manager.extraSpecialArgs to pass arguments to home.nix
|
||||
}
|
||||
|
||||
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
46
hosts/common/applications.nix
Normal file
46
hosts/common/applications.nix
Normal file
|
@ -0,0 +1,46 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
|
||||
hyprlock
|
||||
hypridle
|
||||
hyprpaper
|
||||
hyprcursor
|
||||
grim
|
||||
slurp
|
||||
wl-clipboard
|
||||
kanshi
|
||||
jq
|
||||
bc
|
||||
xorg.xrandr
|
||||
pulseaudio
|
||||
inotify-tools
|
||||
papirus-icon-theme
|
||||
eww
|
||||
mako
|
||||
polkit_gnome
|
||||
|
||||
python3
|
||||
usbutils
|
||||
unzip
|
||||
|
||||
btop
|
||||
|
||||
feh
|
||||
|
||||
kitty
|
||||
dolphin
|
||||
hyfetch
|
||||
wofi
|
||||
enpass
|
||||
firefox
|
||||
thunderbird
|
||||
webcord
|
||||
obsidian
|
||||
kicad
|
||||
gnome.nautilus
|
||||
cinnamon.nemo-with-extensions
|
||||
|
||||
|
||||
];
|
||||
}
|
16
hosts/common/auto-cpufreq.nix
Normal file
16
hosts/common/auto-cpufreq.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
services.auto-cpufreq = {
|
||||
enable = true;
|
||||
settings = {
|
||||
battery = {
|
||||
governor = "powersave";
|
||||
turbo = "never";
|
||||
};
|
||||
charger = {
|
||||
governor = "powersave";
|
||||
turbo = "never";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
31
hosts/common/boot.nix
Normal file
31
hosts/common/boot.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
boot = {
|
||||
loader.systemd-boot.enable = true;
|
||||
loader.efi.canTouchEfiVariables = true;
|
||||
initrd.systemd.enable = true;
|
||||
plymouth = {
|
||||
enable = true;
|
||||
theme = "bgrt";
|
||||
logo = "${pkgs.nixos-icons}/share/icons/hicolor/48x48/apps/nix-snowflake-white.png";
|
||||
font = "${pkgs.dejavu_fonts.minimal}/share/fonts/truetype/DejaVuSans.ttf";
|
||||
};
|
||||
|
||||
consoleLogLevel = 0;
|
||||
initrd.verbose = false;
|
||||
kernelParams = [
|
||||
"quiet"
|
||||
"splash"
|
||||
"boot.shell_on_fail"
|
||||
"loglevel=3"
|
||||
"rd.systemd.show_status=false"
|
||||
"rd.udev.log_level=3"
|
||||
"udev.log_priority=3"
|
||||
];
|
||||
# Hide the OS choice for bootloaders.
|
||||
# It's still possible to open the bootloader list by pressing any key
|
||||
# It will just not appear on screen unless a key is pressed
|
||||
loader.timeout = 0;
|
||||
|
||||
};
|
||||
}
|
|
@ -4,6 +4,11 @@
|
|||
#
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
#TODO: Bootloader, plymouth, import hardware, hostname, network, locale, unfree, thunderbolt
|
||||
# auto-cpufreq, fprintd, console keymap, udev, XDG vars, programs, syncthing, rkit/pipewire, nix-ld
|
||||
|
||||
# home: user, electron wayland, polkit
|
||||
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
27
hosts/common/default.nix
Normal file
27
hosts/common/default.nix
Normal file
|
@ -0,0 +1,27 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
networking.hostName = "Lenni";
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
./applications.nix
|
||||
./auto-cpufreq.nix
|
||||
./envvar.nix
|
||||
./nix-ld-nix
|
||||
./pipewire.nix
|
||||
./polkit.nix
|
||||
./syncthing.nix
|
||||
./udev.nix
|
||||
./user.nix
|
||||
./boot.nix
|
||||
./locales.nix
|
||||
];
|
||||
|
||||
networking.networkmanager.enable = true;
|
||||
console.keyMap = "de";
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
services.hardware.bolt.enable = true;
|
||||
services.fprintd.enable = true;
|
||||
programs.hyprland.enable = true;
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
system.stateVersion = "23.11";
|
||||
}
|
17
hosts/common/envvar.nix
Normal file
17
hosts/common/envvar.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
environment.sessionVariables = rec {
|
||||
NIXOS_OZONE_WL = "1";
|
||||
XDG_CACHE_HOME = "$HOME/.cache";
|
||||
XDG_CONFIG_HOME = "$HOME/.config";
|
||||
XDG_DATA_HOME = "$HOME/.local/share";
|
||||
XDG_STATE_HOME = "$HOME/.local/state";
|
||||
|
||||
# Not officially in the specification
|
||||
#XDG_BIN_HOME = "$HOME/.local/bin";
|
||||
#PATH = [
|
||||
# "${XDG_BIN_HOME}"
|
||||
#];
|
||||
SCRIPTS = "$XDG_CONFIG_HOME/scripts";
|
||||
};
|
||||
}
|
16
hosts/common/locales.nix
Normal file
16
hosts/common/locales.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
time.timeZone = "Europe/Berlin";
|
||||
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";
|
||||
};
|
||||
}
|
12
hosts/common/nix-ld.nix
Normal file
12
hosts/common/nix-ld.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
programs.nix-ld.enable = true;
|
||||
|
||||
programs.nix-ld.libraries = with pkgs; [
|
||||
|
||||
# Add any missing dynamic libraries for unpackaged programs
|
||||
|
||||
# here, NOT in environment.systemPackages
|
||||
|
||||
];
|
||||
}
|
13
hosts/common/pipewire.nix
Normal file
13
hosts/common/pipewire.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
wireplumber.enable = true;
|
||||
# If you want to use JACK applications, uncomment this
|
||||
#jack.enable = true;
|
||||
};
|
||||
}
|
19
hosts/common/polkit.nix
Normal file
19
hosts/common/polkit.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
security.polkit.enable = true;
|
||||
systemd = {
|
||||
user.services.polkit-gnome-authentication-agent-1 = {
|
||||
description = "polkit-gnome-authentication-agent-1";
|
||||
wantedBy = [ "graphical-session.target" ];
|
||||
wants = [ "graphical-session.target" ];
|
||||
after = [ "graphical-session.target" ];
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
|
||||
Restart = "on-failure";
|
||||
RestartSec = 1;
|
||||
TimeoutStopSec = 10;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
47
hosts/common/syncthing.nix
Normal file
47
hosts/common/syncthing.nix
Normal file
|
@ -0,0 +1,47 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
user = "willifan";
|
||||
dataDir = "/home/willifan/temp";
|
||||
configDir = "/home/willifan/temp/.config/syncthing";
|
||||
overrideDevices = true;
|
||||
overrideFolders = true;
|
||||
settings = {
|
||||
gui = {
|
||||
user = "willifan";
|
||||
password = "temppassword";
|
||||
};
|
||||
devices = {
|
||||
Anton = { id = "SGKTC3I-6IQZ5Z5-VAB76N6-L7DJ3TH-BMSZGKZ-MZPZHLO-KOVMZ2W-V5GQTA6"; };
|
||||
};
|
||||
folders = {
|
||||
"Documents" = {
|
||||
id = "jtl6g-qjmwo";
|
||||
path = "/home/willifan/temp/Documents";
|
||||
devices = [ "Anton" ];
|
||||
};
|
||||
"Pictures" = {
|
||||
id = "po4qj-q9t0t";
|
||||
path = "/home/willifan/temp/Pictures";
|
||||
devices = [ "Anton" ];
|
||||
};
|
||||
"Videos" = {
|
||||
id = "4wqf5-xasng";
|
||||
path = "/home/willifan/temp/Videos";
|
||||
devices = [ "Anton" ];
|
||||
};
|
||||
"Notes" = {
|
||||
id = "oc61n-iewgj";
|
||||
path = "/home/willifan/temp/Notes";
|
||||
devices = [ "Anton" ];
|
||||
};
|
||||
"Music" = {
|
||||
id = "xxh8a-3y2tq";
|
||||
path = "/home/willifan/temp/Music";
|
||||
devices = [ "Anton" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
6
hosts/common/udev.nix
Normal file
6
hosts/common/udev.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
services.udev.extraRules = ''
|
||||
ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="intel_backlight", MODE="0666", RUN+="${pkgs.coreutils}/bin/chmod a+w /sys/class/backlight/%k/brightness"
|
||||
'';
|
||||
}
|
9
hosts/common/user.nix
Normal file
9
hosts/common/user.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
users.users.willifan = {
|
||||
isNormalUser = true;
|
||||
description = "willifan";
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
packages = with pkgs; [];
|
||||
};
|
||||
}
|
14
structure
14
structure
|
@ -1,14 +0,0 @@
|
|||
|-nixos
|
||||
|-usecase
|
||||
|-common
|
||||
|-desktop
|
||||
| |-common
|
||||
| | |-willifan
|
||||
| | |-hyprland
|
||||
| | |-...
|
||||
| |-Lenni
|
||||
| | |-hardware
|
||||
| |-Pünktchen
|
||||
| |-hardware
|
||||
|-server
|
||||
|-Anton
|
Loading…
Add table
Reference in a new issue