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:
|
||||
let
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
nixos-hardware,
|
||||
...
|
||||
} @ inputs: let
|
||||
system = "x86_64-linux";
|
||||
pkg = nixpkgs.legacyPackages.${system};
|
||||
in {
|
||||
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra;
|
||||
nixosConfigurations = {
|
||||
laptop = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs;};
|
||||
@ -47,7 +52,6 @@
|
||||
nixos-hardware.nixosModules.microsoft-surface-pro-intel
|
||||
];
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@ -1,6 +1,9 @@
|
||||
{ config, pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
# ...
|
||||
dconf.settings = {
|
||||
# ...
|
||||
@ -22,4 +25,3 @@
|
||||
gnomeExtensions.search-light
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@ -1,6 +1,9 @@
|
||||
{ config, pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
home = {
|
||||
username = "k";
|
||||
homeDirectory = "/home/k";
|
||||
@ -21,7 +24,8 @@
|
||||
enableCompletion = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
autocd = true;
|
||||
plugins = [{
|
||||
plugins = [
|
||||
{
|
||||
name = "zsh-nix-shell";
|
||||
file = "nix-shell.plugin.zsh";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
@ -30,7 +34,8 @@
|
||||
rev = "v0.8.0";
|
||||
sha256 = "1lzrn0n4fxfcgg65v0qhnj7wnybybqzs4adz7xsrkgmcsr0ii8b7";
|
||||
};
|
||||
}];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@ -1,6 +1,9 @@
|
||||
{ config, pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
imports = [./waybar.nix ./tile.nix];
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
@ -9,7 +12,10 @@
|
||||
xwayland.enable = true;
|
||||
|
||||
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";
|
||||
general = {
|
||||
"$mainMod" = "SUPER";
|
||||
@ -28,7 +34,7 @@
|
||||
size = 2;
|
||||
passes = 2;
|
||||
brightness = 1;
|
||||
noise = .3;
|
||||
noise = 0.3;
|
||||
new_optimizations = true;
|
||||
};
|
||||
drop_shadow = true;
|
||||
@ -48,11 +54,7 @@
|
||||
vrr = 1;
|
||||
};
|
||||
|
||||
input = {
|
||||
touchpad = {
|
||||
natural_scroll = true;
|
||||
};
|
||||
};
|
||||
input = {touchpad = {natural_scroll = true;};};
|
||||
|
||||
bind = [
|
||||
# keybindings
|
||||
@ -68,7 +70,6 @@
|
||||
"$mainMod, up, movefocus, u"
|
||||
"$mainMod, down, movefocus, d"
|
||||
|
||||
|
||||
# switch workspace
|
||||
"$mainMod, 1, workspace, 1"
|
||||
"$mainMod, 2, workspace, 2"
|
||||
@ -124,8 +125,7 @@
|
||||
"$mainMod, mouse:273, resizewindow"
|
||||
];
|
||||
|
||||
windowrule =
|
||||
[ "float,mpv" "center,mpv" "pin,wofi" "idleinhibit focus,mpv" ];
|
||||
windowrule = ["float,mpv" "center,mpv" "pin,wofi" "idleinhibit focus,mpv"];
|
||||
|
||||
windowrulev2 = [];
|
||||
};
|
||||
@ -141,4 +141,3 @@
|
||||
_JAVA_AWT_WM_NONREPARENTING = 1;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@ -1,6 +1,9 @@
|
||||
{ config, pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
imports = [./waybar.nix ./tile.nix];
|
||||
|
||||
wayland.windowManager.sway = {
|
||||
@ -29,9 +32,5 @@
|
||||
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
|
||||
_JAVA_AWT_WM_NONREPARENTING = 1;
|
||||
};
|
||||
services = {
|
||||
swayidle = { enable = true; };
|
||||
};
|
||||
|
||||
services = {swayidle = {enable = true;};};
|
||||
}
|
||||
|
||||
|
||||
@ -1,9 +1,10 @@
|
||||
{ config, pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
services = {
|
||||
mako = { enable = true; };
|
||||
};
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
services = {mako = {enable = true;};};
|
||||
programs = {
|
||||
alacritty = {enable = true;};
|
||||
swaylock = {enable = true;};
|
||||
|
||||
@ -1,4 +1,8 @@
|
||||
{ config, pkgs, ... }: {
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
systemd.enable = true;
|
||||
|
||||
@ -1,6 +1,9 @@
|
||||
{ config, pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
imports = [./hardware-configuration.nix];
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
@ -16,17 +19,11 @@
|
||||
gc.automatic = true;
|
||||
settings = {
|
||||
experimental-features = ["nix-command" "flakes"];
|
||||
substituters = [
|
||||
"http://nix.dhilton.xyz/"
|
||||
"https://cache.nixos.org/"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"nix.dhilton.xyz:MOW060dF1A0/UXmPZBue9KMxCO13PHYFwx1X9hcdYZ4="
|
||||
];
|
||||
substituters = ["http://nix.dhilton.xyz/" "https://cache.nixos.org/"];
|
||||
trusted-public-keys = ["nix.dhilton.xyz:MOW060dF1A0/UXmPZBue9KMxCO13PHYFwx1X9hcdYZ4="];
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
networking = {
|
||||
hostName = "laptop";
|
||||
networkmanager.enable = true;
|
||||
@ -138,7 +135,7 @@
|
||||
|
||||
environment = {
|
||||
sessionVariables = {MOZ_USE_XINPUT2 = "1";};
|
||||
gnome.excludePackages = (with pkgs; [
|
||||
gnome.excludePackages = with pkgs; [
|
||||
gnome-photos
|
||||
gnome-tour
|
||||
xterm
|
||||
@ -153,7 +150,7 @@
|
||||
iagno # go game
|
||||
hitori # sudoku game
|
||||
atomix # puzzle game
|
||||
]);
|
||||
];
|
||||
systemPackages = with pkgs; [
|
||||
intel-vaapi-driver
|
||||
intel-compute-runtime
|
||||
@ -170,7 +167,6 @@
|
||||
};
|
||||
|
||||
boot = {
|
||||
|
||||
plymouth = {enable = true;};
|
||||
|
||||
consoleLogLevel = 0;
|
||||
@ -194,5 +190,4 @@
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
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’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
|
||||
|
||||
boot.initrd.availableKernelModules =
|
||||
[ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.availableKernelModules = ["xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = ["kvm-intel"];
|
||||
boot.extraModulePackages = [];
|
||||
@ -22,8 +25,7 @@
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[{ device = "/dev/disk/by-uuid/d9df94a1-5088-468c-839d-f4cd10cb7e5f"; }];
|
||||
swapDevices = [{device = "/dev/disk/by-uuid/d9df94a1-5088-468c-839d-f4cd10cb7e5f";}];
|
||||
|
||||
# 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
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -52,5 +60,4 @@
|
||||
enable = true;
|
||||
autoEnable = true;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@ -1,6 +1,9 @@
|
||||
{ config, pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
imports = [./hardware-configuration.nix ./service.nix];
|
||||
powerManagement.enable = false;
|
||||
system.autoUpgrade.enable = true;
|
||||
@ -11,13 +14,8 @@
|
||||
gc.automatic = true;
|
||||
settings = {
|
||||
experimental-features = ["nix-command" "flakes"];
|
||||
substituters = [
|
||||
"http://nix.dhilton.xyz/"
|
||||
"https://cache.nixos.org/"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"nix.dhilton.xyz:MOW060dF1A0/UXmPZBue9KMxCO13PHYFwx1X9hcdYZ4="
|
||||
];
|
||||
substituters = ["http://nix.dhilton.xyz/" "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
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
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’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
|
||||
|
||||
boot.initrd.availableKernelModules =
|
||||
[ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
|
||||
boot.initrd.availableKernelModules = ["xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = ["kvm-intel"];
|
||||
boot.extraModulePackages = [];
|
||||
@ -27,8 +30,7 @@
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[{ device = "/dev/disk/by-uuid/ecde85bd-abea-4926-80d5-810b01d0e364"; }];
|
||||
swapDevices = [{device = "/dev/disk/by-uuid/ecde85bd-abea-4926-80d5-810b01d0e364";}];
|
||||
|
||||
# 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
|
||||
|
||||
@ -1,11 +1,9 @@
|
||||
{ config, pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
imports = [../home/home_common.nix];
|
||||
home = {
|
||||
packages = with pkgs; [
|
||||
docker
|
||||
docker-compose
|
||||
];
|
||||
};
|
||||
home = {packages = with pkgs; [docker docker-compose];};
|
||||
}
|
||||
|
||||
@ -1,5 +1,8 @@
|
||||
{ pkgs, lib, ... }: {
|
||||
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
networking.firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [80 443 22 26615];
|
||||
@ -124,7 +127,6 @@
|
||||
recommendedTlsSettings = true;
|
||||
|
||||
virtualHosts = {
|
||||
|
||||
"dhilton.xyz" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
|
||||
@ -1,11 +1,15 @@
|
||||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# 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
|
||||
];
|
||||
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||
@ -100,5 +104,4 @@
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
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’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
|
||||
|
||||
boot.initrd.availableKernelModules =
|
||||
[ "xhci_pci" "nvme" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "usb_storage" "sd_mod"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = ["kvm-intel"];
|
||||
boot.extraModulePackages = [];
|
||||
@ -29,8 +32,7 @@
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[{ device = "/dev/disk/by-uuid/19941c01-ac8c-4609-a834-20259f3ee32e"; }];
|
||||
swapDevices = [{device = "/dev/disk/by-uuid/19941c01-ac8c-4609-a834-20259f3ee32e";}];
|
||||
|
||||
# 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
|
||||
|
||||
@ -1,6 +1,9 @@
|
||||
{ config, pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
home.enableNixpkgsReleaseCheck = false;
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
@ -25,7 +28,8 @@
|
||||
enableCompletion = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
autocd = true;
|
||||
plugins = [{
|
||||
plugins = [
|
||||
{
|
||||
name = "zsh-nix-shell";
|
||||
file = "nix-shell.plugin.zsh";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
@ -34,6 +38,7 @@
|
||||
rev = "v0.8.0";
|
||||
sha256 = "1lzrn0n4fxfcgg65v0qhnj7wnybybqzs4adz7xsrkgmcsr0ii8b7";
|
||||
};
|
||||
}];
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@ -1,16 +1,22 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
nixpkgs.overlays = [
|
||||
(final: prev: {
|
||||
ollama-intel = prev.ollama.overrideAttrs (oldAttrs: {
|
||||
buildInputs = oldAttrs.buildInputs or [ ]
|
||||
buildInputs =
|
||||
oldAttrs.buildInputs
|
||||
or []
|
||||
++ [prev.intel-compute-runtime.drivers];
|
||||
propagatedBuildInputs = oldAttrs.propagetedBuildInputs or [ ]
|
||||
propagatedBuildInputs =
|
||||
oldAttrs.propagetedBuildInputs
|
||||
or []
|
||||
++ [prev.intel-compute-runtime.drivers];
|
||||
|
||||
NIX_CFLAGS_COMPILE =
|
||||
"${oldAttrs.NIX_CFLAGS_COMPILE or ""} -mavx2 -mfma -O3";
|
||||
NIX_CFLAGS_COMPILE = "${oldAttrs.NIX_CFLAGS_COMPILE or ""} -mavx2 -mfma -O3";
|
||||
cmakeFlags = [
|
||||
"GGML_NATIVE=true"
|
||||
"BUILD_SHARED_LIBS=true"
|
||||
@ -21,7 +27,9 @@
|
||||
"CMAKE_CXX_COMPILER=icpx"
|
||||
];
|
||||
|
||||
postInstall = (oldAttrs.postInstall or "") + ''
|
||||
postInstall =
|
||||
(oldAttrs.postInstall or "")
|
||||
+ ''
|
||||
mkdir -p "$out/bin"
|
||||
cat << EOF > "$out/bin/ollama-wrapped"
|
||||
#!/bin/sh
|
||||
@ -37,4 +45,3 @@
|
||||
})
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user