Setup nixnuc, rework home manager files

This commit is contained in:
Gene Liverman 2023-12-16 20:17:41 -05:00 committed by Gene Liverman
parent ce3edc74b5
commit 493ac02c33
18 changed files with 273 additions and 100 deletions

1
.gitignore vendored
View file

@ -5,6 +5,7 @@
/vendor/ /vendor/
.dccache .dccache
*.swp
# Config files that are not suitable to add to version control: # Config files that are not suitable to add to version control:
link/nix/config/.mono/ link/nix/config/.mono/

View file

@ -70,15 +70,14 @@
useGlobalPkgs = true; useGlobalPkgs = true;
useUserPackages = true; useUserPackages = true;
users.${username}.imports = [ users.${username}.imports = [
./modules/home-manager ./modules/home-manager/hosts/${hostname}/${username}.nix
./modules/home-manager/darwin.nix
]; ];
extraSpecialArgs = { inherit genebean-omp-themes; }; extraSpecialArgs = { inherit genebean-omp-themes; };
}; };
} }
./modules/common/darwin/all-hosts.nix ./modules/system/common/all-darwin.nix # system-wide stuff
./modules/hosts/darwin/${hostname} # ip address, host specific stuff ./modules/hosts/darwin/${hostname} # host specific stuff
]; # end modules ]; # end modules
}; # end darwinSystem }; # end darwinSystem
@ -101,15 +100,14 @@
useGlobalPkgs = true; useGlobalPkgs = true;
useUserPackages = true; useUserPackages = true;
users.${username}.imports = [ users.${username}.imports = [
./modules/home-manager ./modules/home-manager/hosts/${hostname}/${username}.nix
./modules/home-manager/nixos.nix
]; ];
extraSpecialArgs = { inherit genebean-omp-themes; }; extraSpecialArgs = { inherit genebean-omp-themes; };
}; };
} }
./modules/common/nixos/all-hosts.nix ./modules/system/common/all-nixos.nix # system-wide stuff
./modules/hosts/nixos/${hostname} # ip address, host specific stuff ./modules/hosts/nixos/${hostname} # host specific stuff
]; ];
}; # end nixosSystem }; # end nixosSystem
@ -119,6 +117,7 @@
}; };
nixosConfigurations = { nixosConfigurations = {
nixnuc = nixosSystem "x86_64-linux" "nixnuc" "gene";
rainbow-planet = nixosSystem "x86_64-linux" "rainbow-planet" "gene"; rainbow-planet = nixosSystem "x86_64-linux" "rainbow-planet" "gene";
}; };
}; };

View file

@ -1,11 +1,9 @@
{ pkgs, genebean-omp-themes, ... }: { { pkgs, genebean-omp-themes, ... }: {
home.stateVersion = "23.11";
home.packages = with pkgs; [ home.packages = with pkgs; [
colordiff colordiff
dogdns dogdns
dos2unix dos2unix
du-dust du-dust
element-desktop
git-filter-repo git-filter-repo
gotop gotop
htop htop
@ -78,12 +76,7 @@
}; };
}; };
}; # end git }; # end git
go = {
enable = true;
goPath = "go";
};
jq.enable = true; jq.enable = true;
k9s.enable = true;
neovim.enable = true; neovim.enable = true;
oh-my-posh = { oh-my-posh = {
enable = true; enable = true;
@ -157,9 +150,6 @@
let g:airline_powerline_fonts = 1 let g:airline_powerline_fonts = 1
''; '';
}; };
vscode = {
enable = true;
};
zsh = { zsh = {
enable = true; enable = true;
enableCompletion = true; enableCompletion = true;
@ -218,7 +208,7 @@
}; # end programs }; # end programs
home.file = { home.file = {
".config/powershell/Microsoft.PowerShell_profile.ps1".source = ./files/Microsoft.PowerShell_profile.ps1; ".config/powershell/Microsoft.PowerShell_profile.ps1".source = ../files/Microsoft.PowerShell_profile.ps1;
".config/powershell/Microsoft.VSCode_profile.ps1".source = ./files/Microsoft.PowerShell_profile.ps1; ".config/powershell/Microsoft.VSCode_profile.ps1".source = ../files/Microsoft.PowerShell_profile.ps1;
}; };
} }

View file

@ -0,0 +1,10 @@
{ pkgs, genebean-omp-themes, ... }: {
home.packages = with pkgs; [
element-desktop
];
programs = {
vscode = {
enable = true;
};
};
}

View file

@ -0,0 +1,12 @@
{ pkgs, ... }: {
programs = {
# Linux-specific aliases
zsh.shellAliases = {
nixup = "sudo nixos-rebuild switch --flake ~/repos/dots";
uwgconnect = "nmcli dev wifi connect SecureWest password";
uwgforget = "nmcli connection delete SecureWest";
ykey = "sudo systemctl restart pcscd && sudo pkill -9 gpg-agent && source ~/.zshrc; ssh-add -L";
};
};
}

View file

@ -1,9 +1,5 @@
# Generated via dconf2nix: https://github.com/gvolpe/dconf2nix { lib, pkgs, ... }: with lib.hm.gvariant; {
{ lib, ... }:
with lib.hm.gvariant;
{
dconf.settings = { dconf.settings = {
"com/gexperts/Tilix/profiles/2b7c4080-0ddd-46c5-8f23-563fd3ba789d" = { "com/gexperts/Tilix/profiles/2b7c4080-0ddd-46c5-8f23-563fd3ba789d" = {
background-color = "#272822"; background-color = "#272822";
@ -21,4 +17,14 @@ with lib.hm.gvariant;
}; };
}; };
}
home.file = {
".config/tilix/schemes/Beanbag-Mathias.json".source = ../../files/tilix/Beanbag-Mathias.json;
".config/tilix/schemes/Catppuccin-Frappe.json".source = (pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "tilix";
rev = "3fd05e03419321f2f2a6aad6da733b28be1765ef";
hash = "sha256-SI7QxQ+WBHzeuXbTye+s8pi4tDVZOV4Aa33mRYO276k=";
} + "/src/Catppuccin-Frappe.json");
};
}

View file

@ -0,0 +1,17 @@
{ pkgs, ... }: {
home.file = {
".config/waybar/config".source = ../../files/waybar/config;
".config/waybar/frappe.css".source = (pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "waybar";
rev = "f74ab1eecf2dcaf22569b396eed53b2b2fbe8aff";
hash = "sha256-WLJMA2X20E5PCPg0ZPtSop0bfmu+pLImP9t8A8V4QK8=";
} + "/themes/frappe.css");
".config/waybar/style.css".source = ../../files/waybar/style.css;
};
programs = {
# Using file in ../../files/waybar/ to configure waybar
waybar.enable = true;
};
}

View file

@ -0,0 +1,46 @@
{ pkgs, ... }: {
home.file = {
".config/xfce4/terminal/accels.scm".source = ../../files/xfce4/terminal/accels.scm;
};
xfconf.settings = {
xfce4-terminal = {
"background-mode" = "TERMINAL_BACKGROUND_TRANSPARENT";
"background-darkness" = "0.90000000000000000";
"color-foreground" = "#e3e3ea";
"color-background" = "#08052b";
"color-cursor" = "#ff7f7f";
"color-cursor-use-default" = false;
"color-palette" = "#000000;#e52222;#a6e32d;#fc951e;#c48dff;#fa2573;#67d9f0;#f2f2f2;#555555;#ff5555;#55ff55;#ffff55;#5555ff;#ff55ff;#55ffff;#ffffff";
"font-name" = "Hack Nerd Font Mono 12";
"misc-always-show-tabs" = false;
"misc-bell" = false;
"misc-bell-urgent" = true;
"misc-borders-default" = true;
"misc-cursor-blinks" = false;
"misc-cursor-shape" = "TERMINAL_CURSOR_SHAPE_BLOCK";
"misc-default-geometry" = "120x24";
"misc-inherit-geometry" = false;
"misc-menubar-default" = true;
"misc-mouse-autohide" = false;
"misc-mouse-wheel-zoom" = true;
"misc-toolbar-default" = false;
"misc-confirm-close" = true;
"misc-cycle-tabs" = true;
"misc-tab-close-buttons" = true;
"misc-tab-close-middle-click" = true;
"misc-tab-position" = "GTK_POS_TOP";
"misc-highlight-urls" = true;
"misc-middle-click-opens-uri" = false;
"misc-copy-on-select" = false;
"misc-show-relaunch-dialog" = true;
"misc-rewrap-on-resize" = true;
"misc-slim-tabs" = true;
"misc-new-tab-adjacent" = false;
"misc-search-dialog-opacity" = "100";
"misc-show-unsafe-paste-dialog" = true;
"scrolling-unlimited" = true;
"title-initial" = "xfce4-terminal";
};
};
}

View file

@ -0,0 +1,17 @@
{ pkgs, genebean-omp-themes, ... }: {
home.stateVersion = "23.11";
imports = [
../../common/all-cli.nix
../../common/all-gui.nix
../../common/all-darwin.nix
];
programs = {
go = {
enable = true;
goPath = "go";
};
k9s.enable = true;
};
}

View file

@ -0,0 +1,8 @@
{ pkgs, genebean-omp-themes, ... }: {
home.stateVersion = "23.11";
imports = [
../../common/all-cli.nix
../../common/all-linux.nix
];
}

View file

@ -1,7 +1,14 @@
{ pkgs, ... }: { { pkgs, genebean-omp-themes, ... }: {
home.stateVersion = "23.11";
imports = [ imports = [
./dconf.nix ../../common/all-cli.nix
../../common/all-gui.nix
../../common/all-linux.nix
../../common/linux-apps/tilix.nix
../../common/linux-apps/waybar.nix
../../common/linux-apps/xfce4-terminal.nix
]; ];
home.file = { home.file = {
".config/hypr/frappe.conf".source = (pkgs.fetchFromGitHub { ".config/hypr/frappe.conf".source = (pkgs.fetchFromGitHub {
owner = "catppuccin"; owner = "catppuccin";
@ -9,34 +16,6 @@
rev = "99a88fd21fac270bd999d4a26cf0f4a4222c58be"; rev = "99a88fd21fac270bd999d4a26cf0f4a4222c58be";
hash = "sha256-07B5QmQmsUKYf38oWU3+2C6KO4JvinuTwmW1Pfk8CT8="; hash = "sha256-07B5QmQmsUKYf38oWU3+2C6KO4JvinuTwmW1Pfk8CT8=";
} + "/themes/frappe.conf"); } + "/themes/frappe.conf");
".config/tilix/schemes/Beanbag-Mathias.json".source = ./files/tilix/Beanbag-Mathias.json;
".config/tilix/schemes/Catppuccin-Frappe.json".source = (pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "tilix";
rev = "3fd05e03419321f2f2a6aad6da733b28be1765ef";
hash = "sha256-SI7QxQ+WBHzeuXbTye+s8pi4tDVZOV4Aa33mRYO276k=";
} + "/src/Catppuccin-Frappe.json");
".config/waybar/config".source = ./files/waybar/config;
".config/waybar/frappe.css".source = (pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "waybar";
rev = "f74ab1eecf2dcaf22569b396eed53b2b2fbe8aff";
hash = "sha256-WLJMA2X20E5PCPg0ZPtSop0bfmu+pLImP9t8A8V4QK8=";
} + "/themes/frappe.css");
".config/waybar/style.css".source = ./files/waybar/style.css;
".config/xfce4/terminal/accels.scm".source = ./files/xfce4/terminal/accels.scm;
};
programs = {
# Linux-specific aliases
zsh.shellAliases = {
nixup = "sudo nixos-rebuild switch --flake ~/repos/dots";
uwgconnect = "nmcli dev wifi connect SecureWest password";
uwgforget = "nmcli connection delete SecureWest";
ykey = "sudo systemctl restart pcscd && sudo pkill -9 gpg-agent && source ~/.zshrc; ssh-add -L";
};
# Using file in ./files/waybar/ to configure waybar
waybar.enable = true;
}; };
services.dunst = { services.dunst = {
@ -65,47 +44,6 @@
}; };
}; };
xfconf.settings = {
xfce4-terminal = {
"background-mode" = "TERMINAL_BACKGROUND_TRANSPARENT";
"background-darkness" = "0.90000000000000000";
"color-foreground" = "#e3e3ea";
"color-background" = "#08052b";
"color-cursor" = "#ff7f7f";
"color-cursor-use-default" = false;
"color-palette" = "#000000;#e52222;#a6e32d;#fc951e;#c48dff;#fa2573;#67d9f0;#f2f2f2;#555555;#ff5555;#55ff55;#ffff55;#5555ff;#ff55ff;#55ffff;#ffffff";
"font-name" = "Hack Nerd Font Mono 12";
"misc-always-show-tabs" = false;
"misc-bell" = false;
"misc-bell-urgent" = true;
"misc-borders-default" = true;
"misc-cursor-blinks" = false;
"misc-cursor-shape" = "TERMINAL_CURSOR_SHAPE_BLOCK";
"misc-default-geometry" = "120x24";
"misc-inherit-geometry" = false;
"misc-menubar-default" = true;
"misc-mouse-autohide" = false;
"misc-mouse-wheel-zoom" = true;
"misc-toolbar-default" = false;
"misc-confirm-close" = true;
"misc-cycle-tabs" = true;
"misc-tab-close-buttons" = true;
"misc-tab-close-middle-click" = true;
"misc-tab-position" = "GTK_POS_TOP";
"misc-highlight-urls" = true;
"misc-middle-click-opens-uri" = false;
"misc-copy-on-select" = false;
"misc-show-relaunch-dialog" = true;
"misc-rewrap-on-resize" = true;
"misc-slim-tabs" = true;
"misc-new-tab-adjacent" = false;
"misc-search-dialog-opacity" = "100";
"misc-show-unsafe-paste-dialog" = true;
"scrolling-unlimited" = true;
"title-initial" = "xfce4-terminal";
};
};
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
enable = true; enable = true;
settings = { settings = {
@ -286,4 +224,3 @@
}; # end settings }; # end settings
}; # end hyprland }; # end hyprland
} }

View file

@ -0,0 +1,88 @@
{ inputs, config, pkgs, username, ... }: {
imports = [
./hardware-configuration.nix
];
system.stateVersion = "23.11";
# Bootloader.
boot.loader = {
efi.canTouchEfiVariables = true;
systemd-boot.enable = true;
};
environment.systemPackages = with pkgs; [
helix
jellyfin
jellyfin-ffmpeg
jellyfin-web
net-snmp
yt-dlp
];
hardware.opengl = {
enable = true;
extraPackages = with pkgs; [
intel-media-driver
vaapiIntel
vaapiVdpau
libvdpau-va-gl
intel-compute-runtime # OpenCL filter support (hardware tonemapping and subtitle burn-in)
];
};
networking = {
# Open ports in the firewall.
firewall.allowedTCPPorts = [ 22 ];
# firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# firewall.enable = false;
networkmanager.enable = true;
};
# Hardware Transcoding for Jellyfin
nixpkgs.overlays = [
(self: super: {
# "vaapiIntel" is in some docs, but that is an alias
# to intel-vaapi-driver as of 2023-05-31
intel-vaapi-driver = super.intel-vaapi-driver.override {
enableHybridCodec = true;
};
})
];
# Enable sound with pipewire.
sound.enable = true;
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
programs.mtr.enable = true;
# List services that you want to enable:
services = {
fwupd.enable = true;
jellyfin = {
enable = true;
openFirewall = true;
};
openssh.enable = true;
};
users.users.${username} = {
isNormalUser = true;
description = "Gene Liverman";
extraGroups = [ "docker" "networkmanager" "wheel" ];
packages = with pkgs; [
docker-compose
];
};
virtualisation.docker.enable = true;
}

View file

@ -0,0 +1,39 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/0ee15ee9-37ea-448d-aa3b-23eb25994df0";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/4814-3E47";
fsType = "vfat";
};
swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.eno1.useDHCP = lib.mkDefault true;
# networking.interfaces.enp0s20f0u3u1u4.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View file

@ -25,6 +25,7 @@
wmctrl wmctrl
# common gui apps that really should be in another file # common gui apps that really should be in another file
angryipscanner
firefox firefox
libreoffice libreoffice
meld meld

View file

@ -1,17 +1,18 @@
{ config, pkgs, hostname, username, ... }: { { config, pkgs, hostname, username, ... }: {
imports = [ imports = [
./internationalisation.nix ./linux/internationalisation.nix
]; ];
environment = { environment = {
shells = with pkgs; [ bash zsh ]; shells = with pkgs; [ bash zsh ];
systemPackages = with pkgs; [ systemPackages = with pkgs; [
angryipscanner
dconf2nix dconf2nix
file file
neofetch neofetch
python3 python3
tailscale tailscale
unzip
wget
]; ];
}; };
@ -34,6 +35,7 @@
"flakes" "flakes"
"nix-command" "nix-command"
]; ];
trusted-users = [ "${username}" ];
}; };
programs = { programs = {