diff --git a/apps/common.nix b/apps/common.nix deleted file mode 100644 index aa971bd3d1b83547455fd326f6a86442f94a03c5..0000000000000000000000000000000000000000 --- a/apps/common.nix +++ /dev/null @@ -1,46 +0,0 @@ -{ - pkgs, - config, - ... -}: { - imports = [ - ./bat.nix - ./bottom.nix - ./exa.nix - ./fzf.nix - ./gpg.nix - ./git.nix - ./helix.nix - ./jq.nix - ./lazygit.nix - ./nushell.nix - ./oh-my-posh.nix - ./ssh.nix - ./xdg.nix - ./zoxide.nix - ]; - home = { - packages = with pkgs; [ - # Tools - age - bitwarden-cli - duf - du-dust - fd - just - ripgrep - - # LSPs - nil - - # Formatters - alejandra - ]; - activation.report-changes = config.lib.dag.entryAnywhere '' - ${pkgs.nvd}/bin/nvd --nix-bin-dir=${pkgs.nix}/bin diff $oldGenPath $newGenPath - ''; - stateVersion = "22.11"; - }; - - programs = {home-manager.enable = true;}; -} diff --git a/apps/default.nix b/apps/default.nix index 08c7d47fd76bd9ef409eb7af9ee5002503f403b0..35a50ecb8f6bd421220ad6d554098253133c27ce 100644 --- a/apps/default.nix +++ b/apps/default.nix @@ -1,30 +1,65 @@ +{ + pkgs, + config, + {pkgs, ...}: { +}: { imports = [ + ./common.nix + + ./firefox.nix + ./firefox.nix + ./go.nix + ./gtk.nix + ./spotifyd.nix + ./go.nix + ./gtk.nix + ./helix.nix + ./jq.nix + ./lazygit.nix + ./nushell.nix + ./oh-my-posh.nix + ./spotifyd.nix + ./ssh.nix ./tiny.nix ./wezterm.nix + ./xdg.nix + ./zoxide.nix ]; home = { packages = with pkgs; [ # Tools + age + bitwarden-cli delve discord + duf + du-dust + fd + just obsidian spotify-tui + ripgrep + usql # LSPs gopls lua-language-server marksman + nil nodePackages.yaml-language-server # Formatters alejandra + black + gofumpt + nodePackages.lua-fmt # IDEs jetbrains.goland @@ -37,5 +72,11 @@ nur.repos.jolheiser.kv nur.repos.jolheiser.tclip nur.repos.jolheiser.tmpl ]; + activation.report-changes = config.lib.dag.entryAnywhere '' + ${pkgs.nvd}/bin/nvd --nix-bin-dir=${pkgs.nix}/bin diff $oldGenPath $newGenPath + ''; + stateVersion = "22.11"; }; + + programs = {home-manager.enable = true;}; } diff --git a/flake.nix b/flake.nix index 8d631b9b473de2ef9a330bdeedaa3be3e762487a..6b4d8ebe9073a83d5b567efe0e7d26890a900fa2 100644 --- a/flake.nix +++ b/flake.nix @@ -36,7 +36,7 @@ jolheiser = import jolheiser-nur {pkgs = prev;}; }; }; }; - commonConfig = {server ? false}: { + commonConfig = { config, pkgs, ... @@ -46,45 +46,35 @@ file = path; owner = username; }; in { - config = - { - nixpkgs.overlays = [overlays]; - home-manager = { - useGlobalPkgs = true; - useUserPackages = true; - nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; + }; - nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; + }; { - nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; + }; description = "jolheiser's nixos config"; - nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; + }; - nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; + }; inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; + }; nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; - nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; + }; home-manager.url = "github:nix-community/home-manager"; + flakePath = "/home/${username}/.config/nixpkgs"; }; - nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; + }; + }; agenix.url = "github:ryantm/agenix"; - nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; + }; agenix.inputs = { - home-manager.url = "github:nix-community/home-manager"; + flake-utils.url = "github:numtide/flake-utils"; - home-manager.url = "github:nix-community/home-manager"; + flake-utils.url = "github:numtide/flake-utils"; { - home-manager.url = "github:nix-community/home-manager"; + flake-utils.url = "github:numtide/flake-utils"; description = "jolheiser's nixos config"; - home-manager.url = "github:nix-community/home-manager"; + - home-manager.url = "github:nix-community/home-manager"; + inputs = { - spotify-pw = userSecret ./secrets/shared/spotify-pw.age; - irc-pw = userSecret ./secrets/shared/irc-pw.age; - }; - } - else {} - ); }; username = "jolheiser"; in @@ -133,14 +123,6 @@ agenix.nixosModules.default ./machines/common ./machines/matcha commonConfig - ]; - }; - "dragonwell" = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - modules = [ - home-manager.nixosModules.home-manager - ./machines/dragonwell - (commonConfig {server = true;}) ]; }; }; diff --git a/machines/dragonwell/default.nix b/machines/dragonwell/default.nix deleted file mode 100644 index 589e707bc4db59f6690d203d6987a0f41a607960..0000000000000000000000000000000000000000 --- a/machines/dragonwell/default.nix +++ /dev/null @@ -1,53 +0,0 @@ -{pkgs, ...}: let - username = "jolheiser"; -in { - imports = [./hardware.nix]; - - nixpkgs.config.allowUnfree = true; - - nix = { - gc.automatic = true; - package = pkgs.nixVersions.nix_2_15; - settings = { - experimental-features = ["flakes" "nix-command" "repl-flake"]; - auto-optimise-store = true; - warn-dirty = false; - }; - }; - - system.activationScripts.diff = { - supportsDryActivation = true; - text = '' - ${pkgs.nvd}/bin/nvd --nix-bin-dir=${pkgs.nix}/bin diff /run/current-system "$systemConfig" - ''; - }; - - boot.tmp.cleanOnBoot = true; - zramSwap.enable = true; - - networking = { - hostName = "dragonwell"; - - firewall.enable = true; - }; - - services = { - openssh = { - enable = true; - }; - - tailscale.enable = true; - }; - - virtualisation.docker.enable = true; - - users.users."${username}" = { - extraGroups = ["wheel" "docker" "storage"]; - isNormalUser = true; - openssh.authorizedKeys.keys = [ - ''ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDfKqCWtDlS3tgvfT6hQN+ii8UtabIZ+ZNmYN+bLwIa8PHOEW5MbfaqXSlhKkSi4+7SfQDCHphw0SMfhsQ4qMEcoywZ+4niDgKlQEVkl+S/VGbLuPe92NRStkyreZBLPr3Rh7ScNlGHcmHmoV9v7725fMnsMmabGVhpGO84PwNHOfJyv2tx2h6LxFbAV8S44UQu2lc8YLWCK2UvKuRnBerBXLnDQThUUX8UuCFzb786gQzD5XDU0MENbByxiy0XdVGAC+tFXEiSIgFZlFbFYyShgdTP9MzX2MOglEi+ae+1UIFncraW7ptUey7qHFJylpHWWWvE+GTwsg2G50i0FvFj jolheiser@jolheiser'' - ]; - }; - - system.stateVersion = "22.11"; -} diff --git a/machines/dragonwell/hardware.nix b/machines/dragonwell/hardware.nix deleted file mode 100644 index 329ed8a5c0c1e4620550260d9f14a5f4de47258e..0000000000000000000000000000000000000000 --- a/machines/dragonwell/hardware.nix +++ /dev/null @@ -1,10 +0,0 @@ -{modulesPath, ...}: { - imports = [(modulesPath + "/profiles/qemu-guest.nix")]; - boot.loader.grub.device = "/dev/sda"; - boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "xen_blkfront" "vmw_pvscsi"]; - boot.initrd.kernelModules = ["nvme"]; - fileSystems."/" = { - device = "/dev/sda1"; - fsType = "ext4"; - }; -}