Add dotfiles

This commit is contained in:
muon 2024-03-26 11:39:16 +00:00
commit 39fe550b3e
45 changed files with 4363 additions and 0 deletions

67
hosts/default.nix Normal file
View file

@ -0,0 +1,67 @@
{
nixpkgs,
self,
...
}: let
inherit (self) inputs;
bootloader = ../modules/core/bootloader.nix;
core = ../modules/core;
unfree = ../modules/unfree;
prime = ../modules/unfree/prime.nix;
hmModule = inputs.home-manager.nixosModules.home-manager;
stylix = inputs.stylix;
home-manager = {
useUserPackages = true;
useGlobalPkgs = true;
extraSpecialArgs = {
inherit inputs;
inherit self;
inherit stylix;
};
users.muon = ../modules/home;
};
in {
# desktop
muon = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules =
[
{networking.hostName = "muon";}
./muon/hardware-configuration.nix
core
bootloader
unfree
hmModule
{inherit home-manager;}
];
specialArgs = {
inherit inputs;
};
};
# laptop
muop = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules =
[
{networking.hostName = "muop";}
./muop/hardware-configuration.nix
core
bootloader
unfree
prime
hmModule
#inputs.hyprland.nixosModules.default
# inputs.stylix.nixosModules.stylix
{inherit home-manager;}
];
specialArgs = {
inherit inputs;
};
};
}

69
hosts/default.nix~ Normal file
View file

@ -0,0 +1,69 @@
{
nixpkgs,
self,
...
}: let
inherit (self) inputs;
bootloader = ../modules/core/bootloader.nix;
core = ../modules/core;
unfree = ../modules/unfree;
hmModule = inputs.home-manager.nixosModules.home-manager;
stylix = inputs.stylix;
home-manager = {
useUserPackages = true;
useGlobalPkgs = true;
extraSpecialArgs = {
inherit inputs;
inherit self;
inherit stylix;
};
users.muon = ../modules/home;
};
in {
# desktop
muop = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules =
[
{networking.hostName = "muop";}
./muon/hardware-configuration.nix
core
bootloader
unfree
hmModule
#inputs.hyprland.nixosModules.default
# inputs.stylix.nixosModules.stylix
{inherit home-manager;}
];
specialArgs = {
inherit inputs;
};
};
# laptop
muop = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules =
[
{networking.hostName = "muop";}
./muop/hardware-configuration.nix
core
bootloader
unfree
hmModule
#inputs.hyprland.nixosModules.default
# inputs.stylix.nixosModules.stylix
{inherit home-manager;}
];
specialArgs = {
inherit inputs;
};
};
}

View file

@ -0,0 +1,77 @@
# 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 = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/03e49688-cc62-49c9-a906-e2ea87a38891";
fsType = "ext4";
};
boot.initrd.luks.devices."luks-86769693-b61c-4712-852d-e0fba612d260".device = "/dev/disk/by-uuid/86769693-b61c-4712-852d-e0fba612d260";
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/CCCC-449E";
fsType = "vfat";
};
fileSystems."/mnt/bulk" =
{ device = "/dev/disk/by-uuid/11c2c896-d49a-4d9b-a846-b0a550128395";
fsType = "ext4";
};
# swapDevices =
# [ { device = "/dev/disk/by-uuid/e7cf209d-386d-41db-8a35-6c9fff014722"; }
# ];
# 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.enp0s31f6.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
services.xserver.libinput.mouse.accelProfile = "flat";
services.xserver.displayManager.sessionCommands = ''
${pkgs.xorg.xinput} --set-prop "pointer:Logitech Gaming Mouse G502" "libinput Accel Profile Enabled" 0, 1
${pkgs.xorg.xinput} --set-prop "pointer:Logitech Gaming Mouse G502" "libinput Accel Speed" -0.4
'';
services.xserver.displayManager.setupCommands = ''
${pkgs.xorg.xrandr}/bin/xrandr --output HDMI-1 --mode 1920x1080 --pos 2560x0 --rotate right --output DP-2 --primary --mode 2560x1440 --pos 0x480 --rotate normal
'';
services.xserver.xrandrHeads = [
{
output = "DP-2";
primary = true;
monitorConfig = ''
Option "PreferredMode" "2560x1440"
Option "Position" "0 480"
'';
}
{
output = "HDMI-1";
monitorConfig = ''
Option "PreferredMode" "1920x1080"
Option "Position" "2560 0"
Option "Rotate" "right"
'';
}
];
}

View file

@ -0,0 +1,41 @@
# 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 = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/29b32abb-ea5d-4cca-b506-3485d8df430c";
fsType = "ext4";
};
boot.initrd.luks.devices."luks-57f71aee-059c-4ae1-8859-89cfcb21a4af".device = "/dev/disk/by-uuid/57f71aee-059c-4ae1-8859-89cfcb21a4af";
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/9094-4224";
fsType = "vfat";
};
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.wlo1.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}