changed formater
This commit is contained in:
parent
52fbee6322
commit
3995c29b03
10
flake.nix
10
flake.nix
@ -12,11 +12,16 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
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;};
|
||||||
@ -47,7 +52,6 @@
|
|||||||
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";
|
||||||
@ -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,6 +1,9 @@
|
|||||||
{ config, pkgs, inputs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
imports = [./waybar.nix ./tile.nix];
|
imports = [./waybar.nix ./tile.nix];
|
||||||
|
|
||||||
wayland.windowManager.hyprland = {
|
wayland.windowManager.hyprland = {
|
||||||
@ -9,7 +12,10 @@
|
|||||||
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,8 +125,7 @@
|
|||||||
"$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,6 +1,9 @@
|
|||||||
{ config, pkgs, inputs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
imports = [./waybar.nix ./tile.nix];
|
imports = [./waybar.nix ./tile.nix];
|
||||||
|
|
||||||
wayland.windowManager.sway = {
|
wayland.windowManager.sway = {
|
||||||
@ -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,9 +1,10 @@
|
|||||||
{ 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;};
|
||||||
|
|||||||
@ -1,4 +1,8 @@
|
|||||||
{ config, pkgs, ... }: {
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
programs.waybar = {
|
programs.waybar = {
|
||||||
enable = true;
|
enable = true;
|
||||||
systemd.enable = true;
|
systemd.enable = true;
|
||||||
|
|||||||
@ -1,6 +1,9 @@
|
|||||||
{ config, pkgs, inputs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
imports = [./hardware-configuration.nix];
|
imports = [./hardware-configuration.nix];
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
@ -16,17 +19,11 @@
|
|||||||
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;
|
||||||
@ -138,7 +135,7 @@
|
|||||||
|
|
||||||
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,7 +167,6 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
|
|
||||||
plymouth = {enable = true;};
|
plymouth = {enable = true;};
|
||||||
|
|
||||||
consoleLogLevel = 0;
|
consoleLogLevel = 0;
|
||||||
@ -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,13 +1,16 @@
|
|||||||
# 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, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
|
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 = [];
|
||||||
@ -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,6 +1,9 @@
|
|||||||
{ config, pkgs, inputs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
imports = [./hardware-configuration.nix ./service.nix];
|
imports = [./hardware-configuration.nix ./service.nix];
|
||||||
powerManagement.enable = false;
|
powerManagement.enable = false;
|
||||||
system.autoUpgrade.enable = true;
|
system.autoUpgrade.enable = true;
|
||||||
@ -11,13 +14,8 @@
|
|||||||
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="
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -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,13 +1,16 @@
|
|||||||
# 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, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
|
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 = [];
|
||||||
@ -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, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
imports = [../home/home_common.nix];
|
imports = [../home/home_common.nix];
|
||||||
home = {
|
home = {packages = with pkgs; [docker docker-compose];};
|
||||||
packages = with pkgs; [
|
|
||||||
docker
|
|
||||||
docker-compose
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,8 @@
|
|||||||
{ pkgs, lib, ... }: {
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
networking.firewall = {
|
networking.firewall = {
|
||||||
enable = true;
|
enable = true;
|
||||||
allowedTCPPorts = [80 443 22 26615];
|
allowedTCPPorts = [80 443 22 26615];
|
||||||
@ -124,7 +127,6 @@
|
|||||||
recommendedTlsSettings = true;
|
recommendedTlsSettings = true;
|
||||||
|
|
||||||
virtualHosts = {
|
virtualHosts = {
|
||||||
|
|
||||||
"dhilton.xyz" = {
|
"dhilton.xyz" = {
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
|
|||||||
@ -1,11 +1,15 @@
|
|||||||
# 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"];
|
||||||
@ -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,13 +1,16 @@
|
|||||||
# 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, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
|
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 = [];
|
||||||
@ -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 =
|
||||||
|
oldAttrs.buildInputs
|
||||||
|
or []
|
||||||
++ [prev.intel-compute-runtime.drivers];
|
++ [prev.intel-compute-runtime.drivers];
|
||||||
propagatedBuildInputs = oldAttrs.propagetedBuildInputs or [ ]
|
propagatedBuildInputs =
|
||||||
|
oldAttrs.propagetedBuildInputs
|
||||||
|
or []
|
||||||
++ [prev.intel-compute-runtime.drivers];
|
++ [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