Compare commits

...

10 Commits

Author SHA1 Message Date
d1ca548da0 flake.lock: Update
Flake lock file updates:

• Updated input 'home-manager':
    'github:nix-community/home-manager/0a7ffb28e5df5844d0e8039c9833d7075cdee792' (2024-06-16)
  → 'github:nix-community/home-manager/90ae324e2c56af10f20549ab72014804a3064c7f' (2024-07-11)
• Updated input 'nix-darwin':
    'github:LnL7/nix-darwin/29b3096a6e283d7e6779187244cb2a3942239fdf' (2024-06-17)
  → 'github:LnL7/nix-darwin/5ce8503cf402cf76b203eba4b7e402bea8e44abc' (2024-07-13)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/b60ebf54c15553b393d144357375ea956f89e9a9' (2024-06-16)
  → 'github:NixOS/nixpkgs/feb2849fdeb70028c70d73b848214b00d324a497' (2024-07-09)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/797ce4c1f45a85df6dd3d9abdc53f2691bea9251' (2024-06-16)
  → 'github:Mic92/sops-nix/67035a355b1d52d2d238501f8cc1a18706979760' (2024-07-08)
• Updated input 'sops-nix/nixpkgs':
    'github:NixOS/nixpkgs/3f84a279f1a6290ce154c5531378acc827836fbb' (2024-06-13)
  → 'github:NixOS/nixpkgs/4284c2b73c8bce4b46a6adf23e16d9e2ec8da4bb' (2024-07-05)
• Updated input 'sops-nix/nixpkgs-stable':
    'github:NixOS/nixpkgs/c884223af91820615a6146af1ae1fea25c107005' (2024-06-15)
  → 'github:NixOS/nixpkgs/550ac3e955c30fe96dd8b2223e37e0f5d225c927' (2024-07-06)
2024-07-13 10:58:41 -04:00
8f887e8da9 Flake: Formatting 2024-07-13 10:58:41 -04:00
a2ceaf2e2e Flake: Easier Overlay Spec 2024-07-13 10:58:41 -04:00
7e79913d5e Flake: Unify system config spec 2024-07-13 10:58:41 -04:00
471f2e298e universeair/flake: remove redundant/out of place unfree enable 2024-07-13 10:58:41 -04:00
7000183e98 Flake: Separate modules 2024-07-13 10:58:41 -04:00
bec7b9cc4d universeair: keybind to me-emacs 2024-07-13 10:58:41 -04:00
be0b31c429 nixosConfig: specialArgs = "inputs" -> "{inherit inputs;}" 2024-07-13 10:58:41 -04:00
5fed071e2f Flake: @attrs -> @inputs 2024-07-13 10:58:41 -04:00
7dbd900843 Flake: Reorganize overlays 2024-07-13 10:58:41 -04:00
7 changed files with 90 additions and 76 deletions

38
flake.lock generated
View File

@@ -66,11 +66,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1718526747, "lastModified": 1720734513,
"narHash": "sha256-sKrD/utGvmtQALvuDj4j0CT3AJXP1idOAq2p+27TpeE=", "narHash": "sha256-neWQ8eNtLTd+YMesb7WjKl1SVCbDyCm46LUgP/g/hdo=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "0a7ffb28e5df5844d0e8039c9833d7075cdee792", "rev": "90ae324e2c56af10f20549ab72014804a3064c7f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -108,11 +108,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1718662658, "lastModified": 1720845312,
"narHash": "sha256-AKG7BsqtVWDlefgzyKz7vjaKTLi4+bmTSBhowbQoZtM=", "narHash": "sha256-yPhAsJTpyoIPQZJGC8Fw8W2lAXyhLoTn+HP20bmfkfk=",
"owner": "LnL7", "owner": "LnL7",
"repo": "nix-darwin", "repo": "nix-darwin",
"rev": "29b3096a6e283d7e6779187244cb2a3942239fdf", "rev": "5ce8503cf402cf76b203eba4b7e402bea8e44abc",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -124,11 +124,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1718530797, "lastModified": 1720542800,
"narHash": "sha256-pup6cYwtgvzDpvpSCFh1TEUjw2zkNpk8iolbKnyFmmU=", "narHash": "sha256-ZgnNHuKV6h2+fQ5LuqnUaqZey1Lqqt5dTUAiAnqH0QQ=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "b60ebf54c15553b393d144357375ea956f89e9a9", "rev": "feb2849fdeb70028c70d73b848214b00d324a497",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -156,27 +156,27 @@
}, },
"nixpkgs-stable_2": { "nixpkgs-stable_2": {
"locked": { "locked": {
"lastModified": 1718478900, "lastModified": 1720282526,
"narHash": "sha256-v43N1gZLcGkhg3PdcrKUNIZ1L0FBzB2JqhIYEyKAHEs=", "narHash": "sha256-dudRkHPRivMNOhd04YI+v4sWvn2SnN5ODSPIu5IVbco=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "c884223af91820615a6146af1ae1fea25c107005", "rev": "550ac3e955c30fe96dd8b2223e37e0f5d225c927",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "release-23.11", "ref": "release-24.05",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1718276985, "lastModified": 1720181791,
"narHash": "sha256-u1fA0DYQYdeG+5kDm1bOoGcHtX0rtC7qs2YA2N1X++I=", "narHash": "sha256-i4vJL12/AdyuQuviMMd1Hk2tsGt02hDNhA0Zj1m16N8=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "3f84a279f1a6290ce154c5531378acc827836fbb", "rev": "4284c2b73c8bce4b46a6adf23e16d9e2ec8da4bb",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -201,11 +201,11 @@
"nixpkgs-stable": "nixpkgs-stable_2" "nixpkgs-stable": "nixpkgs-stable_2"
}, },
"locked": { "locked": {
"lastModified": 1718506969, "lastModified": 1720479166,
"narHash": "sha256-Pm9I/BMQHbsucdWf6y9G3xBZh3TMlThGo4KBbeoeczg=", "narHash": "sha256-jqvhLDXzTLTHq9ZviFOpcTmXXmnbLfz7mWhgMNipMN4=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "797ce4c1f45a85df6dd3d9abdc53f2691bea9251", "rev": "67035a355b1d52d2d238501f8cc1a18706979760",
"type": "github" "type": "github"
}, },
"original": { "original": {

111
flake.nix
View File

@@ -10,71 +10,76 @@
home-manager.inputs.nixpkgs.follows = "nixpkgs"; home-manager.inputs.nixpkgs.follows = "nixpkgs";
}; };
outputs = { self, nixpkgs, sops-nix, me-emacs, nix-darwin, home-manager }@attrs: let outputs = { self, nixpkgs, sops-nix, me-emacs, nix-darwin, home-manager }@inputs: let
hydraGitea = import ./overlays/hydra.nix; overlays = import ./overlays/default.nix inputs;
nvidiaContainer = import ./overlays/nvidiacontainer.nix nixpkgs; modules = import ./modules/default.nix inputs;
me-emacs-overlay = me-emacs.overlays.default;
# Configuration for `nixpkgs` overlays' = l: ({ config, pkgs, ... }: {
nixpkgsConfig = { nixpkgs.overlays = l;
config = { allowUnfree = true; }; });
};
pkgs_linux-x86_64 = nixpkgs.legacyPackages."x86-linux"; pkgs_linux-x86_64 = nixpkgs.legacyPackages."x86-linux";
pkgs_linux-aarch64 = nixpkgs.legacyPackages."aarch64-linux"; pkgs_linux-aarch64 = nixpkgs.legacyPackages."aarch64-linux";
sysConfig = config: {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
} // config;
nixosSystem' = config: nixpkgs.lib.nixosSystem (sysConfig ({
} // config));
darwinSystem' = config: nix-darwin.lib.darwinSystem (sysConfig ({
system = "aarch64-darwin";
} // config));
homeConf' = config: home-manager.lib.homeManagerConfiguration config;
in { in {
nixosConfigurations = { nixosConfigurations = {
nixos = nixpkgs.lib.nixosSystem { nixos = nixosSystem' {
system = "x86_64-linux"; modules =[
specialArgs = attrs; ./machines/hippocampus/configuration.nix
modules = (overlays' [
[ overlays.hydra
({ config, pkgs, ... }: { overlays.nvidiaContainer
nixpkgs.overlays = [ hydraGitea nvidiaContainer ]; ])
}) modules.sops
./machines/hippocampus/configuration.nix ];
sops-nix.nixosModules.sops
];
}; };
universedesktop = nixpkgs.lib.nixosSystem { universedesktop = nixosSystem' {
system = "x86_64-linux"; modules = [
specialArgs = attrs; ./machines/universedesktop/configuration.nix
modules = (overlays' [
[ overlays.emacs
({ config, pkgs, ... }: { ])
nixpkgs.overlays = [ me-emacs-overlay ]; modules.sops
}) ];
./machines/universedesktop/configuration.nix
sops-nix.nixosModules.sops
];
}; };
}; };
darwinConfigurations."UniverseAir" = nix-darwin.lib.darwinSystem { darwinConfigurations = {
system = "aarch64-darwin"; UniverseAir = darwinSystem' {
specialArgs = { modules = [
inputs = attrs; ./machines/universeair/configuration.nix
(overlays' [
overlays.emacs
])
modules.home-manager-darwin
];
}; };
modules = [
./machines/universeair/configuration.nix
({ config, pkgs, ... }: {
nixpkgs.overlays = [ me-emacs-overlay ];
})
home-manager.darwinModules.home-manager
{
nixpkgs = nixpkgsConfig;
}
];
}; };
homeConfigurations."universelaptop" = home-manager.lib.homeManagerConfiguration { homeConfigurations = {
pkgs = pkgs_linux-aarch64; universelaptop = homeConf' {
pkgs = pkgs_linux-aarch64;
# Specify your home configuration modules here, for example, extraSpecialArgs = {
# the path to your home.nix. pkgs-x86_64 = pkgs_linux-x86_64;
modules = [ ./machines/asahi/home.nix ]; inputs = inputs;
};
extraSpecialArgs = {
pkgs-x86_64 = pkgs_linux-x86_64; modules = [
inputs = attrs; ./machines/asahi/home.nix
];
}; };
}; };
}; };

View File

@@ -2,7 +2,7 @@
services.skhd = { services.skhd = {
enable = true; enable = true;
skhdConfig = '' skhdConfig = ''
cmd + shift - e : open '${pkgs.mac-emacs}/Applications/Emacs.app' cmd + shift - e : open '${pkgs.me-emacs}/Applications/Emacs.app'
cmd + shift + ctrl - e : kitty -d ~ -1 cmd + shift + ctrl - e : kitty -d ~ -1
''; '';
}; };

View File

@@ -2,9 +2,9 @@
# your system. Help is available in the configuration.nix(5) man page # your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help). # and in the NixOS manual (accessible by running nixos-help).
{ lib, config, pkgs, nixpkgs, ... }: { { lib, config, pkgs, inputs, ... }: {
nix.settings.auto-optimise-store = true; nix.settings.auto-optimise-store = true;
nix.registry.nixpkgs.flake = nixpkgs; nix.registry.nixpkgs.flake = inputs.nixpkgs;
# Allow user-mode qemu for running riscv64 binaries # Allow user-mode qemu for running riscv64 binaries
# boot.binfmt.emulatedSystems = [ "riscv64-linux" ]; # boot.binfmt.emulatedSystems = [ "riscv64-linux" ];

View File

@@ -1,4 +1,4 @@
{ lib, config, pkgs, nixpkgs, ... }: { { lib, config, pkgs, ... }: {
nixpkgs.overlays = [(self: super: rec { nixpkgs.overlays = [(self: super: rec {
# Discord fix # Discord fix
discord = super.discord.override { discord = super.discord.override {

4
modules/default.nix Normal file
View File

@@ -0,0 +1,4 @@
inputs: {
sops = inputs.sops-nix.nixosModules.sops;
home-manager-darwin = inputs.home-manager.darwinModules.home-manager;
}

5
overlays/default.nix Normal file
View File

@@ -0,0 +1,5 @@
inputs: {
hydra = import ./hydra.nix;
nvidiaContainer = import ./nvidiacontainer.nix inputs.nixpkgs;
emacs = inputs.me-emacs.overlays.default;
}