merge hw config and machine config
This commit is contained in:
parent
786a6703fd
commit
f1b46e56bf
6 changed files with 105 additions and 140 deletions
32
common.nix
32
common.nix
|
|
@ -6,7 +6,7 @@
|
|||
imports = [
|
||||
# enable home manager
|
||||
<home-manager/nixos>
|
||||
./home.nix
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
nixpkgs.config = {
|
||||
|
|
@ -25,10 +25,6 @@
|
|||
# wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
# wireless.userControlled.enable = true;
|
||||
|
||||
# Configure network proxy if necessary
|
||||
# proxy.default = "http://user:password@proxy:port/";
|
||||
# proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
|
||||
# Enable networking
|
||||
networkmanager.enable = true;
|
||||
|
||||
|
|
@ -103,33 +99,11 @@
|
|||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
# If you want to use JACK applications, uncomment this
|
||||
#jack.enable = true;
|
||||
|
||||
# use the example session manager (no others are packaged yet so this is enabled by default,
|
||||
# no need to redefine it in your config for now)
|
||||
#media-session.enable = true;
|
||||
};
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
# started in user sessions.
|
||||
# programs.mtr.enable = true;
|
||||
# programs.gnupg.agent = {
|
||||
# enable = true;
|
||||
# enableSSHSupport = true;
|
||||
# };
|
||||
|
||||
system = {
|
||||
# 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).
|
||||
stateVersion = "22.11"; # Did you read the comment?
|
||||
|
||||
# enable auto updates
|
||||
autoUpgrade.enable = true;
|
||||
stateVersion = "22.11";
|
||||
autoUpgrade.enable = true; # enable auto updates
|
||||
};
|
||||
|
||||
nix.gc = {
|
||||
|
|
|
|||
238
home-vinzenz.nix
Normal file
238
home-vinzenz.nix
Normal file
|
|
@ -0,0 +1,238 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
# Define user account
|
||||
users.users.vinzenz = {
|
||||
isNormalUser = true;
|
||||
description = "Vinzenz Schroeter";
|
||||
extraGroups = ["networkmanager" "wheel"];
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
|
||||
# home manager
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.users.vinzenz = {
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
home = {
|
||||
username = "vinzenz";
|
||||
homeDirectory = "/home/vinzenz";
|
||||
stateVersion = "22.11";
|
||||
|
||||
sessionVariables = {
|
||||
EDITOR = "nano";
|
||||
};
|
||||
|
||||
packages = with pkgs; [
|
||||
## Apps
|
||||
keepassxc
|
||||
steam
|
||||
wine-staging
|
||||
insync
|
||||
# gnome-secrets
|
||||
tdesktop
|
||||
simple-scan
|
||||
wireguard-tools
|
||||
# steamlink
|
||||
element-desktop
|
||||
# youtube-music
|
||||
etcher
|
||||
## system monitoring
|
||||
iotop
|
||||
radeontop
|
||||
lsof
|
||||
wirelesstools
|
||||
# lm-sensors
|
||||
## command line niceness
|
||||
tldr
|
||||
powerline
|
||||
powerline-fonts
|
||||
thefuck
|
||||
## development
|
||||
dotnet-sdk_7
|
||||
# gnome workbench
|
||||
jetbrains.rider
|
||||
alejandra
|
||||
arduino
|
||||
uucp
|
||||
screen
|
||||
jetbrains.pycharm-professional
|
||||
kdiff3
|
||||
docker
|
||||
|
||||
(lutris.override {
|
||||
extraPkgs = pkgs: [
|
||||
# List package dependencies here
|
||||
];
|
||||
extraLibraries = pkgs: [
|
||||
# List library dependencies here
|
||||
];
|
||||
})
|
||||
];
|
||||
|
||||
file.".nanorc".text = ''
|
||||
set linenumbers
|
||||
set mouse
|
||||
'';
|
||||
};
|
||||
|
||||
services = {
|
||||
kdeconnect = {
|
||||
enable = true;
|
||||
indicator = true;
|
||||
};
|
||||
};
|
||||
|
||||
programs = {
|
||||
home-manager.enable = true;
|
||||
|
||||
firefox.enable = true;
|
||||
command-not-found.enable = true;
|
||||
dircolors.enable = true;
|
||||
fzf.enable = true;
|
||||
htop.enable = true;
|
||||
|
||||
zsh = {
|
||||
enable = true;
|
||||
|
||||
enableSyntaxHighlighting = true;
|
||||
enableAutosuggestions = true;
|
||||
enableVteIntegration = true;
|
||||
|
||||
initExtra = "eval \"$(direnv hook zsh)\"";
|
||||
|
||||
shellAliases = {
|
||||
my-apply = "sudo nixos-rebuild boot";
|
||||
my-switch = "sudo nixos-rebuild switch";
|
||||
my-update = "sudo nixos-rebuild boot --upgrade";
|
||||
my-fmt = "alejandra .";
|
||||
};
|
||||
|
||||
history = {
|
||||
size = 10000;
|
||||
path = "${config.xdg.dataHome}/zsh/history";
|
||||
expireDuplicatesFirst = true;
|
||||
};
|
||||
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
theme = "agnoster";
|
||||
plugins = ["git" "sudo" "docker" "systemadmin" "thefuck"];
|
||||
};
|
||||
};
|
||||
|
||||
git = {
|
||||
enable = true;
|
||||
userName = "Vinzenz Schroeter";
|
||||
userEmail = "vinzenz.f.s@gmail.com";
|
||||
|
||||
#package = pkgs.gitFull;
|
||||
#config.credential.helper = "libsecret";
|
||||
|
||||
aliases = {
|
||||
prettylog = "log --pretty=oneline --graph";
|
||||
};
|
||||
extraConfig = {
|
||||
pull.ff = "only";
|
||||
init.defaultBranch = "main";
|
||||
merge.tool = "kdiff3";
|
||||
};
|
||||
};
|
||||
|
||||
gh = {
|
||||
enable = true;
|
||||
enableGitCredentialHelper = true;
|
||||
};
|
||||
|
||||
vscode = {
|
||||
enable = true;
|
||||
package = pkgs.vscodium;
|
||||
enableUpdateCheck = false;
|
||||
extensions = with pkgs; [
|
||||
vscode-extensions.bbenoist.nix
|
||||
vscode-extensions.ms-python.python
|
||||
vscode-extensions.kamadorueda.alejandra
|
||||
];
|
||||
userSettings = {
|
||||
"git.autofetch" = true;
|
||||
"update.mode" = "none";
|
||||
"editor.fontFamily" = "'Fira Code', 'Droid Sans Mono', 'monospace', monospace";
|
||||
"editor.fontLigatures" = true;
|
||||
"editor.formatOnSave" = true;
|
||||
"editor.formatOnSaveMode" = "modificationsIfAvailable";
|
||||
"editor.minimap.autohide" = true;
|
||||
"diffEditor.diffAlgorithm" = "advanced";
|
||||
"explorer.excludeGitIgnore" = true;
|
||||
"workbench.startupEditor" = "readme";
|
||||
"markdown.extension.tableFormatter.normalizeIndentation" = true;
|
||||
"markdown.extension.toc.orderedList" = false;
|
||||
"telemetry.telemetryLevel" = "off";
|
||||
"redhat.telemetry.enabled" = false;
|
||||
"workbench.enableExperiments" = false;
|
||||
};
|
||||
};
|
||||
|
||||
direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
|
||||
chromium = {
|
||||
enable = true;
|
||||
extensions = [
|
||||
{
|
||||
# ublock origin
|
||||
id = "cjpalhdlnbpafiamejdnhcphjbkeiagm";
|
||||
}
|
||||
{
|
||||
id = "dcpihecpambacapedldabdbpakmachpb";
|
||||
updateUrl = "https://raw.githubusercontent.com/iamadamdev/bypass-paywalls-chrome/master/updates.xml";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
bottom = {
|
||||
enable = true;
|
||||
settings = {
|
||||
# https://github.com/ClementTsang/bottom/blob/master/sample_configs/default_config.toml
|
||||
};
|
||||
};
|
||||
|
||||
exa = {
|
||||
enable = true;
|
||||
git = true;
|
||||
icons = true;
|
||||
enableAliases = true;
|
||||
extraOptions = [
|
||||
"--group-directories-first"
|
||||
"--header"
|
||||
];
|
||||
};
|
||||
|
||||
# checked https://rycee.gitlab.io/home-manager/options.html until "programs.jq"
|
||||
};
|
||||
|
||||
editorconfig = {
|
||||
enable = true;
|
||||
settings = {
|
||||
"*" = {
|
||||
charset = "utf-8";
|
||||
end_of_line = "lf";
|
||||
trim_trailing_whitespace = true;
|
||||
insert_final_newline = true;
|
||||
max_line_width = 120;
|
||||
indent_style = "space";
|
||||
indent_size = 4;
|
||||
};
|
||||
"*.nix" = {
|
||||
indent_size = 2;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot = {
|
||||
initrd.availableKernelModules = ["xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci"];
|
||||
initrd.kernelModules = [];
|
||||
kernelModules = ["kvm-intel"];
|
||||
extraModulePackages = [];
|
||||
loader.efi.efiSysMountPoint = "/boot/efi";
|
||||
};
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/34cb86c4-8823-4785-9672-92ef0bcd5eaf";
|
||||
fsType = "btrfs";
|
||||
options = ["subvol=@"];
|
||||
};
|
||||
|
||||
fileSystems."/boot/efi" = {
|
||||
device = "/dev/disk/by-uuid/2381-1CD2";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{device = "/dev/disk/by-uuid/f5932f70-60e4-4abe-b23d-2cab3c095c7d";}
|
||||
];
|
||||
|
||||
# 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.eno1.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
|
|
@ -1,9 +1,50 @@
|
|||
{...}: {
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
networking.hostName = "vinzenz-lpt";
|
||||
|
||||
imports = [
|
||||
./vinzenz-lpt-hardware-configuration.nix
|
||||
./common.nix
|
||||
./gnome.nix
|
||||
./home-vinzenz.nix
|
||||
];
|
||||
|
||||
boot = {
|
||||
initrd.availableKernelModules = ["xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci"];
|
||||
initrd.kernelModules = [];
|
||||
kernelModules = ["kvm-intel"];
|
||||
extraModulePackages = [];
|
||||
loader.efi.efiSysMountPoint = "/boot/efi";
|
||||
};
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/34cb86c4-8823-4785-9672-92ef0bcd5eaf";
|
||||
fsType = "btrfs";
|
||||
options = ["subvol=@"];
|
||||
};
|
||||
|
||||
fileSystems."/boot/efi" = {
|
||||
device = "/dev/disk/by-uuid/2381-1CD2";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{device = "/dev/disk/by-uuid/f5932f70-60e4-4abe-b23d-2cab3c095c7d";}
|
||||
];
|
||||
|
||||
# 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.eno1.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,62 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot = {
|
||||
initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "sd_mod"]; # "usb_storage"
|
||||
initrd.kernelModules = [];
|
||||
kernelModules = ["kvm-amd"];
|
||||
extraModulePackages = [];
|
||||
loader.efi.efiSysMountPoint = "/boot";
|
||||
};
|
||||
|
||||
fileSystems = {
|
||||
"/" = {
|
||||
device = "/dev/disk/by-uuid/0e9c983a-e733-447e-8181-f41d6670c4b8";
|
||||
fsType = "btrfs";
|
||||
options = ["subvol=@"];
|
||||
};
|
||||
|
||||
"/boot" = {
|
||||
device = "/dev/disk/by-uuid/AF67-8F16";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
"/mnt/manjaro" = {
|
||||
device = "/dev/disk/by-uuid/b6b4c0b8-4b16-4a72-a18d-d7923a2bb532";
|
||||
fsType = "btrfs";
|
||||
options = ["subvol=@"];
|
||||
};
|
||||
|
||||
"/mnt/manjaro/home" = {
|
||||
device = "/dev/disk/by-uuid/b6b4c0b8-4b16-4a72-a18d-d7923a2bb532";
|
||||
fsType = "btrfs";
|
||||
options = ["subvol=@home"];
|
||||
};
|
||||
|
||||
"/mnt/ssd2" = {
|
||||
device = "/dev/disk/by-uuid/6b2a647d-c68e-4c07-85bf-c9bfc5db7e8a";
|
||||
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.eno1.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp5s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
|
|
@ -1,13 +1,71 @@
|
|||
{...}: {
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
networking.hostName = "vinzenz-pc3";
|
||||
|
||||
imports = [
|
||||
./vinzenz-pc3-hardware-configuration.nix
|
||||
./common.nix
|
||||
./kde.nix
|
||||
./home-vinzenz.nix
|
||||
];
|
||||
|
||||
users.users.vinzenz.openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINrY6tcgnoC/xbgL7vxSjddEY9MBxRXe9n2cAHt88/TT home roaming"
|
||||
];
|
||||
|
||||
boot = {
|
||||
initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "sd_mod"]; # "usb_storage"
|
||||
initrd.kernelModules = [];
|
||||
kernelModules = ["kvm-amd"];
|
||||
extraModulePackages = [];
|
||||
loader.efi.efiSysMountPoint = "/boot";
|
||||
};
|
||||
|
||||
fileSystems = {
|
||||
"/" = {
|
||||
device = "/dev/disk/by-uuid/0e9c983a-e733-447e-8181-f41d6670c4b8";
|
||||
fsType = "btrfs";
|
||||
options = ["subvol=@"];
|
||||
};
|
||||
|
||||
"/boot" = {
|
||||
device = "/dev/disk/by-uuid/AF67-8F16";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
"/mnt/manjaro" = {
|
||||
device = "/dev/disk/by-uuid/b6b4c0b8-4b16-4a72-a18d-d7923a2bb532";
|
||||
fsType = "btrfs";
|
||||
options = ["subvol=@"];
|
||||
};
|
||||
|
||||
"/mnt/manjaro/home" = {
|
||||
device = "/dev/disk/by-uuid/b6b4c0b8-4b16-4a72-a18d-d7923a2bb532";
|
||||
fsType = "btrfs";
|
||||
options = ["subvol=@home"];
|
||||
};
|
||||
|
||||
"/mnt/ssd2" = {
|
||||
device = "/dev/disk/by-uuid/6b2a647d-c68e-4c07-85bf-c9bfc5db7e8a";
|
||||
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.eno1.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp5s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue