WIP kill special args
This commit is contained in:
parent
3135d7b4ab
commit
91af8a8b01
10 changed files with 86 additions and 111 deletions
40
flake.nix
40
flake.nix
|
@ -38,8 +38,12 @@
|
|||
nixpkgs,
|
||||
home-manager,
|
||||
...
|
||||
} @ inputs: let
|
||||
inherit (self) outputs;
|
||||
}: let
|
||||
inherit (self) outputs inputs;
|
||||
|
||||
# a wrapper around all the stuff we might hand off to modules so they can
|
||||
# effectively reference this flake's inputs and outputs
|
||||
thisFlake = {inherit outputs inputs;};
|
||||
|
||||
systems = [
|
||||
"aarch64-linux"
|
||||
|
@ -60,22 +64,26 @@
|
|||
|
||||
# Your custom packages
|
||||
# Acessible through 'nix build', 'nix shell', etc
|
||||
packages = forAllSystems (system: import ./pkgs {pkgs = nixpkgs.legacyPackages.${system};});
|
||||
packages = forAllSystems (system:
|
||||
import ./pkgs {
|
||||
inherit thisFlake;
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
});
|
||||
|
||||
# Formatter for your nix files, available through 'nix fmt'
|
||||
# Other options beside 'alejandra' include 'nixpkgs-fmt'
|
||||
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra);
|
||||
|
||||
# Your custom packages and modifications, exported as overlays
|
||||
overlays = import ./overlays {inherit inputs;};
|
||||
overlays = import ./overlays thisFlake;
|
||||
|
||||
# Reusable nixos modules you might want to export
|
||||
# These are usually stuff you would upstream into nixpkgs
|
||||
nixosModules = import ./modules/nixos;
|
||||
nixosModules = import ./modules/nixos thisFlake;
|
||||
|
||||
# Reusable home-manager modules you might want to export
|
||||
# These are usually stuff you would upstream into home-manager
|
||||
homeManagerModules = import ./modules/home-manager;
|
||||
homeManagerModules = import ./modules/home-manager thisFlake;
|
||||
|
||||
# NixOS configuration entrypoint
|
||||
# Available through 'nixos-rebuild --flake .#your-hostname'
|
||||
|
@ -86,16 +94,12 @@
|
|||
}:
|
||||
nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = {
|
||||
inherit inputs outputs system;
|
||||
flake = self;
|
||||
};
|
||||
modules =
|
||||
[
|
||||
self.nixosModules.common
|
||||
outputs.nixosModules.common
|
||||
]
|
||||
++ modules;
|
||||
}) (import ./nixos);
|
||||
}) (import ./nixos thisFlake);
|
||||
|
||||
# Standalone home-manager configuration entrypoint
|
||||
# Available through 'home-manager --flake .#your-username@your-hostname'
|
||||
|
@ -106,18 +110,14 @@
|
|||
in
|
||||
home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
extraSpecialArgs = {
|
||||
inherit inputs outputs system;
|
||||
inherit (outputs) colors font;
|
||||
};
|
||||
modules = with outputs.homeManagerModules; [
|
||||
common
|
||||
linux
|
||||
{
|
||||
home.homeDirectory = "/home/deck";
|
||||
home.username = "deck";
|
||||
home.stateVersion = "24.05";
|
||||
}
|
||||
linux
|
||||
];
|
||||
};
|
||||
workm1 = let
|
||||
|
@ -125,18 +125,14 @@
|
|||
in
|
||||
home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
extraSpecialArgs = {
|
||||
inherit inputs outputs system;
|
||||
inherit (outputs) colors font;
|
||||
};
|
||||
modules = with outputs.homeManagerModules; [
|
||||
common
|
||||
macos
|
||||
{
|
||||
home.homeDirectory = "/Users/daniel.flanagan";
|
||||
home.username = "daniel.flanagan";
|
||||
home.stateVersion = "24.05";
|
||||
}
|
||||
macos
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
_thisFlake:
|
||||
with builtins;
|
||||
listToAttrs (map (name: {
|
||||
name = name;
|
||||
|
|
|
@ -1,26 +1,23 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
inputs,
|
||||
outputs,
|
||||
system,
|
||||
# config,
|
||||
# inputs,
|
||||
# outputs,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
# modulesPath,
|
||||
...
|
||||
}: {
|
||||
}: let
|
||||
lib = pkgs.lib;
|
||||
in {
|
||||
networking.hostName = lib.mkDefault "nixoslyte";
|
||||
|
||||
imports =
|
||||
[
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
inputs.disko.nixosModules.disko
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
]
|
||||
++ (with outputs.nixosModules; [
|
||||
avahi
|
||||
daniel
|
||||
]);
|
||||
imports = [
|
||||
# (modulesPath + "/installer/scan/not-detected.nix")
|
||||
# inputs.sops-nix.nixosModules.sops
|
||||
# inputs.disko.nixosModules.disko
|
||||
# inputs.home-manager.nixosModules.home-manager
|
||||
# ./avahi.nix
|
||||
# ./daniel.nix
|
||||
];
|
||||
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
|
||||
|
@ -108,7 +105,7 @@
|
|||
};
|
||||
|
||||
root = {
|
||||
openssh.authorizedKeys.keys = config.users.users.daniel.openssh.authorizedKeys.keys;
|
||||
# openssh.authorizedKeys.keys = config.users.users.daniel.openssh.authorizedKeys.keys;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -157,24 +154,24 @@
|
|||
useXkbConfig = true;
|
||||
earlySetup = true;
|
||||
|
||||
colors = with outputs.colors; [
|
||||
bg
|
||||
red
|
||||
green
|
||||
orange
|
||||
blue
|
||||
purple
|
||||
yellow
|
||||
fg3
|
||||
fgdim
|
||||
red
|
||||
green
|
||||
orange
|
||||
blue
|
||||
purple
|
||||
yellow
|
||||
fg
|
||||
];
|
||||
# colors = with outputs.colors; [
|
||||
# bg
|
||||
# red
|
||||
# green
|
||||
# orange
|
||||
# blue
|
||||
# purple
|
||||
# yellow
|
||||
# fg3
|
||||
# fgdim
|
||||
# red
|
||||
# green
|
||||
# orange
|
||||
# blue
|
||||
# purple
|
||||
# yellow
|
||||
# fg
|
||||
# ];
|
||||
};
|
||||
|
||||
networking = {
|
||||
|
@ -239,9 +236,9 @@
|
|||
# You can add overlays here
|
||||
overlays = [
|
||||
# Add overlays your own flake exports (from overlays and pkgs dir):
|
||||
outputs.overlays.additions
|
||||
outputs.overlays.modifications
|
||||
outputs.overlays.unstable-packages
|
||||
# outputs.overlays.additions
|
||||
# outputs.overlays.modifications
|
||||
# outputs.overlays.unstable-packages
|
||||
|
||||
# You can also add overlays exported from other flakes:
|
||||
# neovim-nightly-overlay.overlays.default
|
||||
|
@ -263,11 +260,11 @@
|
|||
nix = {
|
||||
# This will add each flake input as a registry
|
||||
# To make nix3 commands consistent with your flake
|
||||
registry = lib.mapAttrs (_: value: {flake = value;}) inputs;
|
||||
# registry = lib.mapAttrs (_: value: {flake = value;}) inputs;
|
||||
|
||||
# This will additionally add your inputs to the system's legacy channels
|
||||
# Making legacy nix commands consistent as well, awesome!
|
||||
nixPath = lib.mapAttrsToList (key: value: "${key}=${value.to.path}") config.nix.registry;
|
||||
# nixPath = lib.mapAttrsToList (key: value: "${key}=${value.to.path}") config.nix.registry;
|
||||
|
||||
settings = {
|
||||
trusted-users = ["root" "daniel"];
|
||||
|
|
|
@ -1,15 +1,5 @@
|
|||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
system,
|
||||
outputs,
|
||||
...
|
||||
}: {
|
||||
home-manager = {
|
||||
extraSpecialArgs = {
|
||||
inherit inputs outputs system;
|
||||
inherit (outputs) colors font;
|
||||
};
|
||||
users.daniel = {
|
||||
accounts.email.accounts = {
|
||||
primary = {
|
||||
|
@ -34,12 +24,12 @@
|
|||
homeDirectory = "/home/daniel/.home";
|
||||
};
|
||||
|
||||
imports = with outputs.homeManagerModules; [
|
||||
common
|
||||
gnome
|
||||
senpai
|
||||
iex
|
||||
cargo
|
||||
imports = [
|
||||
./common.nix
|
||||
./gnome.nix
|
||||
./senpai.nix
|
||||
./iex.nix
|
||||
./cargo.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
_thisFlake:
|
||||
with builtins;
|
||||
listToAttrs (map (name: {
|
||||
name = name;
|
||||
|
|
|
@ -1,10 +1,4 @@
|
|||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
outputs,
|
||||
system,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./sway.nix
|
||||
# ./hyprland.nix
|
||||
|
@ -15,8 +9,6 @@
|
|||
./kde-connect.nix
|
||||
];
|
||||
|
||||
nixpkgs.overlays = [outputs.overlays.modifications];
|
||||
|
||||
hardware = {
|
||||
opengl = {
|
||||
enable = true;
|
||||
|
|
|
@ -1,14 +1,10 @@
|
|||
{
|
||||
outputs,
|
||||
flake,
|
||||
...
|
||||
}: {
|
||||
{outputs, ...}: {
|
||||
# a minimal, familiar setup that I can bootstrap atop
|
||||
imports = with outputs.nixosModules; [
|
||||
# may need to be tweaked based on the machine's paritioning scheme
|
||||
flake.diskoConfigurations.standard
|
||||
desktop-usage
|
||||
wifi
|
||||
# outputs.diskoConfigurations.standard
|
||||
# desktop-usage
|
||||
# wifi
|
||||
];
|
||||
|
||||
# TODO: may not work for non-UEFI?
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
thisFlake:
|
||||
with builtins; (listToAttrs (map (name: {
|
||||
name = name;
|
||||
value = {
|
||||
system = "x86_64-linux";
|
||||
# specialArgs = thisFlake;
|
||||
modules = [./${name}.nix];
|
||||
};
|
||||
}) [
|
||||
|
|
|
@ -17,14 +17,14 @@
|
|||
inputs.hardware.nixosModules.common-pc-ssd
|
||||
outputs.nixosModules.pipewire-low-latency
|
||||
|
||||
desktop-usage
|
||||
podman
|
||||
postgres
|
||||
wifi
|
||||
hyprland
|
||||
printing
|
||||
ewwbar
|
||||
melee
|
||||
# desktop-usage
|
||||
# podman
|
||||
# postgres
|
||||
# wifi
|
||||
# hyprland
|
||||
# printing
|
||||
# ewwbar
|
||||
# melee
|
||||
];
|
||||
|
||||
programs.steam.enable = true;
|
||||
|
@ -32,12 +32,12 @@
|
|||
|
||||
home-manager.users.daniel = {
|
||||
imports = with outputs.homeManagerModules; [
|
||||
sway
|
||||
pass
|
||||
firefox-no-tabs
|
||||
melee
|
||||
# sway-laptop
|
||||
hyprland
|
||||
# sway
|
||||
# pass
|
||||
# firefox-no-tabs
|
||||
# melee
|
||||
# # sway-laptop
|
||||
# hyprland
|
||||
];
|
||||
|
||||
ssbm = {
|
||||
|
|
|
@ -85,7 +85,7 @@
|
|||
|
||||
powerManagement.enable = false;
|
||||
|
||||
boot.loader.grub.enable = true;
|
||||
# boot.loader.grub.enable = true;
|
||||
boot.loader.grub.device = "/dev/sda";
|
||||
|
||||
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci"];
|
||||
|
|
Loading…
Reference in a new issue