diff --git a/common/boot-logo.png b/common/boot-logo.png new file mode 100644 index 0000000..ce0c98c Binary files /dev/null and b/common/boot-logo.png differ diff --git a/common/de/hyprland.nix b/common/de/hyprland.nix index 98dfe35..b8ff0f7 100644 --- a/common/de/hyprland.nix +++ b/common/de/hyprland.nix @@ -1,3 +1,4 @@ { + # Not working on my hardware for some reason programs.hyprland.enable = true; } diff --git a/common/default.nix b/common/default.nix index 69b81a5..a03fe1a 100644 --- a/common/default.nix +++ b/common/default.nix @@ -7,15 +7,7 @@ ... }: { imports = [ - # If you want to use modules your own flake exports (from modules/nixos): - # outputs.nixosModules.example - - # Or modules from other flakes (such as nixos-hardware): - # inputs.hardware.nixosModules.common-cpu-amd - # inputs.hardware.nixosModules.common-ssd - - # You can also split up your configuration and import pieces of it here: - # ./users.nix + ./packages/neovim.nix ]; nixpkgs = { @@ -65,9 +57,20 @@ auto-optimise-store = true; }; - boot = { - loader.systemd-boot.enable = true; - loader.efi.canTouchEfiVariables = true; + boot.loader = { + systemd-boot = { + enable = true; + + editor = true; # todo + # memtest86.enable = true; + }; + + efi.canTouchEfiVariables = true; + + grub = { + #theme = pkgs.sleek-grub-theme; + #splashImage = ./boot-logo.png; + }; }; # Set your time zone. @@ -98,13 +101,11 @@ shellAliases = { ll = "ls -al"; }; - # history.size = 10000; - # history.path = "${config.xdg.dataHome}/zsh/history"; + ohMyZsh = { enable = true; plugins = [ "git" - # "thefuck" ]; theme = "robbyrussell"; }; @@ -112,42 +113,6 @@ services.fwupd.enable = true; - programs.neovim = { - enable = true; - defaultEditor = true; - - configure = { - customRC = '' - set number - set list - if &diff - colorscheme blue - endif - ''; - packages.myVimPackage = with pkgs.vimPlugins; { - start = [ - ctrlp - nvim-tree-lua - indent-blankline-nvim - - nvim-lspconfig - nvim-treesitter.withAllGrammars - plenary-nvim - gruvbox-material - mini-nvim - ]; - }; - - extraLuaConfig = - /* - lua - */ - '' - require("nvim-tree").setup() - ''; - }; - }; - networking = { networkmanager.enable = true; @@ -156,15 +121,7 @@ nix.settings.allowed-users = ["@wheel"]; - security = { - #auditd.enable = true; - #audit.enable = true; - #audit.rules = [ - # "-a exit,always -F arch=b64 -S execve" - #]; - - sudo.execWheelOnly = true; - }; + security.sudo.execWheelOnly = true; services.tailscale.enable = true; diff --git a/common/adguardhome.nix b/common/packages/adguardhome.nix similarity index 97% rename from common/adguardhome.nix rename to common/packages/adguardhome.nix index ecf1a95..d7c8d4b 100644 --- a/common/adguardhome.nix +++ b/common/packages/adguardhome.nix @@ -2,4 +2,4 @@ services.adguardhome.enable = true; networking.nameservers = ["127.0.0.1"]; -} \ No newline at end of file +} diff --git a/common/packages/neovim.nix b/common/packages/neovim.nix new file mode 100644 index 0000000..5d39b4d --- /dev/null +++ b/common/packages/neovim.nix @@ -0,0 +1,40 @@ +{pkgs, ...}: { + # NeoVIm config + # Imported by default by ../default.nix + + programs.neovim = { + enable = true; + defaultEditor = true; + + configure = { + customRC = '' + set number + set list + if &diff + colorscheme blue + endif + ''; + packages.myVimPackage = with pkgs.vimPlugins; { + start = [ + ctrlp + nvim-tree-lua + indent-blankline-nvim + + nvim-lspconfig + nvim-treesitter.withAllGrammars + plenary-nvim + gruvbox-material + mini-nvim + ]; + }; + + extraLuaConfig = + /* + lua + */ + '' + require("nvim-tree").setup() + ''; + }; + }; +} diff --git a/hosts/stuff/syncthing.nix b/common/packages/syncthing.nix similarity index 86% rename from hosts/stuff/syncthing.nix rename to common/packages/syncthing.nix index d699916..a5221bb 100644 --- a/hosts/stuff/syncthing.nix +++ b/common/packages/syncthing.nix @@ -3,7 +3,6 @@ enable = true; user = "user"; group = "users"; - dataDir = "/home/user"; openDefaultPorts = true; overrideFolders = false; diff --git a/hosts/phoenix/configuration.nix b/hosts/phoenix/configuration.nix index aa678b0..687f72a 100644 --- a/hosts/phoenix/configuration.nix +++ b/hosts/phoenix/configuration.nix @@ -1,4 +1,8 @@ -{pkgs, ...}: { +{ + pkgs, + lib, + ... +}: { imports = [ ./hardware-configuration.nix ../../common/default.nix @@ -11,8 +15,8 @@ ../../common/de/plasma6.nix ../../common/de/hyprland.nix - ./syncthing.nix - ../../common/adguardhome.nix + ../../common/packages/syncthing.nix + ../../common/packages/adguardhome.nix # If you want to use modules your own flake exports (from modules/nixos): # outputs.nixosModules.example @@ -45,7 +49,6 @@ ]; }; - services.btrfs.autoScrub = { enable = true; interval = "weekly"; @@ -69,6 +72,11 @@ dedicatedServer.openFirewall = false; # Open ports in the firewall for Source Dedicated Server }; + services.syncthing = { + dataDir = lib.mkForce "/home/user"; + configDir = lib.mkForce "/data/sync/configuration/"; + }; + environment.systemPackages = with pkgs; [ bitwarden libreoffice-fresh diff --git a/hosts/phoenix/hardware-configuration.nix b/hosts/phoenix/hardware-configuration.nix index d267d6a..b6dc63b 100644 --- a/hosts/phoenix/hardware-configuration.nix +++ b/hosts/phoenix/hardware-configuration.nix @@ -1,6 +1,3 @@ -# 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, diff --git a/hosts/phoenix/syncthing.nix b/hosts/phoenix/syncthing.nix deleted file mode 100644 index 6269568..0000000 --- a/hosts/phoenix/syncthing.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ - services.syncthing = { - enable = true; - user = "user"; - group = "users"; - dataDir = "/home/user"; - configDir = "/data/sync/configuration/"; - - openDefaultPorts = true; - overrideFolders = false; - overrideDevices = false; - }; -} diff --git a/hosts/stuff/configuration.nix b/hosts/stuff/configuration.nix index a3e2465..80f328e 100644 --- a/hosts/stuff/configuration.nix +++ b/hosts/stuff/configuration.nix @@ -9,8 +9,8 @@ ../../common/de/plasma5.nix - ./syncthing.nix - # ../../common/adguardhome.nix + ../../common/packages/syncthing.nix + # ../../common/packages/adguardhome.nix ]; users.users.user = { diff --git a/hosts/stuff/hardware-configuration.nix b/hosts/stuff/hardware-configuration.nix index 890b2e4..e4ab3d4 100644 --- a/hosts/stuff/hardware-configuration.nix +++ b/hosts/stuff/hardware-configuration.nix @@ -1,6 +1,3 @@ -# 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, diff --git a/pkgs/default.nix b/pkgs/default.nix index 8af3a80..96ffce6 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -1,6 +1,5 @@ # Custom packages, that can be defined similarly to ones from nixpkgs # You can build them using 'nix build .#example' -{ pkgs, ... }: -{ - tildefriends = pkgs.callPackage ./tildefriends/default.nix { }; +{pkgs, ...}: { + tildefriends = pkgs.callPackage ./tildefriends/default.nix {}; } diff --git a/pkgs/tildefriends/default.nix b/pkgs/tildefriends/default.nix index 76dbdd4..a2bec1e 100644 --- a/pkgs/tildefriends/default.nix +++ b/pkgs/tildefriends/default.nix @@ -1,11 +1,11 @@ -{ lib -, stdenv -, fetchFromGitea -, gnumake -, openssl -, which +{ + lib, + stdenv, + fetchFromGitea, + gnumake, + openssl, + which, }: - stdenv.mkDerivation rec { pname = "tildefriends"; version = "0.0.17"; @@ -37,15 +37,11 @@ stdenv.mkDerivation rec { doCheck = false; meta = { - homepage = "https://tildefriends.net/"; + homepage = "https://tildefriends.net"; description = "Make apps and friends from the comfort of your web browser."; - longDescription = '' - TODO - ''; - mainProgram = "tildefriends"; - license = with lib.licenses; [ mit ]; - maintainers = with lib.maintainers; [ tasiaiso ]; + license = with lib.licenses; [mit]; + maintainers = with lib.maintainers; [tasiaiso]; platforms = lib.platforms.all; }; }