formatting

This commit is contained in:
caandt 2024-10-27 12:34:49 -05:00
parent 6d04251eb7
commit e6f2aa347e
24 changed files with 152 additions and 145 deletions

View file

@ -14,12 +14,19 @@
}; };
}; };
outputs = { nixpkgs, nixpkgs-stable, home-manager, flake-programs-sqlite, ... }@inputs: outputs = {
let nixpkgs,
nixpkgs-stable,
home-manager,
flake-programs-sqlite,
...
} @ inputs: let
system = "x86_64-linux"; system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
pkgs-stable = nixpkgs-stable.legacyPackages.${system}; pkgs-stable = nixpkgs-stable.legacyPackages.${system};
in with builtins; with nixpkgs.lib.attrsets; { in
with builtins;
with nixpkgs.lib.attrsets; {
nixosConfigurations = mapAttrs' (host: _: { nixosConfigurations = mapAttrs' (host: _: {
name = host; name = host;
value = nixpkgs.lib.nixosSystem { value = nixpkgs.lib.nixosSystem {
@ -31,9 +38,13 @@
modules = [(./hosts + "/${host}")]; modules = [(./hosts + "/${host}")];
}; };
}) (readDir ./hosts); }) (readDir ./hosts);
homeConfigurations = foldl' (a: b: a//b) {} (map (host: let users = ./hosts + "/${host}/users"; in homeConfigurations = foldl' (a: b: a // b) {} (map (
host: let
users = ./hosts + "/${host}/users";
in
if pathExists users if pathExists users
then mapAttrs' (user: _: { then
mapAttrs' (user: _: {
name = "${user}@${host}"; name = "${user}@${host}";
value = home-manager.lib.homeManagerConfiguration { value = home-manager.lib.homeManagerConfiguration {
inherit pkgs; inherit pkgs;
@ -41,7 +52,8 @@
inherit pkgs-stable; inherit pkgs-stable;
}; };
modules = [(users + "/${user}")]; modules = [(users + "/${user}")];
};}) (readDir users) };
}) (readDir users)
else {} else {}
) (attrNames (readDir ./hosts))); ) (attrNames (readDir ./hosts)));
}; };

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
imports = [ imports = [
../../system ../../system
./hardware-configuration.nix ./hardware-configuration.nix

View file

@ -1,11 +1,15 @@
# 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 = config,
[ (modulesPath + "/installer/scan/not-detected.nix") lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod"]; boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod"];
@ -13,13 +17,13 @@
boot.kernelModules = ["kvm-amd"]; boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = []; boot.extraModulePackages = [];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/37229430-3b89-413e-9f9d-f36b3d2935bf"; device = "/dev/disk/by-uuid/37229430-3b89-413e-9f9d-f36b3d2935bf";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/1FF4-8F2A"; device = "/dev/disk/by-uuid/1FF4-8F2A";
fsType = "vfat"; fsType = "vfat";
}; };

View file

@ -1,6 +1,4 @@
{ config, ... }: {config, ...}: {
{
imports = [ imports = [
../../../../user ../../../../user
]; ];

View file

@ -1,6 +1,4 @@
{ lib, ... }: {lib, ...}: {
{
imports = [ imports = [
../common ../common
./hardware-configuration.nix ./hardware-configuration.nix

View file

@ -1,11 +1,15 @@
# 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 = config,
[ (modulesPath + "/installer/scan/not-detected.nix") lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "sd_mod"]; boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "sd_mod"];
@ -13,24 +17,24 @@
boot.kernelModules = ["kvm-intel"]; boot.kernelModules = ["kvm-intel"];
boot.extraModulePackages = []; boot.extraModulePackages = [];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/6c86675c-7428-4a34-98e2-7fa2b423b53e"; device = "/dev/disk/by-uuid/6c86675c-7428-4a34-98e2-7fa2b423b53e";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/home" = fileSystems."/home" = {
{ device = "/dev/disk/by-uuid/d376771f-3dd5-4d8a-94d3-dcb75aae146d"; device = "/dev/disk/by-uuid/d376771f-3dd5-4d8a-94d3-dcb75aae146d";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/4F3D-4702"; device = "/dev/disk/by-uuid/4F3D-4702";
fsType = "vfat"; fsType = "vfat";
options = ["fmask=0022" "dmask=0022"]; options = ["fmask=0022" "dmask=0022"];
}; };
swapDevices = swapDevices = [
[ { device = "/dev/disk/by-uuid/8049404d-f5fb-4387-bb75-f308a7f7126f"; } {device = "/dev/disk/by-uuid/8049404d-f5fb-4387-bb75-f308a7f7126f";}
]; ];
# 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

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
services.pipewire = { services.pipewire = {
enable = true; enable = true;
alsa.enable = true; alsa.enable = true;

View file

@ -1,6 +1,4 @@
{ lib, ... }: {lib, ...}: {
{
programs.bash = { programs.bash = {
completion.enable = true; completion.enable = true;
promptInit = ''PS1="[\u \W] \[\e[32;1m\]\$\[\e[0m\] "''; promptInit = ''PS1="[\u \W] \[\e[32;1m\]\$\[\e[0m\] "'';

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
boot.loader = { boot.loader = {
grub.enable = true; grub.enable = true;
grub.device = "nodev"; grub.device = "nodev";

View file

@ -1,6 +1,10 @@
{ config, pkgs, lib, flake-programs-sqlite, ... }:
{ {
config,
pkgs,
lib,
flake-programs-sqlite,
...
}: {
nix.settings = { nix.settings = {
experimental-features = ["nix-command" "flakes"]; experimental-features = ["nix-command" "flakes"];
use-xdg-base-directories = true; use-xdg-base-directories = true;
@ -36,4 +40,3 @@
system.stateVersion = "24.05"; system.stateVersion = "24.05";
} }

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
imports = [ imports = [
./audio.nix ./audio.nix
./bash.nix ./bash.nix

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
services.xserver = { services.xserver = {
enable = true; enable = true;
autorun = false; autorun = false;

View file

@ -1,6 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
i18n.defaultLocale = "en_US.UTF-8"; i18n.defaultLocale = "en_US.UTF-8";
i18n.supportedLocales = [ i18n.supportedLocales = [
"en_US.UTF-8/UTF-8" "en_US.UTF-8/UTF-8"

View file

@ -1,6 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
programs.partition-manager = { programs.partition-manager = {
enable = true; enable = true;
package = pkgs.libsForQt5.partitionmanager; package = pkgs.libsForQt5.partitionmanager;

View file

@ -1,10 +1,11 @@
{ ... }: {...}: {
{
security.doas = { security.doas = {
enable = true; enable = true;
extraRules = [ extraRules = [
{ groups = [ "wheel" ]; persist = true; } {
groups = ["wheel"];
persist = true;
}
]; ];
}; };
security.polkit.enable = true; security.polkit.enable = true;

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
users.users.ahnwuoa = { users.users.ahnwuoa = {
isNormalUser = true; isNormalUser = true;
extraGroups = ["wheel" "podman"]; extraGroups = ["wheel" "podman"];

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
virtualisation.containers.enable = true; virtualisation.containers.enable = true;
virtualisation = { virtualisation = {
podman = { podman = {

View file

@ -1,6 +1,8 @@
{ config, pkgs, ... }: {
config,
let pkgs,
...
}: let
deps = { deps = {
bell = [pkgs.pipewire pkgs.libnotify]; bell = [pkgs.pipewire pkgs.libnotify];
nsxiv-rifle = [pkgs.nsxiv]; nsxiv-rifle = [pkgs.nsxiv];
@ -8,12 +10,14 @@ let
}; };
mkln = x: config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.local/nixos/user/bin/${x}"; mkln = x: config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.local/nixos/user/bin/${x}";
in { in {
home.file = builtins.listToAttrs (map home.file = builtins.listToAttrs (
map
(x: { (x: {
name = ".local/bin/${x}"; name = ".local/bin/${x}";
value = {source = mkln x;}; value = {source = mkln x;};
}) })
(builtins.filter (
builtins.filter
(x: x != "default.nix") (x: x != "default.nix")
(builtins.attrNames (builtins.readDir ./.)) (builtins.attrNames (builtins.readDir ./.))
) )

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
imports = [ imports = [
./bin ./bin
./home.nix ./home.nix

View file

@ -1,6 +1,9 @@
{ config, pkgs, pkgs-stable, ... }:
{ {
config,
pkgs,
pkgs-stable,
...
}: {
home.packages = with pkgs; [ home.packages = with pkgs; [
(pkgs.symlinkJoin { (pkgs.symlinkJoin {
name = "firefox"; name = "firefox";

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
imports = [ imports = [
./nsxiv-rifle.nix ./nsxiv-rifle.nix
]; ];

View file

@ -1,6 +1,4 @@
{ ... }: {...}: {
{
xdg.desktopEntries."nsxiv-rifle" = { xdg.desktopEntries."nsxiv-rifle" = {
exec = "nsxiv-rifle %F"; exec = "nsxiv-rifle %F";
icon = "nsxiv"; icon = "nsxiv";

View file

@ -1,6 +1,8 @@
{ config, pkgs, ... }:
{ {
config,
pkgs,
...
}: {
qt = { qt = {
enable = true; enable = true;
platformTheme.name = "qtct"; platformTheme.name = "qtct";

View file

@ -1,6 +1,8 @@
{ config, pkgs, ... }: {
config,
let pkgs,
...
}: let
mkln = x: config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.local/nixos/user/${x}"; mkln = x: config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.local/nixos/user/${x}";
in { in {
xdg.configFile.alacritty.source = mkln "config/alacritty"; xdg.configFile.alacritty.source = mkln "config/alacritty";
@ -22,7 +24,9 @@ in {
xdg.configFile.readline.source = config/readline; xdg.configFile.readline.source = config/readline;
xdg.configFile."starship.toml".source = config/starship.toml; xdg.configFile."starship.toml".source = config/starship.toml;
xdg.configFile.sx.source = mkln "config/sx"; xdg.configFile.sx.source = mkln "config/sx";
xdg.configFile."tmux/tmux.conf".text = (builtins.readFile config/tmux/tmux.conf) + '' xdg.configFile."tmux/tmux.conf".text =
(builtins.readFile config/tmux/tmux.conf)
+ ''
run ${pkgs.tmuxPlugins.vim-tmux-navigator.rtp} run ${pkgs.tmuxPlugins.vim-tmux-navigator.rtp}
run ${pkgs.tmuxPlugins.sessionist.rtp} run ${pkgs.tmuxPlugins.sessionist.rtp}
''; '';