mirror of
https://github.com/youwen5/nixos.git
synced 2024-11-24 17:53:51 -08:00
chore: switch to alejandra and format
This commit is contained in:
parent
9062a9d3ed
commit
26439134dd
29 changed files with 342 additions and 315 deletions
24
flake.nix
24
flake.nix
|
@ -28,8 +28,7 @@
|
|||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
lix-module = {
|
||||
url =
|
||||
"https://git.lix.systems/lix-project/nixos-module/archive/2.90.0.tar.gz";
|
||||
url = "https://git.lix.systems/lix-project/nixos-module/archive/2.90.0.tar.gz";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
apple-silicon = {
|
||||
|
@ -38,10 +37,21 @@
|
|||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, home-manager, catppuccin, lanzaboote, stablepkgs
|
||||
, bleedingpkgs, lix-module, nix-darwin, nix-homebrew, apple-silicon, ...
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
home-manager,
|
||||
catppuccin,
|
||||
lanzaboote,
|
||||
stablepkgs,
|
||||
bleedingpkgs,
|
||||
lix-module,
|
||||
nix-darwin,
|
||||
nix-homebrew,
|
||||
apple-silicon,
|
||||
...
|
||||
} @ inputs: rec {
|
||||
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixfmt;
|
||||
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra;
|
||||
nixosConfigurations = {
|
||||
demeter = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs;};
|
||||
|
@ -151,8 +161,8 @@
|
|||
];
|
||||
};
|
||||
};
|
||||
formatter.aarch64-darwin = nixpkgs.legacyPackages.aarch64-darwin.nixfmt;
|
||||
formatter.aarch64-linux = nixpkgs.legacyPackages.aarch64-linux.nixfmt;
|
||||
formatter.aarch64-darwin = nixpkgs.legacyPackages.aarch64-darwin.alejandra;
|
||||
formatter.aarch64-linux = nixpkgs.legacyPackages.aarch64-linux.alejandra;
|
||||
# Build darwin flake using:
|
||||
# $ darwin-rebuild build --flake .#Youwens-MacBook-Pro
|
||||
darwinConfigurations.phobos = nix-darwin.lib.darwinSystem {
|
||||
|
|
|
@ -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, inputs, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
imports = [ # Include the results of the hardware scan.
|
||||
config,
|
||||
inputs,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
|
@ -44,8 +48,7 @@
|
|||
};
|
||||
};
|
||||
|
||||
boot.initrd.luks.devices."luks-52d1be6d-b32f-41e0-a6d7-2ff52599fe7c".device =
|
||||
"/dev/disk/by-uuid/52d1be6d-b32f-41e0-a6d7-2ff52599fe7c";
|
||||
boot.initrd.luks.devices."luks-52d1be6d-b32f-41e0-a6d7-2ff52599fe7c".device = "/dev/disk/by-uuid/52d1be6d-b32f-41e0-a6d7-2ff52599fe7c";
|
||||
|
||||
services.tlp.enable = true;
|
||||
|
||||
|
|
|
@ -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 =
|
||||
[ "nvme" "xhci_pci" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "usbhid" "usb_storage" "sd_mod"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = ["kvm-amd"];
|
||||
boot.extraModulePackages = [];
|
||||
|
@ -17,8 +20,7 @@
|
|||
fsType = "ext4";
|
||||
};
|
||||
|
||||
boot.initrd.luks.devices."luks-f169a679-d70b-4dff-a344-7131f3303813".device =
|
||||
"/dev/disk/by-uuid/f169a679-d70b-4dff-a344-7131f3303813";
|
||||
boot.initrd.luks.devices."luks-f169a679-d70b-4dff-a344-7131f3303813".device = "/dev/disk/by-uuid/f169a679-d70b-4dff-a344-7131f3303813";
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/3FCB-9D60";
|
||||
|
@ -26,8 +28,7 @@
|
|||
options = ["fmask=0022" "dmask=0022"];
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[{ device = "/dev/disk/by-uuid/f28d0752-feab-4591-899e-e5deac3712d0"; }];
|
||||
swapDevices = [{device = "/dev/disk/by-uuid/f28d0752-feab-4591-899e-e5deac3712d0";}];
|
||||
|
||||
# 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,4 +1,3 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
wayland.windowManager.hyprland.settings.monitor = pkgs.lib.mkForce ["eDP-1,2560x1440@165,0x0,1.6"];
|
||||
}
|
||||
|
|
|
@ -1,11 +1,14 @@
|
|||
# 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, inputs, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [ # Include the results of the hardware scan.
|
||||
config,
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
# ./apple-silicon-support
|
||||
];
|
||||
|
@ -155,7 +158,6 @@
|
|||
environment.variables = {
|
||||
EDITOR = "nvim";
|
||||
NIX_AUTO_RUN = 1;
|
||||
|
||||
};
|
||||
services.keyd = {
|
||||
enable = true;
|
||||
|
|
|
@ -1,9 +1,13 @@
|
|||
# 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 = ["usb_storage" "sdhci_pci"];
|
||||
|
|
|
@ -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, inputs, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
imports = [ # Include the results of the hardware scan.
|
||||
config,
|
||||
inputs,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
|
|
|
@ -1,11 +1,15 @@
|
|||
# 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")
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod"];
|
||||
|
@ -13,21 +17,21 @@
|
|||
boot.kernelModules = ["kvm-intel"];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/5a339a7f-8668-42d7-9ecc-d7a8f1d3f7b2";
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/5a339a7f-8668-42d7-9ecc-d7a8f1d3f7b2";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
boot.initrd.luks.devices."luks-362ec972-7c5e-4c9f-ba5d-b8f2ed083509".device = "/dev/disk/by-uuid/362ec972-7c5e-4c9f-ba5d-b8f2ed083509";
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/27EE-D950";
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/27EE-D950";
|
||||
fsType = "vfat";
|
||||
options = ["fmask=0022" "dmask=0022"];
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/670fc084-d593-44b3-aed9-78d95fec71de"; }
|
||||
swapDevices = [
|
||||
{device = "/dev/disk/by-uuid/670fc084-d593-44b3-aed9-78d95fec71de";}
|
||||
];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
{ inputs, config, pkgs, ... }: {
|
||||
{
|
||||
inputs,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
# Expose the package set, including overlays, for convenience.
|
||||
# darwinPackages = inputs.self.darwinConfigurations."Youwens-MacBook-Pro".pkgs;
|
||||
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
{ config, pkgs, ... }: {
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
services.yabai = {
|
||||
enable = true;
|
||||
enableScriptingAddition = true;
|
||||
|
@ -28,4 +32,3 @@
|
|||
blur_radius = 5.0;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{pkgs, ...}:
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
|
|
|
@ -68,7 +68,6 @@
|
|||
useTheme = "gruvbox";
|
||||
};
|
||||
|
||||
|
||||
programs.direnv.enable = true;
|
||||
|
||||
programs.fish = {
|
||||
|
@ -79,8 +78,7 @@
|
|||
};
|
||||
functions = {
|
||||
update-nixos = {
|
||||
description =
|
||||
"Update the system flake and attempt to build and switch to the new configuration.";
|
||||
description = "Update the system flake and attempt to build and switch to the new configuration.";
|
||||
body = ''
|
||||
cd /etc/nixos
|
||||
nix flake update
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
{ inputs, config, pkgs, ... }:
|
||||
|
||||
{
|
||||
inputs,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
home.username = "youwen";
|
||||
home.homeDirectory = "/Users/youwen";
|
||||
|
||||
|
@ -79,5 +82,4 @@
|
|||
|
||||
# Let home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
}
|
||||
|
|
|
@ -7,4 +7,3 @@
|
|||
../waybar/desktop
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
home.username = "youwen";
|
||||
home.homeDirectory = "/home/youwen";
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
settings = {
|
||||
|
@ -164,8 +163,7 @@
|
|||
"ignorezero,swaync-control-center"
|
||||
"blur,logout_dialog"
|
||||
];
|
||||
monitor =
|
||||
[ "DP-1,2560x1440@165,1920x0,auto" "HDMI-A-1,1920x1080@60,0x0,1" ];
|
||||
monitor = ["DP-1,2560x1440@165,1920x0,auto" "HDMI-A-1,1920x1080@60,0x0,1"];
|
||||
dwindle = {
|
||||
pseudotile = "yes";
|
||||
preserve_split = "yes";
|
||||
|
@ -284,11 +282,9 @@
|
|||
services.hypridle = {
|
||||
enable = true;
|
||||
settings = {
|
||||
lock_cmd =
|
||||
"pidof hyprlock || hyprlock"; # avoid starting multiple hyprlock instances.
|
||||
lock_cmd = "pidof hyprlock || hyprlock"; # avoid starting multiple hyprlock instances.
|
||||
before_sleep_cmd = "loginctl lock-session"; # lock before suspend.
|
||||
after_sleep_cmd =
|
||||
"hyprctl dispatch dpms on"; # to avoid having to press a key twice to turn on the display.
|
||||
after_sleep_cmd = "hyprctl dispatch dpms on"; # to avoid having to press a key twice to turn on the display.
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
{pkgs, ...}: {
|
||||
imports =
|
||||
[ ../theming ../home.nix ../programs ../hyprland/laptop ../waybar/laptop ];
|
||||
imports = [../theming ../home.nix ../programs ../hyprland/laptop ../waybar/laptop];
|
||||
|
||||
# some overrides for laptop specifically
|
||||
programs.kitty.settings.font_size = pkgs.lib.mkForce 11;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
{ pkgs, ... }:
|
||||
let createCommon = import ../common-packages.nix;
|
||||
in { home.packages = ((createCommon pkgs) ++ [ ]); }
|
||||
{pkgs, ...}: let
|
||||
createCommon = import ../common-packages.nix;
|
||||
in {home.packages = (createCommon pkgs) ++ [];}
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
{ pkgs, ... }:
|
||||
let createCommon = import ../common-packages.nix;
|
||||
{pkgs, ...}: let
|
||||
createCommon = import ../common-packages.nix;
|
||||
in {
|
||||
home.packages = ((createCommon pkgs) ++ (with pkgs; [
|
||||
home.packages =
|
||||
(createCommon pkgs)
|
||||
++ (with pkgs; [
|
||||
spotify
|
||||
bitwarden-desktop
|
||||
modrinth-app
|
||||
|
@ -9,5 +11,5 @@ in {
|
|||
wine
|
||||
sbctl
|
||||
r2modman
|
||||
]));
|
||||
]);
|
||||
}
|
||||
|
|
|
@ -23,8 +23,6 @@
|
|||
theme=GraphiteNordDark
|
||||
'';
|
||||
|
||||
"Kvantum/GraphiteNord".source =
|
||||
"${pkgs.graphite-kde-theme}/share/Kvantum/GraphiteNord";
|
||||
"Kvantum/GraphiteNord".source = "${pkgs.graphite-kde-theme}/share/Kvantum/GraphiteNord";
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -9,10 +9,8 @@
|
|||
# width = 1000;
|
||||
reload-style-on-change = true;
|
||||
margin = "5px 0px 0px 0px";
|
||||
modules-left =
|
||||
[ "hyprland/window" "hyprland/workspaces" "network" "clock" ];
|
||||
modules-right =
|
||||
[ "group/hardware" "backlight" "group/adjustable" "custom/weather" ];
|
||||
modules-left = ["hyprland/window" "hyprland/workspaces" "network" "clock"];
|
||||
modules-right = ["group/hardware" "backlight" "group/adjustable" "custom/weather"];
|
||||
# modules-center = [ "network" "group/hardware" "clock" ];
|
||||
"hyprland/workspaces" = {
|
||||
active-only = false;
|
||||
|
|
Loading…
Reference in a new issue