changed formater
This commit is contained in:
parent
52fbee6322
commit
3995c29b03
16
flake.nix
16
flake.nix
@ -12,14 +12,19 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, nixos-hardware, ... }@inputs:
|
outputs = {
|
||||||
let
|
self,
|
||||||
|
nixpkgs,
|
||||||
|
nixos-hardware,
|
||||||
|
...
|
||||||
|
} @ inputs: let
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
pkg = nixpkgs.legacyPackages.${system};
|
pkg = nixpkgs.legacyPackages.${system};
|
||||||
in {
|
in {
|
||||||
|
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra;
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
laptop = nixpkgs.lib.nixosSystem {
|
laptop = nixpkgs.lib.nixosSystem {
|
||||||
specialArgs = { inherit inputs; };
|
specialArgs = {inherit inputs;};
|
||||||
modules = [
|
modules = [
|
||||||
./hosts/laptop/configuration.nix
|
./hosts/laptop/configuration.nix
|
||||||
inputs.home-manager.nixosModules.default
|
inputs.home-manager.nixosModules.default
|
||||||
@ -30,7 +35,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
server = nixpkgs.lib.nixosSystem {
|
server = nixpkgs.lib.nixosSystem {
|
||||||
specialArgs = { inherit inputs; };
|
specialArgs = {inherit inputs;};
|
||||||
modules = [
|
modules = [
|
||||||
./hosts/server/configuration.nix
|
./hosts/server/configuration.nix
|
||||||
inputs.home-manager.nixosModules.default
|
inputs.home-manager.nixosModules.default
|
||||||
@ -40,14 +45,13 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
tablet = nixpkgs.lib.nixosSystem {
|
tablet = nixpkgs.lib.nixosSystem {
|
||||||
specialArgs = { inherit inputs; };
|
specialArgs = {inherit inputs;};
|
||||||
modules = [
|
modules = [
|
||||||
./hosts/tablet/configuration.nix
|
./hosts/tablet/configuration.nix
|
||||||
inputs.home-manager.nixosModules.default
|
inputs.home-manager.nixosModules.default
|
||||||
nixos-hardware.nixosModules.microsoft-surface-pro-intel
|
nixos-hardware.nixosModules.microsoft-surface-pro-intel
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,9 @@
|
|||||||
{ config, pkgs, inputs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
# ...
|
# ...
|
||||||
dconf.settings = {
|
dconf.settings = {
|
||||||
# ...
|
# ...
|
||||||
@ -22,4 +25,3 @@
|
|||||||
gnomeExtensions.search-light
|
gnomeExtensions.search-light
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,9 @@
|
|||||||
{ config, pkgs, inputs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
home = {
|
home = {
|
||||||
username = "k";
|
username = "k";
|
||||||
homeDirectory = "/home/k";
|
homeDirectory = "/home/k";
|
||||||
@ -13,7 +16,7 @@
|
|||||||
userName = "k";
|
userName = "k";
|
||||||
userEmail = "markers711@gmail.com";
|
userEmail = "markers711@gmail.com";
|
||||||
};
|
};
|
||||||
tmux = { enable = true; };
|
tmux = {enable = true;};
|
||||||
starship.enable = true;
|
starship.enable = true;
|
||||||
zsh = {
|
zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@ -21,7 +24,8 @@
|
|||||||
enableCompletion = true;
|
enableCompletion = true;
|
||||||
syntaxHighlighting.enable = true;
|
syntaxHighlighting.enable = true;
|
||||||
autocd = true;
|
autocd = true;
|
||||||
plugins = [{
|
plugins = [
|
||||||
|
{
|
||||||
name = "zsh-nix-shell";
|
name = "zsh-nix-shell";
|
||||||
file = "nix-shell.plugin.zsh";
|
file = "nix-shell.plugin.zsh";
|
||||||
src = pkgs.fetchFromGitHub {
|
src = pkgs.fetchFromGitHub {
|
||||||
@ -30,7 +34,8 @@
|
|||||||
rev = "v0.8.0";
|
rev = "v0.8.0";
|
||||||
sha256 = "1lzrn0n4fxfcgg65v0qhnj7wnybybqzs4adz7xsrkgmcsr0ii8b7";
|
sha256 = "1lzrn0n4fxfcgg65v0qhnj7wnybybqzs4adz7xsrkgmcsr0ii8b7";
|
||||||
};
|
};
|
||||||
}];
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,15 +1,21 @@
|
|||||||
{ config, pkgs, inputs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ ./waybar.nix ./tile.nix ];
|
config,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [./waybar.nix ./tile.nix];
|
||||||
|
|
||||||
wayland.windowManager.hyprland = {
|
wayland.windowManager.hyprland = {
|
||||||
enable = true;
|
enable = true;
|
||||||
systemd.variables = [ "--all" ];
|
systemd.variables = ["--all"];
|
||||||
xwayland.enable = true;
|
xwayland.enable = true;
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
exec-once = [ "${pkgs.hyprpaper}/bin/hyprpaper" "${pkgs.iio-hyprland}/bin/iio-hyprland" ];
|
exec-once = [
|
||||||
|
"${pkgs.hyprpaper}/bin/hyprpaper"
|
||||||
|
"${pkgs.iio-hyprland}/bin/iio-hyprland"
|
||||||
|
];
|
||||||
monitor = "eDP-1,preferred,auto,1";
|
monitor = "eDP-1,preferred,auto,1";
|
||||||
general = {
|
general = {
|
||||||
"$mainMod" = "SUPER";
|
"$mainMod" = "SUPER";
|
||||||
@ -28,7 +34,7 @@
|
|||||||
size = 2;
|
size = 2;
|
||||||
passes = 2;
|
passes = 2;
|
||||||
brightness = 1;
|
brightness = 1;
|
||||||
noise = .3;
|
noise = 0.3;
|
||||||
new_optimizations = true;
|
new_optimizations = true;
|
||||||
};
|
};
|
||||||
drop_shadow = true;
|
drop_shadow = true;
|
||||||
@ -48,11 +54,7 @@
|
|||||||
vrr = 1;
|
vrr = 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
input = {
|
input = {touchpad = {natural_scroll = true;};};
|
||||||
touchpad = {
|
|
||||||
natural_scroll = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
bind = [
|
bind = [
|
||||||
# keybindings
|
# keybindings
|
||||||
@ -68,7 +70,6 @@
|
|||||||
"$mainMod, up, movefocus, u"
|
"$mainMod, up, movefocus, u"
|
||||||
"$mainMod, down, movefocus, d"
|
"$mainMod, down, movefocus, d"
|
||||||
|
|
||||||
|
|
||||||
# switch workspace
|
# switch workspace
|
||||||
"$mainMod, 1, workspace, 1"
|
"$mainMod, 1, workspace, 1"
|
||||||
"$mainMod, 2, workspace, 2"
|
"$mainMod, 2, workspace, 2"
|
||||||
@ -124,10 +125,9 @@
|
|||||||
"$mainMod, mouse:273, resizewindow"
|
"$mainMod, mouse:273, resizewindow"
|
||||||
];
|
];
|
||||||
|
|
||||||
windowrule =
|
windowrule = ["float,mpv" "center,mpv" "pin,wofi" "idleinhibit focus,mpv"];
|
||||||
[ "float,mpv" "center,mpv" "pin,wofi" "idleinhibit focus,mpv" ];
|
|
||||||
|
|
||||||
windowrulev2 = [ ];
|
windowrulev2 = [];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -141,4 +141,3 @@
|
|||||||
_JAVA_AWT_WM_NONREPARENTING = 1;
|
_JAVA_AWT_WM_NONREPARENTING = 1;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,10 @@
|
|||||||
{ config, pkgs, inputs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ ./waybar.nix ./tile.nix ];
|
config,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [./waybar.nix ./tile.nix];
|
||||||
|
|
||||||
wayland.windowManager.sway = {
|
wayland.windowManager.sway = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@ -29,9 +32,5 @@
|
|||||||
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
|
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
|
||||||
_JAVA_AWT_WM_NONREPARENTING = 1;
|
_JAVA_AWT_WM_NONREPARENTING = 1;
|
||||||
};
|
};
|
||||||
services = {
|
services = {swayidle = {enable = true;};};
|
||||||
swayidle = { enable = true; };
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,14 +1,15 @@
|
|||||||
{ config, pkgs, inputs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
services = {
|
config,
|
||||||
mako = { enable = true; };
|
pkgs,
|
||||||
};
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
services = {mako = {enable = true;};};
|
||||||
programs = {
|
programs = {
|
||||||
alacritty = { enable = true; };
|
alacritty = {enable = true;};
|
||||||
swaylock = {enable = true;};
|
swaylock = {enable = true;};
|
||||||
wofi = { enable = true; };
|
wofi = {enable = true;};
|
||||||
zathura = { enable = true; };
|
zathura = {enable = true;};
|
||||||
mpv = { enable = true; };
|
mpv = {enable = true;};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,8 @@
|
|||||||
{ config, pkgs, ... }: {
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
programs.waybar = {
|
programs.waybar = {
|
||||||
enable = true;
|
enable = true;
|
||||||
systemd.enable = true;
|
systemd.enable = true;
|
||||||
@ -6,14 +10,14 @@
|
|||||||
mainBar = {
|
mainBar = {
|
||||||
layer = "bottom";
|
layer = "bottom";
|
||||||
position = "bottom";
|
position = "bottom";
|
||||||
output = [ "eDP-1" ];
|
output = ["eDP-1"];
|
||||||
margin-left = 45;
|
margin-left = 45;
|
||||||
margin-right = 45;
|
margin-right = 45;
|
||||||
spacing = 15;
|
spacing = 15;
|
||||||
|
|
||||||
modules-left = [ "sway/workspaces" "sway/mode" ];
|
modules-left = ["sway/workspaces" "sway/mode"];
|
||||||
modules-center = [ "clock" ];
|
modules-center = ["clock"];
|
||||||
modules-right = [ "pulseaudio" "network" "battery" ];
|
modules-right = ["pulseaudio" "network" "battery"];
|
||||||
|
|
||||||
cpu = {
|
cpu = {
|
||||||
interval = 15;
|
interval = 15;
|
||||||
@ -38,7 +42,7 @@
|
|||||||
phone = " ";
|
phone = " ";
|
||||||
portable = " ";
|
portable = " ";
|
||||||
car = " ";
|
car = " ";
|
||||||
default = [ " " " " ];
|
default = [" " " "];
|
||||||
};
|
};
|
||||||
scroll-step = 1;
|
scroll-step = 1;
|
||||||
on-click = "pavucontrol";
|
on-click = "pavucontrol";
|
||||||
@ -66,7 +70,7 @@
|
|||||||
|
|
||||||
battery = {
|
battery = {
|
||||||
format = "{capacity}% {icon}";
|
format = "{capacity}% {icon}";
|
||||||
"format-icons" = [ " " " " " " " " " " ];
|
"format-icons" = [" " " " " " " " " "];
|
||||||
};
|
};
|
||||||
|
|
||||||
clock = {
|
clock = {
|
||||||
|
|||||||
@ -1,7 +1,10 @@
|
|||||||
{ config, pkgs, inputs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ ./hardware-configuration.nix ];
|
config,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [./hardware-configuration.nix];
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
system.autoUpgrade.enable = true;
|
system.autoUpgrade.enable = true;
|
||||||
@ -15,18 +18,12 @@
|
|||||||
nix = {
|
nix = {
|
||||||
gc.automatic = true;
|
gc.automatic = true;
|
||||||
settings = {
|
settings = {
|
||||||
experimental-features = [ "nix-command" "flakes" ];
|
experimental-features = ["nix-command" "flakes"];
|
||||||
substituters = [
|
substituters = ["http://nix.dhilton.xyz/" "https://cache.nixos.org/"];
|
||||||
"http://nix.dhilton.xyz/"
|
trusted-public-keys = ["nix.dhilton.xyz:MOW060dF1A0/UXmPZBue9KMxCO13PHYFwx1X9hcdYZ4="];
|
||||||
"https://cache.nixos.org/"
|
|
||||||
];
|
|
||||||
trusted-public-keys = [
|
|
||||||
"nix.dhilton.xyz:MOW060dF1A0/UXmPZBue9KMxCO13PHYFwx1X9hcdYZ4="
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
hostName = "laptop";
|
hostName = "laptop";
|
||||||
networkmanager.enable = true;
|
networkmanager.enable = true;
|
||||||
@ -115,7 +112,7 @@
|
|||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
nix-ld.enable = true;
|
nix-ld.enable = true;
|
||||||
nix-ld.libraries = with pkgs; [ glibc glib ];
|
nix-ld.libraries = with pkgs; [glibc glib];
|
||||||
zsh.enable = true;
|
zsh.enable = true;
|
||||||
steam.enable = true;
|
steam.enable = true;
|
||||||
steam.gamescopeSession.enable = true;
|
steam.gamescopeSession.enable = true;
|
||||||
@ -126,19 +123,19 @@
|
|||||||
users.users.k = {
|
users.users.k = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
description = "k";
|
description = "k";
|
||||||
extraGroups = [ "networkmanager" "wheel" ];
|
extraGroups = ["networkmanager" "wheel"];
|
||||||
packages = with pkgs; [ zsh ];
|
packages = with pkgs; [zsh];
|
||||||
shell = pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
backupFileExtension = "bk";
|
backupFileExtension = "bk";
|
||||||
users = { "k" = import ./home.nix; };
|
users = {"k" = import ./home.nix;};
|
||||||
};
|
};
|
||||||
|
|
||||||
environment = {
|
environment = {
|
||||||
sessionVariables = { MOZ_USE_XINPUT2 = "1"; };
|
sessionVariables = {MOZ_USE_XINPUT2 = "1";};
|
||||||
gnome.excludePackages = (with pkgs; [
|
gnome.excludePackages = with pkgs; [
|
||||||
gnome-photos
|
gnome-photos
|
||||||
gnome-tour
|
gnome-tour
|
||||||
xterm
|
xterm
|
||||||
@ -153,7 +150,7 @@
|
|||||||
iagno # go game
|
iagno # go game
|
||||||
hitori # sudoku game
|
hitori # sudoku game
|
||||||
atomix # puzzle game
|
atomix # puzzle game
|
||||||
]);
|
];
|
||||||
systemPackages = with pkgs; [
|
systemPackages = with pkgs; [
|
||||||
intel-vaapi-driver
|
intel-vaapi-driver
|
||||||
intel-compute-runtime
|
intel-compute-runtime
|
||||||
@ -170,8 +167,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
|
plymouth = {enable = true;};
|
||||||
plymouth = { enable = true; };
|
|
||||||
|
|
||||||
consoleLogLevel = 0;
|
consoleLogLevel = 0;
|
||||||
initrd.verbose = false;
|
initrd.verbose = false;
|
||||||
@ -194,5 +190,4 @@
|
|||||||
# Before changing this value read the documentation for this option
|
# Before changing this value read the documentation for this option
|
||||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||||
system.stateVersion = "23.11"; # Did you read the comment?
|
system.stateVersion = "23.11"; # Did you read the comment?
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,16 +1,19 @@
|
|||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
# and may be overwritten by future invocations. Please make changes
|
# and may be overwritten by future invocations. Please make changes
|
||||||
# to /etc/nixos/configuration.nix instead.
|
# to /etc/nixos/configuration.nix instead.
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules =
|
boot.initrd.availableKernelModules = ["xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod"];
|
||||||
[ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" ];
|
boot.initrd.kernelModules = [];
|
||||||
boot.initrd.kernelModules = [ ];
|
boot.kernelModules = ["kvm-intel"];
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
boot.extraModulePackages = [];
|
||||||
boot.extraModulePackages = [ ];
|
|
||||||
|
|
||||||
fileSystems."/" = {
|
fileSystems."/" = {
|
||||||
device = "/dev/disk/by-uuid/a7301069-c11f-411e-9a23-446744c3ae76";
|
device = "/dev/disk/by-uuid/a7301069-c11f-411e-9a23-446744c3ae76";
|
||||||
@ -22,8 +25,7 @@
|
|||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices =
|
swapDevices = [{device = "/dev/disk/by-uuid/d9df94a1-5088-468c-839d-f4cd10cb7e5f";}];
|
||||||
[{ device = "/dev/disk/by-uuid/d9df94a1-5088-468c-839d-f4cd10cb7e5f"; }];
|
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
# 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
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
|
|||||||
@ -1,7 +1,15 @@
|
|||||||
{ config, pkgs, inputs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ ../home/home_common.nix ../home/gnome.nix ../home/sway.nix ../home/hyprland.nix];
|
config,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [
|
||||||
|
../home/home_common.nix
|
||||||
|
../home/gnome.nix
|
||||||
|
../home/sway.nix
|
||||||
|
../home/hyprland.nix
|
||||||
|
];
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
@ -52,5 +60,4 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
autoEnable = true;
|
autoEnable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,43 +1,41 @@
|
|||||||
{ config, pkgs, inputs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ ./hardware-configuration.nix ./service.nix ];
|
config,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [./hardware-configuration.nix ./service.nix];
|
||||||
powerManagement.enable = false;
|
powerManagement.enable = false;
|
||||||
system.autoUpgrade.enable = true;
|
system.autoUpgrade.enable = true;
|
||||||
networking.networkmanager.enable = true;
|
networking.networkmanager.enable = true;
|
||||||
boot.kernelParams = [ "intel_pstate=active" ];
|
boot.kernelParams = ["intel_pstate=active"];
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
gc.automatic = true;
|
gc.automatic = true;
|
||||||
settings = {
|
settings = {
|
||||||
experimental-features = [ "nix-command" "flakes" ];
|
experimental-features = ["nix-command" "flakes"];
|
||||||
substituters = [
|
substituters = ["http://nix.dhilton.xyz/" "https://cache.nixos.org/"];
|
||||||
"http://nix.dhilton.xyz/"
|
trusted-public-keys = ["nix.dhilton.xyz:MOW060dF1A0/UXmPZBue9KMxCO13PHYFwx1X9hcdYZ4="];
|
||||||
"https://cache.nixos.org/"
|
|
||||||
];
|
|
||||||
trusted-public-keys = [
|
|
||||||
"nix.dhilton.xyz:MOW060dF1A0/UXmPZBue9KMxCO13PHYFwx1X9hcdYZ4="
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
nix-ld.enable = true;
|
nix-ld.enable = true;
|
||||||
nix-ld.libraries = with pkgs; [ glibc glib ];
|
nix-ld.libraries = with pkgs; [glibc glib];
|
||||||
zsh.enable = true;
|
zsh.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
users.users.k = {
|
users.users.k = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
description = "k";
|
description = "k";
|
||||||
extraGroups = [ "networkmanager" "wheel" ];
|
extraGroups = ["networkmanager" "wheel"];
|
||||||
packages = with pkgs; [ zsh ];
|
packages = with pkgs; [zsh];
|
||||||
shell = pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager = { users = { "k" = import ./home.nix; }; };
|
home-manager = {users = {"k" = import ./home.nix;};};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [ microcodeIntel ];
|
environment.systemPackages = with pkgs; [microcodeIntel];
|
||||||
|
|
||||||
hardware.bluetooth.enable = true;
|
hardware.bluetooth.enable = true;
|
||||||
hardware.bluetooth.powerOnBoot = true;
|
hardware.bluetooth.powerOnBoot = true;
|
||||||
@ -54,7 +52,7 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
services.xserver.videoDrivers = [ "intel" ];
|
services.xserver.videoDrivers = ["intel"];
|
||||||
|
|
||||||
# This value determines the NixOS release from which the default
|
# This value determines the NixOS release from which the default
|
||||||
# settings for stateful data, like file locations and database versions
|
# settings for stateful data, like file locations and database versions
|
||||||
@ -63,5 +61,4 @@
|
|||||||
# Before changing this value read the documentation for this option
|
# Before changing this value read the documentation for this option
|
||||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||||
system.stateVersion = "23.11"; # Did you read the comment?
|
system.stateVersion = "23.11"; # Did you read the comment?
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,16 +1,19 @@
|
|||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
# and may be overwritten by future invocations. Please make changes
|
# and may be overwritten by future invocations. Please make changes
|
||||||
# to /etc/nixos/configuration.nix instead.
|
# to /etc/nixos/configuration.nix instead.
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules =
|
boot.initrd.availableKernelModules = ["xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"];
|
||||||
[ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
|
boot.initrd.kernelModules = [];
|
||||||
boot.initrd.kernelModules = [ ];
|
boot.kernelModules = ["kvm-intel"];
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
boot.extraModulePackages = [];
|
||||||
boot.extraModulePackages = [ ];
|
|
||||||
|
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
@ -27,8 +30,7 @@
|
|||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices =
|
swapDevices = [{device = "/dev/disk/by-uuid/ecde85bd-abea-4926-80d5-810b01d0e364";}];
|
||||||
[{ device = "/dev/disk/by-uuid/ecde85bd-abea-4926-80d5-810b01d0e364"; }];
|
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
# 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
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
|
|||||||
@ -1,11 +1,9 @@
|
|||||||
{ config, pkgs, inputs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ ../home/home_common.nix ];
|
config,
|
||||||
home = {
|
pkgs,
|
||||||
packages = with pkgs; [
|
inputs,
|
||||||
docker
|
...
|
||||||
docker-compose
|
}: {
|
||||||
];
|
imports = [../home/home_common.nix];
|
||||||
};
|
home = {packages = with pkgs; [docker docker-compose];};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,9 +1,12 @@
|
|||||||
{ pkgs, lib, ... }: {
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
networking.firewall = {
|
networking.firewall = {
|
||||||
enable = true;
|
enable = true;
|
||||||
allowedTCPPorts = [ 80 443 22 26615 ];
|
allowedTCPPorts = [80 443 22 26615];
|
||||||
allowedUDPPorts = [ 26615 ];
|
allowedUDPPorts = [26615];
|
||||||
};
|
};
|
||||||
|
|
||||||
security.acme = {
|
security.acme = {
|
||||||
@ -11,18 +14,18 @@
|
|||||||
defaults.email = "markers711@gmail.com";
|
defaults.email = "markers711@gmail.com";
|
||||||
};
|
};
|
||||||
|
|
||||||
virtualisation.docker = { enable = true; };
|
virtualisation.docker = {enable = true;};
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
openssh = { enable = true; };
|
openssh = {enable = true;};
|
||||||
|
|
||||||
jellyfin = { enable = true; };
|
jellyfin = {enable = true;};
|
||||||
|
|
||||||
fail2ban = { enable = true; };
|
fail2ban = {enable = true;};
|
||||||
|
|
||||||
postgresql = { enable = true; };
|
postgresql = {enable = true;};
|
||||||
|
|
||||||
i2p = { enable = true; };
|
i2p = {enable = true;};
|
||||||
|
|
||||||
nix-serve = {
|
nix-serve = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@ -64,13 +67,13 @@
|
|||||||
|
|
||||||
home-assistant = {
|
home-assistant = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraComponents = [ "wiz" "fail2ban" "ollama" "wyoming" ];
|
extraComponents = ["wiz" "fail2ban" "ollama" "wyoming"];
|
||||||
config = {
|
config = {
|
||||||
default_config = { };
|
default_config = {};
|
||||||
"automation ui" = "!include automations.yaml";
|
"automation ui" = "!include automations.yaml";
|
||||||
http = {
|
http = {
|
||||||
use_x_forwarded_for = "true";
|
use_x_forwarded_for = "true";
|
||||||
trusted_proxies = [ "127.0.0.1" ];
|
trusted_proxies = ["127.0.0.1"];
|
||||||
server_port = 8003;
|
server_port = 8003;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -109,7 +112,7 @@
|
|||||||
email = "markers711@gmail.com";
|
email = "markers711@gmail.com";
|
||||||
registration_open = false;
|
registration_open = false;
|
||||||
};
|
};
|
||||||
"Pleroma.Web.Endpoint" = { url.host = "fed.dhilton.xyz"; };
|
"Pleroma.Web.Endpoint" = {url.host = "fed.dhilton.xyz";};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
nginx = {
|
nginx = {
|
||||||
@ -124,7 +127,6 @@
|
|||||||
recommendedTlsSettings = true;
|
recommendedTlsSettings = true;
|
||||||
|
|
||||||
virtualHosts = {
|
virtualHosts = {
|
||||||
|
|
||||||
"dhilton.xyz" = {
|
"dhilton.xyz" = {
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
|
|||||||
@ -1,14 +1,18 @@
|
|||||||
# Edit this configuration file to define what should be installed on
|
# Edit this configuration file to define what should be installed on
|
||||||
# your system. Help is available in the configuration.nix(5) man page
|
# your system. Help is available in the configuration.nix(5) man page
|
||||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||||
|
|
||||||
{ config, pkgs, inputs, nixos-hardware, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ # Include the results of the hardware scan.
|
config,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
nixos-hardware,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [
|
||||||
|
# Include the results of the hardware scan.
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
];
|
];
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
networking.networkmanager.enable = true;
|
networking.networkmanager.enable = true;
|
||||||
@ -69,11 +73,11 @@
|
|||||||
users.users.k = {
|
users.users.k = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
description = "k";
|
description = "k";
|
||||||
extraGroups = [ "networkmanager" "wheel" ];
|
extraGroups = ["networkmanager" "wheel"];
|
||||||
packages = with pkgs; [ zsh ];
|
packages = with pkgs; [zsh];
|
||||||
shell = pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
};
|
};
|
||||||
home-manager = { users = { "k" = import ./home.nix; }; };
|
home-manager = {users = {"k" = import ./home.nix;};};
|
||||||
|
|
||||||
system.autoUpgrade.enable = true;
|
system.autoUpgrade.enable = true;
|
||||||
nix.gc.automatic = true;
|
nix.gc.automatic = true;
|
||||||
@ -89,7 +93,7 @@
|
|||||||
neovim
|
neovim
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.kernelModules = [ "soc_button_array" ];
|
boot.kernelModules = ["soc_button_array"];
|
||||||
|
|
||||||
networking.firewall.enable = true;
|
networking.firewall.enable = true;
|
||||||
|
|
||||||
@ -100,5 +104,4 @@
|
|||||||
# Before changing this value read the documentation for this option
|
# Before changing this value read the documentation for this option
|
||||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||||
system.stateVersion = "23.11"; # Did you read the comment?
|
system.stateVersion = "23.11"; # Did you read the comment?
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,16 +1,19 @@
|
|||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
# and may be overwritten by future invocations. Please make changes
|
# and may be overwritten by future invocations. Please make changes
|
||||||
# to /etc/nixos/configuration.nix instead.
|
# to /etc/nixos/configuration.nix instead.
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules =
|
boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "usb_storage" "sd_mod"];
|
||||||
[ "xhci_pci" "nvme" "usb_storage" "sd_mod" ];
|
boot.initrd.kernelModules = [];
|
||||||
boot.initrd.kernelModules = [ ];
|
boot.kernelModules = ["kvm-intel"];
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
boot.extraModulePackages = [];
|
||||||
boot.extraModulePackages = [ ];
|
|
||||||
|
|
||||||
hardware.opengl.driSupport32Bit = true;
|
hardware.opengl.driSupport32Bit = true;
|
||||||
networking.hostName = "surface";
|
networking.hostName = "surface";
|
||||||
@ -29,8 +32,7 @@
|
|||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices =
|
swapDevices = [{device = "/dev/disk/by-uuid/19941c01-ac8c-4609-a834-20259f3ee32e";}];
|
||||||
[{ device = "/dev/disk/by-uuid/19941c01-ac8c-4609-a834-20259f3ee32e"; }];
|
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
# 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
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
|
|||||||
@ -1,6 +1,9 @@
|
|||||||
{ config, pkgs, inputs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
home.enableNixpkgsReleaseCheck = false;
|
home.enableNixpkgsReleaseCheck = false;
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
@ -25,7 +28,8 @@
|
|||||||
enableCompletion = true;
|
enableCompletion = true;
|
||||||
syntaxHighlighting.enable = true;
|
syntaxHighlighting.enable = true;
|
||||||
autocd = true;
|
autocd = true;
|
||||||
plugins = [{
|
plugins = [
|
||||||
|
{
|
||||||
name = "zsh-nix-shell";
|
name = "zsh-nix-shell";
|
||||||
file = "nix-shell.plugin.zsh";
|
file = "nix-shell.plugin.zsh";
|
||||||
src = pkgs.fetchFromGitHub {
|
src = pkgs.fetchFromGitHub {
|
||||||
@ -34,6 +38,7 @@
|
|||||||
rev = "v0.8.0";
|
rev = "v0.8.0";
|
||||||
sha256 = "1lzrn0n4fxfcgg65v0qhnj7wnybybqzs4adz7xsrkgmcsr0ii8b7";
|
sha256 = "1lzrn0n4fxfcgg65v0qhnj7wnybybqzs4adz7xsrkgmcsr0ii8b7";
|
||||||
};
|
};
|
||||||
}];
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,16 +1,22 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
nixpkgs.overlays = [
|
nixpkgs.overlays = [
|
||||||
(final: prev: {
|
(final: prev: {
|
||||||
ollama-intel = prev.ollama.overrideAttrs (oldAttrs: {
|
ollama-intel = prev.ollama.overrideAttrs (oldAttrs: {
|
||||||
buildInputs = oldAttrs.buildInputs or [ ]
|
buildInputs =
|
||||||
++ [ prev.intel-compute-runtime.drivers ];
|
oldAttrs.buildInputs
|
||||||
propagatedBuildInputs = oldAttrs.propagetedBuildInputs or [ ]
|
or []
|
||||||
++ [ prev.intel-compute-runtime.drivers ];
|
++ [prev.intel-compute-runtime.drivers];
|
||||||
|
propagatedBuildInputs =
|
||||||
|
oldAttrs.propagetedBuildInputs
|
||||||
|
or []
|
||||||
|
++ [prev.intel-compute-runtime.drivers];
|
||||||
|
|
||||||
NIX_CFLAGS_COMPILE =
|
NIX_CFLAGS_COMPILE = "${oldAttrs.NIX_CFLAGS_COMPILE or ""} -mavx2 -mfma -O3";
|
||||||
"${oldAttrs.NIX_CFLAGS_COMPILE or ""} -mavx2 -mfma -O3";
|
|
||||||
cmakeFlags = [
|
cmakeFlags = [
|
||||||
"GGML_NATIVE=true"
|
"GGML_NATIVE=true"
|
||||||
"BUILD_SHARED_LIBS=true"
|
"BUILD_SHARED_LIBS=true"
|
||||||
@ -21,7 +27,9 @@
|
|||||||
"CMAKE_CXX_COMPILER=icpx"
|
"CMAKE_CXX_COMPILER=icpx"
|
||||||
];
|
];
|
||||||
|
|
||||||
postInstall = (oldAttrs.postInstall or "") + ''
|
postInstall =
|
||||||
|
(oldAttrs.postInstall or "")
|
||||||
|
+ ''
|
||||||
mkdir -p "$out/bin"
|
mkdir -p "$out/bin"
|
||||||
cat << EOF > "$out/bin/ollama-wrapped"
|
cat << EOF > "$out/bin/ollama-wrapped"
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
@ -37,4 +45,3 @@
|
|||||||
})
|
})
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user