ref: merged nixos and macOS configuration

This commit is contained in:
Léana 江 2023-12-30 20:45:31 +01:00 committed by Léana 江
parent 76632a9d1c
commit fcba199e19
21 changed files with 35 additions and 12 deletions

View file

@ -54,7 +54,7 @@
pkgs = pkgsS s;
};
withSystem = (device: system: hostname:
nixosWithSystem = (device: system:
let
args = {
pkgs = pkgsS system;
@ -62,7 +62,8 @@
wired = wiredS system;
agenix = agenixS system;
nur = nurS system;
inherit system hostname;
hostname = device;
inherit system;
};
in (nixpkgs.lib.nixosSystem {
specialArgs = args;
@ -75,16 +76,36 @@
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.leana = import ./home;
users.leana = import (./home/leana + "@${device}");
extraSpecialArgs = args;
};
}
];
}));
homeManagerWithSystem = (device: system:
let
pkgs = pkgsS system;
unstable = unstableS system;
in home-manager.lib.homeManagerConfiguration {
pkgs = pkgs;
extraSpecialArgs = {
system = system;
inherit unstable;
};
modules = [ (./home/leana + "@${device}") ];
});
in {
nixosConfigurations = {
thinkpad-test = withSystem "thinkpad" "aarch64-linux" "nixie-test";
thinkpad = withSystem "thinkpad" "x86_64-linux" "nixie";
nixie-test = nixosWithSystem "nixie-test" "aarch64-linux";
nixie = nixosWithSystem "nixie" "x86_64-linux";
};
homeConfigurations = {
"macOS" = homeManagerWithSystem "macOS" "aarch64-darwin";
"earth2077.fr" = homeManagerWithSystem "earth2077.fr" "x86_64-linux";
};
};
}

View file

@ -0,0 +1,31 @@
{ pkgs, unstable, ... }: {
programs.home-manager.enable = true;
imports = [ ./dev.nix ];
home = {
username = "leana";
homeDirectory = "/home/leana";
stateVersion = "23.11";
};
home.packages = with pkgs; [
# shell and script dependencies
fish
figlet
gnused
starship
stow
ripgrep
fd
fzf
vivid
# utils
btop
tree
rsync
tldr
];
}

View file

@ -0,0 +1,59 @@
{ pkgs, unstable, ... }: {
home.packages = with pkgs; [
# Editors and utils
tmux
neovim
vim
hyperfine
watchexec
tea
tokei
# Generic LSPs
vscode-langservers-extracted # HTML/CSS/JSON/ESLint
nodePackages.bash-language-server # Bash
marksman # Markdown
nodePackages.pyright # Python
taplo # TOML
texlab # LaTeX
typescript # TypeScript
nodePackages.vim-language-server # Vim Script
typst-lsp # Typst
lua-language-server # Lua
# git
git
git-lfs
bat
delta
gnupg
nil
alejandra
nixfmt
# (python39.withPackages (ps:
# with ps; [
# beautifulsoup4
# requests
#
# # python-lsp-server
# # rope
# # pyflakes
# # mccabe
# # pycodestyle
# # pydocstyle
# # autopep8
# ]))
# jdk17
# rustup
# nodejs_20
# unstable.opam
];
programs.direnv = {
enable = true;
nix-direnv.enable = true;
};
}

View file

@ -0,0 +1,36 @@
{ pkgs, unstable, ... }: {
programs.home-manager.enable = true;
imports = [ ./dev.nix ./fonts.nix ];
home = {
username = "leana";
homeDirectory = "/Users/leana";
stateVersion = "23.11";
};
home.packages = with pkgs; [
# shell and script dependencies
fish
figlet
gnused
starship
stow
ripgrep
fd
fzf
vivid
# utils
btop
tree
rsync
tldr
unstable.typst
# music
cmus
cmusfm
];
}

View file

@ -0,0 +1,59 @@
{ pkgs, unstable, ... }: {
home.packages = with pkgs; [
# Editors and utils
tmux
neovim
vim
hyperfine
watchexec
tea
tokei
# Generic LSPs
vscode-langservers-extracted # HTML/CSS/JSON/ESLint
nodePackages.bash-language-server # Bash
marksman # Markdown
nodePackages.pyright # Python
taplo # TOML
texlab # LaTeX
typescript # TypeScript
nodePackages.vim-language-server # Vim Script
typst-lsp # Typst
lua-language-server # Lua
# git
git
git-lfs
bat
delta
gnupg
nil
alejandra
nixfmt
(python39.withPackages (ps:
with ps; [
beautifulsoup4
requests
python-lsp-server
rope
pyflakes
mccabe
pycodestyle
pydocstyle
autopep8
]))
jdk17
rustup
nodejs_20
unstable.opam
];
programs.direnv = {
enable = true;
nix-direnv.enable = true;
};
}

View file

@ -0,0 +1,8 @@
{ pkgs, wired, ... }: {
home.packages = with pkgs; [
# fonts
(nerdfonts.override { fonts = [ "CascadiaCode" "JetBrainsMono" "Meslo" ]; })
lmodern
cascadia-code
];
}

View file

@ -103,13 +103,15 @@
"Wikipedia (en)".metaData.alias = "@wk";
};
};
settings = { "general.smoothScroll" = true; };
extraConfig = ''
user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", true);
user_pref("full-screen-api.ignore-widgets", true);
user_pref("media.ffmpeg.vaapi.enabled", true);
user_pref("media.rdd-vpx.enabled", true);
'';
extraConfig =
# FIXME: not working?
''
user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", true);
user_pref("full-screen-api.ignore-widgets", true);
user_pref("media.ffmpeg.vaapi.enabled", true);
user_pref("media.rdd-vpx.enabled", true);
user_pref("layout.css.devPixelsPerPx", 1.2);
'';
userChrome = ''
#statuspanel-label {
font-size: 18px !important;