diff options
author | ene <ene@sils.li> | 2023-02-11 16:48:09 +0100 |
---|---|---|
committer | ene <ene@sils.li> | 2023-02-12 17:47:40 +0100 |
commit | c0717cd0fc05dd7fc88e6941923570b00ed55f18 (patch) | |
tree | 42564a13449ce41033b8208047f8481bbf8cef45 /home-manager | |
parent | Feat(home-manager): Make the home configuration better (diff) | |
download | nixos-config-c0717cd0fc05dd7fc88e6941923570b00ed55f18.tar.gz nixos-config-c0717cd0fc05dd7fc88e6941923570b00ed55f18.zip |
Fix(home-manager): Import home-manager correctly
Diffstat (limited to '')
-rw-r--r-- | home-manager/alacritty/default.nix | 2 | ||||
-rw-r--r-- | home-manager/cups/default.nix | 2 | ||||
-rw-r--r-- | home-manager/default.nix | 55 | ||||
-rw-r--r-- | home-manager/firefox/default.nix | 232 | ||||
-rw-r--r-- | home-manager/gammastep/default.nix | 2 | ||||
-rw-r--r-- | home-manager/git/default.nix | 2 | ||||
-rw-r--r-- | home-manager/grades/default.nix | 2 | ||||
-rw-r--r-- | home-manager/gtk/default.nix | 2 | ||||
-rw-r--r-- | home-manager/home.nix | 24 | ||||
-rw-r--r-- | home-manager/keepassxc/default.nix | 2 | ||||
-rw-r--r-- | home-manager/latexindent/default.nix | 4 | ||||
-rw-r--r-- | home-manager/less/default.nix | 2 | ||||
-rw-r--r-- | home-manager/lf/default.nix | 6 | ||||
-rw-r--r-- | home-manager/mako/default.nix | 2 | ||||
-rw-r--r-- | home-manager/mpd/default.nix | 2 |
15 files changed, 157 insertions, 184 deletions
diff --git a/home-manager/alacritty/default.nix b/home-manager/alacritty/default.nix index 1bb6afac..2a18b0d9 100644 --- a/home-manager/alacritty/default.nix +++ b/home-manager/alacritty/default.nix @@ -1,5 +1,5 @@ {config, ...}: { - home-manager.users.soispha.programs.alacritty = { +programs.alacritty = { enable = true; settings = { env = { diff --git a/home-manager/cups/default.nix b/home-manager/cups/default.nix index f86fa806..4fef0a9c 100644 --- a/home-manager/cups/default.nix +++ b/home-manager/cups/default.nix @@ -1,3 +1,3 @@ {config, ...}: { - home-manager.xdg.configFile."cups/lpoptions".text = "Default Brother\n"; +xdg.configFile."cups/lpoptions".text = "Default Brother\n"; } diff --git a/home-manager/default.nix b/home-manager/default.nix index e6983ee4..d559d35b 100644 --- a/home-manager/default.nix +++ b/home-manager/default.nix @@ -12,38 +12,35 @@ configHome = "${homeDirectory}/.config"; in { imports = [ - home-manager.nixosModules.home-manager + #home-manager.nixosModules.home-manager - ./alacritty - ./cups - ./firefox - ./gammastep - ./git - ./grades - ./gtk - ./keepassxc - ./latexindent - ./less - ./lf - ./mako - ./mpd + ./alacritty + ./cups + ./firefox + ./gammastep + ./git + ./grades + ./gtk + ./keepassxc + ./latexindent + ./less + ./lf + ./mako + ./mpd ]; + home = { + inherit username homeDirectory; + stateVersion = "23.05"; - home-manager.users.soispha = { - home = { - inherit username homeDirectory; - stateVersion = "23.05"; - - # TODO - sessionVariables = { - DISPLAY = ":0"; - EDITOR = "nvim"; - }; - packages = []; - }; - xdg = { - inherit configHome; - enable = true; + # TODO + sessionVariables = { + DISPLAY = ":0"; + EDITOR = "nvim"; }; + packages = []; + }; + xdg = { + inherit configHome; + enable = true; }; } diff --git a/home-manager/firefox/default.nix b/home-manager/firefox/default.nix index 5e9b9632..af627a21 100644 --- a/home-manager/firefox/default.nix +++ b/home-manager/firefox/default.nix @@ -4,12 +4,14 @@ pkgs, lib, stdenv, + strip_js_comments, + user_js, ... }: let user_js_override = "./settings/override.js"; - user_js = lib.runCommand "user.js" {} '' + user_js = pkgs.runCommand "user.js" {} '' mkdir $out; - ${config.inputs.strip_js_comments}/bin ${config.inputs.user_js} > $out/user.js; + ${strip_js_comments}/bin "${user_js}/user.js" > $out/user.js; cat ${user_js_override} >> $out/user.js; sed 's/user_pref(\(.*\)",\(.*\));/\1" = \2;/' $out/user.js > $out/user.nix; ''; @@ -96,125 +98,123 @@ #"security.webauth.webauthn_enable_softtoken" = true; #"security.webauth.webauthn_enable_usbtoken" = true; } - builtins.readFile - "${user_js}/user.nix"; + (builtins.readFile + "${user_js}/user.nix"); in { - home-manager.users.${config.soisha.user.username} = { - packages = [ - pkgs.firefox-wayland - ]; - sessionVariables = { - # improve touch input & make scrolling smother - MOZ_USE_XINPUT2 = "1"; - # improve wayland support - MOZ_ENABLE_WAYLAND = 1; - XDG_CURRENT_DESKTOP = "river"; - }; - xdg.mimeApps = { - enable = true; - defaultApplications = { - "text/html" = ["firefox.desktop"]; - "x-scheme-handler/http" = ["firefox.desktop"]; - "x-scheme-handler/https" = ["firefox.desktop"]; - "x-scheme-handler/about" = ["firefox.desktop"]; - "x-scheme-handler/unknown" = ["firefox.desktop"]; - }; + home.packages = [ + pkgs.firefox-wayland + ]; + sessionVariables = { + # improve touch input & make scrolling smother + MOZ_USE_XINPUT2 = "1"; + # improve wayland support + MOZ_ENABLE_WAYLAND = 1; + XDG_CURRENT_DESKTOP = "river"; + }; + xdg.mimeApps = { + enable = true; + defaultApplications = { + "text/html" = ["firefox.desktop"]; + "x-scheme-handler/http" = ["firefox.desktop"]; + "x-scheme-handler/https" = ["firefox.desktop"]; + "x-scheme-handler/about" = ["firefox.desktop"]; + "x-scheme-handler/unknown" = ["firefox.desktop"]; }; - programs.firefox = { - enable = true; - package = pkgs.firefox; - extensions = builtins.map buildFirefoxXpiAddon (lib.attrValues (lib.importJSON ./extensions.json)); - profile."default" = { - isDefault = true; - id = 0; - name = "default"; - - userChrome = builtins.readFile "./chrome/userChrome.css"; - - search = { - default = "Brave Search"; - force = true; - - engines = { - "Brave Search" = { - urls = [{template = "https://search.brave.com/search?q={searchTerms}";}]; - iconUpdateURL = "https://cdn.search.brave.com/serp/v1/static/brand/8eabe183f0d1f2cb3e2916b7b20c310efd196d740c8cecd341732fcd396fb665-apple-touch-icon.png"; - updateInterval = 24 * 60 * 60 * 1000; # every day - definedAliases = ["@bs"]; - }; - - "Nix Packages" = { - urls = [ - { - template = "https://search.nixos.org/packages"; - params = [ - { - name = "type"; - value = "packages"; - } - { - name = "query"; - value = "{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}";}]; - iconUpdateURL = "https://nixos.wiki/favicon.png"; - updateInterval = 24 * 60 * 60 * 1000; # every day - definedAliases = ["@nw"]; - }; - "Bing".metaData.hidden = true; - "Google".metaData.hidden = true; - "Amazon.de".metaData.hidden = true; + }; + programs.firefox = { + enable = true; + package = pkgs.firefox; + extensions = builtins.map buildFirefoxXpiAddon (lib.attrValues (lib.importJSON ./extensions.json)); + profile."default" = { + isDefault = true; + id = 0; + name = "default"; + + userChrome = builtins.readFile "./chrome/userChrome.css"; + + search = { + default = "Brave Search"; + force = true; + + engines = { + "Brave Search" = { + urls = [{template = "https://search.brave.com/search?q={searchTerms}";}]; + iconUpdateURL = "https://cdn.search.brave.com/serp/v1/static/brand/8eabe183f0d1f2cb3e2916b7b20c310efd196d740c8cecd341732fcd396fb665-apple-touch-icon.png"; + updateInterval = 24 * 60 * 60 * 1000; # every day + definedAliases = ["@bs"]; }; - }; - bookmarks = [ - { - name = "Rust::std"; - # TODO - url = "file:///home/dt/.local/share/rustup/toolchains/stable-x86_64-unknown-linux-gnu/share/doc/rust/html/std/all.html"; - } - - { - name = "Feed - Piped"; - url = "https://piped.kavin.rocks/feed"; - } - - { - name = "DeepL Translate"; - url = "https://www.deepl.com/translator#en/de/test"; - } - - { - name = "Google Scholar"; - url = "https://scholar.google.com/"; - } - - { - name = "ArchWiki"; - url = "https://wiki.archlinux.org/"; - } - - { - name = "Arch Package "; - url = "https://archlinux.org/packages/"; - } - - { - name = "layout.css.devPixelsPerPx"; - url = "about:config"; - } - ]; - inherit settings; + "Nix Packages" = { + urls = [ + { + template = "https://search.nixos.org/packages"; + params = [ + { + name = "type"; + value = "packages"; + } + { + name = "query"; + value = "{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}";}]; + iconUpdateURL = "https://nixos.wiki/favicon.png"; + updateInterval = 24 * 60 * 60 * 1000; # every day + definedAliases = ["@nw"]; + }; + "Bing".metaData.hidden = true; + "Google".metaData.hidden = true; + "Amazon.de".metaData.hidden = true; + }; }; + + bookmarks = [ + { + name = "Rust::std"; + # TODO + url = "file:///home/dt/.local/share/rustup/toolchains/stable-x86_64-unknown-linux-gnu/share/doc/rust/html/std/all.html"; + } + + { + name = "Feed - Piped"; + url = "https://piped.kavin.rocks/feed"; + } + + { + name = "DeepL Translate"; + url = "https://www.deepl.com/translator#en/de/test"; + } + + { + name = "Google Scholar"; + url = "https://scholar.google.com/"; + } + + { + name = "ArchWiki"; + url = "https://wiki.archlinux.org/"; + } + + { + name = "Arch Package "; + url = "https://archlinux.org/packages/"; + } + + { + name = "layout.css.devPixelsPerPx"; + url = "about:config"; + } + ]; + inherit settings; }; }; } diff --git a/home-manager/gammastep/default.nix b/home-manager/gammastep/default.nix index 75c5630f..8ed5d54c 100644 --- a/home-manager/gammastep/default.nix +++ b/home-manager/gammastep/default.nix @@ -1,5 +1,5 @@ {config, ...}: { - home-manager.services.gammastep = { + services.gammastep = { enable = true; settings = { general = { diff --git a/home-manager/git/default.nix b/home-manager/git/default.nix index 179c449b..667bb206 100644 --- a/home-manager/git/default.nix +++ b/home-manager/git/default.nix @@ -90,7 +90,7 @@ }; }; in { - home-manager.programs.git = { + programs.git = { enable = true; #package = pkgs.gitAndTools.gitFull; # TODO for git send-email support aliases = { diff --git a/home-manager/grades/default.nix b/home-manager/grades/default.nix index 8cca9640..a63c6320 100644 --- a/home-manager/grades/default.nix +++ b/home-manager/grades/default.nix @@ -1,5 +1,5 @@ {config, ...}: { - home-manager.xdg.configFile."grades/config.yaml" = { + xdg.configFile."grades/config.yaml" = { enable = true; target = "grades/config.yaml"; source = "./config.yaml"; diff --git a/home-manager/gtk/default.nix b/home-manager/gtk/default.nix index 52393231..de78e663 100644 --- a/home-manager/gtk/default.nix +++ b/home-manager/gtk/default.nix @@ -5,7 +5,7 @@ stdenv, ... }: { - home-manager.gkt = { + programs.gkt = { enable = true; theme = { package = pkgs.nordic; diff --git a/home-manager/home.nix b/home-manager/home.nix deleted file mode 100644 index 574d3623..00000000 --- a/home-manager/home.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ - home-manager, - pkgs, - ... -}: let - imports = [ -#homeage.homeManagerModules.homeage -#neovim-flake.nixosModules.${system}.hm - ./default.nix - ]; - - mkHome = _: ( - home-manager.lib.homeManagerConfiguration { - inherit pkgs; - - extraSpecialArgs = { - }; - - modules = [{inherit imports;}]; - } - ); -in { - home = mkHome {}; -} diff --git a/home-manager/keepassxc/default.nix b/home-manager/keepassxc/default.nix index dfe89e35..3cc7ae1a 100644 --- a/home-manager/keepassxc/default.nix +++ b/home-manager/keepassxc/default.nix @@ -3,7 +3,7 @@ pkgs, ... }: { - home-manager.xdg.configFile."keepassxc/keepassxc.ini" = { + xdg.configFile."keepassxc/keepassxc.ini" = { target = "keepassxc/keepassxc.ini"; source = "./keepasxc.ini"; }; diff --git a/home-manager/latexindent/default.nix b/home-manager/latexindent/default.nix index 657382ca..fabf4bd3 100644 --- a/home-manager/latexindent/default.nix +++ b/home-manager/latexindent/default.nix @@ -3,11 +3,11 @@ pkgs, ... }: { - home-manager.xdg.configFile."latexindent/indentconfig.yaml" = { + xdg.configFile."latexindent/indentconfig.yaml" = { target = "latexindent/indentconfig.yaml"; source = "./indentconfig.yaml"; }; - home-manager.xdg.configFile."latexindent/mysettings.yaml" = { + xdg.configFile."latexindent/mysettings.yaml" = { target = "latexindent/mysettings.yaml"; source = "./mysettings.yaml"; }; diff --git a/home-manager/less/default.nix b/home-manager/less/default.nix index 052f736f..c9e74ecc 100644 --- a/home-manager/less/default.nix +++ b/home-manager/less/default.nix @@ -3,7 +3,7 @@ pkgs, ... }: { - home-manager.programs.less = { + programs.less = { enable = true; keys = '' t forw-line diff --git a/home-manager/lf/default.nix b/home-manager/lf/default.nix index fd8c4b39..364d839e 100644 --- a/home-manager/lf/default.nix +++ b/home-manager/lf/default.nix @@ -12,16 +12,16 @@ wait = file: "!{{" + builtins.readFile "${file}" + "}}"; # adds a prompt after the command has run in { - home-manager.xdg.configFile."lf/icons" = { + xdg.configFile."lf/icons" = { target = "lf/icons"; source = "./icons"; }; - home-manager.xdg.configFile."lf/colors" = { + xdg.configFile."lf/colors" = { target = "lf/colors"; source = "./colors"; }; - home-manager.programs.lf = { + programs.lf = { enable = true; commands = { diff --git a/home-manager/mako/default.nix b/home-manager/mako/default.nix index 30a11930..54989c66 100644 --- a/home-manager/mako/default.nix +++ b/home-manager/mako/default.nix @@ -3,7 +3,7 @@ pkgs, ... }: { - home-manager.programs.mako = { + programs.mako = { enable = true; backgroudColor = "#2e3440"; borderColor = "#88c0d0"; diff --git a/home-manager/mpd/default.nix b/home-manager/mpd/default.nix index 02b94d0e..99db3707 100644 --- a/home-manager/mpd/default.nix +++ b/home-manager/mpd/default.nix @@ -5,7 +5,7 @@ }: let dataDir = "$XDG_DATA_HOME/mpd"; in { - home-manager.services.mpd = { +services.mpd = { enable = true; inherit dataDir; musicDirectory = "~/media/music"; |