mirror of
https://github.com/traxys/Nixfiles.git
synced 2026-03-28 15:07:22 +01:00
minus: Introduce machine
This commit is contained in:
parent
6ad0774622
commit
2a3e19337e
6 changed files with 174 additions and 0 deletions
46
flake.nix
46
flake.nix
|
|
@ -587,6 +587,52 @@
|
|||
}
|
||||
];
|
||||
};
|
||||
|
||||
minus = nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./hostconfig/minus/extra_info.nix
|
||||
./hostconfig/minus/hardware-configuration.nix
|
||||
./hostconfig/minus/nixos.nix
|
||||
self.nixosModules.minimal
|
||||
self.nixosModules.personal-cli
|
||||
({pkgs, ...}: {
|
||||
nixpkgs.overlays = [
|
||||
inputs.nur.overlay
|
||||
inputs.rust-overlay.overlays.default
|
||||
inputs.comma.overlays.default
|
||||
(final: prev: pkgList system prev.callPackage)
|
||||
(final: prev: inputs.nix-gaming.packages."${system}")
|
||||
];
|
||||
})
|
||||
./nixos/configuration.nix
|
||||
home-manager.nixosModules.home-manager
|
||||
({config, ...}: {
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.${config.extraInfo.username} = {
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./hostconfig/minus/extra_info.nix
|
||||
./hostconfig/minus/hm.nix
|
||||
self.hmModules.minimal
|
||||
self.hmModules.personal-cli
|
||||
self.hmModules.personal-gui
|
||||
inputs.fioul.homeManagerModules.default
|
||||
];
|
||||
};
|
||||
home-manager.extraSpecialArgs = {
|
||||
flake = self;
|
||||
};
|
||||
# Optionally, use home-manager.extraSpecialArgs to pass
|
||||
# arguments to home.nix
|
||||
})
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
homeConfigurations."boyerq@thinkpad-nixos" = home-manager.lib.homeManagerConfiguration {
|
||||
|
|
|
|||
7
hostconfig/minus/extra_info.nix
Normal file
7
hostconfig/minus/extra_info.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
extraInfo.username = "traxys";
|
||||
extraInfo.email = "quentin+dev@familleboyer.net";
|
||||
extraInfo.inputs = {
|
||||
#touchpad = "2:7:SynPS/2_Synaptics_TouchPad";
|
||||
};
|
||||
}
|
||||
40
hostconfig/minus/hardware-configuration.nix
Normal file
40
hostconfig/minus/hardware-configuration.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
# 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" "usb_storage" "usbhid" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/867b63c6-0ce0-4c60-9fea-78e6f2fc2a48";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/98AE-2D96";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/9417523e-0cc5-47f3-920a-ac39038673d4"; }
|
||||
];
|
||||
|
||||
# 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.enp1s0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlo1.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
6
hostconfig/minus/hm.nix
Normal file
6
hostconfig/minus/hm.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{config, ...}: {
|
||||
home.username = "${config.extraInfo.username}";
|
||||
home.homeDirectory = "/home/${config.extraInfo.username}";
|
||||
|
||||
home.stateVersion = "23.11";
|
||||
}
|
||||
63
hostconfig/minus/nixos.nix
Normal file
63
hostconfig/minus/nixos.nix
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
networking.hostName = "minus";
|
||||
networking.networkmanager.enable = true;
|
||||
time.timeZone = "Europe/Paris";
|
||||
i18n.defaultLocale = "en_GB.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "fr_FR.UTF-8";
|
||||
LC_IDENTIFICATION = "fr_FR.UTF-8";
|
||||
LC_MEASUREMENT = "fr_FR.UTF-8";
|
||||
LC_MONETARY = "fr_FR.UTF-8";
|
||||
LC_NAME = "fr_FR.UTF-8";
|
||||
LC_NUMERIC = "fr_FR.UTF-8";
|
||||
LC_PAPER = "fr_FR.UTF-8";
|
||||
LC_TELEPHONE = "fr_FR.UTF-8";
|
||||
LC_TIME = "fr_FR.UTF-8";
|
||||
};
|
||||
|
||||
services.xserver.enable = true;
|
||||
services.xserver.displayManager.gdm.enable = true;
|
||||
services.xserver.desktopManager.gnome.enable = true;
|
||||
|
||||
services.xserver = {
|
||||
layout = "us";
|
||||
xkbVariant = "dvp";
|
||||
};
|
||||
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
|
||||
users.users."${config.extraInfo.username}" = {
|
||||
isNormalUser = true;
|
||||
description = "Quentin";
|
||||
extraGroups = ["networkmanager" "wheel"];
|
||||
};
|
||||
|
||||
services.xserver.displayManager.autoLogin.enable = true;
|
||||
services.xserver.displayManager.autoLogin.user = "traxys";
|
||||
|
||||
systemd.services."getty@tty1".enable = false;
|
||||
systemd.services."autovt@tty1".enable = false;
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
services.openssh.enable = true;
|
||||
system.stateVersion = "23.11";
|
||||
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
}
|
||||
12
updateMinus.sh
Executable file
12
updateMinus.sh
Executable file
|
|
@ -0,0 +1,12 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
REMOTE=root@192.168.1.127
|
||||
CONFIG=minus
|
||||
|
||||
nixos-rebuild switch \
|
||||
--verbose \
|
||||
--fast \
|
||||
--use-remote-sudo \
|
||||
--flake .#${CONFIG} \
|
||||
--target-host $REMOTE "$@"
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue