Skip to content

Commit

Permalink
Reformat all the Nix
Browse files Browse the repository at this point in the history
  • Loading branch information
gmacon committed Aug 22, 2024
1 parent bdf02cf commit 556cf87
Show file tree
Hide file tree
Showing 35 changed files with 743 additions and 572 deletions.
9 changes: 5 additions & 4 deletions argon/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,10 @@
users.users.gmacon = {
isNormalUser = true;
description = "George Macon";
extraGroups = [ "networkmanager" "wheel" ];
extraGroups = [
"networkmanager"
"wheel"
];
shell = pkgs.zsh;
packages = with pkgs; [
# thunderbird
Expand Down Expand Up @@ -149,9 +152,7 @@
directories = [ "/home/gmacon" ];
checkpointBytes = "10G";
period = "daily";
excludes = [
".cache"
];
excludes = [ ".cache" ];
tarsnapper = {
enable = true;
deltas = "1d 7d 28d 364d";
Expand Down
36 changes: 22 additions & 14 deletions argon/hardware-configuration.nix
Original file line number Diff line number Diff line change
@@ -1,30 +1,38 @@
# 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, ... }:
{
config,
lib,
pkgs,
...
}:

{
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 = [ ];

fileSystems."/" =
{
device = "/dev/disk/by-uuid/f5b58870-34bb-4c82-b229-eb6f949c3ac9";
fsType = "ext4";
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/f5b58870-34bb-4c82-b229-eb6f949c3ac9";
fsType = "ext4";
};

boot.initrd.luks.devices."luks-ea7ac1b1-e2b3-4e8c-ac68-a9864d91cdda".device = "/dev/disk/by-uuid/ea7ac1b1-e2b3-4e8c-ac68-a9864d91cdda";

fileSystems."/boot" =
{
device = "/dev/disk/by-uuid/0285-F1F8";
fsType = "vfat";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/0285-F1F8";
fsType = "vfat";
};

swapDevices =
[{ device = "/dev/disk/by-uuid/c667f835-6206-4200-bbe6-3ab738f90199"; }];
swapDevices = [ { device = "/dev/disk/by-uuid/c667f835-6206-4200-bbe6-3ab738f90199"; } ];

# 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
Expand Down
170 changes: 85 additions & 85 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -99,20 +99,21 @@
};

outputs =
{ self
, agenix
, emacs
, flake_env
, home-manager
, lanzaboote
, lix-module
, nix-direnv
, nix-index-database
, nixos-hardware
, nixpkgs
, nixpkgs-stable
, ...
} @ inputs:
{
self,
agenix,
emacs,
flake_env,
home-manager,
lanzaboote,
lix-module,
nix-direnv,
nix-index-database,
nixos-hardware,
nixpkgs,
nixpkgs-stable,
...
}@inputs:
let
nixpkgsModule = {
nixpkgs = {
Expand All @@ -122,16 +123,20 @@
nix-direnv.overlays.default
(import ./nix/overlay.nix)
(self: super: {
beeper = (
self.callPackage "${nixpkgs}/pkgs/applications/networking/instant-messengers/beeper" { }
);
beeper = (self.callPackage "${nixpkgs}/pkgs/applications/networking/instant-messengers/beeper" { });
})
];
config.allowUnfree = true;
};
nix.settings = {
experimental-features = [ "nix-command" "flakes" ];
trusted-users = [ "root" "@wheel" ];
experimental-features = [
"nix-command"
"flakes"
];
trusted-users = [
"root"
"@wheel"
];
keep-outputs = true;
keep-derivations = true;
auto-optimise-store = true;
Expand All @@ -141,10 +146,11 @@
inherit (nixpkgsModule.nixpkgs) overlays config;
};
linuxPkgs = import nixpkgs-stable (nixpkgsArgs // { system = "x86_64-linux"; });
darwinPkgs =
import nixpkgs-stable (nixpkgsArgs // { system = "x86_64-darwin"; });
darwinPkgs = import nixpkgs-stable (nixpkgsArgs // { system = "x86_64-darwin"; });
unstablePkgs = import nixpkgs (nixpkgsArgs // { system = "x86_64-linux"; });
extraSpecialArgs = { inherit inputs unstablePkgs; };
extraSpecialArgs = {
inherit inputs unstablePkgs;
};
in
{
nixosConfigurations.argon = nixpkgs-stable.lib.nixosSystem {
Expand Down Expand Up @@ -213,81 +219,75 @@
];
};

homeConfigurations.work-laptop =
home-manager.lib.homeManagerConfiguration {
pkgs = darwinPkgs;
homeConfigurations.work-laptop = home-manager.lib.homeManagerConfiguration {
pkgs = darwinPkgs;

modules = [
nix-index-database.hmModules.nix-index
./home-manager/common/common.nix
./home-manager/common/darwin.nix
./home-manager/graphical/common.nix
./home-manager/work/common.nix
];
modules = [
nix-index-database.hmModules.nix-index
./home-manager/common/common.nix
./home-manager/common/darwin.nix
./home-manager/graphical/common.nix
./home-manager/work/common.nix
];

extraSpecialArgs = {
username = "gmacon3";
userEmail = "[email protected]";
homeDirectory = "/Users/gmacon3";
} // extraSpecialArgs;
};
extraSpecialArgs = {
username = "gmacon3";
userEmail = "[email protected]";
homeDirectory = "/Users/gmacon3";
} // extraSpecialArgs;
};

homeConfigurations.work-desktop =
home-manager.lib.homeManagerConfiguration {
pkgs = linuxPkgs;
homeConfigurations.work-desktop = home-manager.lib.homeManagerConfiguration {
pkgs = linuxPkgs;

modules = [
nix-index-database.hmModules.nix-index
./home-manager/common/common.nix
./home-manager/common/linux.nix
./home-manager/common/alien-linux.nix
./home-manager/graphical/common.nix
./home-manager/graphical/linux.nix
./home-manager/work/common.nix
./home-manager/work-graphical/linux.nix
];
modules = [
nix-index-database.hmModules.nix-index
./home-manager/common/common.nix
./home-manager/common/linux.nix
./home-manager/common/alien-linux.nix
./home-manager/graphical/common.nix
./home-manager/graphical/linux.nix
./home-manager/work/common.nix
./home-manager/work-graphical/linux.nix
];

extraSpecialArgs = {
username = "gmacon3";
userEmail = "[email protected]";
homeDirectory = "/home/gmacon3";
} // extraSpecialArgs;
};
extraSpecialArgs = {
username = "gmacon3";
userEmail = "[email protected]";
homeDirectory = "/home/gmacon3";
} // extraSpecialArgs;
};

homeConfigurations.work-server =
home-manager.lib.homeManagerConfiguration {
pkgs = linuxPkgs;
homeConfigurations.work-server = home-manager.lib.homeManagerConfiguration {
pkgs = linuxPkgs;

modules = [
nix-index-database.hmModules.nix-index
./home-manager/common/common.nix
./home-manager/common/linux.nix
./home-manager/common/alien-linux.nix
./home-manager/work/common.nix
];
modules = [
nix-index-database.hmModules.nix-index
./home-manager/common/common.nix
./home-manager/common/linux.nix
./home-manager/common/alien-linux.nix
./home-manager/work/common.nix
];

extraSpecialArgs = {
username = "gmacon3";
userEmail = "[email protected]";
homeDirectory = "/home/gmacon3";
} // extraSpecialArgs;
};
extraSpecialArgs = {
username = "gmacon3";
userEmail = "[email protected]";
homeDirectory = "/home/gmacon3";
} // extraSpecialArgs;
};

legacyPackages = {
x86_64-linux = linuxPkgs;
x86_64-darwin = darwinPkgs;
};
devShells = builtins.mapAttrs
(system: pkgs:
{
default = pkgs.mkShell {
packages = [
agenix.packages.${system}.default
pkgs.bridge-manager
pkgs.yq-go
];
};
})
self.legacyPackages;
devShells = builtins.mapAttrs (system: pkgs: {
default = pkgs.mkShell {
packages = [
agenix.packages.${system}.default
pkgs.bridge-manager
pkgs.yq-go
];
};
}) self.legacyPackages;
};
}
3 changes: 2 additions & 1 deletion home-manager/common/alien-linux.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{ pkgs, inputs, ... }: {
{ pkgs, inputs, ... }:
{
nix = {
package = pkgs.nix;
registry.nixpkgs.flake = inputs.nixpkgs;
Expand Down
Loading

0 comments on commit 556cf87

Please sign in to comment.