mirror of
https://github.com/nmasur/dotfiles
synced 2025-02-21 19:12:02 +00:00
more moving around
This commit is contained in:
parent
dc6b6f8328
commit
1062369a78
17
flake.lock
generated
17
flake.lock
generated
@ -557,7 +557,6 @@
|
|||||||
"tree-sitter-python": "tree-sitter-python",
|
"tree-sitter-python": "tree-sitter-python",
|
||||||
"tree-sitter-rasi": "tree-sitter-rasi",
|
"tree-sitter-rasi": "tree-sitter-rasi",
|
||||||
"tree-sitter-vimdoc": "tree-sitter-vimdoc",
|
"tree-sitter-vimdoc": "tree-sitter-vimdoc",
|
||||||
"wallpapers": "wallpapers",
|
|
||||||
"wsl": "wsl",
|
"wsl": "wsl",
|
||||||
"zenyd-mpv-scripts": "zenyd-mpv-scripts"
|
"zenyd-mpv-scripts": "zenyd-mpv-scripts"
|
||||||
}
|
}
|
||||||
@ -810,22 +809,6 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"wallpapers": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1657544922,
|
|
||||||
"narHash": "sha256-1c1uDz37MhksWC75myv6jao5q2mIzD8X8I+TykXXmWg=",
|
|
||||||
"owner": "exorcist365",
|
|
||||||
"repo": "wallpapers",
|
|
||||||
"rev": "8d2860ac6c05cec0f78d5c9d07510f4ff5da90dc",
|
|
||||||
"type": "gitlab"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "exorcist365",
|
|
||||||
"repo": "wallpapers",
|
|
||||||
"type": "gitlab"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"wsl": {
|
"wsl": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat_2",
|
"flake-compat": "flake-compat_2",
|
||||||
|
52
flake.nix
52
flake.nix
@ -52,11 +52,11 @@
|
|||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Wallpapers
|
# # Wallpapers
|
||||||
wallpapers = {
|
# wallpapers = {
|
||||||
url = "gitlab:exorcist365/wallpapers";
|
# url = "gitlab:exorcist365/wallpapers";
|
||||||
flake = false;
|
# flake = false;
|
||||||
};
|
# };
|
||||||
|
|
||||||
# Used to generate NixOS images for other platforms
|
# Used to generate NixOS images for other platforms
|
||||||
nixos-generators = {
|
nixos-generators = {
|
||||||
@ -295,9 +295,9 @@
|
|||||||
inputs.wsl.nixosModules.wsl
|
inputs.wsl.nixosModules.wsl
|
||||||
./platforms/nixos
|
./platforms/nixos
|
||||||
];
|
];
|
||||||
specialArgs = {
|
# specialArgs = {
|
||||||
wallpapers = inputs.wallpapers;
|
# wallpapers = inputs.wallpapers;
|
||||||
};
|
# };
|
||||||
};
|
};
|
||||||
|
|
||||||
buildDarwin =
|
buildDarwin =
|
||||||
@ -320,7 +320,8 @@
|
|||||||
# Create nixosConfigurations using the different pkgs for each system
|
# Create nixosConfigurations using the different pkgs for each system
|
||||||
# What to do with home config?
|
# What to do with home config?
|
||||||
|
|
||||||
nixosModules = import ./hosts/x86_64-linux nixpkgs // import ./hosts/aarch64-linux nixpkgs;
|
nixosModules = import ./hosts/nixos nixpkgs;
|
||||||
|
darwinModules = import ./hosts/darwin nixpkgs;
|
||||||
|
|
||||||
# Contains my full system builds, including home-manager
|
# Contains my full system builds, including home-manager
|
||||||
# nixos-rebuild switch --flake .#tempest
|
# nixos-rebuild switch --flake .#tempest
|
||||||
@ -350,24 +351,27 @@
|
|||||||
|
|
||||||
# Contains my full Mac system builds, including home-manager
|
# Contains my full Mac system builds, including home-manager
|
||||||
# darwin-rebuild switch --flake .#lookingglass
|
# darwin-rebuild switch --flake .#lookingglass
|
||||||
darwinConfigurations = builtins.mapAttrs buildDarwin {
|
darwinConfigurations = builtins.mapAttrs (
|
||||||
pkgs = pkgsBySystem.aarch64-darwin;
|
name: module:
|
||||||
modules = import ./hosts/darwin;
|
buildDarwin {
|
||||||
};
|
pkgs = pkgsBySystem.aarch64-darwin;
|
||||||
|
modules = [ module ];
|
||||||
|
}
|
||||||
|
) darwinModules;
|
||||||
|
# darwinConfigurations = builtins.mapAttrs buildDarwin {
|
||||||
|
# pkgs = pkgsBySystem.aarch64-darwin;
|
||||||
|
# modules = import ./hosts/darwin;
|
||||||
|
# };
|
||||||
|
|
||||||
# For quickly applying home-manager settings with:
|
# For quickly applying home-manager settings with:
|
||||||
# home-manager switch --flake .#tempest
|
# home-manager switch --flake .#tempest
|
||||||
homeConfigurations = rec {
|
homeConfigurations = builtins.mapAttrs (
|
||||||
default = personal;
|
name: module:
|
||||||
work = buildHome {
|
buildHome {
|
||||||
pkgs = pkgsBySystem.aarch64-darwin;
|
pkgs = pkgsBySystem.x86_64-linux;
|
||||||
modules = { };
|
module = [ module ];
|
||||||
};
|
}
|
||||||
personal = buildHome {
|
) nixosModules;
|
||||||
};
|
|
||||||
tempest = nixosConfigurations.tempest.config.home-manager.users.${globals.user}.home;
|
|
||||||
lookingglass = darwinConfigurations.lookingglass.config.home-manager.users."Noah.Masur".home;
|
|
||||||
};
|
|
||||||
|
|
||||||
# Disk formatting, only used once
|
# Disk formatting, only used once
|
||||||
diskoConfigurations = {
|
diskoConfigurations = {
|
||||||
|
16
hosts/darwin/default.nix
Normal file
16
hosts/darwin/default.nix
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
# Return a list of all nix-darwin hosts
|
||||||
|
|
||||||
|
{ lib, ... }:
|
||||||
|
|
||||||
|
lib.pipe (lib.filesystem.listFilesRecursive ./.) [
|
||||||
|
# Get only files ending in default.nix
|
||||||
|
(builtins.filter (name: lib.hasSuffix "default.nix" name))
|
||||||
|
# Import each host function
|
||||||
|
map
|
||||||
|
(file: {
|
||||||
|
name = builtins.baseNameOf (builtins.dirOf file);
|
||||||
|
value = import file;
|
||||||
|
})
|
||||||
|
# Convert to an attrset of hostname -> host function
|
||||||
|
(builtins.listToAttrs)
|
||||||
|
]
|
@ -1,6 +1,6 @@
|
|||||||
# Return a list of all hosts
|
# Return a list of all hosts
|
||||||
|
|
||||||
{
|
{
|
||||||
darwin-hosts = import ./aarch64-darwin;
|
darwin-hosts = import ./darwin;
|
||||||
linux-hosts = import ./x86_64-linux // import ./aarch64-linux;
|
linux-hosts = import ./nixos;
|
||||||
}
|
}
|
||||||
|
20
hosts/nixos/default.nix
Normal file
20
hosts/nixos/default.nix
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
# Return a list of all NixOS hosts
|
||||||
|
|
||||||
|
{ nixpkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (nixpkgs) lib;
|
||||||
|
in
|
||||||
|
|
||||||
|
lib.pipe (lib.filesystem.listFilesRecursive ./.) [
|
||||||
|
# Get only files ending in default.nix
|
||||||
|
(builtins.filter (name: lib.hasSuffix "default.nix" name))
|
||||||
|
# Import each host function
|
||||||
|
map
|
||||||
|
(file: {
|
||||||
|
name = builtins.baseNameOf (builtins.dirOf file);
|
||||||
|
value = import file;
|
||||||
|
})
|
||||||
|
# Convert to an attrset of hostname -> host function
|
||||||
|
(builtins.listToAttrs)
|
||||||
|
]
|
@ -1,10 +1,15 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
pkgs.
|
pkgs.stdenv.mkDerivation {
|
||||||
|
pname = "wallpapers";
|
||||||
pkgs.writeShellApplication
|
version = "0.1";
|
||||||
{
|
src = pkgs.fetchFromGitLab {
|
||||||
name = "ocr";
|
owner = "exorcist365";
|
||||||
runtimeInputs = [ pkgs.tesseract ];
|
repo = "wallpapers";
|
||||||
text = builtins.readFile ./ocr.sh;
|
rev = "8d2860ac6c05cec0f78d5c9d07510f4ff5da90dc";
|
||||||
}
|
sha256 = "155lb7w563dk9kdn4752hl0zjhgnq3j4cvs9z98nb25k1xpmpki7";
|
||||||
|
};
|
||||||
|
installPhase = ''
|
||||||
|
cp -r $src/ $out/
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
@ -20,6 +20,7 @@ in
|
|||||||
wallpaper = {
|
wallpaper = {
|
||||||
type = lib.types.path;
|
type = lib.types.path;
|
||||||
description = "Wallpaper background image file";
|
description = "Wallpaper background image file";
|
||||||
|
default = "${pkgs.wallpapers}/gruvbox/road.jpg";
|
||||||
};
|
};
|
||||||
commands = {
|
commands = {
|
||||||
launcher = lib.mkOption {
|
launcher = lib.mkOption {
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
wallpapers ? null,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
@ -17,7 +16,7 @@ in
|
|||||||
wallpaper = {
|
wallpaper = {
|
||||||
type = lib.types.nullOr lib.types.path;
|
type = lib.types.nullOr lib.types.path;
|
||||||
description = "Wallpaper background image file";
|
description = "Wallpaper background image file";
|
||||||
default = "${wallpapers}/gruvbox/road.jpg";
|
default = "${pkgs.wallpapers}/gruvbox/road.jpg";
|
||||||
};
|
};
|
||||||
gtk.theme = {
|
gtk.theme = {
|
||||||
name = lib.mkOption {
|
name = lib.mkOption {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user