diff --git a/flake.lock b/flake.lock index 220b0750..eaaef6a7 100644 --- a/flake.lock +++ b/flake.lock @@ -1,61 +1,5 @@ { "nodes": { - "doom-emacs": { - "inputs": { - "emacs-overlay": "emacs-overlay" - }, - "locked": { - "lastModified": 1690365066, - "narHash": "sha256-s/L/tSZYb5+Ijhf7wOaf+rhoW9R8FIdLphMYpr62JeY=", - "ref": "refs/heads/main", - "rev": "5b1259840d7f5e5ac379f7b4cce5fa53974aff52", - "revCount": 11, - "type": "git", - "url": "https://git.xenia.me.uk/xenia/emacs.git" - }, - "original": { - "type": "git", - "url": "https://git.xenia.me.uk/xenia/emacs.git" - } - }, - "emacs-overlay": { - "inputs": { - "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs", - "nixpkgs-stable": "nixpkgs-stable" - }, - "locked": { - "lastModified": 1690250820, - "narHash": "sha256-1EgvKQJ/rT23kY9SW5t+1vVMt5PqYsR1459TS87ulzg=", - "owner": "nix-community", - "repo": "emacs-overlay", - "rev": "9815e71dd833db0b076072df6f7ea46737854470", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "emacs-overlay", - "type": "github" - } - }, - "flake-utils": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1689068808, - "narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "home-manager": { "inputs": { "nixpkgs": [ @@ -121,38 +65,6 @@ } }, "nixpkgs": { - "locked": { - "lastModified": 1690031011, - "narHash": "sha256-kzK0P4Smt7CL53YCdZCBbt9uBFFhE0iNvCki20etAf4=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "12303c652b881435065a98729eb7278313041e49", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-stable": { - "locked": { - "lastModified": 1690148897, - "narHash": "sha256-l/j/AX1d2K79EWslwgWR2+htkzCbtjKZsS5NbWXnhz4=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "ac1acba43b2f9db073943ff5ed883ce7e8a40a2c", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-23.05", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_2": { "locked": { "lastModified": 1690179384, "narHash": "sha256-+arbgqFTAtoeKtepW9wCnA0njCOyoiDFyl0Q0SBSOtE=", @@ -170,29 +82,13 @@ }, "root": { "inputs": { - "doom-emacs": "doom-emacs", "home-manager": "home-manager", "hyprland": "hyprland", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs", "tokyonight": "tokyonight", "wallpapers": "wallpapers" } }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, "tokyonight": { "flake": false, "locked": { diff --git a/flake.nix b/flake.nix index 6a5ea175..a9020392 100644 --- a/flake.nix +++ b/flake.nix @@ -11,7 +11,6 @@ url = "github:hyprwm/Hyprland"; inputs.nixpkgs.follows = "nixpkgs"; }; - doom-emacs.url = "git+https://git.xenia.me.uk/xenia/emacs.git"; wallpapers.url = "git+https://git.xenia.me.uk/xenia/wallpapers.git"; tokyonight = { url = "github:folke/tokyonight.nvim"; @@ -19,8 +18,7 @@ }; }; - outputs = { self, nixpkgs, home-manager, hyprland, doom-emacs, wallpapers - , tokyonight, }: + outputs = { self, nixpkgs, home-manager, hyprland, wallpapers, tokyonight, }: let shell = "zsh"; in { nixosConfigurations = let @@ -42,8 +40,7 @@ pkgs = import nixpkgs { inherit system; config.allowUnfree = true; - overlays = - [ waybar-experimental-overlay doom-emacs.outputs.overlay.default ]; + overlays = [ waybar-experimental-overlay ]; }; in { Legion = let hostname = "Legion"; @@ -88,10 +85,7 @@ pkgs = self.nixosConfigurations.${hostname}.pkgs; in home-manager.lib.homeManagerConfiguration { inherit pkgs extraSpecialArgs; - modules = [ - ./hosts/${hostname}/home.nix - doom-emacs.outputs.homeManagerModules.default - ]; + modules = [ ./hosts/${hostname}/home.nix ]; }; # Legacy home configurations "tux@Monarch" = let @@ -100,10 +94,7 @@ pkgs = nixpkgs.legacyPackages.${system}; in home-manager.lib.homeManagerConfiguration { inherit pkgs extraSpecialArgs; - modules = [ - ./hosts/${hostname}/home.nix - doom-emacs.outputs.homeManagerModules.default - ]; + modules = [ ./hosts/${hostname}/home.nix ]; }; }; }; diff --git a/home/emacs/default.nix b/home/emacs/default.nix new file mode 100644 index 00000000..65003fba --- /dev/null +++ b/home/emacs/default.nix @@ -0,0 +1,49 @@ +{ pkgs, ... }: + +{ + # Emacs server service + services.emacs = { + enable = true; + package = pkgs.emacs28NativeComp; + defaultEditor = true; + startWithUserSession = true; + client.enable = true; + }; + home.packages = with pkgs; [ + # Emacs dependencies + emacs28NativeComp + git + ripgrep + coreutils + cmake + fd + + # Language-specific requirements + ispell + sqlite + pandoc + python3 + gfortran + texlive.combined.scheme-medium + texlab + + # Formatters + nixfmt + beautysh + black + nodePackages.fixjson + fprettify + isort + shellharden + stylua + python3Packages.mdformat + + # LSP servers + nil + fortls + nodePackages.pyright + nodePackages.yaml-language-server + nodePackages.bash-language-server + shellcheck + ]; +} diff --git a/home/firefox/default.nix b/home/firefox/default.nix index ad1654b8..5df2dda4 100644 --- a/home/firefox/default.nix +++ b/home/firefox/default.nix @@ -1,9 +1,10 @@ -{pkgs, ...}: { +{ pkgs, ... }: { programs.firefox = { enable = true; profiles.default = { settings = { "app.shield.optoutstudies.enabled" = false; + "browser.startup.homepage" = "https://cloud.xenia.me.uk"; "browser.bookmarks.addedImportButton" = true; "browser.bookmarks.showMobileBookmarks" = true; "browser.toolbars.bookmarks.visibility" = "newtab"; @@ -36,28 +37,84 @@ search = { default = "DuckDuckGo"; force = true; - order = ["DuckDuckGo"]; + order = [ "DuckDuckGo" ]; engines = { "MyNixOS" = { - urls = [{template = "https://mynixos.com/search?q={searchTerms}";}]; - icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; - definedAliases = ["@np"]; + urls = + [{ template = "https://mynixos.com/search?q={searchTerms}"; }]; + icon = + "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; + definedAliases = [ "@np" ]; }; "NixOS Wiki" = { - urls = [{template = "https://nixos.wiki/index.php?search={searchTerms}";}]; - icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; - definedAliases = ["@nw"]; + urls = [{ + template = "https://nixos.wiki/index.php?search={searchTerms}"; + }]; + icon = + "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; + definedAliases = [ "@nw" ]; }; "Arch Wiki" = { - urls = [{template = "https://wiki.archlinux.org/index.php?search={searchTerms}";}]; - definedAliases = ["@aw"]; + urls = [{ + template = + "https://wiki.archlinux.org/index.php?search={searchTerms}"; + }]; + definedAliases = [ "@aw" ]; }; "GitHub" = { - urls = [{template = "https://github.com/search?q={searchTerms}";}]; - definedAliases = ["@gh"]; + urls = + [{ template = "https://github.com/search?q={searchTerms}"; }]; + definedAliases = [ "@gh" ]; }; }; }; + bookmarks = [{ + name = "toolbar"; + toolbar = true; + bookmarks = [ + { + name = "Wikipedia"; + tags = [ "wiki" ]; + keyword = "wiki"; + url = "https://en.wikipedia.org"; + } + { + name = "NixOS Wiki"; + tags = [ "wiki" "nix" ]; + url = "https://nixos.wiki/"; + } + { + name = "Arch Wiki"; + tags = [ "wiki" "arch" ]; + url = "https://wiki.archlinux.org/"; + } + { + name = "Nextcloud"; + tags = [ "cloud" "storage" "federation" "xenia" ]; + url = "https://cloud.xenia.me.uk"; + } + { + name = "Proton Mail"; + tags = [ "email" ]; + url = "https://mail.proton.me"; + } + { + name = "Gitea"; + tags = [ "git" "source" "xenia" ]; + url = "https://git.xenia.me.uk"; + } + { + name = "GitHub"; + tags = [ "git" "source" ]; + url = "https://github.com"; + } + { + name = "GitLab"; + tags = [ "git" "source" ]; + url = "https://gitlab.com"; + } + ]; + }]; }; }; } diff --git a/home/firefox/personal.nix b/home/firefox/personal.nix deleted file mode 100644 index f469f83c..00000000 --- a/home/firefox/personal.nix +++ /dev/null @@ -1,55 +0,0 @@ -{...}: { - imports = [./default.nix]; - programs.firefox.profiles.default = { - settings."browser.startup.homepage" = "https://cloud.xenia.me.uk"; - bookmarks = [ - { - name = "toolbar"; - toolbar = true; - bookmarks = [ - { - name = "Wikipedia"; - tags = ["wiki"]; - keyword = "wiki"; - url = "https://en.wikipedia.org"; - } - { - name = "NixOS Wiki"; - tags = ["wiki" "nix"]; - url = "https://nixos.wiki/"; - } - { - name = "Arch Wiki"; - tags = ["wiki" "arch"]; - url = "https://wiki.archlinux.org/"; - } - { - name = "Nextcloud"; - tags = ["cloud" "storage" "federation" "xenia"]; - url = "https://cloud.xenia.me.uk"; - } - { - name = "Proton Mail"; - tags = ["email"]; - url = "https://mail.proton.me"; - } - { - name = "Gitea"; - tags = ["git" "source" "xenia"]; - url = "https://git.xenia.me.uk"; - } - { - name = "GitHub"; - tags = ["git" "source"]; - url = "https://github.com"; - } - { - name = "GitLab"; - tags = ["git" "source"]; - url = "https://gitlab.com"; - } - ]; - } - ]; - }; -} diff --git a/home/firefox/work.nix b/home/firefox/work.nix deleted file mode 100644 index ee04acc3..00000000 --- a/home/firefox/work.nix +++ /dev/null @@ -1,127 +0,0 @@ -{...}: { - imports = [./default.nix]; - programs.firefox.profiles.default = { - settings = { - "browser.startup.homepage" = "https://nucleus.ukaea.uk"; - }; - search.engines."JET Pulse" = { - urls = [{template = "https://data.jet.uk/dashboard/pulses/{searchTerms}/overview";}]; - definedAliases = ["@p"]; - }; - search.engines."JET Dashboard" = { - urls = [{template = "https://data.jet.uk/dashboard/sessions/?search_for={searchTerms}";}]; - definedAliases = ["@jd"]; - }; - bookmarks = [ - { - name = "toolbar"; - toolbar = true; - bookmarks = [ - { - name = "Gitea"; - tags = ["git" "source" "xenia"]; - url = "https://git.xenia.me.uk"; - } - { - name = "GitHub"; - tags = ["git" "source"]; - url = "https://github.com"; - } - { - name = "GitLab"; - tags = ["git" "source"]; - url = "https://gitlab.com"; - } - { - name = "UKAEA GitLab"; - tags = ["git" "source"]; - url = "https://git.ccfe.ac.uk"; - } - { - name = "Nucleus"; - url = "https://nucleus.ukaea.uk"; - } - { - name = "U4BW"; - tags = ["admin"]; - url = "https://ubw.unit4cloud.com/uk_aea_prod_web"; - } - { - name = "Marval"; - tags = ["support" "helpdesk"]; - url = "https://marval.service.ukaea.uk/MSMSelfService/Index.aspx"; - } - { - name = "JET homepage"; - tags = ["JET"]; - url = "w3.jet.uk"; - } - { - name = "Physics Summary"; - tags = ["JET" "operations"]; - url = "https://users.euro-fusion.org/pages/physics-summary/LatestSession.php"; - } - { - name = "JSPO"; - tags = ["JET" "operations"]; - url = "https://www.jspo.jet.uk/"; - } - { - name = "J2 Roster"; - url = "https://apps.powerapps.com/play/e/default-c6ac664b-ae27-4d5d-b4e6-bb5717196fc7/a/c403a9ad-95e0-47b7-8c82-752b22a6d6f5?tenantId=c6ac664b-ae27-4d5d-b4e6-bb5717196fc7&source=portal"; - } - { - name = "OpenWikis"; - bookmarks = [ - { - name = "Home page"; - tags = ["JET" "operations" "wiki"]; - url = "https://wiki.jetdata.eu/open/index.php?title=Main_Page"; - } - { - name = "Spectroscopy Group"; - tags = ["JET" "operations" "wiki"]; - url = "https://wiki.jetdata.eu/open/index.php?title=Spectroscopy_Group:index"; - } - { - name = "KS5"; - tags = ["JET" "operations" "wiki"]; - url = "https://wiki.jetdata.eu/open/index.php?title=CXS:Topic3"; - } - { - name = "KT3"; - tags = ["JET" "operations" "wiki"]; - url = "https://wiki.jetdata.eu/open/index.php?title=KT3_Journals"; - } - { - name = "DCO Wiki"; - tags = ["JET" "operations" "wiki"]; - url = "https://wiki.jetdata.eu/open/index.php?title=Diagnostic_Coordinator_Wiki"; - } - ]; - } - { - name = "JET Mimics"; - bookmarks = [ - { - name = "Countdown"; - tags = ["JET" "operations" "mimics"]; - url = "http://webmimic.jet.uk/mc/codas/countdown"; - } - { - name = "KS5"; - tags = ["JET" "operations" "mimics"]; - url = "http://webmimic.jet.uk/DG/codas/ks5.mim.html"; - } - { - name = "KT3"; - tags = ["JET" "operations" "mimics"]; - url = "http://webmimic.jet.uk/DG/codas/kt3.mim.html"; - } - ]; - } - ]; - } - ]; - }; -} diff --git a/home/hyprland/hyprland.conf b/home/hyprland/hyprland.conf index b44a7d21..8215649e 100644 --- a/home/hyprland/hyprland.conf +++ b/home/hyprland/hyprland.conf @@ -120,6 +120,7 @@ windowrule = workspace 2,(firefox) windowrule = workspace 2,(chromium-browser) windowrulev2 = float,title:(File|Picture-in-Picture),class:(firefox) windowrulev2 = pin,title:(File|Picture-in-Picture),class:(firefox) +windowrulev2 = float,title:^(about:blank).*,class:(chromium-browser) # 3: files bind = SUPER, F, workspace, 3 diff --git a/hosts/Monarch/home.nix b/hosts/Monarch/home.nix index 14f15a5c..e2af695d 100644 --- a/hosts/Monarch/home.nix +++ b/hosts/Monarch/home.nix @@ -1,4 +1,5 @@ -{pkgs, ...}: let +{ pkgs, ... }: +let username = "tux"; homeDirectory = "/Users/${username}"; in { @@ -7,13 +8,13 @@ in { ../../home/git/personal.nix ../../home/ssh/personal.nix ../../home/tui - ../../home/wezterm ../../home/emacs + ../../home/wezterm ]; home = { inherit username homeDirectory; stateVersion = "23.05"; - packages = with pkgs; [gcc]; + packages = with pkgs; [ gcc ]; }; programs = { home-manager.enable = true; diff --git a/hosts/Ronin/home.nix b/hosts/Ronin/home.nix index 7725a17e..5190af06 100644 --- a/hosts/Ronin/home.nix +++ b/hosts/Ronin/home.nix @@ -14,6 +14,7 @@ in { ../../home/ssh/work.nix ../../home/tui ../../home/hyprland + ../../home/emacs ../../home/wezterm ]; home = { diff --git a/hosts/common.nix b/hosts/common.nix index 4034ee9a..a0e6d51d 100644 --- a/hosts/common.nix +++ b/hosts/common.nix @@ -20,13 +20,6 @@ in { system.autoUpgrade.flake = flakeURL; environment = { localBinInPath = true; - shellAliases = { - ll = "ls -laF"; - nou = "sudo nixos-rebuild switch --flake \"${flakeURL}\""; - nour = "nou --refresh"; - hms = "${pkgs.home-manager}/bin/home-manager switch --flake \"${flakeURL}\""; - hmsr = "hms --refresh"; - }; systemPackages = with pkgs; [distrobox]; }; networking.networkmanager.enable = true; diff --git a/hosts/desktop.nix b/hosts/desktop.nix index 12e4e1b6..275909e5 100644 --- a/hosts/desktop.nix +++ b/hosts/desktop.nix @@ -14,7 +14,6 @@ grim slurp signal-desktop - libreoffice zotero ]; security = {