first phase of flake conversion
This commit is contained in:
parent
1b47e24cb0
commit
2ea78bdd47
53 changed files with 491 additions and 50 deletions
2
flake-todo
Normal file
2
flake-todo
Normal file
|
@ -0,0 +1,2 @@
|
|||
all systems flakes
|
||||
do overlays properly for syspkgs/homepkgs
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
description = "master home systems config";
|
||||
description = "nixos config";
|
||||
|
||||
inputs = {
|
||||
|
||||
|
@ -10,11 +10,17 @@
|
|||
inputs.nixpkgs-lib.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
eww = {
|
||||
url = "github:elkowar/eww";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.rust-overlay.follows = "rust-overlay";
|
||||
};
|
||||
# eww = {
|
||||
# url = "github:elkowar/eww";
|
||||
# inputs.nixpkgs.follows = "nixpkgs";
|
||||
# inputs.rust-overlay.follows = "rust-overlay";
|
||||
# };
|
||||
|
||||
# rust-overlay = {
|
||||
# url = "github:oxalica/rust-overlay";
|
||||
# inputs.nixpkgs.follows = "nixpkgs";
|
||||
# inputs.flake-utils.follows = "flake-utils";
|
||||
# };
|
||||
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
|
||||
|
@ -31,27 +37,77 @@
|
|||
|
||||
hyprland.url = "github:hyprwm/Hyprland";
|
||||
|
||||
rust-overlay = {
|
||||
url = "github:oxalica/rust-overlay";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.flake-utils.follows = "flake-utils";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
outputs = inputs@{ flake-parts, ... }:
|
||||
inputs.flake-parts.lib.mkFlake {inherit inputs;} {
|
||||
outputs = { self, nixpkgs, home-manager, eww, helix, hyprland, ... }@inputs:
|
||||
let
|
||||
|
||||
systems = ["x86_64-linux"];
|
||||
|
||||
imports = [
|
||||
|
||||
inherit (self) outputs:
|
||||
forAllSystems = nixpkgs.lib.genAttrs [
|
||||
"x86_64-linux"
|
||||
];
|
||||
|
||||
perSystem = {config, self', inputs', pkgs, system, ...}: {
|
||||
|
||||
in
|
||||
rec {
|
||||
|
||||
# custom packages
|
||||
syspkgs = forAllSystems (system:
|
||||
let pkgs = nixpkgs.legacyPackages.${system};
|
||||
in import ./syspkgs { inherit pkgs; }
|
||||
);
|
||||
|
||||
homepkgs = forAllSystems (system:
|
||||
let pkgs = nixpkgs.legacyPackages.${system};
|
||||
in import ./homepkgs { inherit pkgs; }
|
||||
);
|
||||
|
||||
# any overlays or modules we use
|
||||
# overlays = import ./overlays { inherit inputs; };
|
||||
# nixosModules = import ./modules/nixos;
|
||||
# homeModules = import ./modules/home;
|
||||
|
||||
nixosConfigurations = {
|
||||
|
||||
"quiver" = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = { inherit inputs outputs; };
|
||||
modules = [
|
||||
./system/configuration.nix
|
||||
./system/quiver.nix
|
||||
];
|
||||
};
|
||||
|
||||
"adrift" = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = { inherit inputs outputs; };
|
||||
modules = [
|
||||
./system/configuration.nix
|
||||
./system/adrift.nix
|
||||
]
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
homeConfigurations = {
|
||||
|
||||
"bolt@quiver" = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||
extraSpecialArgs = { inherit inputs outputs; };
|
||||
modules = [
|
||||
./home/home.nix
|
||||
./home/bolt.nix
|
||||
];
|
||||
};
|
||||
|
||||
"plank@adrift" = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||
extraSpecialArgs = { inherit inputs outputs; };
|
||||
modules = [
|
||||
./home/home.nix
|
||||
./home/plank.nix
|
||||
];
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
|
6
flake/home/bolt.nix
Normal file
6
flake/home/bolt.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{ inputs, outputs, lib, config, pkgs, ... }: {
|
||||
home = {
|
||||
username = "bolt";
|
||||
homeDirectory = "/home/bolt";
|
||||
};
|
||||
}
|
37
flake/home/dots/Xresources
Normal file
37
flake/home/dots/Xresources
Normal file
|
@ -0,0 +1,37 @@
|
|||
|
||||
! special
|
||||
*.foreground: #d3dae3
|
||||
*.background: #181b28
|
||||
*.cursorColor: #d3dae3
|
||||
|
||||
! black
|
||||
*.color0: #2f343f
|
||||
*.color8: #1e2233
|
||||
|
||||
! red
|
||||
*.color1: #ed244e
|
||||
*.color9: #da4453
|
||||
|
||||
! green
|
||||
*.color2: #27ae60
|
||||
*.color10: #71f79f
|
||||
|
||||
! yellow
|
||||
*.color3: #f67400
|
||||
*.color11: #fdbc4b
|
||||
|
||||
! blue
|
||||
*.color4: #2980b9
|
||||
*.color12: #1d99f3
|
||||
|
||||
! magenta
|
||||
*.color5: #c50ed2
|
||||
*.color13: #9b59b6
|
||||
|
||||
! cyan
|
||||
*.color6: #3daee9
|
||||
*.color14: #5294e2
|
||||
|
||||
! white
|
||||
*.color7: #a1a9b1
|
||||
*.color15: #656a73
|
|
@ -21,8 +21,8 @@ input {
|
|||
general {
|
||||
layout=dwindle
|
||||
border_size=3
|
||||
gaps_in=10
|
||||
gaps_out=20
|
||||
gaps_in=15
|
||||
gaps_out=25
|
||||
resize_on_border=true
|
||||
hover_icon_on_border=true
|
||||
col.active_border=0xffa1a9b1
|
42
flake/home/dots/zsh
Normal file
42
flake/home/dots/zsh
Normal file
|
@ -0,0 +1,42 @@
|
|||
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
||||
|
||||
la_culr()
|
||||
{
|
||||
ls -lha --group-directories-first --color $@ | culr
|
||||
}
|
||||
|
||||
ls_culr()
|
||||
{
|
||||
ls -lh --group-directories-first --color $@ | culr
|
||||
}
|
||||
|
||||
ps_culr()
|
||||
{
|
||||
ps ww$@ | culr
|
||||
}
|
||||
|
||||
alias ...=\"cd ../..\"
|
||||
alias ....=\"cd ../../..\"
|
||||
alias .....=\"cd ../../../..\"
|
||||
|
||||
alias fresh=\"clear; echo; ~/.nix/header.sh\"
|
||||
alias icat=\"kitty +kitten icat\"
|
||||
alias chmox=\"chmod +x\"
|
||||
alias gs=\"git status\"
|
||||
alias gcl=\"git clone\"
|
||||
alias ga=\"git add\"
|
||||
alias gcb=\"git checkout -b\"
|
||||
alias gco=\"git checkout\"
|
||||
alias gl=\"git pull\"
|
||||
alias gp=\"git push\"
|
||||
alias gd=\"git diff\"
|
||||
alias gcam=\"git commit -am\"
|
||||
alias gcm=\"git commit -m\"
|
||||
alias gr=\"git restore\"
|
||||
alias gm=\"git merge\"
|
||||
alias l=\"ls_culr\"
|
||||
alias la=\"la_culr\"
|
||||
alias p=\"ps_culr\"
|
||||
alias mnt=\"mount | column -t | culr\"
|
||||
alias kaboom=\"printf 'type any input if you wish to update\n\npress enter to continue\n'; read upgrade; if [ -n \\\"\\\$upgrade\\\" ]; then echo upgrading..; sudo nix-channel --update; else echo no upgrade!; fi; sudo nixos-rebuild switch -j9 && rm ~/.gtkrc-2.0; home-manager switch && sudo nix-collect-garbage && nix-store --optimise\"
|
||||
fresh
|
284
flake/home/home.nix
Normal file
284
flake/home/home.nix
Normal file
|
@ -0,0 +1,284 @@
|
|||
{ inputs, outputs, lib, config, pkgs, ... }:
|
||||
|
||||
let
|
||||
wlogout_style_base = dots/wlogout/style.css;
|
||||
wlogout_style = pkgs.runCommandLocal "wlogout_style_base" {wlogpath = lib.strings.escape ["/"] "${pkgs.wlogout}";} ''
|
||||
cp ${wlogout_style_base} $out
|
||||
sed -i "s/\/usr\/share\/wlogout/$wlogpath\/share\/wlogout/g" $out
|
||||
sed -i "s/\/etc\/wlogout/$wlogpath\/etc\/wlogout/g" $out
|
||||
'';
|
||||
in
|
||||
{
|
||||
|
||||
imports = [
|
||||
inputs.hyprland.homeManagerModules.default
|
||||
./programs/eww/default.nix
|
||||
];
|
||||
|
||||
nixpkgs = {
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
allowUnfreePredicate = (_: true);
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
home.stateVersion = "22.11";
|
||||
|
||||
home.packages = with pkgs; [
|
||||
thunderbird
|
||||
clementine
|
||||
inkscape
|
||||
|
||||
btop
|
||||
bat
|
||||
joshuto
|
||||
ripgrep
|
||||
fd
|
||||
lazygit
|
||||
fzf
|
||||
zoxide
|
||||
zellij
|
||||
glib # for gsettings
|
||||
fuzzel
|
||||
grim
|
||||
slurp
|
||||
swaybg
|
||||
wlogout
|
||||
wf-recorder
|
||||
libnotify
|
||||
xorg.xrdb
|
||||
swayidle
|
||||
swaynotificationcenter
|
||||
# swayosd
|
||||
waylock
|
||||
playerctl
|
||||
|
||||
kdeconnect
|
||||
syncthing
|
||||
keepassxc
|
||||
|
||||
direnv
|
||||
|
||||
mpv
|
||||
|
||||
meslo-lgs-nf
|
||||
|
||||
libsForQt5.qtstyleplugin-kvantum
|
||||
|
||||
gtk-engine-murrine
|
||||
];
|
||||
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
systemdIntegration = true;
|
||||
nvidiaPatches = true;
|
||||
xwayland = {
|
||||
enable = true;
|
||||
hidpi = false;
|
||||
};
|
||||
recommendedEnvironment = true;
|
||||
extraConfig = builtins.readFile dots/hyprland/hyprland.conf;
|
||||
};
|
||||
|
||||
programs.eww-hyprland = {
|
||||
enable = true;
|
||||
colors = builtins.readFile dots/eww/colors.scss;
|
||||
};
|
||||
|
||||
systemd.user.startServices = "sd-switch";
|
||||
systemd.user.services."hyprland-system76" = {
|
||||
Unit = {
|
||||
Description = "the hyprland process scheduler hook";
|
||||
Requires = [ "dbus.service" ];
|
||||
};
|
||||
Install = {
|
||||
WantedBy = [ "graphical-session.target" "default.target" ];
|
||||
};
|
||||
Service = {
|
||||
ExecStart = ''${pkgs.hyprland-s76}/bin/hyprland-system76-scheduler-hook.sh'';
|
||||
};
|
||||
};
|
||||
|
||||
xresources.extraConfig = builtins.readFile ./dots/Xresources;
|
||||
|
||||
xdg.enable = true;
|
||||
xdg.configFile = builtins.mapAttrs (name: value: { enable=true; text=builtins.readFile value; })
|
||||
{
|
||||
"wlogout/layout" = dots/wlogout/layout;
|
||||
"wlogout/style.css" = wlogout_style;
|
||||
"swaync/config.json" = dots/swaync/config.json;
|
||||
"swaync/configSchema.json" = dots/swaync/configSchema.json;
|
||||
"swaync/style.css" = dots/swaync/style.css;
|
||||
"fuzzel/fuzzel.ini" = dots/fuzzel/fuzzel.ini;
|
||||
};
|
||||
|
||||
xdg.systemDirs.data = [
|
||||
"${pkgs.gtk3}/share/gsettings-schemas/${pkgs.gtk3.name}"
|
||||
"${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}"
|
||||
];
|
||||
|
||||
home.sessionVariables = {
|
||||
GTK_THEME = "Sweet-Dark";
|
||||
};
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
theme = {
|
||||
package = pkgs.sweet;
|
||||
name = "Sweet-Dark";
|
||||
};
|
||||
iconTheme = {
|
||||
package = pkgs.papirus-icon-theme;
|
||||
name = "Papirus-Dark";
|
||||
};
|
||||
};
|
||||
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
nix-direnv = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
programs.firefox =
|
||||
{
|
||||
enable = true;
|
||||
profiles.default = {
|
||||
id = 0;
|
||||
name = "Default";
|
||||
settings = {
|
||||
"browser.startup.homepage" = "about:blank";
|
||||
};
|
||||
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
|
||||
vimium-c
|
||||
darkreader
|
||||
localcdn
|
||||
ublock-origin
|
||||
plasma-integration
|
||||
keepassxc-browser
|
||||
user-agent-string-switcher
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
programs.helix.enable = true;
|
||||
programs.helix.settings = {
|
||||
theme = "gruvbox_dark_hard";
|
||||
editor.lsp.display-messages = true;
|
||||
};
|
||||
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
font = {
|
||||
name = "Ellograph CF";
|
||||
size = 10;
|
||||
};
|
||||
settings = {
|
||||
foreground = "#d3dae3";
|
||||
background = "#060604";
|
||||
cursor = "#d3dae3";
|
||||
selection_foreground = "#fdbc4b";
|
||||
selection_background = "#1e2233";
|
||||
color0 = "#2f343f";
|
||||
color1 = "#ed244e";
|
||||
color2 = "#27ae60";
|
||||
color3 = "#f67400";
|
||||
color4 = "#2980b9";
|
||||
color5 = "#c50ed2";
|
||||
color6 = "#3daee9";
|
||||
color7 = "#a1a9b1";
|
||||
color8 = "#1e2233";
|
||||
color9 = "#da4453";
|
||||
color10 = "#71f79f";
|
||||
color11 = "#fdbc4b";
|
||||
color12 = "#1d99f3";
|
||||
color13 = "#9b59b6";
|
||||
color14 = "#5294e2";
|
||||
color15 = "#656a73";
|
||||
};
|
||||
};
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "atagen";
|
||||
userEmail = "atagen@boss.co";
|
||||
extraConfig = {
|
||||
credential.helper = "keepassxc";
|
||||
};
|
||||
};
|
||||
|
||||
programs.fzf = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableAutosuggestions = true;
|
||||
enableCompletion = true;
|
||||
enableSyntaxHighlighting = true;
|
||||
enableVteIntegration = true;
|
||||
autocd = true;
|
||||
defaultKeymap = "viins";
|
||||
initExtra = builtins.readFile ./dots/zsh;
|
||||
plugins = [
|
||||
{
|
||||
name = "powerlevel10k";
|
||||
src = pkgs.zsh-powerlevel10k;
|
||||
file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme";
|
||||
}
|
||||
{
|
||||
name = "zsh-vi-mode";
|
||||
src = pkgs.zsh-vi-mode;
|
||||
file = "share/zsh-vi-mode/zsh-vi-mode.zsh";
|
||||
}
|
||||
{
|
||||
name = "zsh-autopair";
|
||||
src = pkgs.zsh-autopair;
|
||||
file = "share/zsh-autopair/zsh-autopair.zsh";
|
||||
}
|
||||
{
|
||||
name = "zsh-completions";
|
||||
src = pkgs.zsh-completions;
|
||||
file = "share/zsh-completions/zsh-completions.zsh";
|
||||
}
|
||||
{
|
||||
name = "zsh-command-time";
|
||||
src = pkgs.zsh-command-time;
|
||||
file = "share/zsh-completions/zsh-command-time.zsh";
|
||||
}
|
||||
{
|
||||
name = "zsh-autocomplete";
|
||||
src = pkgs.zsh-autocomplete;
|
||||
file = "share/zsh-autocomplete/zsh-autocomplete.zsh";
|
||||
}
|
||||
{
|
||||
name = "zsh-fast-syntax-highlighting";
|
||||
src = pkgs.zsh-fast-syntax-highlighting;
|
||||
file = "share/zsh-fast-syntax-highlighting/zsh-fast-syntax-highlighting.zsh";
|
||||
}
|
||||
{
|
||||
name = "zsh-nix-shell";
|
||||
src = pkgs.zsh-nix-shell;
|
||||
file = "share/zsh-nix-shell/zsh-nix-shell.zsh";
|
||||
}
|
||||
{
|
||||
name = "any-nix-shell";
|
||||
src = pkgs.any-nix-shell;
|
||||
file = "share/any-nix-shell/any-nix-shell.zsh";
|
||||
}
|
||||
{
|
||||
name = "nix-zsh-completions";
|
||||
src = pkgs.nix-zsh-completions;
|
||||
file = "share/nix-zsh-completions/nix-zsh-completions.zsh";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
}
|
|
@ -35,7 +35,6 @@
|
|||
wget
|
||||
wireplumber
|
||||
wlogout
|
||||
socat
|
||||
fuzzel
|
||||
swaynotificationcenter
|
||||
];
|
|
@ -43,9 +43,7 @@ in {
|
|||
zellij
|
||||
xonotic
|
||||
nicotine-plus
|
||||
|
||||
glib # for gsettings
|
||||
|
||||
fuzzel
|
||||
grim
|
||||
slurp
|
||||
|
@ -58,7 +56,6 @@ in {
|
|||
swaynotificationcenter
|
||||
swayosd
|
||||
waylock
|
||||
|
||||
playerctl
|
||||
];
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ in
|
|||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
|
||||
|
||||
thunderbird
|
||||
|
||||
clementine
|
||||
|
@ -41,6 +41,21 @@ in
|
|||
fd
|
||||
lazygit
|
||||
fzf
|
||||
zellij
|
||||
glib # for gsettings
|
||||
fuzzel
|
||||
grim
|
||||
slurp
|
||||
swaybg
|
||||
wlogout
|
||||
wf-recorder
|
||||
libnotify
|
||||
xorg.xrdb
|
||||
swayidle
|
||||
swaynotificationcenter
|
||||
swayosd
|
||||
waylock
|
||||
playerctl
|
||||
|
||||
kdeconnect
|
||||
keepassxc
|
||||
|
@ -165,7 +180,6 @@ in
|
|||
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
# package = kitty_notest;
|
||||
font = {
|
||||
name = "Ellograph CF";
|
||||
size = 10;
|
||||
|
|
|
@ -33,16 +33,8 @@
|
|||
keep-derivations = true
|
||||
'';
|
||||
|
||||
environment.sessionVariables = rec {
|
||||
WLR_NO_HARDWARE_CURSORS = "1";
|
||||
GBM_BACKEND = "nvidia-drm";
|
||||
NVD_BACKEND = "direct";
|
||||
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
|
||||
LIBVA_DRIVER_NAME = "nvidia";
|
||||
__GL_GSYNC_ALLOWED = "1";
|
||||
__GL_VRR_ALLOWED = "1";
|
||||
EDITOR = "hx";
|
||||
};
|
||||
|
||||
systemd.services.NetworkManager-wait-online.enable = false;
|
||||
|
||||
environment.pathsToLink = [ "/share/zsh" ];
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
|
@ -112,8 +104,8 @@
|
|||
};
|
||||
|
||||
qt.enable = true;
|
||||
qt.style = "kvantum";
|
||||
qt.platformTheme = "qt5ct";
|
||||
qt.style = "kvantum";
|
||||
|
||||
programs.zsh.enable = true;
|
||||
users.defaultUserShell = pkgs.zsh;
|
||||
|
|
|
@ -40,6 +40,17 @@ in {
|
|||
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
|
||||
environment.sessionVariables = rec {
|
||||
WLR_NO_HARDWARE_CURSORS = "1";
|
||||
GBM_BACKEND = "nvidia-drm";
|
||||
NVD_BACKEND = "direct";
|
||||
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
|
||||
LIBVA_DRIVER_NAME = "nvidia";
|
||||
__GL_GSYNC_ALLOWED = "1";
|
||||
__GL_VRR_ALLOWED = "1";
|
||||
EDITOR = "hx";
|
||||
};
|
||||
|
||||
virtualisation = {
|
||||
podman = {
|
||||
enable = true;
|
||||
|
@ -57,16 +68,17 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
xwayland = {
|
||||
enable = true;
|
||||
hidpi = false;
|
||||
};
|
||||
nvidiaPatches = true;
|
||||
};
|
||||
# programs.hyprland = {
|
||||
# enable = true;
|
||||
# xwayland = {
|
||||
# enable = true;
|
||||
# hidpi = false;
|
||||
# };
|
||||
# nvidiaPatches = true;
|
||||
# };
|
||||
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
hardware.nvidia.modesetting.enable = true;
|
||||
hardware.nvidia.powerManagement.enable = true;
|
||||
programs.xwayland.enable = true;
|
||||
|
@ -160,7 +172,7 @@ in {
|
|||
fileSystems."/data" = {
|
||||
device = "/dev/disk/by-uuid/39D4F78C658E8B56";
|
||||
fsType = "ntfs";
|
||||
options = [ "rw" "uid=1001" "gid=100" ];
|
||||
options = [ "rw" "uid=1000" "gid=100" ];
|
||||
};
|
||||
|
||||
# swapDevices = [ {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue