diff --git a/configuration.nix b/configuration.nix index 3b56bd6..d5cf60d 100644 --- a/configuration.nix +++ b/configuration.nix @@ -4,23 +4,6 @@ ... }: { system.stateVersion = settings.version; - environment = { - defaultPackages = []; #don't install anything by default - binsh = "${pkgs.dash}/bin/dash"; #use dash for speed - variables = { - EDITOR = "vi"; - VISUAL = "vi"; - PAGER = "page"; - SYSTEMD_PAGERSECURE = "true"; - TERMINAL = "st"; - }; - shellAliases = { - ls = "exa --long --icons"; - }; - interactiveShellInit = '' - neofetch - ''; - }; security.sudo = { enable = true; execWheelOnly = true; diff --git a/flake.nix b/flake.nix index dd3a0e3..b289272 100644 --- a/flake.nix +++ b/flake.nix @@ -1,7 +1,7 @@ { inputs = { - nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; - nixpkgs-master.url = "github:nixos/nixpkgs"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + nixpkgs-master.url = "github:NixOS/nixpkgs"; home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; @@ -26,8 +26,6 @@ outputs = { self, nixpkgs, - spicetify-nix, - sxhkd-flake, ... } @ inputs: let settings = { @@ -45,72 +43,23 @@ afk-cmds = final.callPackage ./pkgs/afk-cmds {}; parrot = final.callPackage ./pkgs/parrot {}; webcord = inputs.nixpkgs-master.legacyPackages.${system}.webcord; - nerdfonts-overpass = prev.nerdfonts.override { - fonts = ["Overpass"]; - }; }) inputs.suckless.overlay ]; }; in { formatter.x86_64-linux = pkgs.alejandra; - nixosConfigurations = { gerg-desktop = lib.nixosSystem { inherit system pkgs; specialArgs = {inherit inputs settings;}; modules = [ - sxhkd-flake.nixosModules.sxhkd + inputs.sxhkd-flake.nixosModules.sxhkd + inputs.home-manager.nixosModules.home-manager + ./home-manager ./configuration.nix ./systems/desktop.nix - { - environment.etc = { - "nix/flake-channels/system".source = inputs.self; - "nix/flake-channels/nixpkgs".source = inputs.nixpkgs.outPath; - "nix/flake-channels/home-manager".source = inputs.home-manager.outPath; - }; - nix = { - nixPath = [ - "nixpkgs=/etc/nix/flake-channels/nixpkgs" - "home-manager=/etc/nix/flake-channels/home-manager" - ]; - #automatically get registry from input flakes - registry = - { - system.flake = self; - default.flake = nixpkgs; - } - // lib.attrsets.mapAttrs ( - _: source: { - flake = source; - } - ) ( - lib.attrsets.filterAttrs ( - _: source: ( - !(lib.attrsets.hasAttrByPath ["flake"] source) || source.flake == false - ) - ) - inputs - ); - settings = { - experimental-features = ["nix-command" "flakes" "repl-flake"]; - auto-optimise-store = true; - warn-dirty = false; - }; - }; - } - inputs.home-manager.nixosModules.home-manager - { - home-manager = { - useGlobalPkgs = true; - useUserPackages = false; - extraSpecialArgs = {inherit spicetify-nix settings;}; - users = { - ${settings.username} = import ./home-manager/home.nix; - root = import ./home-manager/root.nix; - }; - }; - } + ./nix.nix ]; }; }; diff --git a/home-manager/config/neofetch/config.conf b/home-manager/config/neofetch/config.conf deleted file mode 100644 index c91114d..0000000 --- a/home-manager/config/neofetch/config.conf +++ /dev/null @@ -1,87 +0,0 @@ -print_info() { - info title - info underline - info "OS" distro - info "Kernel" kernel - info "Uptime" uptime - info "Packages" packages - info "Shell" shell - info "WM" wm - info "WM Theme" wm_theme - info "Theme" theme - info "Icons" icons - info "Terminal" term - info "CPU" cpu - info "GPU" gpu - info "Memory" memory - info "Disk" disk - info cols -} -title_fqdn="off" -kernel_shorthand="on" -distro_shorthand="tiny" -os_arch="off" -uptime_shorthand="tiny" -memory_percent="on" -memory_unit="gib" -package_managers="tiny" -shell_path="off" -shell_version="off" -speed_type="bios_limit" -speed_shorthand="on" -cpu_brand="off" -cpu_speed="off" -cpu_cores="off" -cpu_temp="C" -gpu_brand="off" -gpu_type="all" -refresh_rate="off" -gtk_shorthand="on" -gtk2="off" -gtk3="on" -public_ip_host="http://ident.me" -public_ip_timeout=2 -local_ip_interface=('auto') -de_version="off" -disk_show=('/') -disk_subtitle="dir" -disk_percent="on" -music_player="auto" -song_format="%artist% - %album% - %title%" -song_shorthand="off" -mpc_args=() -colors=(distro) -bold="on" -underline_enabled="on" -underline_char="-" -separator=":" -block_range=(0 15) -color_blocks="on" -block_width=3 -block_height=1 -col_offset="auto" -bar_char_elapsed="-" -bar_char_total="=" -bar_border="on" -bar_length=15 -bar_color_elapsed="distro" -bar_color_total="distro" -memory_display="on" -battery_display="on" -disk_display="on" -image_backend="pixterm" -image_source="auto" -ascii_distro="auto" -ascii_colors=(distro) -ascii_bold="on" -image_loop="off" -thumbnail_dir="${XDG_CACHE_HOME:-${HOME}/.cache}/thumbnails/neofetch" -crop_mode="normal" -crop_offset="center" -image_size="auto" -catimg_size="2" -gap=3 -yoffset=0 -xoffset=0 -background_color= -stdout="off" diff --git a/home-manager/default.nix b/home-manager/default.nix new file mode 100644 index 0000000..d37099b --- /dev/null +++ b/home-manager/default.nix @@ -0,0 +1,41 @@ +{ + settings, + lib, + inputs, + ... +}: let + helperfunc = args: (lib.lists.forEach args (m: ./. + ("/" + m + ".nix"))); +in { + home-manager = { + useGlobalPkgs = true; + useUserPackages = false; + extraSpecialArgs = {inherit inputs settings;}; + users = { + ${settings.username} = { + imports = + helperfunc + [ + "theme" + "spicetify" + ]; + xsession.numlock.enable = true; + home = { + homeDirectory = "/home/${settings.username}"; + stateVersion = settings.version; + }; + }; + root = { + imports = + helperfunc + [ + "theme" + ]; + home = { + username = "root"; + homeDirectory = "/root"; + stateVersion = settings.version; + }; + }; + }; + }; +} diff --git a/home-manager/home.nix b/home-manager/home.nix deleted file mode 100644 index 88cec75..0000000 --- a/home-manager/home.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ - pkgs, - settings, - lib, - ... -}: { - imports = let - modules = [ - "librewolf" - "theme" - "spicetify" - ]; - in - lib.lists.forEach modules ( - m: - ./. + ("/" + m + ".nix") - ); - xsession.numlock.enable = true; - home = { - homeDirectory = "/home/${settings.username}"; - stateVersion = settings.version; - file = { - ".background-image".source = ../images/nix-stars.png; - ".config" = { - source = ./config; - recursive = true; - }; - }; - }; -} diff --git a/home-manager/librewolf.nix b/home-manager/librewolf.nix deleted file mode 100644 index 478832f..0000000 --- a/home-manager/librewolf.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ - programs = { - librewolf = { - enable = true; - settings = { - "webgl.disabled" = true; - "media.peerconnection.ice.no_host" = false; - "browser.sessionstore.resume_from_crash" = false; - "security.OCSP.require" = false; - "network.dns.disableIPv6" = true; - "privacy.resistFingerprinting" = true; - "privacy.resistFingerprinting.letterboxing" = true; - "privacy.clearOnShutdown.history" = true; - "privacy.clearOnShutdown.downloads" = true; - }; - }; - }; -} diff --git a/home-manager/root.nix b/home-manager/root.nix deleted file mode 100644 index dcbb469..0000000 --- a/home-manager/root.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ - settings, - lib, - ... -}: { - imports = let - modules = [ - "theme" - ]; - in - lib.lists.forEach modules ( - m: - ./. + ("/" + m + ".nix") - ); - home = { - username = "root"; - homeDirectory = "/root"; - stateVersion = settings.version; - file = { - ".config/neofetch/config.conf" = { - source = ./config/neofetch/config.conf; - recursive = false; - }; - }; - }; -} diff --git a/home-manager/spicetify.nix b/home-manager/spicetify.nix index 5bc9b55..607c2ab 100644 --- a/home-manager/spicetify.nix +++ b/home-manager/spicetify.nix @@ -1,11 +1,12 @@ { pkgs, - spicetify-nix, + inputs, ... }: let - spicePkgs = spicetify-nix.packages.${pkgs.system}.default; + sp-nix = inputs.spicetify-nix; + spicePkgs = sp-nix.packages.${pkgs.system}.default; in { - imports = [spicetify-nix.homeManagerModule]; + imports = [sp-nix.homeManagerModule]; programs.spicetify = { spotifyPackage = pkgs.spotify-unwrapped; spicetifyPackage = pkgs.spicetify-cli; diff --git a/images/nix-stars.png b/images/nix-stars.png deleted file mode 100644 index dc2a572..0000000 Binary files a/images/nix-stars.png and /dev/null differ diff --git a/images/recursion.png b/images/recursion.png new file mode 100644 index 0000000..f3062d4 Binary files /dev/null and b/images/recursion.png differ diff --git a/images/stars-1080.jpg b/images/stars-1080.jpg deleted file mode 100644 index e520cc1..0000000 Binary files a/images/stars-1080.jpg and /dev/null differ diff --git a/images/stars.jpg b/images/stars.jpg deleted file mode 100644 index 28b0e71..0000000 Binary files a/images/stars.jpg and /dev/null differ diff --git a/modules/fonts.nix b/modules/fonts.nix index f5fdd42..cd847e1 100644 --- a/modules/fonts.nix +++ b/modules/fonts.nix @@ -1,6 +1,13 @@ {pkgs, ...}: { fonts = { - fonts = with pkgs; [overpass nerdfonts-overpass material-design-icons]; + fonts = with pkgs; [ + overpass + material-design-icons + (nerdfonts.override + { + fonts = ["Overpass"]; + }) + ]; fontDir.enable = true; fontconfig = { enable = true; diff --git a/modules/packages.nix b/modules/packages.nix index 37670ac..6a0bf12 100644 --- a/modules/packages.nix +++ b/modules/packages.nix @@ -4,34 +4,38 @@ inputs, ... }: { - environment.systemPackages = with pkgs; [ - bottom #view tasks - efibootmgr #efi editor - maim #screenshooter - pciutils #lspci - alsa-utils #volume control - btrfs-progs #for external harddrive - vlc #play stuff - bitwarden #store stuff - qbittorrent #steal stuff - webcord # talk to people (gross) - feh #for wallpaper - xfce.mousepad - brightnessctl #brightness control for laptop - playerctl #music control - networkmanagerapplet #gui connection control - pavucontrol #gui volume control - xclip #commandline clipboard access - exa #ls replacement - cava #pretty audio - neofetch # cus yes - dmenu #suckless launcher - st #suckless terminal - pipes-rs # more fun things - pcmanfm #file manager - nix-tree #view packages - bc #terminal calculator - page #use nvim as a pager - inputs.nvim-config.packages.${pkgs.system}.default #my custom nvim flake - ]; + environment = { + defaultPackages = []; #don't install anything by default + systemPackages = with pkgs; [ + bottom #view tasks + efibootmgr #efi editor + maim #screenshooter + pciutils #lspci + alsa-utils #volume control + btrfs-progs #for external harddrive + vlc #play stuff + bitwarden #store stuff + qbittorrent #steal stuff + webcord # talk to people (gross) + feh #for wallpaper + xfce.mousepad + brightnessctl #brightness control for laptop + playerctl #music control + networkmanagerapplet #gui connection control + pavucontrol #gui volume control + xclip #commandline clipboard access + exa #ls replacement + cava #pretty audio + nitch # cus yes + dmenu #suckless launcher + st #suckless terminal + pipes-rs # more fun things + pcmanfm #file manager + nix-tree #view packages + bc #terminal calculator + page #use nvim as a pager + librewolf #best browser + inputs.nvim-config.packages.${pkgs.system}.default #my custom nvim flake + ]; + }; } diff --git a/modules/zsh.nix b/modules/shells.nix similarity index 70% rename from modules/zsh.nix rename to modules/shells.nix index 473c921..fda96ba 100644 --- a/modules/zsh.nix +++ b/modules/shells.nix @@ -1,4 +1,18 @@ -{ +{pkgs, ...}: { + environment = { + binsh = "${pkgs.dash}/bin/dash"; #use dash for speed + variables = { + EDITOR = "vi"; + VISUAL = "vi"; + PAGER = "page"; + SYSTEMD_PAGERSECURE = "true"; + TERMINAL = "st"; + }; + shellAliases = { + ls = "exa --long --icons"; + }; + interactiveShellInit = "nitch"; + }; programs = { zsh = { enable = true; diff --git a/modules/xserver.nix b/modules/xserver.nix index 89fb60f..85b702f 100644 --- a/modules/xserver.nix +++ b/modules/xserver.nix @@ -13,6 +13,9 @@ excludePackages = [pkgs.xterm]; windowManager.dwm.enable = true; displayManager = { + sessionCommands = '' + feh --bg-scale ${../images/recursion.png} + ''; defaultSession = "none+dwm"; lightdm = { enable = true; @@ -45,7 +48,7 @@ font-style = normal text-color = "#7AA2F7" error-color = "#DB4B4B" - background-image = "/etc/nixos/images/nix-stars.png" + background-image = "${../images/recursion.png}" background-color = "#000000" window-color = "#000000" border-color = "#000000" diff --git a/nix.nix b/nix.nix new file mode 100644 index 0000000..28eb5a2 --- /dev/null +++ b/nix.nix @@ -0,0 +1,40 @@ +{ + inputs, + lib, + ... +}: { + environment.etc = { + "nix/flake-channels/system".source = inputs.self; + "nix/flake-channels/nixpkgs".source = inputs.nixpkgs.outPath; + "nix/flake-channels/home-manager".source = inputs.home-manager.outPath; + }; + nix = { + nixPath = [ + "nixpkgs=/etc/nix/flake-channels/nixpkgs" + "home-manager=/etc/nix/flake-channels/home-manager" + ]; + #automatically get registry from input flakes + registry = + { + system.flake = inputs.self; + default.flake = inputs.nixpkgs; + } + // lib.attrsets.mapAttrs ( + _: source: { + flake = source; + } + ) ( + lib.attrsets.filterAttrs ( + _: source: ( + !(lib.attrsets.hasAttrByPath ["flake"] source) || source.flake == false + ) + ) + inputs + ); + settings = { + experimental-features = ["nix-command" "flakes" "repl-flake"]; + auto-optimise-store = true; + warn-dirty = false; + }; + }; +} diff --git a/systems/desktop.nix b/systems/desktop.nix index 86ceba0..294ed79 100644 --- a/systems/desktop.nix +++ b/systems/desktop.nix @@ -18,7 +18,7 @@ "sxhkd" "vfio" "xserver" - "zsh" + "shells" ]; in lib.lists.forEach modules ( diff --git a/systems/laptop.nix b/systems/laptop.nix index 49b7c21..8b252a9 100644 --- a/systems/laptop.nix +++ b/systems/laptop.nix @@ -15,7 +15,7 @@ "scripts" "sxhkd" "xserver" - "zsh" + "shells" ]; in lib.lists.forEach modules (