mirror of
https://github.com/deltathetawastaken/dotfiles.git
synced 2025-12-06 07:16:37 +03:00
add huanan host
This commit is contained in:
parent
84c20abe3c
commit
6040dcc09f
35
flake.nix
35
flake.nix
|
|
@ -43,11 +43,46 @@
|
||||||
};
|
};
|
||||||
nixosConfigurations.intelnuc = nixpkgs-unstable.lib.nixosSystem {
|
nixosConfigurations.intelnuc = nixpkgs-unstable.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
|
specialArgs = {
|
||||||
|
inherit inputs;
|
||||||
|
unstable = import nixpkgs-unstable {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
config = { allowUnfree = true; };
|
||||||
|
};
|
||||||
|
};
|
||||||
modules = [
|
modules = [
|
||||||
./hosts/generic.nix
|
./hosts/generic.nix
|
||||||
./hosts/intelnuc/configuration.nix
|
./hosts/intelnuc/configuration.nix
|
||||||
./hosts/intelnuc/hardware-configuration.nix
|
./hosts/intelnuc/hardware-configuration.nix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
nixosConfigurations.huanan = nixpkgs-unstable.lib.nixosSystem {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
specialArgs = {
|
||||||
|
inherit inputs;
|
||||||
|
unstable = import nixpkgs-unstable {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
config = { allowUnfree = true; };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
modules = [
|
||||||
|
./hosts/generic.nix
|
||||||
|
./hosts/huanan/configuration.nix
|
||||||
|
./hosts/huanan/hardware-configuration.nix
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
|
{
|
||||||
|
home-manager.useGlobalPkgs = true;
|
||||||
|
home-manager.useUserPackages = true;
|
||||||
|
home-manager.users.delta = import ./home/home.nix;
|
||||||
|
home-manager.extraSpecialArgs = {
|
||||||
|
inherit inputs;
|
||||||
|
unstable = import nixpkgs-unstable {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
config = { allowUnfree = true; };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -124,6 +124,18 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
programs.ssh = {
|
||||||
|
enable = true;
|
||||||
|
matchBlocks = {
|
||||||
|
"intelnuc" = {
|
||||||
|
hostname = "192.168.3.53";
|
||||||
|
};
|
||||||
|
"huanan" = {
|
||||||
|
hostname = "192.168.3.106";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
programs.fish = {
|
programs.fish = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,6 @@
|
||||||
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
|
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
|
||||||
QT_QPA_PLATFORM = "wayland";
|
QT_QPA_PLATFORM = "wayland";
|
||||||
NIXOS_OZONE_WL = "1";
|
NIXOS_OZONE_WL = "1";
|
||||||
FLAKE = "/home/delta/Documents/dotfiles";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
|
|
@ -205,7 +204,6 @@
|
||||||
adw-gtk3
|
adw-gtk3
|
||||||
any-nix-shell
|
any-nix-shell
|
||||||
openconnect
|
openconnect
|
||||||
micro
|
|
||||||
oath-toolkit
|
oath-toolkit
|
||||||
expect
|
expect
|
||||||
ffmpegthumbnailer
|
ffmpegthumbnailer
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ inputs, config, pkgs, ... }:
|
{ unstable, inputs, config, pkgs, ... }:
|
||||||
let
|
let
|
||||||
run = pkgs.writeScriptBin "run" ''
|
run = pkgs.writeScriptBin "run" ''
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
@ -9,6 +9,10 @@ let
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
in {
|
in {
|
||||||
|
environment.sessionVariables = {
|
||||||
|
FLAKE = "/home/delta/Documents/dotfiles";
|
||||||
|
};
|
||||||
|
|
||||||
users.users.delta = {
|
users.users.delta = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
description = "delta";
|
description = "delta";
|
||||||
|
|
@ -35,7 +39,8 @@ in {
|
||||||
git
|
git
|
||||||
micro
|
micro
|
||||||
nano
|
nano
|
||||||
nh
|
unstable.nh
|
||||||
|
any-nix-shell
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.command-not-found.enable = false;
|
programs.command-not-found.enable = false;
|
||||||
|
|
|
||||||
45
hosts/huanan/configuration.nix
Normal file
45
hosts/huanan/configuration.nix
Normal file
|
|
@ -0,0 +1,45 @@
|
||||||
|
# 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’).
|
||||||
|
|
||||||
|
{ inputs, unstable, config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
boot.loader.grub.enable = true;
|
||||||
|
boot.loader.grub.device = "/dev/nvme0n1";
|
||||||
|
boot.loader.grub.useOSProber = true;
|
||||||
|
|
||||||
|
networking.hostName = "huanan";
|
||||||
|
networking.networkmanager.enable = true;
|
||||||
|
time.timeZone = "Europe/Moscow";
|
||||||
|
|
||||||
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
|
|
||||||
|
i18n.extraLocaleSettings = {
|
||||||
|
LC_TIME = "ru_RU.UTF-8";
|
||||||
|
};
|
||||||
|
|
||||||
|
services.xserver.enable = true;
|
||||||
|
services.xserver.displayManager.gdm.enable = true;
|
||||||
|
services.xserver.desktopManager.gnome.enable = true;
|
||||||
|
|
||||||
|
services.xserver = {
|
||||||
|
layout = "us";
|
||||||
|
xkbVariant = "";
|
||||||
|
};
|
||||||
|
|
||||||
|
services.printing.enable = true;
|
||||||
|
sound.enable = true;
|
||||||
|
hardware.pulseaudio.enable = false;
|
||||||
|
security.rtkit.enable = true;
|
||||||
|
services.pipewire = {
|
||||||
|
enable = true;
|
||||||
|
alsa.enable = true;
|
||||||
|
alsa.support32Bit = true;
|
||||||
|
pulse.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.openssh.enable = true;
|
||||||
|
networking.firewall.enable = false;
|
||||||
|
system.stateVersion = "23.11"; # Did you read the comment?
|
||||||
|
}
|
||||||
26
hosts/huanan/hardware-configuration.nix
Normal file
26
hosts/huanan/hardware-configuration.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
# 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.
|
||||||
|
{ inputs, unstable, config, lib, pkgs, modulesPath, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "ehci_pci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{ device = "/dev/disk/by-uuid/63db5f65-03bf-455e-ad82-36307c29df79";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [ ];
|
||||||
|
|
||||||
|
networking.useDHCP = lib.mkDefault true;
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
}
|
||||||
|
|
@ -15,8 +15,6 @@
|
||||||
extraGroups = [ "networkmanager" "wheel" "docker"];
|
extraGroups = [ "networkmanager" "wheel" "docker"];
|
||||||
};
|
};
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
git
|
git
|
||||||
vim
|
vim
|
||||||
|
|
|
||||||
|
|
@ -22,14 +22,7 @@
|
||||||
[ { device = "/dev/disk/by-uuid/3ab7f83d-71ac-4317-ade1-70e83e3e243f"; }
|
[ { device = "/dev/disk/by-uuid/3ab7f83d-71ac-4317-ade1-70e83e3e243f"; }
|
||||||
];
|
];
|
||||||
|
|
||||||
# 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.useDHCP = lib.mkDefault true;
|
||||||
# networking.interfaces.enp2s0.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.wlp4s0.useDHCP = lib.mkDefault true;
|
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue