Compare commits
2 Commits
349f056e46
...
810aa7be5a
| Author | SHA1 | Date | |
|---|---|---|---|
| 810aa7be5a | |||
| 243a6b5217 |
+31
-10
@@ -179,7 +179,7 @@ outputs =
|
|||||||
let
|
let
|
||||||
lib = nixpkgs.lib;
|
lib = nixpkgs.lib;
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
user = import ./assets/flake/users/henrov.nix;
|
user = import ./generated/out_of_tree/users/henrov.nix;
|
||||||
machines = [
|
machines = [
|
||||||
"traveldroid"
|
"traveldroid"
|
||||||
"maindroid"
|
"maindroid"
|
||||||
@@ -219,7 +219,7 @@ outputs =
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
devShells.${system}.default = import ./assets/flake/terminal_shell/devshell.nix {
|
devShells.${system}.default = import ./generated/out_of_tree/terminal_shell/devshell.nix {
|
||||||
inherit (nixpkgs.legacyPackages.${system}) mkShell;
|
inherit (nixpkgs.legacyPackages.${system}) mkShell;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -227,9 +227,9 @@ outputs =
|
|||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
* First the nix-files that flake really needs and that do not fit wel in the hierarchical structure
|
* First the nix-files that flake really needs and that do not fit wel in the hierarchical structure
|
||||||
** =assets/flake/users/top.nix=
|
** =generated/out_of_tree/users/top.nix=
|
||||||
The ./generated/top.nix file acts as an anchor or entry point for the entire chain of imports in the pyramid structure.
|
The ./generated/top.nix file acts as an anchor or entry point for the entire chain of imports in the pyramid structure.
|
||||||
#+BEGIN_SRC nix :tangle assets/flake/users/top.nix :noweb tangle :mkdirp yes :eval never-html
|
#+BEGIN_SRC nix :tangle generated/out_of_tree/users/top.nix :noweb tangle :mkdirp yes :eval never-html
|
||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
@@ -238,9 +238,9 @@ The ./generated/top.nix file acts as an anchor or entry point for the entire cha
|
|||||||
}
|
}
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** =assets/flake/users/user.nix=
|
** =generated/out_of_tree/users/user.nix=
|
||||||
This is the default user, just search and replace henrov another name if you want to change
|
This is the default user, just search and replace henrov another name if you want to change
|
||||||
#+BEGIN_SRC nix :tangle assets/flake/users/user.nix :noweb tangle :mkdirp yes :eval never-html
|
#+BEGIN_SRC nix :tangle generated/out_of_tree/users/user.nix :noweb tangle :mkdirp yes :eval never-html
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
@@ -269,9 +269,9 @@ in
|
|||||||
}
|
}
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** =assets/flake/users/henrov.nix=
|
** =generated/out_of_tree/users/henrov.nix=
|
||||||
This is the default user, just search and replace henrov another name if you want to change
|
This is the default user, just search and replace henrov another name if you want to change
|
||||||
#+BEGIN_SRC nix :tangle assets/flake/users/henrov.nix :noweb tangle :mkdirp yes :eval never-html
|
#+BEGIN_SRC nix :tangle generated/out_of_tree/users/henrov.nix :noweb tangle :mkdirp yes :eval never-html
|
||||||
{
|
{
|
||||||
username = "henrov";
|
username = "henrov";
|
||||||
hashedPassword = "$6$ISAmsPLyFi7idYXr$VmZsq.zMsyh1irSkyDNqtorNXG0oEHbbMVqTii1t8bymvrQ5ZQmbdi4OiBNeNYe/huHGrojXM.3TST2fTLz0T.";
|
hashedPassword = "$6$ISAmsPLyFi7idYXr$VmZsq.zMsyh1irSkyDNqtorNXG0oEHbbMVqTii1t8bymvrQ5ZQmbdi4OiBNeNYe/huHGrojXM.3TST2fTLz0T.";
|
||||||
@@ -281,9 +281,30 @@ This is the default user, just search and replace henrov another name if you wan
|
|||||||
}
|
}
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** =assets/flake/terminal_shell/devshell.nix=
|
** =generated/out_of_tree/terminal_shell/top.nix=
|
||||||
This code defines a Nix shell environment (also called a "devShell") that you can enter using the nix develop command. When you enter this shell, Nix will provide the tools and dependencies listed in buildInputs.
|
This code defines a Nix shell environment (also called a "devShell") that you can enter using the nix develop command. When you enter this shell, Nix will provide the tools and dependencies listed in buildInputs.
|
||||||
#+BEGIN_SRC nix :tangle assets/flake/terminal_shell/devshell.nix :noweb tangle :mkdirp yes :eval never-html
|
#+BEGIN_SRC nix :tangle generated/out_of_tree/terminal_shell/top.nix :noweb tangle :mkdirp yes :eval never-html
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
user,
|
||||||
|
inputs,
|
||||||
|
flakeRoot,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./devshell.nix
|
||||||
|
inputs.home-manager.nixosModules.home-manager
|
||||||
|
];
|
||||||
|
}
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
** =generated/out_of_tree/terminal_shell/devshell.nix=
|
||||||
|
This code defines a Nix shell environment (also called a "devShell") that you can enter using the nix develop command. When you enter this shell, Nix will provide the tools and dependencies listed in buildInputs.
|
||||||
|
#+BEGIN_SRC nix :tangle generated/out_of_tree/terminal_shell/devshell.nix :noweb tangle :mkdirp yes :eval never-html
|
||||||
{ mkShell, ... }:
|
{ mkShell, ... }:
|
||||||
mkShell {
|
mkShell {
|
||||||
buildInputs = with import <nixpkgs> {}; [
|
buildInputs = with import <nixpkgs> {}; [
|
||||||
|
|||||||
+1
-1
@@ -50,7 +50,7 @@ outputs =
|
|||||||
inherit system;
|
inherit system;
|
||||||
modules = [
|
modules = [
|
||||||
# Import machine-specific configurations
|
# Import machine-specific configurations
|
||||||
./assets/flake/machines/traveldroid/top.nix
|
./generated/out_of_tree/machines/traveldroid/top.nix
|
||||||
# Catppuccin theme module
|
# Catppuccin theme module
|
||||||
inputs.catppuccin.nixosModules.catppuccin
|
inputs.catppuccin.nixosModules.catppuccin
|
||||||
# Anchoring all the other nixes
|
# Anchoring all the other nixes
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
services.pipewire = {
|
||||||
|
enable = true;
|
||||||
|
alsa.enable = true; # ALSA compatibility
|
||||||
|
pulse.enable = true; # PulseAudio compatibility
|
||||||
|
wireplumber.enable = true; # Session manager for PipeWire
|
||||||
|
};
|
||||||
|
|
||||||
|
# Realtime privileges for pro audio (optional)
|
||||||
|
security.rtkit.enable = true;
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
# Enable Bluetooth hardware and daemon
|
||||||
|
hardware.bluetooth = {
|
||||||
|
enable = true;
|
||||||
|
powerOnBoot = true;
|
||||||
|
packages = with pkgs; [ bluez ];
|
||||||
|
};
|
||||||
|
|
||||||
|
# Enable Bluetooth audio support in PipeWire
|
||||||
|
services.pipewire = {
|
||||||
|
config.pulse = {
|
||||||
|
bluez5.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Optional: Additional Bluetooth settings
|
||||||
|
hardware.bluetooth.extraConfig = ''
|
||||||
|
AutoEnable=true
|
||||||
|
DiscoverableTimeout=0
|
||||||
|
PairableTimeout=0
|
||||||
|
'';
|
||||||
|
|
||||||
|
# Install a graphical Bluetooth manager (optional)
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
blueman
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
{ pkgs, ... } :
|
||||||
|
{
|
||||||
|
boot = {
|
||||||
|
initrd = {
|
||||||
|
verbose = false; # its a lot of logs. dont need it, unless we do.
|
||||||
|
kernelModules = [ ]; # no kernel modules on boot
|
||||||
|
};
|
||||||
|
|
||||||
|
extraModulePackages = [ ]; # no extra packages on boot either
|
||||||
|
kernelPackages = pkgs.linuxPackages_latest; # latest greatest linux kernel
|
||||||
|
kernelParams = [ "silent" ]; # quiet those logs
|
||||||
|
|
||||||
|
consoleLogLevel = 0; # quiten more logs
|
||||||
|
plymouth.enable = true; # graphical boot animation instead
|
||||||
|
|
||||||
|
supportedFilesystems = [ "ntfs" ]; # should see the ntfs (windows)
|
||||||
|
|
||||||
|
loader = {
|
||||||
|
systemd-boot.enable = true; # systemd-boot
|
||||||
|
systemd-boot.configurationLimit = 10;
|
||||||
|
efi.canTouchEfiVariables = true; # allow editing efi to edit the boot loader
|
||||||
|
timeout = 5; # grub timeout to make a selection
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
{
|
||||||
|
services.dbus = lib.mkForce {
|
||||||
|
enable = true; # Force this to be true
|
||||||
|
};
|
||||||
|
|
||||||
|
# Configure dbus-broker via its configuration file
|
||||||
|
environment.etc."dbus-broker/launch.conf".text = ''
|
||||||
|
[General]
|
||||||
|
LogLevel=warning
|
||||||
|
MaxConnectionsPerUser=2048
|
||||||
|
'';
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
{
|
||||||
|
hostname,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
modulesPath,
|
||||||
|
user,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
# (modulesPath + "/installer/scan/not-detected.nix")
|
||||||
|
#../../hardware/hardware.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = [
|
||||||
|
"xhci_pci"
|
||||||
|
"nvme"
|
||||||
|
"usb_storage"
|
||||||
|
"sd_mod"
|
||||||
|
"rtsx_usb_sdmmc"
|
||||||
|
];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
fileSystems."/" = {
|
||||||
|
device = "/dev/disk/by-uuid/69433a14-fbaf-401b-af85-cd1bbf02b4e2";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" = {
|
||||||
|
device = "/dev/disk/by-uuid/811D-0676";
|
||||||
|
fsType = "vfat";
|
||||||
|
options = [
|
||||||
|
"fmask=0077"
|
||||||
|
"dmask=0077"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [
|
||||||
|
{ device = "/dev/disk/by-uuid/b6c557c2-7682-460b-a5e7-8f6f2f429a3a"; }
|
||||||
|
];
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
user,
|
||||||
|
inputs,
|
||||||
|
flakeRoot,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
wm = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
default = "hyprland";
|
||||||
|
description = "Type of window manager to use";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
# Minimal settings that must be defined here
|
||||||
|
networking.hostName = "traveldroid";
|
||||||
|
wm.type = "hyprland";
|
||||||
|
|
||||||
|
# User configuration
|
||||||
|
users.users.${user.username} = {
|
||||||
|
isNormalUser = true;
|
||||||
|
extraGroups = [
|
||||||
|
"wheel"
|
||||||
|
"networkmanager"
|
||||||
|
];
|
||||||
|
hashedPassword = user.hashedPassword;
|
||||||
|
home = user.homeDirectory;
|
||||||
|
};
|
||||||
|
# Optional: Enable auto-login for testing
|
||||||
|
services.getty.autologinUser = user.username;
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
networking = {
|
||||||
|
useDHCP = lib.mkDefault true;
|
||||||
|
networkmanager.enable = true;
|
||||||
|
networkmanager.wifi.backend = "iwd";
|
||||||
|
wireless.iwd.enable = true;
|
||||||
|
wireless.userControlled.enable = true;
|
||||||
|
firewall = {
|
||||||
|
enable = true;
|
||||||
|
# KDE Connect: discovery + encrypted connections
|
||||||
|
allowedTCPPortRanges = [
|
||||||
|
{
|
||||||
|
from = 1714;
|
||||||
|
to = 1764;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
allowedUDPPortRanges = [
|
||||||
|
{
|
||||||
|
from = 1714;
|
||||||
|
to = 1764;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Install NetworkManager and wofi
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
networkmanager
|
||||||
|
wofi
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
{ config, pkgs, user, ... }:
|
||||||
|
{
|
||||||
|
environment.sessionVariables = {
|
||||||
|
XDG_SESSION_TYPE = "wayland";
|
||||||
|
XDG_CURRENT_DESKTOP = "Hyprland";
|
||||||
|
XCURSOR_SIZE = "24";
|
||||||
|
GTK_ENABLE_DARK_MODE = "1";
|
||||||
|
GTK_THEME = "Catppuccin-Mocha-Standard-Blue-Dark";
|
||||||
|
GTK_ICON_THEME = "Papirus-Dark";
|
||||||
|
# Use this instead of GTK_APPLICATION_PREFER_DARK_THEME for newer GTK apps:
|
||||||
|
GTK_THEME_VARIANT = "dark";
|
||||||
|
# For Qt apps (if any):
|
||||||
|
QT_STYLE_OVERRIDE = "gtk2";
|
||||||
|
# For Zen Browser (Firefox fork):
|
||||||
|
MOZ_ENABLE_WAYLAND = "1";
|
||||||
|
GSETTINGS_SCHEMA_DIR = "${pkgs.gsettings-desktop-schemas}/share/glib-2.0/schemas";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Add other session-wide variables here (e.g., QT_QPA_PLATFORM, SDL_VIDEODRIVER)
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
user,
|
||||||
|
inputs,
|
||||||
|
flakeRoot,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./boot.nix
|
||||||
|
./hardware-configuration.nix
|
||||||
|
./machine.nix
|
||||||
|
./dbus.nix
|
||||||
|
./audio.nix
|
||||||
|
./xdg.nix
|
||||||
|
./session.nix
|
||||||
|
./networking.nix
|
||||||
|
inputs.home-manager.nixosModules.home-manager
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
xdg.portal = {
|
||||||
|
enable = true;
|
||||||
|
config.system.default = [ "hyprland" "gtk" ];
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user