ich hab nix gemacht
This commit is contained in:
commit
78b46dfe8c
8 changed files with 265 additions and 0 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
/configuration.nix
|
||||
24
autologin.nix
Normal file
24
autologin.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let cfg = config.autologin;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
autologin.username = pkgs.lib.mkOption {
|
||||
description = "Username of user to be automatically logged in at tty1";
|
||||
};
|
||||
};
|
||||
config = {
|
||||
systemd.services."autovt@tty1".description = "Autologin at the TTY1";
|
||||
systemd.services."autovt@tty1".after = [ "systemd-logind.service" ]; # without it user session not started and xorg can't be run from this tty
|
||||
systemd.services."autovt@tty1".wantedBy = [ "multi-user.target" ];
|
||||
systemd.services."autovt@tty1".serviceConfig = {
|
||||
ExecStart = [
|
||||
"" # override upstream default with an empty ExecStart
|
||||
"@${pkgs.utillinux}/sbin/agetty agetty --login-program ${pkgs.shadow}/bin/login --autologin '${cfg.username}' --noclear %I $TERM"
|
||||
];
|
||||
Restart = "always";
|
||||
Type = "idle";
|
||||
};
|
||||
};
|
||||
}
|
||||
9
fish.nix
Normal file
9
fish.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
unstable.fish
|
||||
];
|
||||
programs.fish.enable = true;
|
||||
}
|
||||
|
||||
7
hardware/t520.nix
Normal file
7
hardware/t520.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
boot.initrd.availableKernelModules = [
|
||||
"i915"
|
||||
];
|
||||
}
|
||||
132
machines/t520/configuration.nix
Normal file
132
machines/t520/configuration.nix
Normal file
|
|
@ -0,0 +1,132 @@
|
|||
# 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, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
./hardware-configuration.nix
|
||||
../../hardware/t520.nix
|
||||
../../sway.nix
|
||||
../../unstable.nix
|
||||
../../fish.nix
|
||||
../../autologin.nix
|
||||
];
|
||||
|
||||
boot.loader.grub = {
|
||||
enable = true;
|
||||
version = 2;
|
||||
device = "/dev/sda";
|
||||
};
|
||||
|
||||
boot.initrd.availableKernelModules = [
|
||||
"aes_x86_64"
|
||||
"aesni_intel"
|
||||
"cryptd"
|
||||
];
|
||||
|
||||
boot.initrd.luks.devices = {
|
||||
pvcrypt = {
|
||||
device = "/dev/disk/by-uuid/3a1a8fec-b028-45c0-8432-7fcbe4615f44";
|
||||
preLVM = true;
|
||||
};
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostName = "jalr-t520";
|
||||
interfaces.eno0.useDHCP = true;
|
||||
networkmanager.enable = true;
|
||||
useDHCP = false;
|
||||
};
|
||||
|
||||
i18n.defaultLocale = "de_DE.UTF-8";
|
||||
console = {
|
||||
font = "Lat2-Terminus16";
|
||||
keyMap = "neo";
|
||||
};
|
||||
|
||||
time.timeZone = "Europe/Berlin";
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
file
|
||||
firefox-wayland
|
||||
fzf
|
||||
git
|
||||
htop
|
||||
jq
|
||||
neovim
|
||||
pavucontrol
|
||||
ripgrep
|
||||
spice-gtk
|
||||
virt-manager
|
||||
];
|
||||
|
||||
fonts.fonts = with pkgs; [
|
||||
powerline-fonts
|
||||
roboto
|
||||
font-awesome
|
||||
];
|
||||
|
||||
environment.variables.EDITOR = "nvim";
|
||||
|
||||
nixpkgs.overlays = [
|
||||
(self: super: {
|
||||
neovim = super.neovim.override {
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
};
|
||||
})
|
||||
];
|
||||
|
||||
programs.mtr.enable = true;
|
||||
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
pinentryFlavor = "qt";
|
||||
};
|
||||
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = true;
|
||||
|
||||
services.udisks2.enable = true;
|
||||
|
||||
|
||||
virtualisation = {
|
||||
docker.enable = true;
|
||||
libvirtd.enable = true;
|
||||
};
|
||||
|
||||
# https://github.com/NixOS/nixpkgs/issues/60594
|
||||
security.wrappers.spice-client-glib-usb-acl-helper.source = "${pkgs.spice-gtk}/bin/spice-client-glib-usb-acl-helper";
|
||||
|
||||
security.polkit.enable = true;
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.jalr = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [
|
||||
"dialout"
|
||||
"docker"
|
||||
"libvirtd"
|
||||
"networkmanager"
|
||||
"video"
|
||||
"wheel"
|
||||
]; # Enable ‘sudo’ for the user.
|
||||
shell = pkgs.fish;
|
||||
};
|
||||
|
||||
autologin.username = "jalr";
|
||||
|
||||
# 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 = "20.03"; # Did you read the comment?
|
||||
|
||||
}
|
||||
30
machines/t520/hardware-configuration.nix
Normal file
30
machines/t520/hardware-configuration.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
# 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, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "ehci_pci" "ahci" "firewire_ohci" "usb_storage" "usbhid" "sd_mod" "sdhci_pci" ];
|
||||
boot.initrd.kernelModules = [ "dm-snapshot" ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/62e31097-dc6e-4f91-a043-1a6b8a154201";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/c4df83d7-8985-47df-b5cd-bf18bd490a50";
|
||||
fsType = "ext2";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
nix.maxJobs = lib.mkDefault 4;
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||
}
|
||||
46
sway.nix
Normal file
46
sway.nix
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
# environment.systemPackages = with pkgs; [
|
||||
# sway
|
||||
# ];
|
||||
|
||||
# nixpkgs.overlays = [
|
||||
# (self: super: {
|
||||
# sway = super.neovim.override {
|
||||
# extraOptions = [
|
||||
# "--unsupported-gpu"
|
||||
# ];
|
||||
# };
|
||||
# })
|
||||
# ];
|
||||
programs.sway = {
|
||||
enable = true;
|
||||
# extraOptions = [
|
||||
# "--unsupported-gpu"
|
||||
# ];
|
||||
extraPackages = with pkgs; [
|
||||
alacritty
|
||||
grim
|
||||
mako
|
||||
redshift-wlr
|
||||
slurp
|
||||
swayidle
|
||||
swaylock
|
||||
waybar
|
||||
wl-clipboard
|
||||
wofi
|
||||
xwayland
|
||||
];
|
||||
extraSessionCommands =
|
||||
''
|
||||
export XKB_DEFAULT_LAYOUT=de
|
||||
export XKB_DEFAULT_VARIANT=neo
|
||||
export QT_QPA_PLATFORM=wayland
|
||||
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
|
||||
export ELM_ENGINE=wayland_shm
|
||||
export GDK_BACKEND=wayland
|
||||
export _JAVA_AWT_WM_NONREPARENTING=1
|
||||
'';
|
||||
};
|
||||
}
|
||||
16
unstable.nix
Normal file
16
unstable.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
unstableTarball =
|
||||
fetchTarball
|
||||
https://github.com/NixOS/nixpkgs-channels/archive/nixos-unstable.tar.gz;
|
||||
in
|
||||
{
|
||||
nixpkgs.config = {
|
||||
packageOverrides = pkgs: {
|
||||
unstable = import unstableTarball {
|
||||
config = config.nixpkgs.config;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue