This commit is contained in:
Daniel Flanagan 2023-10-05 01:02:31 -05:00
parent 408ae8df77
commit d702e2cb24
Signed by: lytedev
GPG key ID: 5B2020A0F9921EF4
5 changed files with 2066 additions and 1403 deletions

View file

@ -19,22 +19,6 @@
"url": "ssh://gitea@git.lyte.dev/lytedev/api.lyte.dev.git"
}
},
"base16-schemes": {
"flake": false,
"locked": {
"lastModified": 1689473676,
"narHash": "sha256-L0RhUr9+W5EPWBpLcmkKpUeCEWRs/kLzVMF3Vao2ZU0=",
"owner": "tinted-theming",
"repo": "base16-schemes",
"rev": "d95123ca6377cd849cfdce92c0a24406b0c6a789",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "base16-schemes",
"type": "github"
}
},
"crane": {
"inputs": {
"flake-compat": "flake-compat",
@ -239,25 +223,6 @@
"type": "github"
}
},
"nix-colors": {
"inputs": {
"base16-schemes": "base16-schemes",
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1695388192,
"narHash": "sha256-2jelpE7xK+4M7jZNyWL7QYOYegQLYBDQS5bvdo8XRUQ=",
"owner": "misterio77",
"repo": "nix-colors",
"rev": "37227f274b34a3b51649166deb94ce7fec2c6a4c",
"type": "github"
},
"original": {
"owner": "misterio77",
"repo": "nix-colors",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1690026219,
@ -274,21 +239,6 @@
"type": "github"
}
},
"nixpkgs-lib": {
"locked": {
"lastModified": 1694911725,
"narHash": "sha256-8YqI+YU1DGclEjHsnrrGfqsQg3Wyga1DfTbJrN3Ud0c=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "819180647f428a3826bfc917a54449da1e532ce0",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixpkgs.lib",
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1696039360,
@ -425,7 +375,6 @@
"helix": "helix",
"home-manager": "home-manager",
"hyprland": "hyprland",
"nix-colors": "nix-colors",
"nixpkgs-stable": "nixpkgs-stable",
"nixpkgs-unstable": "nixpkgs-unstable",
"sops-nix": "sops-nix"

126
flake.nix
View file

@ -8,7 +8,6 @@
sops-nix.url = "github:Mic92/sops-nix";
hardware.url = "github:nixos/nixos-hardware";
hyprland.url = "github:hyprwm/Hyprland";
nix-colors.url = "github:misterio77/nix-colors";
api-lyte-dev.url = "git+ssh://gitea@git.lyte.dev/lytedev/api.lyte.dev.git";
@ -25,7 +24,6 @@
nixpkgs-stable,
nixpkgs-unstable,
home-manager,
nix-colors,
...
} @ inputs: let
inherit (self) outputs;
@ -38,8 +36,120 @@
"x86_64-darwin"
];
color-schemes = let
mkColorScheme = scheme @ {
scheme-name,
bg,
bg2,
bg3,
bg4,
bg5,
fg,
fg2,
fg3,
fgdim,
# pink,
purple,
red,
# orange,
yellow,
green,
teal,
blue,
...
}: let
base =
{
# aliases?
text = fg;
primary = blue;
urgent = red;
# blacks
"0" = bg4;
"8" = bg5;
"1" = red;
"9" = red;
"2" = green;
"10" = green;
"3" = yellow;
"11" = yellow;
"4" = blue;
"12" = blue;
"5" = purple;
"13" = purple;
"6" = teal;
"14" = teal;
# whites
"7" = fg2;
"15" = fg3;
}
// scheme;
in
{
withHashPrefix = inputs.nixpkgs-unstable.lib.mapAttrs (_: value: "#${value}") base;
}
// base;
in {
donokai = mkColorScheme {
scheme-name = "donokai";
bg = "111111";
bg2 = "181818";
bg3 = "222222";
bg4 = "292929";
bg5 = "333333";
fg = "f8f8f8";
fg2 = "d8d8d8";
fg3 = "c8c8c8";
fgdim = "666666";
red = "f92672";
green = "a6e22e";
yellow = "f4bf75";
blue = "66d9ef";
purple = "ae81ff";
teal = "a1efe4";
# orange = "fab387";
};
catppuccin-mocha-sapphire = mkColorScheme {
scheme-name = "catppuccin-mocha-sapphire";
bg = "1e1e2e";
bg2 = "181825";
bg3 = "313244";
bg4 = "45475a";
bg5 = "585b70";
fg = "cdd6f4";
fg2 = "bac2de";
fg3 = "a6adc8";
fgdim = "6c7086";
# pink = "f5e0dc";
purple = "cba6f7";
red = "f38ba8";
# orange = "fab387";
# yellow = "f9e2af";
yellow = "fab387";
green = "a6e3a1";
teal = "94e2d5";
blue = "74c7ec";
};
};
colors = color-schemes.catppuccin-mocha-sapphire;
font = {
name = "IosevkaLyteTerm";
size = 12;
};
linuxHomeManagerModules = [./home ./home/linux.nix];
forAllSystems = nixpkgs-stable.lib.genAttrs systems;
in {
# TODO: nix-color integration?
# Your custom packages
# Acessible through 'nix build', 'nix shell', etc
packages = forAllSystems (system: import ./pkgs nixpkgs-stable.legacyPackages.${system});
@ -66,7 +176,7 @@
cb {
system = system;
specialArgs = {
inherit inputs outputs system nix-colors;
inherit inputs outputs system colors font;
flake = self;
};
modules =
@ -76,14 +186,12 @@
]
++ modules
++ [
# all nixos hosts should use our home manager config
# TODO: unify with the module list in outputs.homeConfigurations.daniel
inputs.home-manager.nixosModules.home-manager
{
home-manager = {
extraSpecialArgs = {inherit inputs outputs system nix-colors;};
extraSpecialArgs = {inherit inputs outputs system colors font;};
users.daniel = {
imports = [./home ./home/linux.nix];
imports = linuxHomeManagerModules;
};
};
}
@ -108,11 +216,11 @@
mkHome = system: modules:
home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs-unstable.legacyPackages.${system};
extraSpecialArgs = {inherit inputs outputs system nix-colors;};
extraSpecialArgs = {inherit inputs outputs system colors font;};
modules = modules;
};
in {
"daniel" = mkHome "x86_64-linux" [./home ./home/linux.nix];
"daniel" = mkHome "x86_64-linux" linuxHomeManagerModules;
"daniel.flanagan" = mkHome "aarch64-darwin" [./home];
};

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,32 +1,4 @@
{pkgs, ...}: let
# this is unused because it's referenced by my sway config
dbus-sway-environment = pkgs.writeTextFile {
name = "dbus-sway-environment";
destination = "/bin/dbus-sway-environment";
executable = true;
text = ''
dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway
systemctl --user stop wireplumber xdg-desktop-portal xdg-desktop-portal-wlr
systemctl --user start wireplumber xdg-desktop-portal xdg-desktop-portal-wlr
'';
};
# this is unused because it's referenced by my sway config
configure-gtk = pkgs.writeTextFile {
name = "configure-gtk";
destination = "/bin/configure-gtk";
executable = true;
text = let
schema = pkgs.gsettings-desktop-schemas;
datadir = "${schema}/share/gsettings-schemas/${schema.name}";
in ''
export XDG_DATA_DIRS="${datadir}:$XDG_DATA_DIRS
gnome_schema = org.gnome.desktop.interface
gsettings set $gnome_schema gtk-theme 'Catppuccin-Mocha'
'';
};
in {
{pkgs, ...}: {
imports = [./pipewire.nix];
# services.xserver.libinput.enable = true;