cleanup(all): moving all config to hosts folder
This commit is contained in:
51
nix/hosts/doloro-wsl/configuration.nix
Normal file
51
nix/hosts/doloro-wsl/configuration.nix
Normal file
@@ -0,0 +1,51 @@
|
||||
{ pkgs, lib, ... }:
|
||||
{
|
||||
networking.hostName = "doloro-wsl-laptop";
|
||||
programs = {
|
||||
nh = {
|
||||
enable = true;
|
||||
flake = "/home/doloro/dotfiles";
|
||||
};
|
||||
nix-ld = {
|
||||
enable = true;
|
||||
package = pkgs.nix-ld-rs;
|
||||
};
|
||||
};
|
||||
virtualisation.podman = {
|
||||
enable = true;
|
||||
};
|
||||
environment = {
|
||||
localBinInPath = true;
|
||||
systemPackages = with pkgs; [
|
||||
git
|
||||
home-manager
|
||||
];
|
||||
};
|
||||
# stylix.base16Scheme = lib.mkForce "${pkgs.base16-schemes}/share/themes/tokyo-night-terminal-dark.yaml";
|
||||
services.tailscale.enable = true;
|
||||
networking.firewall.trustedInterfaces = [ "eth0" ];
|
||||
systemd.services.firewall.enable = lib.mkForce true;
|
||||
# modules = {
|
||||
# users.enable = true;
|
||||
# secrets.enable = true;
|
||||
# sshserver.enable = true;
|
||||
# nix-conf.enable = true;
|
||||
# shell.enable = true;
|
||||
# stylix.enable = true;
|
||||
# hosting = {
|
||||
# enable = false;
|
||||
# networking = {
|
||||
# publicInterface = "eth0";
|
||||
# };
|
||||
# stacks = {
|
||||
# test = {
|
||||
# config =
|
||||
# { pkgs, ... }:
|
||||
# {
|
||||
# environment.systemPackages = with pkgs; [ fastfetch ];
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
}
|
||||
126
nix/hosts/doloro-wsl/home.nix
Normal file
126
nix/hosts/doloro-wsl/home.nix
Normal file
@@ -0,0 +1,126 @@
|
||||
{
|
||||
inputs,
|
||||
config,
|
||||
pkgs,
|
||||
fetchFromGitHub,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./modules/hyprland/home.nix
|
||||
./modules/quickshell/home.nix
|
||||
./modules/chromium/home.nix
|
||||
#./modules/neovim/home.nix
|
||||
./modules/stylix/home.nix
|
||||
./modules/nixvim/home.nix
|
||||
./modules/tmux/home.nix
|
||||
./modules/theme/home.nix
|
||||
# ./modules/spicetify/home.nix
|
||||
./modules/obs/home.nix
|
||||
./modules/blender/home.nix
|
||||
./modules/fish/home.nix
|
||||
./modules/ytm/home.nix
|
||||
./overlays.nix
|
||||
];
|
||||
# Home Manager needs a bit of information about you and the paths it should
|
||||
# manage.
|
||||
home.username = "doloro";
|
||||
home.homeDirectory = "/home/doloro";
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "Doloro1978";
|
||||
userEmail = "doloroo@proton.me";
|
||||
};
|
||||
|
||||
# This value determines the Home Manager release that your configuration is
|
||||
# compatible with. This helps avoid breakage when a new Home Manager release
|
||||
# introduces backwards incompatible changes.
|
||||
#
|
||||
# You should not change this value, even if you update Home Manager. If you do
|
||||
# want to update the value, then make sure to first check the Home Manager
|
||||
# release notes.
|
||||
home.stateVersion = "25.05"; # Please read the comment before changing.
|
||||
|
||||
# The home.packages option allows you to install Nix packages into your
|
||||
# environment.
|
||||
home.packages = with pkgs; [
|
||||
hello
|
||||
vim
|
||||
telegram-desktop
|
||||
vesktop
|
||||
# spotify
|
||||
pavucontrol
|
||||
lazygit
|
||||
btop
|
||||
sops
|
||||
];
|
||||
# sops.age.keyFile = "/home/doloro/.config/sops/age/key.txt";
|
||||
|
||||
# Home Manager is pretty good at managing dotfiles. The primary way to manage
|
||||
# plain files is through 'home.file'.
|
||||
home.file = {
|
||||
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
|
||||
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
|
||||
# # symlink to the Nix store copy.
|
||||
# ".screenrc".source = dotfiles/screenrc;
|
||||
|
||||
# # You can also set the file content immediately.
|
||||
# ".gradle/gradle.properties".text = ''
|
||||
# org.gradle.console=verbose
|
||||
# org.gradle.daemon.idletimeout=3600000
|
||||
# '';
|
||||
};
|
||||
|
||||
# Home Manager can also manage your environment variables through
|
||||
# 'home.sessionVariables'. These will be explicitly sourced when using a
|
||||
# shell provided by Home Manager. If you don't want to manage your shell
|
||||
# through Home Manager then you have to manually source 'hm-session-vars.sh'
|
||||
# located at either
|
||||
#
|
||||
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
|
||||
#
|
||||
# or
|
||||
#
|
||||
# ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh
|
||||
#
|
||||
# or
|
||||
#
|
||||
# /etc/profiles/per-user/doloro/etc/profile.d/hm-session-vars.sh
|
||||
#
|
||||
home.sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
};
|
||||
services = {
|
||||
dunst = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
# {{{{{ TODO Put in different file
|
||||
systemd.user.services.pw-discordaudio-virtual-device = {
|
||||
Install = {
|
||||
WantedBy = [ "hyprland-session.target" ];
|
||||
};
|
||||
Service = {
|
||||
ExecStart = "${pkgs.writeShellScript "discord_audio_virt_device" ''
|
||||
#!/run/current-system/sw/bin/bash
|
||||
pw-loopback -m '[ FL FR]' --capture-props='media.class=Audio/Sink node.name=DiscordSink' -n DiscordSink
|
||||
''}";
|
||||
};
|
||||
};
|
||||
systemd.user.services.pw-gameaudio-virtual-device = {
|
||||
Install = {
|
||||
WantedBy = [ "hyprland-session.target" ];
|
||||
};
|
||||
Service = {
|
||||
ExecStart = "${pkgs.writeShellScript "game_audio_virt_device" ''
|
||||
#!/run/current-system/sw/bin/bash
|
||||
pw-loopback -m '[ FL FR]' --capture-props='media.class=Audio/Sink node.name=GameAudioSink' -n GameAudioSink
|
||||
''}";
|
||||
};
|
||||
};
|
||||
# }}}}}
|
||||
# Let Home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
}
|
||||
237
nix/hosts/doloro/configuration.nix
Normal file
237
nix/hosts/doloro/configuration.nix
Normal file
@@ -0,0 +1,237 @@
|
||||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page, on
|
||||
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
|
||||
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
./modules/greetd/nixos.nix
|
||||
./modules/stylix/nixos.nix
|
||||
./modules/steam/nixos.nix
|
||||
./modules/hyprland/nixos.nix
|
||||
./disks.nix
|
||||
./overlays.nix
|
||||
];
|
||||
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
boot.loader.grub.enable = true;
|
||||
boot.loader.grub.device = "nodev";
|
||||
boot.loader.grub.devices = [
|
||||
"/dev/disk/by-id/nvme-CT1000P2SSD8_2221E632CD1F"
|
||||
"nodev"
|
||||
];
|
||||
#boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.loader.grub.efiSupport = true;
|
||||
boot.loader.grub.efiInstallAsRemovable = true;
|
||||
|
||||
nix.settings = {
|
||||
experimental-features = [
|
||||
"flakes"
|
||||
"nix-command"
|
||||
];
|
||||
trusted-users = [
|
||||
"doloro"
|
||||
];
|
||||
};
|
||||
|
||||
networking.hostName = "doloroo-main"; # Define your hostname.
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# Configure network connections interactively with nmcli or nmtui.
|
||||
networking.networkmanager.enable = true;
|
||||
networking.firewall.enable = false;
|
||||
|
||||
security.rtkit.enable = true;
|
||||
|
||||
sops = {
|
||||
defaultSopsFile = ./secrets/users.yaml;
|
||||
secrets = {
|
||||
root-hashed_password = {
|
||||
neededForUsers = true;
|
||||
};
|
||||
doloro-hashed_password = {
|
||||
neededForUsers = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/London";
|
||||
|
||||
# Configure network proxy if necessary
|
||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
|
||||
# Select internationalisation properties.
|
||||
# i18n.defaultLocale = "en_US.UTF-8";
|
||||
# console = {
|
||||
# font = "Lat2-Terminus16";
|
||||
# keyMap = "us";
|
||||
# useXkbConfig = true; # use xkb.options in tty.
|
||||
# };
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
# services.xserver.enable = true;
|
||||
|
||||
# Enable OpenGL
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
# Load nvidia driver for Xorg and Wayland
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
|
||||
fileSystems."/mnt/2tb" = {
|
||||
device = "/dev/disk/by-uuid/0f49aec7-4af2-4f4f-b475-3f4fad2b59c2";
|
||||
fsType = "ext4";
|
||||
options = [
|
||||
# If you don't have this options attribute, it'll default to "defaults"
|
||||
# boot options for fstab. Search up fstab mount options you can use
|
||||
"defaults"
|
||||
"users" # Allows any user to mount and unmount
|
||||
"nofail" # Prevent system from failing if this drive doesn't mount
|
||||
"exec"
|
||||
];
|
||||
};
|
||||
|
||||
hardware.nvidia = {
|
||||
|
||||
# Modesetting is required.
|
||||
modesetting.enable = true;
|
||||
|
||||
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
|
||||
# Enable this if you have graphical corruption issues or application crashes after waking
|
||||
# up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead
|
||||
# of just the bare essentials.
|
||||
powerManagement.enable = false;
|
||||
|
||||
# Fine-grained power management. Turns off GPU when not in use.
|
||||
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
|
||||
powerManagement.finegrained = false;
|
||||
|
||||
# Use the NVidia open source kernel module (not to be confused with the
|
||||
# independent third-party "nouveau" open source driver).
|
||||
# Support is limited to the Turing and later architectures. Full list of
|
||||
# supported GPUs is at:
|
||||
# https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
|
||||
# Only available from driver 515.43.04+
|
||||
open = false;
|
||||
|
||||
# Enable the Nvidia settings menu,
|
||||
# accessible via `nvidia-settings`.
|
||||
nvidiaSettings = true;
|
||||
|
||||
# Optionally, you may need to select the appropriate driver version for your specific GPU.
|
||||
package = config.boot.kernelPackages.nvidiaPackages.latest;
|
||||
};
|
||||
|
||||
fonts = {
|
||||
enableDefaultPackages = true;
|
||||
packages = with pkgs; [
|
||||
nerd-fonts.jetbrains-mono
|
||||
material-design-icons
|
||||
material-symbols
|
||||
nerd-fonts.caskaydia-cove
|
||||
nerd-fonts.noto
|
||||
];
|
||||
fontDir.enable = true;
|
||||
};
|
||||
|
||||
# Configure keymap in X11
|
||||
# services.xserver.xkb.layout = "us";
|
||||
# services.xserver.xkb.options = "eurosign:e,caps:escape";
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
# services.printing.enable = true;
|
||||
|
||||
# Enable sound.
|
||||
# services.pulseaudio.enable = true;
|
||||
# OR
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
|
||||
programs.fish.enable = true;
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
# services.libinput.enable = true;
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
PasswordAuthentication = true;
|
||||
};
|
||||
};
|
||||
users.users.doloro = {
|
||||
isNormalUser = true;
|
||||
shell = pkgs.fish;
|
||||
extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
||||
packages = with pkgs; [
|
||||
tree
|
||||
];
|
||||
};
|
||||
users.mutableUsers = false;
|
||||
users.users.doloro.hashedPasswordFile = config.sops.secrets."doloro-hashed_password".path;
|
||||
# users.users.root.hashedPasswordFile = config.sops.secrets."root-hashed_password".path;
|
||||
users.users.root.initialPassword = "root";
|
||||
# programs.firefox.enable = true;
|
||||
|
||||
# List packages installed in system profile.
|
||||
# You can use https://search.nixos.org/ to find more packages (and options).
|
||||
environment.systemPackages = with pkgs; [
|
||||
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
||||
wget
|
||||
killall
|
||||
];
|
||||
|
||||
# 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;
|
||||
# };
|
||||
|
||||
# List services that you want to enable:
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
# services.openssh.enable = true;
|
||||
|
||||
# Open ports in the firewall.
|
||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||
# Or disable the firewall altogether.
|
||||
# networking.firewall.enable = false;
|
||||
|
||||
# Copy the NixOS configuration file and link it from the resulting system
|
||||
# (/run/current-system/configuration.nix). This is useful in case you
|
||||
# accidentally delete configuration.nix.
|
||||
# system.copySystemConfiguration = true;
|
||||
|
||||
# This option defines the first version of NixOS you have installed on this particular machine,
|
||||
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
|
||||
#
|
||||
# Most users should NEVER change this value after the initial install, for any reason,
|
||||
# even if you've upgraded your system to a new NixOS release.
|
||||
#
|
||||
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
|
||||
# so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how
|
||||
# to actually do that.
|
||||
#
|
||||
# This value being lower than the current NixOS release does NOT mean your system is
|
||||
# out of date, out of support, or vulnerable.
|
||||
#
|
||||
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
|
||||
# and migrated your data accordingly.
|
||||
#
|
||||
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
|
||||
system.stateVersion = "25.11"; # Did you read the comment?
|
||||
}
|
||||
29
nix/hosts/doloro/hardware-configuration.nix
Normal file
29
nix/hosts/doloro/hardware-configuration.nix
Normal file
@@ -0,0 +1,29 @@
|
||||
# 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 = [ ];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
126
nix/hosts/doloro/home.nix
Normal file
126
nix/hosts/doloro/home.nix
Normal file
@@ -0,0 +1,126 @@
|
||||
{
|
||||
inputs,
|
||||
config,
|
||||
pkgs,
|
||||
fetchFromGitHub,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./modules/hyprland/home.nix
|
||||
./modules/quickshell/home.nix
|
||||
./modules/chromium/home.nix
|
||||
#./modules/neovim/home.nix
|
||||
./modules/stylix/home.nix
|
||||
./modules/nixvim/home.nix
|
||||
./modules/tmux/home.nix
|
||||
./modules/theme/home.nix
|
||||
# ./modules/spicetify/home.nix
|
||||
./modules/obs/home.nix
|
||||
./modules/blender/home.nix
|
||||
./modules/fish/home.nix
|
||||
./modules/ytm/home.nix
|
||||
./overlays.nix
|
||||
];
|
||||
# Home Manager needs a bit of information about you and the paths it should
|
||||
# manage.
|
||||
home.username = "doloro";
|
||||
home.homeDirectory = "/home/doloro";
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "Doloro1978";
|
||||
userEmail = "doloroo@proton.me";
|
||||
};
|
||||
|
||||
# This value determines the Home Manager release that your configuration is
|
||||
# compatible with. This helps avoid breakage when a new Home Manager release
|
||||
# introduces backwards incompatible changes.
|
||||
#
|
||||
# You should not change this value, even if you update Home Manager. If you do
|
||||
# want to update the value, then make sure to first check the Home Manager
|
||||
# release notes.
|
||||
home.stateVersion = "25.05"; # Please read the comment before changing.
|
||||
|
||||
# The home.packages option allows you to install Nix packages into your
|
||||
# environment.
|
||||
home.packages = with pkgs; [
|
||||
hello
|
||||
vim
|
||||
telegram-desktop
|
||||
vesktop
|
||||
# spotify
|
||||
pavucontrol
|
||||
lazygit
|
||||
btop
|
||||
sops
|
||||
];
|
||||
# sops.age.keyFile = "/home/doloro/.config/sops/age/key.txt";
|
||||
|
||||
# Home Manager is pretty good at managing dotfiles. The primary way to manage
|
||||
# plain files is through 'home.file'.
|
||||
home.file = {
|
||||
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
|
||||
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
|
||||
# # symlink to the Nix store copy.
|
||||
# ".screenrc".source = dotfiles/screenrc;
|
||||
|
||||
# # You can also set the file content immediately.
|
||||
# ".gradle/gradle.properties".text = ''
|
||||
# org.gradle.console=verbose
|
||||
# org.gradle.daemon.idletimeout=3600000
|
||||
# '';
|
||||
};
|
||||
|
||||
# Home Manager can also manage your environment variables through
|
||||
# 'home.sessionVariables'. These will be explicitly sourced when using a
|
||||
# shell provided by Home Manager. If you don't want to manage your shell
|
||||
# through Home Manager then you have to manually source 'hm-session-vars.sh'
|
||||
# located at either
|
||||
#
|
||||
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
|
||||
#
|
||||
# or
|
||||
#
|
||||
# ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh
|
||||
#
|
||||
# or
|
||||
#
|
||||
# /etc/profiles/per-user/doloro/etc/profile.d/hm-session-vars.sh
|
||||
#
|
||||
home.sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
};
|
||||
services = {
|
||||
dunst = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
# {{{{{ TODO Put in different file
|
||||
systemd.user.services.pw-discordaudio-virtual-device = {
|
||||
Install = {
|
||||
WantedBy = [ "hyprland-session.target" ];
|
||||
};
|
||||
Service = {
|
||||
ExecStart = "${pkgs.writeShellScript "discord_audio_virt_device" ''
|
||||
#!/run/current-system/sw/bin/bash
|
||||
pw-loopback -m '[ FL FR]' --capture-props='media.class=Audio/Sink node.name=DiscordSink' -n DiscordSink
|
||||
''}";
|
||||
};
|
||||
};
|
||||
systemd.user.services.pw-gameaudio-virtual-device = {
|
||||
Install = {
|
||||
WantedBy = [ "hyprland-session.target" ];
|
||||
};
|
||||
Service = {
|
||||
ExecStart = "${pkgs.writeShellScript "game_audio_virt_device" ''
|
||||
#!/run/current-system/sw/bin/bash
|
||||
pw-loopback -m '[ FL FR]' --capture-props='media.class=Audio/Sink node.name=GameAudioSink' -n GameAudioSink
|
||||
''}";
|
||||
};
|
||||
};
|
||||
# }}}}}
|
||||
# Let Home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
}
|
||||
Reference in New Issue
Block a user