added modern branch
This commit is contained in:
@@ -1,204 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
myConfig,
|
||||
inputs,
|
||||
lib,
|
||||
specialArgs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
inputs.chaotic.nixosModules.default
|
||||
./hardware-configuration.nix
|
||||
../../modules/default/desktop.nix
|
||||
../../modules/default/dev.nix
|
||||
../../modules/default/remote.nix
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
pavucontrol
|
||||
wl-clipboard
|
||||
wget
|
||||
protontricks
|
||||
];
|
||||
|
||||
users = {
|
||||
defaultUserShell = pkgs.${myConfig.general.Terminal.shell};
|
||||
users = {
|
||||
${myConfig.essentials.Username} = {
|
||||
isNormalUser = true;
|
||||
extraGroups = ["wheel" "networkmanager" "input" "video"];
|
||||
initialHashedPassword = "$y$j9T$NHFtSwF4NJtEmgMjy4Xdg.$9WQltjEx3eEfZ7GbpGLW8lBhJtiXPOeIawrxdmx0.vB";
|
||||
useDefaultShell = true;
|
||||
packages = [];
|
||||
};
|
||||
};
|
||||
};
|
||||
home-manager = {
|
||||
backupFileExtension = "backup";
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
extraSpecialArgs = specialArgs;
|
||||
users.${myConfig.essentials.Username} = import ../../home/hakase.nix;
|
||||
};
|
||||
|
||||
nixpkgs.config.allowUnfree = myConfig.general.allowUnfree;
|
||||
|
||||
hardware.logitech.wireless.enable = true;
|
||||
hardware.bluetooth.enable = true;
|
||||
hardware.bluetooth.powerOnBoot = true;
|
||||
hardware.bluetooth.settings = {
|
||||
General = {
|
||||
AutoEnable = true;
|
||||
Experimental = true;
|
||||
MultiProfile = "multiple";
|
||||
FastConnectable = true;
|
||||
};
|
||||
};
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
};
|
||||
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
time.timeZone = "${myConfig.nixos.Timezone}";
|
||||
|
||||
boot.loader = {
|
||||
systemd-boot = lib.mkIf (myConfig.nixos.Boot.mode == "systemd") {
|
||||
enable = true;
|
||||
};
|
||||
grub = lib.mkIf (myConfig.nixos.Boot.mode == "grub") {
|
||||
efiSupport = true;
|
||||
enable = true;
|
||||
device = "nodev";
|
||||
useOSProber = true;
|
||||
};
|
||||
efi = {
|
||||
canTouchEfiVariables = true;
|
||||
efiSysMountPoint = "/boot";
|
||||
};
|
||||
};
|
||||
|
||||
programs.ssh.extraConfig = myConfig.optionals.Ssh.extraConfig;
|
||||
|
||||
programs.bash = {
|
||||
interactiveShellInit = ''
|
||||
if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]]
|
||||
then
|
||||
shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION=""
|
||||
exec ${pkgs.fish}/bin/fish $LOGIN_OPTION
|
||||
fi
|
||||
'';
|
||||
};
|
||||
|
||||
programs = {
|
||||
zsh.enable = true;
|
||||
fish.enable = true;
|
||||
};
|
||||
|
||||
services = {
|
||||
displayManager.sessionPackages = [inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland];
|
||||
# getty.autologinUser = "${myConfig.essentials.Username}";
|
||||
# greetd = {
|
||||
# enable = true;
|
||||
# settings.default_session = {
|
||||
# user = "${myConfig.essentials.Username}";
|
||||
# command = "Hyprland";
|
||||
# };
|
||||
# };
|
||||
|
||||
seatd.enable = true;
|
||||
upower.enable = true;
|
||||
scx.enable = true; # by default uses scx_rustland scheduler
|
||||
libinput.enable = true;
|
||||
blueman.enable = true;
|
||||
printing.enable = true;
|
||||
openssh.enable = true;
|
||||
pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
|
||||
# lowLatency = {
|
||||
# enable = true;
|
||||
# quantum = 64;
|
||||
# rate = 48000;
|
||||
# };
|
||||
};
|
||||
};
|
||||
# make pipewire realtime-capable
|
||||
security.rtkit.enable = true;
|
||||
|
||||
nix = {
|
||||
distributedBuilds = true;
|
||||
settings = {
|
||||
builders-use-substitutes = true;
|
||||
trusted-users = myConfig.optionals.Builds.trustedUsers;
|
||||
experimental-features = ["nix-command" "flakes"];
|
||||
};
|
||||
};
|
||||
|
||||
console = {
|
||||
earlySetup = false;
|
||||
font = "${pkgs.terminus_font}/share/consolefonts/ter-132n.psf.gz";
|
||||
packages = with pkgs; [terminus_font];
|
||||
useXkbConfig = true;
|
||||
};
|
||||
|
||||
networking = {
|
||||
# wakeOnLan.enable = true;
|
||||
networkmanager.enable = true;
|
||||
firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [22 80];
|
||||
allowedUDPPorts = [53];
|
||||
};
|
||||
proxy.default = null;
|
||||
proxy.noProxy = null;
|
||||
};
|
||||
|
||||
boot.loader.timeout = 0;
|
||||
boot.loader.limine.maxGenerations = 5;
|
||||
hardware.amdgpu.initrd.enable = true;
|
||||
|
||||
boot.kernelParams = [
|
||||
"quiet"
|
||||
"splash"
|
||||
"boot.shell_on_fail"
|
||||
"udev.log_priority=3"
|
||||
"rd.systemd.show_status=auto"
|
||||
"iommu=pt"
|
||||
"amd_pstate=active"
|
||||
];
|
||||
boot.kernelPackages = pkgs.linuxPackages_cachyos;
|
||||
boot.kernel.sysctl = {
|
||||
"kernel.split_lock_mitigate" = 0;
|
||||
"kernel.nmi_watchdog" = 0;
|
||||
"kernel.sched_bore" = "1";
|
||||
};
|
||||
|
||||
boot.initrd = {
|
||||
systemd.enable = true;
|
||||
kernelModules = [];
|
||||
verbose = false;
|
||||
};
|
||||
boot.plymouth.enable = true;
|
||||
boot.plymouth.theme = "seal";
|
||||
boot.plymouth.themePackages = with pkgs; [
|
||||
# By default we would install all themes
|
||||
(adi1090x-plymouth-themes.override {
|
||||
selected_themes = ["seal"];
|
||||
})
|
||||
];
|
||||
boot.consoleLogLevel = 0;
|
||||
systemd.extraConfig = "DefaultTimeoutStopSec=5s";
|
||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||
# Or disable the firewall altogether.
|
||||
# networking.firewall.enable = false;
|
||||
|
||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
system.stateVersion = "25.05";
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
# 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" "ahci" "usbhid" "usb_storage" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/532ac73e-1370-4e4d-9d5a-15033de0b96d";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@" ];
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/1368-D3F3";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0077" "dmask=0077" ];
|
||||
};
|
||||
|
||||
fileSystems."/home" =
|
||||
{ device = "/dev/disk/by-uuid/780aa81f-c4d6-478b-9c51-2d60362fdb07";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/b02ef55c-4caf-4a24-a6a2-fb8001eafe22"; }
|
||||
];
|
||||
|
||||
# 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.enp11s0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp10s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
myConfig,
|
||||
inputs,
|
||||
system,
|
||||
mkArgs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
../../modules/default/darwin.nix
|
||||
inputs.home-manager.darwinModules.home-manager
|
||||
];
|
||||
# List packages installed in system profile. To search by name, run:
|
||||
# $ nix-env -qaP | grep wget
|
||||
environment.systemPackages = [];
|
||||
|
||||
# Auto upgrade nix package and the daemon service.
|
||||
# services.nix-daemon.enable = true;
|
||||
# services.karabiner-elements.enable = true;
|
||||
# nix.package = pkgs.nix;
|
||||
|
||||
# Necessary for using flakes on this system.
|
||||
nix.settings.experimental-features = "nix-command flakes";
|
||||
nix.settings.trusted-users = myConfig.optionals.Builds.trustedUsers;
|
||||
|
||||
# Create /etc/zshrc that loads the nix-darwin environment.
|
||||
programs.zsh.enable = true; # default shell on catalina
|
||||
programs.fish.enable = true;
|
||||
|
||||
# $ darwin-rebuild changelog
|
||||
system.stateVersion = 5;
|
||||
|
||||
# The platform the configuration will be used on.
|
||||
nixpkgs.hostPlatform = "aarch64-darwin";
|
||||
security.pam.services.sudo_local.touchIdAuth = true;
|
||||
|
||||
users.users.${myConfig.essentials.Username} = {
|
||||
name = "${myConfig.essentials.Username}";
|
||||
home = "/Users/${myConfig.essentials.Username}";
|
||||
# shell = pkgs.${myConfig.general.terminal.Shell}; # no support for nix-darwin, but can be changed via chsh.
|
||||
};
|
||||
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.extraSpecialArgs = mkArgs system;
|
||||
home-manager.users.${myConfig.essentials.Username} = import ../../home/darwin.nix;
|
||||
}
|
||||
@@ -1,169 +0,0 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
myConfig,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
inputs.chaotic.nixosModules.default
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
####################
|
||||
# Boot & Kernel #
|
||||
####################
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.loader.timeout = 0;
|
||||
boot.loader.limine.maxGenerations = 5;
|
||||
hardware.amdgpu.initrd.enable = true;
|
||||
|
||||
boot.kernelParams = ["quiet"];
|
||||
boot.kernelPackages = pkgs.linuxPackages_cachyos;
|
||||
boot.kernel.sysctl = {
|
||||
"kernel.split_lock_mitigate" = 0;
|
||||
"kernel.nmi_watchdog" = 0;
|
||||
"kernel.sched_bore" = "1";
|
||||
};
|
||||
|
||||
boot.initrd = {
|
||||
systemd.enable = true;
|
||||
kernelModules = [];
|
||||
verbose = false;
|
||||
};
|
||||
boot.plymouth.enable = true;
|
||||
boot.consoleLogLevel = 0;
|
||||
systemd.extraConfig = "DefaultTimeoutStopSec=5s";
|
||||
|
||||
################
|
||||
# FileSystems #
|
||||
################
|
||||
# fileSystems."/" = {
|
||||
# options = ["compress=zstd"];
|
||||
# };
|
||||
|
||||
############
|
||||
# Network #
|
||||
############
|
||||
networking = {
|
||||
networkmanager.enable = true;
|
||||
firewall.enable = false;
|
||||
hostName = "nixos";
|
||||
};
|
||||
|
||||
#################
|
||||
# Bluetooth #
|
||||
#################
|
||||
hardware.bluetooth.enable = true;
|
||||
hardware.bluetooth.settings = {
|
||||
General = {
|
||||
MultiProfile = "multiple";
|
||||
FastConnectable = true;
|
||||
};
|
||||
};
|
||||
|
||||
#################
|
||||
# Sound & RTKit #
|
||||
#################
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
|
||||
########################
|
||||
# Graphical & Greetd #
|
||||
########################
|
||||
|
||||
services.xserver.enable = false;
|
||||
services.getty.autologinUser = "steamos";
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
settings.default_session = {
|
||||
user = "${myConfig.essentials.Username}";
|
||||
command = "steam-gamescope > /dev/null 2>&1";
|
||||
};
|
||||
};
|
||||
|
||||
########################
|
||||
# Programs & Gaming #
|
||||
########################
|
||||
services.automatic-timezoned.enable = true;
|
||||
services.flatpak.enable = true;
|
||||
xdg.portal.enable = true;
|
||||
xdg.portal.config.common.default = "*";
|
||||
xdg.portal.extraPortals = [pkgs.xdg-desktop-portal-gtk];
|
||||
|
||||
# programs.steam.gamescopeSession.args = ["-w 1920" "-h 1080" "-r 120" "--xwayland-count 2" "-e" "--hdr-enabled" "--mangoapp"];
|
||||
|
||||
programs = {
|
||||
appimage = {
|
||||
enable = true;
|
||||
binfmt = true;
|
||||
};
|
||||
fish = {enable = true;};
|
||||
mosh = {enable = true;};
|
||||
tmux = {enable = true;};
|
||||
gamescope.capSysNice = true;
|
||||
steam = {
|
||||
enable = true;
|
||||
gamescopeSession.enable = true;
|
||||
extraCompatPackages = with pkgs; [proton-ge-bin];
|
||||
extraPackages = with pkgs; [
|
||||
mangohud
|
||||
gamescope-wsi
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
environment.sessionVariables = {
|
||||
PROTON_USE_NTSYNC = "1";
|
||||
ENABLE_HDR_WSI = "1";
|
||||
DXVK_HDR = "1";
|
||||
PROTON_ENABLE_AMD_AGS = "1";
|
||||
PROTON_ENABLE_NVAPI = "1";
|
||||
ENABLE_GAMESCOPE_WSI = "1";
|
||||
STEAM_MULTIPLE_XWAYLANDS = "1";
|
||||
};
|
||||
|
||||
###################
|
||||
# Virtualization #
|
||||
###################
|
||||
virtualisation.docker.enable = true;
|
||||
virtualisation.docker.enableOnBoot = false;
|
||||
virtualisation.libvirtd.enable = true;
|
||||
|
||||
###############
|
||||
# Users #
|
||||
###############
|
||||
users.users.${myConfig.essentials.Username} = {
|
||||
isNormalUser = true;
|
||||
description = "SteamOS user";
|
||||
extraGroups = ["networkmanager" "wheel" "docker" "video" "seat" "audio" "libvirtd"];
|
||||
# password = "steamos";
|
||||
};
|
||||
|
||||
#################
|
||||
# Security #
|
||||
#################
|
||||
security.sudo.wheelNeedsPassword = false;
|
||||
security.polkit.enable = true;
|
||||
services.seatd.enable = true;
|
||||
services.openssh.enable = true;
|
||||
|
||||
######################
|
||||
######################
|
||||
|
||||
########################
|
||||
# System State Version #
|
||||
########################
|
||||
system.stateVersion = "25.05";
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
# 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" "ahci" "usbhid" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/532ac73e-1370-4e4d-9d5a-15033de0b96d";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@" ];
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/1368-D3F3";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0077" "dmask=0077" ];
|
||||
};
|
||||
|
||||
fileSystems."/home" =
|
||||
{ device = "/dev/disk/by-uuid/780aa81f-c4d6-478b-9c51-2d60362fdb07";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/b02ef55c-4caf-4a24-a6a2-fb8001eafe22"; }
|
||||
];
|
||||
|
||||
# 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.enp11s0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp10s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
Reference in New Issue
Block a user