trying to get this shit to build

This commit is contained in:
Bryan Ramos 2023-06-06 16:26:04 -04:00
parent 1861c3e6e6
commit 375a6dc02f
17 changed files with 111 additions and 115 deletions

18
flake.lock generated
View file

@ -57,27 +57,11 @@
"type": "github" "type": "github"
} }
}, },
"nur": {
"locked": {
"lastModified": 1686076172,
"narHash": "sha256-FA0RCy8AkxWCfhdCfTNjHG2IMM14HZ50IUIkVbJRVF0=",
"owner": "nix-community",
"repo": "NUR",
"rev": "b2adbf0149922d8503a89bccf099ffdc22907d51",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "NUR",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"disko": "disko", "disko": "disko",
"home-manager": "home-manager", "home-manager": "home-manager",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs"
"nur": "nur"
} }
} }
}, },

View file

@ -1,9 +1,9 @@
{ description = "Fully Declarative YOLO"; {
description = "Fully Declarative YOLO";
inputs = inputs =
{ {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nur.url = "github:nix-community/NUR";
home-manager = { home-manager = {
url = "github:nix-community/home-manager/master"; url = "github:nix-community/home-manager/master";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
@ -14,21 +14,25 @@
}; };
}; };
outputs = { self, nixpkgs, nur, home-manager, disko }: outputs = { self, nixpkgs, home-manager, disko }:
let let
system = "x86_64-linux"; system = "x86_64-linux";
overlays = [
(self: super: {
nur = import (builtins.fetchTarball "https://github.com/nix-community/NUR/archive/master.tar.gz")
{inherit self;};
})
];
pkgs = import nixpkgs { pkgs = import nixpkgs {
inherit system; inherit system overlays;
config = { config = {
allowUnfree = true; allowUnfree = true;
packageOverrides = pkgs: {
nur = import nur { inherit pkgs; };
};
}; };
}; };
in in
{ nixosConfigurations.desktop = nixpkgs.lib.nixosSystem { {
nixosConfigurations.desktop = nixpkgs.lib.nixosSystem {
inherit system; inherit system;
modules = [ modules = [
./sysConfig/desktop ./sysConfig/desktop

View file

@ -1,4 +1,4 @@
{ pkgs, config, ... }: { ... }:
{ {
programs.home-manager.enable = true; programs.home-manager.enable = true;
@ -8,7 +8,7 @@
home.username = "bryan"; home.username = "bryan";
home.homeDirectory = "/home/bryan"; home.homeDirectory = "/home/bryan";
config.modules = { modules = {
gui.enable = true; gui.enable = true;
browsers.enable = true; browsers.enable = true;
alacritty.enable = true; alacritty.enable = true;

View file

@ -1,6 +1,5 @@
{ pkgs, lib, ... }: { pkgs, lib, ... }:
with lib;
{ {
enable = true; enable = true;
settings = { settings = {
@ -15,63 +14,63 @@ with lib;
colors = { colors = {
primary = { primary = {
background = 0x0d1117; background = "#0d1117";
foreground = 0xb3b1ad; foreground = "#b3b1ad";
}; };
normal = { normal = {
black = 0x484f58; black = "#484f58";
red = 0xff7b72; red = "#ff7b72";
green = 0x3fb950; green = "#3fb950";
yellow = 0xd29922; yellow = "#d29922";
blue = 0x58a6ff; blue = "#58a6ff";
magenta = 0xbc8cff; magenta = "#bc8cff";
cyan = 0x39c5cf; cyan = "#39c5cf";
white = 0xb1bac4; white = "#b1bac4";
}; };
bright = { bright = {
black = 0x6e7681; black = "#6e7681";
red = 0xffa198; red = "#ffa198";
green = 0x56d364; green = "#56d364";
yellow = 0xe3b341; yellow = "#e3b341";
blue = 0x79c0ff; blue = "#79c0ff";
magenta = 0xd2a8ff; magenta = "#d2a8ff";
cyan = 0x56d4dd; cyan = "#56d4dd";
white = 0xf0f6fc; white = "#f0f6fc";
}; };
}; };
font = { font = {
normal = { normal = {
family = terminus-nerdfont; family = "Terminus (TTF)";
style = Medium; style = "Regular";
}; };
bold = { bold = {
family = terminus-nerdfont; family = "Terminus (TTF)";
style = Bold; style = "Bold";
}; };
italic = { italic = {
family = terminus-nerdfont; family = "Terminus (TTF)";
style = Medium Italic; style = "Italic";
}; };
bold_italic = { bold_italic = {
family = terminus-nerdfont; family = "Terminus (TTF)";
style = Bold Italic; style = "Bold Italic";
}; };
}; };
size = 14; size = 14;
cursor = { cursor = {
color = 0xffffff; color = "#ffffff";
style = { style = {
shape = Block; shape = "Block";
blinking = Always; blinking = "Always";
blink-interval = 750; blink_interval = 750;
}; };
}; };
}; };

View file

@ -1,4 +1,4 @@
'' {
hmup = "home-manager switch --flake '$HOME/Documents/projects/nixos#bryan'"; hmup = "home-manager switch --flake '$HOME/Documents/projects/nixos#bryan'";
nixup = "sudo nixos-rebuild switch --flake '$HOME/Documents/projects/nixos#socratesV2'"; nixup = "sudo nixos-rebuild switch --flake '$HOME/Documents/projects/nixos#socratesV2'";
'' }

View file

@ -3,12 +3,12 @@
{ {
isDefault = true; isDefault = true;
search.default = "Startpage"; search.default = "Startpage";
extensions = with pkgs.nur.repos.rycee.firefox-addons; [ # extensions = with pkgs.nur.repos.rycee.firefox-addons; [
ublock-origin # ublock-origin
darkreader # darkreader
keepassxc-browser # keepassxc-browser
multi-account-containers # multi-account-containers
]; # ];
settings = { settings = {
"extensions.activeThemeID" = "firefox-compact-dark@mozilla.org"; "extensions.activeThemeID" = "firefox-compact-dark@mozilla.org";

View file

@ -12,7 +12,7 @@ in
profiles.bryan = import config/bryan.nix { inherit pkgs; }; profiles.bryan = import config/bryan.nix { inherit pkgs; };
}; };
home.packages = [ home.packages = with pkgs; [
google-chrome google-chrome
(tor-browser-bundle-bin.override { (tor-browser-bundle-bin.override {
useHardenedMalloc = false; # NixOS bug requires this useHardenedMalloc = false; # NixOS bug requires this

View file

@ -13,5 +13,5 @@
./neovim/default.nix ./neovim/default.nix
./security/default.nix ./security/default.nix
./utils/default.nix ./utils/default.nix
] { inherit pkgs; }; ];
} }

View file

@ -8,10 +8,12 @@ in
config = mkIf cfg.enable { config = mkIf cfg.enable {
programs.gpg = { programs.gpg = {
enable = true; enable = true;
publicKeys."bryan@ramos.codes" = { publicKeys = [
trust = 5; {
text = import ./config/pubKey.nix; text = import ./config/pubKey.nix;
}; trust = 5;
}
];
}; };
programs.ssh.enable = true; programs.ssh.enable = true;

View file

@ -1,5 +1,8 @@
{ pkgs, lib, ... }: { pkgs, lib, config, ... }:
let
inherit (config.lib.formats.rasi) mkLiteral;
in
with lib; with lib;
{ enable = true; { enable = true;
package = pkgs.rofi-wayland; package = pkgs.rofi-wayland;

View file

@ -7,6 +7,16 @@ in
{ enable = true; { enable = true;
xwayland = true; xwayland = true;
wrapperFeatures.gtk = true; wrapperFeatures.gtk = true;
extraOptions = [
"--unsupported-gpu"
"--my-next-gpu-wont-be-nvidia"
];
extraSessionCommands = ''
export _JAVA_AWT_WM_NONREPARENTING=1
'';
config = { config = {
modifier = "Mod1"; modifier = "Mod1";
menu = "\${pkgs.rofi-wayland}/bin/rofi -show drun -show-icons -drun-icon-theme Qogir -font 'Noto Sans 14'"; menu = "\${pkgs.rofi-wayland}/bin/rofi -show drun -show-icons -drun-icon-theme Qogir -font 'Noto Sans 14'";
@ -24,16 +34,20 @@ in
}; };
}; };
bars.sway-bar = { bars = [
position = "top"; {
statusCommand = ''while :; do echo "$(free -h | awk '/^Mem/ {print $3}') '|' $(date +'%I:%M:%S %p') '|' $(date +'%m-%d-%Y')"; sleep 1; done''; position = "top";
fonts = { statusCommand = ''while :; do echo "$(free -h | awk '/^Mem/ {print $3}') '|' $(date +'%I:%M:%S %p') '|' $(date +'%m-%d-%Y')"; sleep 1; done'';
names = [ "Noto Sans" "Noto Emoji" "Noto Color Emoji" ]; fonts = {
size = 10.0; names = [ "Noto Sans" "Noto Emoji" "Noto Color Emoji" ];
}; size = 10.0;
colors.background = "#0A0E14"; };
colors.statusline = "#FFFFFF"; colors = {
}; background = "#0A0E14";
statusline = "#FFFFFF";
};
}
];
gaps = { gaps = {
smartGaps = false; smartGaps = false;
@ -51,14 +65,5 @@ in
"${modifier}+Shift+f" = "exec alacritty -e ranger"; "${modifier}+Shift+f" = "exec alacritty -e ranger";
"${modifier}+Shift+d" = "exec emote"; "${modifier}+Shift+d" = "exec emote";
}; };
extraOptions = [
"--unsupported-gpu"
"--my-next-gpu-wont-be-nvidia"
];
extraSessionCommands = ''
export _JAVA_AWT_WM_NONREPARENTING=1
'';
}; };
} }

View file

@ -3,12 +3,12 @@
with lib; with lib;
let let
cfg = config.modules.gui; cfg = config.modules.gui;
in in
{ options.modules.gui = { enable = mkEnableOption "gui"; }; { options.modules.gui = { enable = mkEnableOption "gui"; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
wayland.windowManager.sway = import ./config/sway.nix { inherit pkgs config lib; }; wayland.windowManager.sway = import ./config/sway.nix { inherit pkgs config lib; };
programs.rofi = import ./config/rofi.nix { inherit pkgs lib; }; programs.rofi = import ./config/rofi.nix { inherit pkgs config lib; };
gtk = { gtk = {
enable = true; enable = true;
@ -21,7 +21,7 @@ in
programs.btop.enable = true; programs.btop.enable = true;
fonts.fontconfig.enable = true; fonts.fontconfig.enable = true;
home.packages = [ home.packages = with pkgs; [
xdg-utils xdg-utils
grim grim
slurp slurp

View file

@ -3,11 +3,9 @@
let let
github-theme = pkgs.vimUtils.buildVimPlugin { github-theme = pkgs.vimUtils.buildVimPlugin {
name = "github-theme"; name = "github-theme";
src = pkgs.fetchFromGithub { src = builtins.fetchTarball {
owner = "projekt0n"; url = "https://github.com/projekt0n/github-nvim-theme/archive/refs/tags/v1.0.0.tar.gz";
repo = "github-nvim-theme"; sha256 = "15c65qw1sgw3v5wrwbg5f1fqb82qq1yr44g2nrwb7b7m134jyr1h";
rev = "ea713c37691b2519f56cd801a2330bdf66393d0f";
sha256 = "0cwr3b5r2ac7aizxmwb3mlhdc2sh0pw670vcwps79x9jp52yrj2y";
}; };
}; };
@ -23,7 +21,7 @@ with pkgs.vimPlugins;
''; '';
} }
{ plugin = lazygit.nvim; } { plugin = lazygit-nvim; }
{ {
plugin = LazyVim; plugin = LazyVim;

View file

@ -1,4 +1,4 @@
{ lib, config, ... }: { pkgs, lib, config, ... }:
with lib; with lib;
let let
@ -7,7 +7,7 @@ let
in in
{ options.modules.security = { enable = mkEnableOption "security"; }; { options.modules.security = { enable = mkEnableOption "security"; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
home.packages = [ home.packages = with pkgs; [
keepassxc wireguard-tools ipscan keepassxc wireguard-tools ipscan
]; ];
}; };

View file

@ -12,11 +12,11 @@ in
home.packages = with pkgs; [ home.packages = with pkgs; [
wget curl tree neofetch wget curl tree neofetch
unzip fping calc qrendcode unzip fping calc qrencode
fd pkg-config pciutils fd pkg-config pciutils
neofetch mdbook rsync neofetch mdbook rsync
android-studio docker docker gcc gnumake
gcc gnumake android-studio
]; ];
}; };
} }

View file

@ -53,8 +53,8 @@
}; };
# Virtualisation # Virtualisation
nix.settings.system-features = "kvm"; nix.settings.system-features = [ "kvm" ];
environment.systemPackages = pkgs.virt-manager; environment.systemPackages = [ pkgs.virt-manager ];
virtualisation.libvirtd = { virtualisation.libvirtd = {
enable = true; enable = true;
@ -66,6 +66,7 @@
}; };
# CPU # CPU
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
powerManagement.cpuFreqGovernor = lib.mkDefault "performance"; powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
} }

View file

@ -80,7 +80,7 @@
# Networking # Networking
networking = { networking = {
hostName = "socratesV2"; hostName = "socrates";
useDHCP = lib.mkDefault true; useDHCP = lib.mkDefault true;
networkmanager.enable = true; networkmanager.enable = true;
firewall = { firewall = {
@ -93,7 +93,7 @@
enable = true; enable = true;
startWhenNeeded = true; startWhenNeeded = true;
settings = { settings = {
permitRootLogin = false; # permitRootLogin = false;
X11Forwarding = true; X11Forwarding = true;
PasswordAuthentication = false; PasswordAuthentication = false;
}; };