Initial commit of NixOS configuration
This commit is contained in:
7
components/default.nix
Normal file
7
components/default.nix
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{lib, ...}: {
|
||||||
|
imports = [
|
||||||
|
./hyprland
|
||||||
|
./utils.nix
|
||||||
|
./waybar.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
8
components/hyprland/default.nix
Normal file
8
components/hyprland/default.nix
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{lib, ...}: {
|
||||||
|
imports = [
|
||||||
|
./hyprland.nix
|
||||||
|
./hypridle.nix
|
||||||
|
./hyprlock.nix
|
||||||
|
./hyprpaper.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
8
components/hyprland/hypridle.nix
Normal file
8
components/hyprland/hypridle.nix
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{pkgs, ...}: {
|
||||||
|
services.hypridle = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
before_sleep_cmd = "hyprlock";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
163
components/hyprland/hyprland.nix
Normal file
163
components/hyprland/hyprland.nix
Normal file
@@ -0,0 +1,163 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
cfg=config.hyprland;
|
||||||
|
in {
|
||||||
|
options = {
|
||||||
|
hyprland = {
|
||||||
|
primaryModifier = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
default = "SUPER";
|
||||||
|
};
|
||||||
|
secondaryModifier = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
default = "Control_L";
|
||||||
|
};
|
||||||
|
terminal = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
default = "kitty";
|
||||||
|
};
|
||||||
|
fileManager = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
default = "dolphin";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config = {
|
||||||
|
wayland.windowManager.hyprland = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
monitor = [
|
||||||
|
"eDP-1, 2256x1504@60, 0x0, 1"
|
||||||
|
"desc:HAT Kamvas 12 l56051794302, 1920x1080@60, 0x1504, 1"
|
||||||
|
];
|
||||||
|
|
||||||
|
"$mod1" = cfg.primaryModifier;
|
||||||
|
"$mod2" = cfg.secondaryModifier;
|
||||||
|
|
||||||
|
exec-once = [
|
||||||
|
"waybar"
|
||||||
|
"hyprpaper"
|
||||||
|
"nm-applet"
|
||||||
|
"hypridle"
|
||||||
|
"wl-paste --watch cliphist store"
|
||||||
|
"XDG_MENU_PREFIX=arch- kbuildsycoca6"
|
||||||
|
];
|
||||||
|
|
||||||
|
env = [
|
||||||
|
"XCURSOR_SIZE,24"
|
||||||
|
"HYPRCURSOR_SIZE,24"
|
||||||
|
"XDG_SESSION_TYPE,wayland"
|
||||||
|
"QT_QPA_PLATFORMTHEME,qt6ct"
|
||||||
|
"QT_QPA_PLATFORM,wayland"
|
||||||
|
"GTK_THEME, Adwaita:dark"
|
||||||
|
"XDG_MENU_PREFIX,plasma-"
|
||||||
|
];
|
||||||
|
|
||||||
|
misc = {
|
||||||
|
force_default_wallpaper = 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
general = {
|
||||||
|
gaps_in = 5;
|
||||||
|
gaps_out = 10;
|
||||||
|
border_size = 2;
|
||||||
|
"col.active_border" = "rgba(463155ff)";
|
||||||
|
"col.inactive_border" = "rgba(251b31aa)";
|
||||||
|
resize_on_border = false;
|
||||||
|
allow_tearing = false;
|
||||||
|
layout = "dwindle";
|
||||||
|
};
|
||||||
|
|
||||||
|
decoration = {
|
||||||
|
rounding = 12;
|
||||||
|
rounding_power = 2;
|
||||||
|
active_opacity = 1.0;
|
||||||
|
inactive_opacity = 0.95;
|
||||||
|
|
||||||
|
shadow = {
|
||||||
|
enabled = true;
|
||||||
|
range = 4;
|
||||||
|
render_power = 3;
|
||||||
|
color = "rgba(1a1a1aee)";
|
||||||
|
};
|
||||||
|
|
||||||
|
blur = {
|
||||||
|
enabled = true;
|
||||||
|
size = 5;
|
||||||
|
passes = 2;
|
||||||
|
noise = 0.06;
|
||||||
|
new_optimizations = true;
|
||||||
|
vibrancy = 0.1696;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
input = {
|
||||||
|
kb_layout = "gb";
|
||||||
|
follow_mouse = 1;
|
||||||
|
sensitivity = 0;
|
||||||
|
touchpad = {
|
||||||
|
natural_scroll = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
gesture = [
|
||||||
|
"3, horizontal, workspace"
|
||||||
|
];
|
||||||
|
|
||||||
|
bind = [
|
||||||
|
"$mod1, Q, exec, ${cfg.terminal}"
|
||||||
|
"$mod2&Shift_L, Q, killactive"
|
||||||
|
"$mod2&alt, Q, forcekillactive"
|
||||||
|
"$mod1, L, exec, hyprlock"
|
||||||
|
"$mod1&alt, L, exit"
|
||||||
|
"$mod1, F, exec, ${cfg.fileManager}"
|
||||||
|
"$mod1&Shift_L, V, togglefloating"
|
||||||
|
"$mod1, R, exec, rofi -show run"
|
||||||
|
"alt, space, exec, rofi -show drun"
|
||||||
|
"$mod1, P, pseudo, "
|
||||||
|
"$mod1, J, togglesplit, "
|
||||||
|
"$mod2&Shift_L, F, fullscreen"
|
||||||
|
"$mod1, left, movefocus, l"
|
||||||
|
"$mod1, right, movefocus, r"
|
||||||
|
"$mod1, up, movefocus, u"
|
||||||
|
"$mod1, down, movefocus, d"
|
||||||
|
"$mod1&$mod2, right, workspace, +1"
|
||||||
|
"$mod1&$mod2, left, workspace, -1"
|
||||||
|
"$mod1&$mod2&Shift_L, right, movetoworkspace, +1"
|
||||||
|
"$mod1&$mod2&Shift_L, left, movetoworkspace, -1"
|
||||||
|
"$mod1, mouse_down, workspace, e+1"
|
||||||
|
"$mod1, mouse_up, workspace, e-1"
|
||||||
|
", PRINT, exec, hyprshot -m region --clipboard-only"
|
||||||
|
"Shift_L, PRINT, exec, hyprshot -m region"
|
||||||
|
"$mod1, T, exec, hyprctl setprop active opaque toggle"
|
||||||
|
"$mod1, V, exec, cliphist list | rofi -dmenu | cliphist decode | wl-copy"
|
||||||
|
];
|
||||||
|
|
||||||
|
bindm = [
|
||||||
|
"$mod1, mouse:272, movewindow"
|
||||||
|
"$mod1, mouse:273, resizewindow"
|
||||||
|
];
|
||||||
|
|
||||||
|
bindel = [
|
||||||
|
",XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"
|
||||||
|
",XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
|
||||||
|
",XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
|
||||||
|
",XF86MonBrightnessUp, exec, brightnessctl s 10%+"
|
||||||
|
",XF86MonBrightnessDown, exec, brightnessctl s 10%-"
|
||||||
|
];
|
||||||
|
|
||||||
|
bindl = [
|
||||||
|
", XF86AudioNext, exec, playerctl next"
|
||||||
|
", XF86AudioPause, exec, playerctl play-pause"
|
||||||
|
", XF86AudioPlay, exec, playerctl play-pause"
|
||||||
|
", XF86AudioPrev, exec, playerctl previous"
|
||||||
|
", switch:Lid Switch, exec, hyprlock"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
67
components/hyprland/hyprlock.nix
Normal file
67
components/hyprland/hyprlock.nix
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
{pkgs, ...}: {
|
||||||
|
programs.hyprlock = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
background = {
|
||||||
|
path = "~/.nixos/components/hyprland/wallpaper.png";
|
||||||
|
blur_passes = 2;
|
||||||
|
contrast = 1;
|
||||||
|
brightness = 0.5;
|
||||||
|
vibrancy = 0.2;
|
||||||
|
vibrancy_darkness = 0.2;
|
||||||
|
};
|
||||||
|
|
||||||
|
general = {
|
||||||
|
no_fade_in = true;
|
||||||
|
no_fade_out = true;
|
||||||
|
hide_cursor = false;
|
||||||
|
grace = 0;
|
||||||
|
disable_loading_bar = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
input-field = {
|
||||||
|
size = "250, 60";
|
||||||
|
outline_thickness = 2;
|
||||||
|
dots_size = 0.2;
|
||||||
|
dots_spacing = 0.35;
|
||||||
|
dots_center = true;
|
||||||
|
outer_color = "rgba(0, 0, 0, 0)";
|
||||||
|
inner_color = "rgba(0, 0, 0, 0.2)";
|
||||||
|
font_color = "rgba(142, 243, 244, 0.75)";
|
||||||
|
fade_on_empty = false;
|
||||||
|
rounding = -1;
|
||||||
|
check_color = "rgb(204, 136, 34)";
|
||||||
|
placeholder_text = ''<i><span foreground="##cdd6f4">Input Password...</span></i>'';
|
||||||
|
hide_input = false;
|
||||||
|
position = "0, -200";
|
||||||
|
halign = "center";
|
||||||
|
valign = "center";
|
||||||
|
};
|
||||||
|
|
||||||
|
label = [
|
||||||
|
{
|
||||||
|
text = ''cmd[update:1000] echo "$(date +"%-I:%M")"'';
|
||||||
|
color = "rgba(242, 243, 244, 0.75)";
|
||||||
|
font_size = 95;
|
||||||
|
font_familly = "JetBrains Mono Extrabold";
|
||||||
|
position = "0, 200";
|
||||||
|
halign = "center";
|
||||||
|
valign = "center";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
text = ''cmd[update:1000] echo "$(date +"%A, %B %d")"'';
|
||||||
|
color = "rgba(242, 243, 244, 0.75)";
|
||||||
|
font_size = 22;
|
||||||
|
font_familly = "JetBrains Mono";
|
||||||
|
position = "0, 300";
|
||||||
|
halign = "center";
|
||||||
|
valign = "center";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
auth = {
|
||||||
|
"fingerprint:enabled" = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
13
components/hyprland/hyprpaper.nix
Normal file
13
components/hyprland/hyprpaper.nix
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
{pkgs, ...}: {
|
||||||
|
services.hyprpaper = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
preload = [
|
||||||
|
"~/.nixos/components/hyprland/wallpaper.png"
|
||||||
|
];
|
||||||
|
wallpaper = [
|
||||||
|
", ~/.nixos/components/hyprland/wallpaper.png"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
BIN
components/hyprland/wallpaper.png
Normal file
BIN
components/hyprland/wallpaper.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 MiB |
25
components/utils.nix
Normal file
25
components/utils.nix
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
{pkgs, ...}: {
|
||||||
|
programs.rofi = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.rofi.override {
|
||||||
|
plugins = with pkgs; [
|
||||||
|
rofi-calc
|
||||||
|
];
|
||||||
|
};
|
||||||
|
extraConfig = {
|
||||||
|
modi = "drun,calc,run";
|
||||||
|
show-icons = true;
|
||||||
|
drun-display-format = "{icon} {name}";
|
||||||
|
disable-history = false;
|
||||||
|
hide-scrollbar = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
hyprshot
|
||||||
|
wl-clipboard
|
||||||
|
networkmanagerapplet
|
||||||
|
];
|
||||||
|
|
||||||
|
services.hyprpolkitagent.enable = true;
|
||||||
|
}
|
||||||
134
components/waybar.nix
Normal file
134
components/waybar.nix
Normal file
@@ -0,0 +1,134 @@
|
|||||||
|
{pkgs, ...}: {
|
||||||
|
programs.waybar = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
mainBar = {
|
||||||
|
"layer" = "top";
|
||||||
|
"position" = "top";
|
||||||
|
"mode" = "dock";
|
||||||
|
"reload_style_on_change" = true;
|
||||||
|
"gtk-layer-shell" = true;
|
||||||
|
|
||||||
|
"modules-left" = [
|
||||||
|
"hyprland/workspaces"
|
||||||
|
];
|
||||||
|
|
||||||
|
"modules-center" = [
|
||||||
|
"clock"
|
||||||
|
];
|
||||||
|
|
||||||
|
"modules-right" = [
|
||||||
|
"tray"
|
||||||
|
"battery"
|
||||||
|
];
|
||||||
|
|
||||||
|
"tray" = {
|
||||||
|
"icon-size" = 12;
|
||||||
|
"spacing" = 4;
|
||||||
|
};
|
||||||
|
|
||||||
|
"hyprland/workspaces" = {
|
||||||
|
"persistent-workspaces" = {
|
||||||
|
"1" = [];
|
||||||
|
"2" = [];
|
||||||
|
"3" = [];
|
||||||
|
"4" = [];
|
||||||
|
"5" = [];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# "clock" = {
|
||||||
|
# "format" = "{ =%m-%d %H =%M}";
|
||||||
|
# };
|
||||||
|
|
||||||
|
"battery" = {
|
||||||
|
"states" = {
|
||||||
|
"warning" = 30;
|
||||||
|
"critical" = 15;
|
||||||
|
};
|
||||||
|
|
||||||
|
"format" = "{icon} {capacity}%";
|
||||||
|
"format-icons" = ["" "" "" "" "" "" ""];
|
||||||
|
"format-warning" = " {capacity}%";
|
||||||
|
"format-critical" = " {capacity}%";
|
||||||
|
"format-charging" = " {capacity}%";
|
||||||
|
|
||||||
|
"interval" = 1;
|
||||||
|
"min-length" = 6;
|
||||||
|
"max-length" = 6;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
style = "
|
||||||
|
* {
|
||||||
|
font-family: \"JetBrainsMono Nerd Font\";
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 12px;
|
||||||
|
min-height: 0;
|
||||||
|
padding: 0;
|
||||||
|
border: none;
|
||||||
|
margin: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* === Main Background === */
|
||||||
|
|
||||||
|
window#waybar {
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* === Workspace Buttons === */
|
||||||
|
|
||||||
|
#workspaces button {
|
||||||
|
border-radius: 8px;
|
||||||
|
box-shadow: none;
|
||||||
|
margin: 2px 0;
|
||||||
|
padding: 0 2px;
|
||||||
|
transition: none;
|
||||||
|
}
|
||||||
|
#workspaces button:hover {
|
||||||
|
color: #11111b;
|
||||||
|
background: #c7a4de;
|
||||||
|
text-shadow: none;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
#workspaces button.active {
|
||||||
|
color: #11111b;
|
||||||
|
background: #885ab0;
|
||||||
|
margin: 3px 0;
|
||||||
|
padding: 0 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* == Workspaces == */
|
||||||
|
|
||||||
|
#workspaces {
|
||||||
|
background: #11111b;
|
||||||
|
padding: 0 4px;
|
||||||
|
border-radius: 7px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* == Time == */
|
||||||
|
|
||||||
|
#clock {
|
||||||
|
background: #11111b;
|
||||||
|
padding: 0 8px;
|
||||||
|
border-radius: 7px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* == Battery == */
|
||||||
|
|
||||||
|
#battery {
|
||||||
|
background: #11111b;
|
||||||
|
padding: 0 8px;
|
||||||
|
border-radius: 7px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* == Tray == */
|
||||||
|
|
||||||
|
#tray {
|
||||||
|
background: #11111b;
|
||||||
|
padding: 0 4px;
|
||||||
|
border-radius: 7px;
|
||||||
|
}
|
||||||
|
";
|
||||||
|
};
|
||||||
|
}
|
||||||
42
configuration.nix
Normal file
42
configuration.nix
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [ # Include the results of the hardware scan.
|
||||||
|
./hardware-configuration.nix
|
||||||
|
./system_components
|
||||||
|
];
|
||||||
|
|
||||||
|
# Use the systemd-boot EFI boot loader.
|
||||||
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
|
networking.hostName = "framework"; # Define your hostname.
|
||||||
|
|
||||||
|
# Configure network connections interactively with nmcli or nmtui.
|
||||||
|
networking.networkmanager.enable = true;
|
||||||
|
|
||||||
|
# Set your time zone.
|
||||||
|
time.timeZone = "Europe/London";
|
||||||
|
|
||||||
|
# Select internationalisation properties.
|
||||||
|
i18n.defaultLocale = "en_GB.UTF-8";
|
||||||
|
|
||||||
|
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||||
|
|
||||||
|
# Configure keymap in X11
|
||||||
|
services.xserver.xkb.layout = "gb";
|
||||||
|
|
||||||
|
# Enable touchpad support (enabled default in most desktopManager).
|
||||||
|
services.libinput.enable = true;
|
||||||
|
|
||||||
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||||
|
users.users.toaster = {
|
||||||
|
isNormalUser = true;
|
||||||
|
extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
||||||
|
};
|
||||||
|
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
services.openssh.enable = true;
|
||||||
|
system.stateVersion = "25.11";
|
||||||
|
}
|
||||||
|
|
||||||
82
flake.lock
generated
Normal file
82
flake.lock
generated
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"home-manager": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1766980997,
|
||||||
|
"narHash": "sha256-oegDNAvyQwaG3GqSi4U5jpKM7SYHGESGVIuKMRV/lbw=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"rev": "7a7b43c7231a439d248179ba8d561dd6cd81799b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixos-hardware": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1766568855,
|
||||||
|
"narHash": "sha256-UXVtN77D7pzKmzOotFTStgZBqpOcf8cO95FcupWp4Zo=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixos-hardware",
|
||||||
|
"rev": "c5db9569ac9cc70929c268ac461f4003e3e5ca80",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "master",
|
||||||
|
"repo": "nixos-hardware",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1766902085,
|
||||||
|
"narHash": "sha256-coBu0ONtFzlwwVBzmjacUQwj3G+lybcZ1oeNSQkgC0M=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "c0b0e0fddf73fd517c3471e546c0df87a42d53f4",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"home-manager": "home-manager",
|
||||||
|
"nixos-hardware": "nixos-hardware",
|
||||||
|
"nixpkgs": "nixpkgs",
|
||||||
|
"stable-nixpkgs": "stable-nixpkgs"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"stable-nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1766736597,
|
||||||
|
"narHash": "sha256-BASnpCLodmgiVn0M1MU2Pqyoz0aHwar/0qLkp7CjvSQ=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "f560ccec6b1116b22e6ed15f4c510997d99d5852",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-25.11",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
45
flake.nix
Normal file
45
flake.nix
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
{
|
||||||
|
description = ":3";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||||
|
stable-nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
|
||||||
|
home-manager = {
|
||||||
|
url = "github:nix-community/home-manager";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = {
|
||||||
|
nixpkgs,
|
||||||
|
stable-nixpkgs,
|
||||||
|
home-manager,
|
||||||
|
nixos-hardware,
|
||||||
|
...
|
||||||
|
} @ inputs: let
|
||||||
|
system = "x86_64-linux";
|
||||||
|
in {
|
||||||
|
nixosConfigurations = {
|
||||||
|
framework = nixpkgs.lib.nixosSystem {
|
||||||
|
specialArgs = {
|
||||||
|
inherit inputs;
|
||||||
|
inherit system;
|
||||||
|
|
||||||
|
pkgs-stable = import stable-nixpkgs {
|
||||||
|
inherit system;
|
||||||
|
config.allowUnfree = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
modules = [
|
||||||
|
./configuration.nix
|
||||||
|
nixos-hardware.nixosModules.framework-13th-gen-intel
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
|
{
|
||||||
|
home-manager.users.toaster = ./home.nix;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
31
hardware-configuration.nix
Normal file
31
hardware-configuration.nix
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
# 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" "thunderbolt" "nvme" "usb_storage" "sd_mod" ];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{ device = "/dev/disk/by-uuid/148f3522-8d5e-4f24-b9e0-282834e1f164";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" =
|
||||||
|
{ device = "/dev/disk/by-uuid/FDCD-5ED4";
|
||||||
|
fsType = "vfat";
|
||||||
|
options = [ "fmask=0077" "dmask=0077" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [ ];
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
}
|
||||||
18
home.nix
Normal file
18
home.nix
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [
|
||||||
|
./components
|
||||||
|
./programs
|
||||||
|
];
|
||||||
|
|
||||||
|
home.username = "toaster";
|
||||||
|
home.homeDirectory = "/home/toaster";
|
||||||
|
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
|
home.stateVersion = "25.11";
|
||||||
|
}
|
||||||
8
programs/default.nix
Normal file
8
programs/default.nix
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{lib, ...}: {
|
||||||
|
imports = [
|
||||||
|
./fish.nix
|
||||||
|
./kitty.nix
|
||||||
|
./unconfigured.nix
|
||||||
|
./nh.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
35
programs/fish.nix
Normal file
35
programs/fish.nix
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
{pkgs, ...}: {
|
||||||
|
programs.fish = {
|
||||||
|
enable = true;
|
||||||
|
interactiveShellInit = "
|
||||||
|
nix-your-shell fish | source
|
||||||
|
";
|
||||||
|
|
||||||
|
shellAliases = {
|
||||||
|
cd = "z";
|
||||||
|
cat = "bat";
|
||||||
|
};
|
||||||
|
|
||||||
|
# plugins = with pkgs.fishPlugins; [
|
||||||
|
# tide
|
||||||
|
# ];
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.zoxide = {
|
||||||
|
enable = true;
|
||||||
|
enableFishIntegration = true;
|
||||||
|
options = [];
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.bat = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# home.file.".config/mommy/config.sh".text = ''
|
||||||
|
# MOMMY_SWEETIE="toaster, boy"
|
||||||
|
# MOMMY_COLOR="lolcat"
|
||||||
|
# MOMMY_FORBIDDEN_WORDS="fat/,"
|
||||||
|
# '';
|
||||||
|
|
||||||
|
programs.kitty.shellIntegration.enableFishIntegration = true;
|
||||||
|
}
|
||||||
12
programs/kitty.nix
Normal file
12
programs/kitty.nix
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{pkgs, ...}: {
|
||||||
|
programs.kitty = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
font_family = "0xProto Nerd Font Mono";
|
||||||
|
background_opacity = 0.5;
|
||||||
|
font_size = 12.0;
|
||||||
|
force_ltr = "no";
|
||||||
|
single_window_margin_width = 10;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
6
programs/nh.nix
Normal file
6
programs/nh.nix
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{pkgs, ...}: {
|
||||||
|
programs.nh = {
|
||||||
|
enable = true;
|
||||||
|
flake = "/home/toaster/.nixos";
|
||||||
|
};
|
||||||
|
}
|
||||||
16
programs/unconfigured.nix
Normal file
16
programs/unconfigured.nix
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
firefox
|
||||||
|
krita
|
||||||
|
gimp
|
||||||
|
kdePackages.dolphin
|
||||||
|
blender
|
||||||
|
nerd-fonts._0xproto
|
||||||
|
vesktop
|
||||||
|
git
|
||||||
|
vscode
|
||||||
|
];
|
||||||
|
}
|
||||||
8
system_components/default.nix
Normal file
8
system_components/default.nix
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{lib, ...}: {
|
||||||
|
imports = [
|
||||||
|
./fish_root.nix
|
||||||
|
./sddm.nix
|
||||||
|
./hardware.nix
|
||||||
|
./tailscale.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
18
system_components/fish_root.nix
Normal file
18
system_components/fish_root.nix
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
{pkgs, ...}:{
|
||||||
|
programs.fish.enable = true;
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
nix-your-shell
|
||||||
|
btop
|
||||||
|
fastfetch
|
||||||
|
wget
|
||||||
|
];
|
||||||
|
|
||||||
|
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
|
||||||
|
'';
|
||||||
|
}
|
||||||
12
system_components/hardware.nix
Normal file
12
system_components/hardware.nix
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{pkgs, ...}: {
|
||||||
|
hardware.opentabletdriver.enable = true;
|
||||||
|
hardware.uinput.enable = true;
|
||||||
|
boot.kernelModules = [ "uinput" ];
|
||||||
|
|
||||||
|
hardware.graphics = {
|
||||||
|
enable = true;
|
||||||
|
extraPackages = with pkgs; [
|
||||||
|
intel-media-driver
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
6
system_components/pipewire.nix
Normal file
6
system_components/pipewire.nix
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{pkgs, ...}: {
|
||||||
|
services.pipewire = {
|
||||||
|
enable = true;
|
||||||
|
pulse.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
9
system_components/sddm.nix
Normal file
9
system_components/sddm.nix
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{pkgs, ...}: {
|
||||||
|
programs.hyprland.enable = true;
|
||||||
|
|
||||||
|
services.displayManager.defaultSession = "hyprland";
|
||||||
|
services.displayManager.sddm = {
|
||||||
|
enable = true;
|
||||||
|
wayland.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
6
system_components/tailscale.nix
Normal file
6
system_components/tailscale.nix
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{pkgs, ...}: {
|
||||||
|
services.tailscale = {
|
||||||
|
enable = true;
|
||||||
|
extraSetFlags = [ "--accept-routes" ];
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user