moved config
This commit is contained in:
7
config/defaults.nix
Normal file
7
config/defaults.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{ den, ... }:
|
||||
{
|
||||
den.default = {
|
||||
nixos.system.stateVersion = "25.11";
|
||||
homeManager.home.stateVersion = "25.11";
|
||||
};
|
||||
}
|
||||
11
config/dendritic.nix
Normal file
11
config/dendritic.nix
Normal file
@@ -0,0 +1,11 @@
|
||||
{ inputs, lib, ... }:
|
||||
{
|
||||
imports = [
|
||||
inputs.flake-file.flakeModules.dendritic
|
||||
inputs.den.flakeModules.dendritic
|
||||
];
|
||||
flake-file.do-not-edit = "You FAGGOT; Do NOT edit this file !!!!, run 'nix run .#write-flake' ";
|
||||
flake-file.outputs = lib.mkForce ''
|
||||
inputs: inputs.flake-parts.lib.mkFlake { inherit inputs; } (inputs.import-tree ./config)
|
||||
'';
|
||||
}
|
||||
70
config/hosts/aspects/doloro-desktop/disko.nix
Normal file
70
config/hosts/aspects/doloro-desktop/disko.nix
Normal file
@@ -0,0 +1,70 @@
|
||||
{
|
||||
modules,
|
||||
__findFile,
|
||||
...
|
||||
}:
|
||||
{
|
||||
den.aspects.desktop = {
|
||||
includes = [ modules.disko ];
|
||||
nixos =
|
||||
{ lib, ... }:
|
||||
{
|
||||
disko.devices = {
|
||||
disk = {
|
||||
main = {
|
||||
device = lib.mkDefault "/dev/disk/by-id/nvme-CT1000P2SSD8_2221E632CD1F";
|
||||
type = "disk";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
boot = {
|
||||
name = "boot";
|
||||
size = "1M";
|
||||
type = "EF02";
|
||||
};
|
||||
ESP = {
|
||||
name = "ESP";
|
||||
priority = 1;
|
||||
size = "4G";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [ "umask=0077" ];
|
||||
};
|
||||
};
|
||||
root = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = [ "-f" ]; # Override existing partition
|
||||
# Subvolumes must set a mountpoint in order to be mounted,
|
||||
# unless their parent is mounted
|
||||
subvolumes = {
|
||||
# Subvolume name is different from mountpoint
|
||||
"@" = {
|
||||
mountpoint = "/";
|
||||
};
|
||||
# Subvolume name is the same as the mountpoint
|
||||
"@home" = {
|
||||
mountpoint = "/home";
|
||||
};
|
||||
# Parent is not mounted so the mountpoint must be set
|
||||
"@nix" = {
|
||||
mountpoint = "/nix";
|
||||
};
|
||||
"@blackhole" = {
|
||||
mountpoint = "/var/blackhole";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
24
config/hosts/aspects/doloro-desktop/home.nix
Normal file
24
config/hosts/aspects/doloro-desktop/home.nix
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
den,
|
||||
__findFile,
|
||||
modules,
|
||||
...
|
||||
}:
|
||||
{
|
||||
den.aspects.doloro-desktop = {
|
||||
includes = [
|
||||
<den/primary-user>
|
||||
den.aspects.doloro-shared
|
||||
modules.sops
|
||||
modules.fish
|
||||
];
|
||||
nixos =
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
users.users.doloro = {
|
||||
shell = pkgs.fish;
|
||||
hashedPasswordFile = config.sops.secrets."doloro-hashed_password".path;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
98
config/hosts/aspects/doloro-desktop/host.nix
Normal file
98
config/hosts/aspects/doloro-desktop/host.nix
Normal file
@@ -0,0 +1,98 @@
|
||||
{
|
||||
den,
|
||||
modules,
|
||||
pkgs,
|
||||
__findFile,
|
||||
...
|
||||
}:
|
||||
{
|
||||
den.aspects.desktop = {
|
||||
includes = [
|
||||
modules.nix
|
||||
modules.hyprland
|
||||
];
|
||||
nixos =
|
||||
{ pkgs, config, ... }:
|
||||
{
|
||||
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;
|
||||
networking.hostName = "doloroo-main"; # Define your hostname.
|
||||
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
# Enable "Silent boot"
|
||||
boot.consoleLogLevel = 3;
|
||||
boot.initrd.verbose = false;
|
||||
boot.kernelParams = [
|
||||
"quiet"
|
||||
"splash"
|
||||
"boot.shell_on_fail"
|
||||
"udev.log_priority=3"
|
||||
"rd.systemd.show_status=auto"
|
||||
];
|
||||
|
||||
networking.networkmanager.enable = true;
|
||||
networking.firewall.enable = false;
|
||||
|
||||
security.rtkit.enable = true;
|
||||
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
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 = true;
|
||||
|
||||
# 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;
|
||||
# prime.offload.enable = true;
|
||||
|
||||
# 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;
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
15
config/hosts/aspects/doloro-shared.nix
Normal file
15
config/hosts/aspects/doloro-shared.nix
Normal file
@@ -0,0 +1,15 @@
|
||||
{ den, modules, ... }:
|
||||
{
|
||||
den.aspects.doloro-shared = {
|
||||
includes = [
|
||||
modules.nixvim
|
||||
modules.nix
|
||||
];
|
||||
homeManager = {
|
||||
home = {
|
||||
username = "doloro";
|
||||
homeDirectory = "/home/doloro";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
75
config/hosts/aspects/laptop/disko.nix
Normal file
75
config/hosts/aspects/laptop/disko.nix
Normal file
@@ -0,0 +1,75 @@
|
||||
{
|
||||
modules,
|
||||
__findFile,
|
||||
...
|
||||
}:
|
||||
{
|
||||
den.aspects.laptop = {
|
||||
includes = [ modules.disko ];
|
||||
nixos =
|
||||
{ lib, ... }:
|
||||
{
|
||||
disko.devices = {
|
||||
disk = {
|
||||
main = {
|
||||
device = "/dev/nvme0n1";
|
||||
type = "disk";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
boot = {
|
||||
name = "boot";
|
||||
size = "1M";
|
||||
type = "EF02";
|
||||
};
|
||||
ESP = {
|
||||
name = "ESP";
|
||||
priority = 1;
|
||||
size = "4G";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [ "umask=0077" ];
|
||||
};
|
||||
};
|
||||
plainSwap = {
|
||||
size = "48G";
|
||||
content = {
|
||||
type = "swap";
|
||||
discardPolicy = "both"; # Both "once" and page discard policies
|
||||
resumeDevice = true; # Use for hibernation resume device
|
||||
};
|
||||
};
|
||||
root = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = [ "-f" ]; # Override existing partition
|
||||
# Subvolumes must set a mountpoint in order to be mounted,
|
||||
# unless their parent is mounted
|
||||
subvolumes = {
|
||||
# Subvolume name is different from mountpoint
|
||||
"@" = {
|
||||
mountpoint = "/";
|
||||
};
|
||||
# Subvolume name is the same as the mountpoint
|
||||
"@home" = {
|
||||
mountpoint = "/home";
|
||||
};
|
||||
# Parent is not mounted so the mountpoint must be set
|
||||
"@nix" = {
|
||||
mountpoint = "/nix";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
25
config/hosts/aspects/laptop/home.nix
Normal file
25
config/hosts/aspects/laptop/home.nix
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
den,
|
||||
__findFile,
|
||||
modules,
|
||||
...
|
||||
}:
|
||||
{
|
||||
den.aspects.doloro-laptop = {
|
||||
includes = [
|
||||
<den/primary-user>
|
||||
den.aspects.doloro-shared
|
||||
modules.user.doloro
|
||||
modules.sops
|
||||
modules.fish
|
||||
];
|
||||
nixos =
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
users.users.doloro = {
|
||||
shell = pkgs.fish;
|
||||
hashedPasswordFile = config.sops.secrets."doloro-hashed_password".path;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
169
config/hosts/aspects/laptop/host.nix
Normal file
169
config/hosts/aspects/laptop/host.nix
Normal file
@@ -0,0 +1,169 @@
|
||||
{
|
||||
den,
|
||||
modules,
|
||||
__findFile,
|
||||
...
|
||||
}:
|
||||
{
|
||||
den.aspects.laptop = {
|
||||
includes = [
|
||||
modules.nix
|
||||
];
|
||||
nixos =
|
||||
{ pkgs, config, ... }:
|
||||
{
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
# boot.kernelPackages = pkgs.linuxPackages_6_12; # Hibernate works on 6.12 but not on latest
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest; # Unpinned the linux version for now.. as i am not using hibernate that often
|
||||
networking.hostName = "doloro-nixos-laptop"; # Define your hostname.
|
||||
security.rtkit.enable = true;
|
||||
|
||||
# Configure network connections interactively with nmcli or nmtui.
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# Set your time zone.
|
||||
# time.timeZone = "Europe/London";
|
||||
services.automatic-timezoned.enable = true;
|
||||
|
||||
nix.settings = {
|
||||
substituters = [
|
||||
"https://nix-community.cachix.org"
|
||||
"https://cache.nixos.org/"
|
||||
"https://attic.scug.io/pkgs"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
"pkgs:+sRbfiZMMX5R3PuAPtIRz/emowDoGZNpozibrnrAvuc="
|
||||
];
|
||||
experimental-features = [
|
||||
"flakes"
|
||||
"nix-command"
|
||||
];
|
||||
trusted-users = [
|
||||
"doloro"
|
||||
];
|
||||
};
|
||||
|
||||
services.gnome.gnome-keyring.enable = true;
|
||||
|
||||
hardware = {
|
||||
firmware = [ pkgs.intel-npu-driver ];
|
||||
cpu.intel = {
|
||||
# npu.enable = true;
|
||||
};
|
||||
graphics = {
|
||||
enable = true;
|
||||
# https://github.com/intel/libvpl?tab=readme-ov-file#dispatcher-behavior-when-targeting-intel-gpus
|
||||
extraPackages = with pkgs; [
|
||||
vpl-gpu-rt
|
||||
intel-media-driver # VA-API (iHD) userspace
|
||||
intel-vaapi-driver
|
||||
# vpl-gpu-rt # oneVPL (QSV) runtime
|
||||
intel-compute-runtime # OpenCL (NEO) + Level Zero for Arc/Xe
|
||||
];
|
||||
};
|
||||
};
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
PasswordAuthentication = true;
|
||||
PermitRootLogin = "prohibit-password";
|
||||
};
|
||||
};
|
||||
users.users.root.openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBaa6Z5qtBSLEz+A4fQGYPfkOISsRQlmKkVbcx2zxML7"
|
||||
];
|
||||
|
||||
# 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;
|
||||
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
|
||||
services.libinput.enable = true;
|
||||
|
||||
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
# users.users.doloro = {
|
||||
# isNormalUser = true;
|
||||
# shell = pkgs.fish;
|
||||
# extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
||||
# packages = with pkgs; [
|
||||
# tree
|
||||
# ];
|
||||
# hashedPasswordFile = config.sops.secrets."doloro-hashed_password".path;
|
||||
# openssh.authorizedKeys.keys = [
|
||||
# "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBaa6Z5qtBSLEz+A4fQGYPfkOISsRQlmKkVbcx2zxML7" # pc public key
|
||||
# ];
|
||||
# # initialPassword = "sex";
|
||||
# };
|
||||
users.mutableUsers = false;
|
||||
services.system76-scheduler.enable = true;
|
||||
|
||||
# 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.
|
||||
# git
|
||||
# wget
|
||||
# # tlp-pd
|
||||
# brightnessctl
|
||||
# nvtopPackages.intel
|
||||
# seahorse
|
||||
# ];
|
||||
|
||||
# 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:
|
||||
|
||||
# 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.
|
||||
|
||||
# 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?
|
||||
};
|
||||
};
|
||||
}
|
||||
24
config/hosts/root.nix
Normal file
24
config/hosts/root.nix
Normal file
@@ -0,0 +1,24 @@
|
||||
{ den, __findFile, ... }:
|
||||
{
|
||||
# Homes
|
||||
den.homes.x86_64-linux.doloro-desktop = {
|
||||
userName = "doloro";
|
||||
};
|
||||
# TODO
|
||||
# den.homes.x86_64-linux.doloro-laptop = {
|
||||
# userName = "doloro";
|
||||
# };
|
||||
# Machines
|
||||
den.hosts.x86_64-linux.desktop = {
|
||||
users.doloro = {
|
||||
includes = [ <modules/user/groups> ];
|
||||
aspect = "doloro-desktop";
|
||||
};
|
||||
};
|
||||
# TODO
|
||||
# den.hosts.x86_64-linux.laptop = {
|
||||
# users.doloro = {
|
||||
# aspect = "doloro-laptop";
|
||||
# };
|
||||
# };
|
||||
}
|
||||
10
config/inputs.nix
Normal file
10
config/inputs.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
{ ... }:
|
||||
{
|
||||
flake-file.inputs = {
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
den.url = "github:vic/den";
|
||||
};
|
||||
}
|
||||
14
config/modules/disko.nix
Normal file
14
config/modules/disko.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
flake-file.inputs.disko.url = "github:nix-community/disko";
|
||||
modules.disko = {
|
||||
nixos =
|
||||
{ ... }:
|
||||
{
|
||||
imports = [ inputs.disko.nixosModules.disko ];
|
||||
};
|
||||
};
|
||||
}
|
||||
13
config/modules/dunst.nix
Normal file
13
config/modules/dunst.nix
Normal file
@@ -0,0 +1,13 @@
|
||||
{ modules, ... }:
|
||||
{
|
||||
modules.dunst = {
|
||||
services.dunst = {
|
||||
enable = true;
|
||||
settings = {
|
||||
global = {
|
||||
font = "Noto Nerd Font 8";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
44
config/modules/fish.nix
Normal file
44
config/modules/fish.nix
Normal file
@@ -0,0 +1,44 @@
|
||||
{ modules, pkgs, ... }:
|
||||
{
|
||||
modules.fish = {
|
||||
nixos = {
|
||||
programs.fish.enable = true;
|
||||
};
|
||||
homeManager = {
|
||||
home.shell.enableFishIntegration = true;
|
||||
home.packages = [ pkgs.nix-output-monitor ];
|
||||
programs = {
|
||||
fish = {
|
||||
enable = true;
|
||||
shellInit = ''
|
||||
set -g theme_nerd_fonts yes
|
||||
set -g theme_color_scheme nord
|
||||
set -g theme_display_user yes
|
||||
set -g fish_color_autosuggestion 6F6578
|
||||
alias nik 'nix'
|
||||
'';
|
||||
# alias nos 'sudo echo; sudo nixos-rebuild switch --flake .#${aspect-name} --log-format internal-json -v &| nom --json'
|
||||
# alias hms 'home-manager switch --flake .#${aspect-name} --log-format internal-json -v &| nom --json'
|
||||
plugins = [
|
||||
{
|
||||
name = "bobthefish";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "oh-my-fish";
|
||||
repo = "theme-bobthefish";
|
||||
rev = "e3b4d4eafc23516e35f162686f08a42edf844e40";
|
||||
sha256 = "sha256-cXOYvdn74H4rkMWSC7G6bT4wa9d3/3vRnKed2ixRnuA=";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
eza = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
icons = "auto";
|
||||
git = true;
|
||||
extraOptions = [ ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
46
config/modules/hyprland/hyprland.nix
Normal file
46
config/modules/hyprland/hyprland.nix
Normal file
@@ -0,0 +1,46 @@
|
||||
{
|
||||
modules,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
flake-file.inputs = {
|
||||
hyprland.url = "github:hyprwm/Hyprland";
|
||||
};
|
||||
modules.hyprland = {
|
||||
nixos =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.xwayland.enable = true;
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
# withUWSM = true;
|
||||
# set the flake package
|
||||
package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
|
||||
# make sure to also set the portal package, so that they are in sync
|
||||
portalPackage =
|
||||
inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
|
||||
};
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
# extraPortals = [ pkgs.xdg-desktop-portal-cosmic ];
|
||||
};
|
||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
hardware.graphics = {
|
||||
# package = pkgs-unstable.mesa;
|
||||
|
||||
# if you also want 32-bit support (e.g for Steam)
|
||||
# enable32Bit = true;
|
||||
# package32 = pkgs-unstable.pkgsi686Linux.mesa;
|
||||
};
|
||||
};
|
||||
homeManager =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
systemd.variables = [ "--all" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
4
config/modules/hyprland/settings.nix
Normal file
4
config/modules/hyprland/settings.nix
Normal file
@@ -0,0 +1,4 @@
|
||||
{ modules, ... }:
|
||||
{
|
||||
|
||||
}
|
||||
34
config/modules/nix.nix
Normal file
34
config/modules/nix.nix
Normal file
@@ -0,0 +1,34 @@
|
||||
{ ... }:
|
||||
{
|
||||
modules.nix = {
|
||||
nixos =
|
||||
{ ... }:
|
||||
{
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
nix.settings = {
|
||||
substituters = [
|
||||
"https://hyprland.cachix.org"
|
||||
"https://nix-community.cachix.org"
|
||||
"https://cache.nixos.org/"
|
||||
"https://attic.scug.io/pkgs"
|
||||
"https://cache.nixos-cuda.org"
|
||||
"https://niri.cachix.org"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
"pkgs:+sRbfiZMMX5R3PuAPtIRz/emowDoGZNpozibrnrAvuc="
|
||||
"cache.nixos-cuda.org:74DUi4Ye579gUqzH4ziL9IyiJBlDpMRn9MBN8oNan9M="
|
||||
"niri.cachix.org-1:Wv0OmO7PsuocRKzfDoJ3mulSl7Z6oezYhGhR+3W2964="
|
||||
];
|
||||
experimental-features = [
|
||||
"flakes"
|
||||
"nix-command"
|
||||
];
|
||||
trusted-users = [
|
||||
"doloro"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
278
config/modules/nixvim/default.nix
Normal file
278
config/modules/nixvim/default.nix
Normal file
@@ -0,0 +1,278 @@
|
||||
{
|
||||
den,
|
||||
modules,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
# Its in its own folder for future modulizaion efforts
|
||||
flake-file.inputs = {
|
||||
nixvim = {
|
||||
url = "github:nix-community/nixvim";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
modules = {
|
||||
nixvim = {
|
||||
homeManager =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
inputs.nixvim.homeModules.nixvim
|
||||
];
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
colorschemes.gruvbox-material.enable = true;
|
||||
extraPackages = with pkgs; [
|
||||
# formatters
|
||||
nixfmt
|
||||
rustfmt
|
||||
# misc
|
||||
ripgrep
|
||||
# misc
|
||||
nixd
|
||||
];
|
||||
performance.byteCompileLua = {
|
||||
enable = true;
|
||||
plugins = true;
|
||||
nvimRuntime = true;
|
||||
luaLib = true;
|
||||
configs = true;
|
||||
};
|
||||
plugins = {
|
||||
todo-comments.enable = true;
|
||||
lsp-status.enable = true;
|
||||
transparent.enable = true;
|
||||
conform-nvim = {
|
||||
enable = true;
|
||||
settings = {
|
||||
formatters_by_ft = {
|
||||
nix = [ "nixfmt" ];
|
||||
rust = [ "rustfmt" ];
|
||||
"_" = [
|
||||
"squeeze_blanks"
|
||||
"trim_whitespace"
|
||||
"trim_newlines"
|
||||
];
|
||||
};
|
||||
format_on_save = {
|
||||
timeout_ms = 500;
|
||||
lsp_format = "fallback";
|
||||
};
|
||||
};
|
||||
};
|
||||
lsp = {
|
||||
enable = true;
|
||||
servers = {
|
||||
qmlls = {
|
||||
enable = true;
|
||||
config = {
|
||||
cmd = "-E";
|
||||
};
|
||||
};
|
||||
rust_analyzer = {
|
||||
enable = true;
|
||||
installCargo = false;
|
||||
installRustc = false;
|
||||
};
|
||||
nixd = {
|
||||
enable = true;
|
||||
};
|
||||
astro = {
|
||||
enable = true;
|
||||
};
|
||||
ts_ls = {
|
||||
enable = true;
|
||||
};
|
||||
svelte.enable = true;
|
||||
};
|
||||
};
|
||||
lsp-format = {
|
||||
enable = true;
|
||||
# lspServersToEnable = [ "qmlls" ];
|
||||
};
|
||||
notify = {
|
||||
enable = true;
|
||||
settings = {
|
||||
background_color = "#00000000";
|
||||
};
|
||||
};
|
||||
mini-cursorword.enable = true;
|
||||
# mini-statusline.enable = true;
|
||||
lualine = {
|
||||
enable = true;
|
||||
settings = {
|
||||
sections = {
|
||||
lualine_a = [ "mode" ];
|
||||
lualine_b = [
|
||||
"branch"
|
||||
"diff"
|
||||
"diagnostics"
|
||||
];
|
||||
lualine_c = [ "filename" ];
|
||||
lualine_x = [
|
||||
"encoding"
|
||||
"fileformat"
|
||||
"filetype"
|
||||
];
|
||||
lualine_y = [ "lsp_status" ];
|
||||
lualine_z = [ "location" ];
|
||||
};
|
||||
inactive_sections = {
|
||||
lualine_a = [ ];
|
||||
lualine_b = [ ];
|
||||
lualine_c = [ "filename" ];
|
||||
lualine_x = [ "location" ];
|
||||
lualine_y = [ ];
|
||||
lualine_z = [ ];
|
||||
};
|
||||
};
|
||||
};
|
||||
web-devicons.enable = true;
|
||||
vim-dadbod-completion.enable = true;
|
||||
telescope.enable = true;
|
||||
lazygit.enable = true;
|
||||
mini-indentscope = {
|
||||
enable = true;
|
||||
settings = {
|
||||
draw = {
|
||||
delay = 10;
|
||||
};
|
||||
};
|
||||
};
|
||||
mini-files = {
|
||||
enable = true;
|
||||
settings = {
|
||||
windows = {
|
||||
preview = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
trouble.enable = true;
|
||||
cmp = {
|
||||
enable = true;
|
||||
autoEnableSources = true;
|
||||
settings = {
|
||||
sources = [
|
||||
{ name = "nvim_lsp"; }
|
||||
{ name = "path"; }
|
||||
{ name = "buffer"; }
|
||||
];
|
||||
mapping = {
|
||||
"<C-Space>" = "cmp.mapping.complete()";
|
||||
"<C-d>" = "cmp.mapping.scroll_docs(-4)";
|
||||
"<C-e>" = "cmp.mapping.close()";
|
||||
"<C-f>" = "cmp.mapping.scroll_docs(4)";
|
||||
"<CR>" = "cmp.mapping.confirm({ select = true })";
|
||||
"<S-Tab>" = "cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})";
|
||||
"<Tab>" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})";
|
||||
};
|
||||
};
|
||||
};
|
||||
lspkind.enable = true;
|
||||
tiny-inline-diagnostic.enable = true;
|
||||
# persisted.enable = true;
|
||||
auto-session = {
|
||||
enable = true;
|
||||
settings = {
|
||||
enabled = true;
|
||||
auto_save = true;
|
||||
auto_restore = true;
|
||||
};
|
||||
};
|
||||
wakatime.enable = true;
|
||||
treesitter = {
|
||||
enable = true;
|
||||
grammarPackages = with pkgs.vimPlugins.nvim-treesitter.builtGrammars; [
|
||||
bash
|
||||
json
|
||||
lua
|
||||
make
|
||||
markdown
|
||||
nix
|
||||
regex
|
||||
toml
|
||||
vim
|
||||
vimdoc
|
||||
xml
|
||||
yaml
|
||||
];
|
||||
settings = {
|
||||
highlight.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
extraPlugins = with pkgs; [
|
||||
# vimPlugins.mini-completion
|
||||
vimPlugins.mini-comment
|
||||
vimPlugins.melange-nvim
|
||||
vimPlugins.telescope-file-browser-nvim
|
||||
vimPlugins.lsp-progress-nvim
|
||||
];
|
||||
opts = {
|
||||
number = true;
|
||||
bg = "dark";
|
||||
tabstop = 2;
|
||||
shiftwidth = 2;
|
||||
termguicolors = true;
|
||||
};
|
||||
globals = {
|
||||
mapleader = " ";
|
||||
};
|
||||
keymaps = [
|
||||
{
|
||||
action = "<cmd>Telescope persisted<cr>";
|
||||
key = "<leader>fs";
|
||||
options = {
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
action = "<cmd>Telescope find_files<cr>";
|
||||
key = "<leader>ff";
|
||||
options = {
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
action = "<cmd>:lua MiniFiles.open()<cr>";
|
||||
key = "<leader>fv";
|
||||
options = {
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
action = "<cmd>LazyGit<cr>";
|
||||
key = "<leader>lg";
|
||||
options = {
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
action = "<cmd>Telescope buffers<cr>";
|
||||
key = "<leader>fb";
|
||||
options = {
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
action = "<cmd>Telescope live_grep<cr>";
|
||||
key = "<leader>fg";
|
||||
options = {
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
action = "<cmd>Trouble diagnostics toggle<cr>";
|
||||
key = "<leader>fd";
|
||||
options = {
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
46
config/modules/secrets/secrets.yaml
Normal file
46
config/modules/secrets/secrets.yaml
Normal file
@@ -0,0 +1,46 @@
|
||||
doloro-hashed_password: ENC[AES256_GCM,data:RYB/bSNTz1TeGucdFHrxxhOqvqQYvQS3lm44I1Lf3LIEVMXL5s41zxIw0S+JVdlq8I3oHDY4C3o5V4lu+8qAWMyIZYp/6Xp4cw==,iv:yOuKk95skNZ5z805vtoJwvyOdsh08BuyBSgXN+M4Ybo=,tag:QAFhUYuqHT6Spw/l4feY4g==,type:str]
|
||||
root-hashed_password: ENC[AES256_GCM,data:vzVtz1Ht4XD+omdKjU/Zvoaftq8jKE4kxOjAGZTvoYI07hjItR2TSsYrLw0lwsxyJosfoyF3bVsZSFCuuN7njdchGMSSujZJhg==,iv:0av3n4fcGOHYQB4zidt/qn+blBSiDQ29LN15sVufLLs=,tag:nKKVDbCGxB7wDrMPAyJOaw==,type:str]
|
||||
wakatime-scug-io-api-key: ENC[AES256_GCM,data:XQUccNW4210U8ZpHSGVcsdbAirzyTvmcy4y6emk7n4N6MO/W,iv:9/f9ceLshA7l8hJB+IDIPvEwYwSkFlPOLmpvtYXLTpU=,tag:x7hESZCouzYVNef2C+iCSA==,type:str]
|
||||
meow: ENC[AES256_GCM,data:JVzenw==,iv:oCOo9//r5s2K4pSeH5UNEj0LL+9h2yq0G0DPOfwjmyQ=,tag:0gu9FNOrjQ8fpB+B+RbGSg==,type:str]
|
||||
sops:
|
||||
age:
|
||||
- recipient: age1ykcy2r4kk729e7adqxu8s24ujc60z5eux7ma0ca4ruzydwgm5p6qmdp838
|
||||
enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBIYVcvRFNGOUwyTllMSWtX
|
||||
WGdEeWVBa0U5MXROTXEwSzVJZms5MWZmM1RzCk9ra1FmT2tlbkp4ZW5tYW90SEhK
|
||||
Y25TNmFrMEg4TzJIT0wwaGRQMlYrZXMKLS0tIEpKaEMvdHB6aVBodmN1OERXZ2da
|
||||
SUh3TjIreHJBL0VEUXJkOGpseVphYlkKnhM3XxcBXG4Y+OedQzcngNACsFoASPTp
|
||||
Ik5COr5AVsinTS+uOpNDKIY+y0mwkZq50NSIBMy0drhDjd3i+h5dmA==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
- recipient: age1e6vws55p0g23qzthm4qa93hpt6lqmck6670gkygph0sc0j7my4uq5wqjfh
|
||||
enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSAwWmZGZWUwZUk5UEk2Ujgz
|
||||
S0RHd0VSUWNEbWtoTlRkOWphS0IzeE8vT0FFCjlxaFVESGdpeVFCUlRCaGo0U0pZ
|
||||
Y1NFQXRNVm52SXgxMGtkc2NVTTRzMGcKLS0tIER5bHZLV0lsczh6dXdJQWpjakpX
|
||||
Zms5MnphZ09UZWVNdFcrREx5U1Y0UGMKE9KkY+8lbZ7to2aGhsJ4iSmboyfekOJi
|
||||
giQ1GWdOs/MJAPN/xgcHzfNj7hzEUJxgj5z0kd0q2GzZCOvGfO16NA==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
- recipient: age1x3lahhkefkap67cdmdjcqaxan9hp62er78akr79v9m73nvgugpeqk0y32a
|
||||
enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSA3cnhuNDh3SEFxZUpXTHdv
|
||||
RWRHNVFTcm1xbjdiN3FRRjFVR2JPRkdCcXd3Cm51VHptYXVlYnQzY0pJSGt1anZn
|
||||
QTZ3YTgwSFJUUUxsMEYrdk9RRUFyN0UKLS0tIFJKNDNKY0lnQVdlM1gycm1sRkJ2
|
||||
cHJTV1FZbDZ0M3NpS2w1YW01ZGhIWDAKef6765U4ew5QPmbHhDuufAjq0bS/qhJh
|
||||
9N7g+a4vqTvv5TaOYQ98JBgfVclOZYIx9WO6xPJnb495gPyhWxEjuQ==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
- recipient: age1exzngtk4d9vcsmcq6ap5xx3ca9qacqjkrv86ymged7msx9z6vfyqsf5sjq
|
||||
enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBheUI4VzZUN3NSTGc3U1kv
|
||||
YzJqRk1mNjBUVTdFNzRNTTZQSmcvUW5zcnowCjI4WlRoL2pPeDZWRy9TaEZUQ1po
|
||||
YUl1emFGL29qYW9iZXExUVBZai9GN2sKLS0tIEZ1ZEM2N05zYzU4OFdUVUtDaHRu
|
||||
a3Y2V1I5TjFnVUNiWEZlZkVMekFZelEKXZc7W3mZcj/rypQ+Wm2Iqvd/4Ry/n507
|
||||
FcYa+F2LT32D43AoaPZxEHIyJCYUeGpD7Z9rcI822u4pOpCvuoKiRg==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2025-12-28T17:02:38Z"
|
||||
mac: ENC[AES256_GCM,data:uWBbdr10CpCUsn6TcaqewwqnXlICizTGW+arCLZz5S0b+Nc8iznq98Ev/G4M9mg4f79JRSwXnL6KgtVyf0Hd5LJuEhmViv2wTNfOTBffN3AV/Bvz2qCuwhD14GzPGUH3oYijfx+EB1LaGLniE2rx85h+q1hasRUlUY8UE/ndzus=,iv:rIM5T3PkzTsJYRjvWWbJyEcKu3evRcYJhVNeGCtOlms=,tag:pCYvDaI0qLIvJJzwT08nwQ==,type:str]
|
||||
unencrypted_suffix: _unencrypted
|
||||
version: 3.11.0
|
||||
38
config/modules/secrets/sops.nix
Normal file
38
config/modules/secrets/sops.nix
Normal file
@@ -0,0 +1,38 @@
|
||||
{ inputs, modules, ... }:
|
||||
{
|
||||
#
|
||||
flake-file.inputs = {
|
||||
sops-nix = {
|
||||
url = "github:Mic92/sops-nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
modules.sops = {
|
||||
homeManager = {
|
||||
imports = [
|
||||
inputs.sops-nix.homeManagerModules.sops
|
||||
];
|
||||
sops = {
|
||||
age.keyFile = "/home/doloro/.config/sops/age/key.txt"; # must have no password!
|
||||
defaultSopsFile = ./secrets.yaml;
|
||||
};
|
||||
};
|
||||
nixos = {
|
||||
imports = [
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
];
|
||||
sops = {
|
||||
age.keyFile = "/etc/ssh/ssh_host_ed25519_key";
|
||||
defaultSopsFile = ./secrets.yaml;
|
||||
secrets = {
|
||||
root-hashed_password = {
|
||||
neededForUsers = true;
|
||||
};
|
||||
doloro-hashed_password = {
|
||||
neededForUsers = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
18
config/modules/tmux.nix
Normal file
18
config/modules/tmux.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{ pkgs, modules, ... }:
|
||||
{
|
||||
modules.tmux = {
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
plugins = with pkgs.tmuxPlugins; [
|
||||
sensible
|
||||
minimal-tmux-status
|
||||
];
|
||||
extraConfig = ''
|
||||
set-option -g default-terminal "xterm-256color"
|
||||
set -a terminal-features "xterm-256color:RGB"
|
||||
set -g status-bg black
|
||||
set -g status-fg white
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
15
config/modules/user/doloro.nix
Normal file
15
config/modules/user/doloro.nix
Normal file
@@ -0,0 +1,15 @@
|
||||
{ modules, ... }:
|
||||
{
|
||||
modules.user.groups =
|
||||
{ config, user, ... }:
|
||||
{
|
||||
nixos = {
|
||||
users.users.${user.userName} = {
|
||||
extraGroups = [
|
||||
"wheel"
|
||||
"networkmanager"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
14
config/namespace.nix
Normal file
14
config/namespace.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
inputs,
|
||||
den,
|
||||
__findFile ? __findFile,
|
||||
...
|
||||
}:
|
||||
{
|
||||
_module.args.__findFile = den.lib.__findFile;
|
||||
imports = [
|
||||
inputs.den.flakeModule
|
||||
(inputs.den.namespace "modules" true)
|
||||
# (inputs.den.namespace "hosts" true)
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user