diff --git a/flake.nix b/flake.nix index 082409e..0a8feab 100644 --- a/flake.nix +++ b/flake.nix @@ -25,36 +25,23 @@ in rec { overlays = import ./overlays { inherit inputs; }; + nixosModules = import ./modules/nixos; + homeManagerModules = import ./modules/home-manager; + stablePkgs = nixpkgs-stable.legacyPackages."x86_64-linux"; nixosConfigurations = { trantor = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - specialArgs = { - # unstablePkgs = nixpkgs-unstable.legacyPackages."x86_64-linux"; - stablePkgs = nixpkgs-stable.legacyPackages."x86_64-linux"; - impermanence = impermanence; - }; - modules = [ - ./nixos/hosts/trantor - ./nixos/modules/common.nix - ./nixos/modules/desktop.nix + ./hosts/trantor home-manager.nixosModules.home-manager impermanence.nixosModules.impermanence ]; }; capibara = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - specialArgs = { - stablePkgs = nixpkgs-stable.legacyPackages."x86_64-linux"; - impermanence = impermanence; - }; - + specialArgs = { inherit stablePkgs impermanence inputs outputs; }; modules = [ - ./nixos/hosts/capibara - ./nixos/modules/common.nix - ./nixos/modules/desktop.nix + ./hosts/capibara nixos-hardware.nixosModules.lenovo-thinkpad-x230 home-manager.nixosModules.home-manager impermanence.nixosModules.impermanence @@ -64,33 +51,12 @@ homeConfigurations = { - "rilla@capibara" = home-manager.lib.homeManagerConfiguration { - pkgs = nixpkgs.legacyPackages.x86_64-linux; - extraSpecialArgs = { inherit inputs outputs; }; - modules = [ - ./home/hosts/capibara.nix - ./home/modules/common - ./home/modules/desktop-river - ./home/modules/theming - ]; - }; - - "rilla@trantor" = home-manager.lib.homeManagerConfiguration { - pkgs = nixpkgs.legacyPackages.x86_64-linux; - extraSpecialArgs = { inherit inputs outputs; }; - modules = [ - ./home/hosts/trantor.nix - ./home/modules/common - ./home/modules/desktop-river - ./home/modules/theming/trantor.nix - ]; - }; - "rilla@echidna" = home-manager.lib.homeManagerConfiguration { pkgs = nixpkgs.legacyPackages.x86_64-linux; extraSpecialArgs = { inherit inputs outputs; }; - modules = [ ./home/hosts/echidna.nix ]; + modules = [ ./hosts/echidna/home.nix ]; }; + }; }; } diff --git a/home/hosts/capibara.nix b/home/hosts/capibara.nix deleted file mode 100644 index 2d9b9d2..0000000 --- a/home/hosts/capibara.nix +++ /dev/null @@ -1,4 +0,0 @@ -{ inputs, outputs, lib, config, pkgs, ... }: - -{ -} diff --git a/home/hosts/echidna.nix b/home/hosts/echidna.nix deleted file mode 100644 index 54b1c27..0000000 --- a/home/hosts/echidna.nix +++ /dev/null @@ -1,90 +0,0 @@ -{ config, pkgs, ... }: - -{ - home.username = "rilla"; - home.homeDirectory = "/home/rilla"; - - home.stateVersion = "23.05"; - programs.home-manager.enable = true; - - nixpkgs.config = { allowUnfree = true; }; - - imports = [ - ../modules/cheat - ../modules/foot - ../modules/dav - ../modules/fonts - ../modules/git - ../modules/gpg - ../modules/lf - ../modules/mail - ../modules/neovim - ../modules/pass - ../modules/rss - ../modules/ssh - ../modules/tmux - ../modules/vitetris - ../modules/xdg - ../modules/zsh - ]; - - home.sessionVariables = { - EDITOR = "${pkgs.neovim}/bin/nvim"; - VISUAL = "${pkgs.neovim}/bin/nvim"; - BROWSER = "${pkgs.firefox}/bin/firefox"; - # OPENER = "todo"; # todo - TERMINAL = "${pkgs.alacritty}/bin/alacritty"; - CM_LAUNCHER = "rofi"; # for clipmenu - LEDGER_FILE = "${config.home.homeDirectory}/finance/2021.journal"; - }; - - home.packages = with pkgs; [ - R - ansible - bind.dnsutils - docker-compose - file - just - gnumake - html-tidy - htop - inetutils # telnet - j2cli - jq - killall - kubectl - libnotify - mosh - neofetch - pandoc - podman-compose - pv - ripgrep - sassc - screen - shellcheck - signify - unzip - wget - ]; - - programs.bat = { - enable = true; - config = { theme = "gruvbox-dark"; }; - }; - - programs.fzf = { - enable = true; - enableZshIntegration = true; - # defaultOptions = [ - # "--preview --preview 'bat --color=always --style=header,grid --line-range :300 {}'" - # ]; - tmux.enableShellIntegration = true; - }; - - programs.direnv = { - enable = true; - enableZshIntegration = true; - nix-direnv.enable = true; - }; -} diff --git a/home/hosts/trantor.nix b/home/hosts/trantor.nix deleted file mode 100644 index e6b062f..0000000 --- a/home/hosts/trantor.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ config, pkgs, ... }: - -{ - imports = [ - ./common.nix - ../modules/desktop-river - ../modules/theming/trantor.nix - ]; -} diff --git a/home/modules/browsers/default.nix b/home/modules/browsers/default.nix deleted file mode 100644 index 7b63c37..0000000 --- a/home/modules/browsers/default.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ config, pkgs, ... }: - -{ - # imports = [ ./firefox ]; - - home.packages = [ pkgs.librewolf pkgs.firefox pkgs.tor-browser-bundle-bin ]; - - programs.chromium = { - enable = true; - package = pkgs.ungoogled-chromium; - }; -} diff --git a/home/modules/browsers/firefox/default.nix b/home/modules/browsers/firefox/default.nix deleted file mode 100644 index 3e579a6..0000000 --- a/home/modules/browsers/firefox/default.nix +++ /dev/null @@ -1,61 +0,0 @@ -{ config, pkgs, ... }: - -{ - # nix-env -f '' -qaP -A nur.repos.rycee.firefox-addons - programs.firefox = { - enable = true; - # maybe enable tridactyl? - # nix-env -f '' -qaP -A nur.repos.rycee.firefox-addons - # extensions = with pkgs.nur.repos.rycee.firefox-addons; [ - # browserpass - # canvasblocker - # clearurls - # cookie-autodelete - # darkreader - # floccus - # foxyproxy-standard - # https-everywhere - # i-dont-care-about-cookies - # localcdn - # noscript - # privacy-possum - # privacy-redirect - # ublock-origin - # vimium - # # todo: AdNauseam, wallabagger, DownThemAll! Wayback Machine - # ]; - profiles = { - default = { - id = 0; - name = "default"; - isDefault = true; - settings = { - # change some values from arkenfox's defaults - "privacy.resistFingerprinting" = - false; # if true, this would the window size to rounded dimensions, which is too annoying on a tiling window manager - "extensions.pocket.enabled" = false; - "identity.fxaccounts.enabled" = false; - "browser.search.suggest.enabled" = true; - "browser.urlbar.suggest.searches" = true; - "keyword.enable" = true; - - # for Firefox-UI-Fix - "toolkit.legacyUserProfileCustomizations.stylesheets" = true; - "browser.proton.enabled" = true; - "svg.context-properties.content.enabled" = true; - "layout.css.backdrop-filter.enabled" = true; - "browser.compactmode.show" = true; - "browser.urlbar.suggest.calculator" = true; - - "browser.uidensity" = 1; - - # "browser.search.region" = "GB"; - # "browser.search.isUS" = false; - # "distribution.searchplugins.defaultLocale" = "en-GB"; - # "general.useragent.locale" = "en-GB"; - # "browser.bookmarks.showMobileBookmarks" = true; - }; - }; - }; - }; -} diff --git a/home/modules/common/default.nix b/home/modules/common/default.nix deleted file mode 100644 index 124c75b..0000000 --- a/home/modules/common/default.nix +++ /dev/null @@ -1,147 +0,0 @@ -{ inputs, outputs, lib, config, pkgs, ... }: - -{ - nixpkgs = { - overlays = [ - outputs.overlays.modifications - ]; - config = { - allowUnfree = true; - allowUnfreePredicate = (_: true); - }; - }; - - home = { - username = "rilla"; - homeDirectory = "/home/rilla"; - }; - - programs.home-manager.enable = true; - - imports = [ - # ./minidisc - ../arduino - ../browsers - ../cheat - ../dav - ../drawterm - ../fonts - ../foot - ../git - ../gotify - ../gpg - ../idasen - ../lf - ../mail - ../maker - ../mpd - ../msg - ../music - ../neovim - ../pass - ../rss - ../snapcast - ../sound - ../ssh - ../syncthing - ../tmux - ../vitetris - ../wallets - ../wine - ../xdg - ../zsh - ]; - - home.sessionVariables = { - BROWSER = "${pkgs.firefox}/bin/firefox"; - TERMINAL = "${pkgs.alacritty}/bin/alacritty"; - }; - - home.packages = with pkgs; [ - # calibre - R - acpi - android-tools - ansible - bind.dnsutils - # pyenv - docker-compose - file - gimp - gnumake - html-tidy - htop - inetutils # telnet - j2cli - john - jq - killall - kubectl - libnotify - libreoffice - lxqt.pcmanfm-qt - mosh - mpv - neofetch - pynitrokey - networkmanagerapplet - nextcloud-client - pandoc - podman-compose - pv - ripgrep - sassc - screen - shellcheck - signify - unzip - vagrant - virt-manager - virtiofsd - wget - ]; - - # services.kdeconnect = { - # enable = true; - # indicator = true; - # }; - - programs.bat = { - enable = true; - config = { theme = "gruvbox-dark"; }; - }; - - programs.fzf = { - enable = true; - enableZshIntegration = true; - # defaultOptions = [ - # "--preview --preview 'bat --color=always --style=header,grid --line-range :300 {}'" - # ]; - tmux.enableShellIntegration = true; - }; - - services.gnome-keyring = { - enable = true; - components = [ "secrets" ]; - }; - - services.nextcloud-client = { - enable = true; - startInBackground = true; - }; - - dconf.settings = { - "org/virt-manager/virt-manager/connections" = { - "autoconnect" = [ "qemu:///system" ]; - "uris" = [ "qemu:///system" ]; - }; - }; - - programs.direnv = { - enable = true; - enableZshIntegration = true; - nix-direnv.enable = true; - }; - - home.stateVersion = "22.11"; -} diff --git a/nixos/hosts/capibara/default.nix b/hosts/capibara/default.nix similarity index 87% rename from nixos/hosts/capibara/default.nix rename to hosts/capibara/default.nix index 064d5f5..dc325e2 100644 --- a/nixos/hosts/capibara/default.nix +++ b/hosts/capibara/default.nix @@ -1,32 +1,18 @@ -{ config, pkgs, ... }: +{ inputs, outputs, config, pkgs, ... }: -let - offline-backups = pkgs.writeScriptBin "offline-backups" '' - #!${pkgs.dash}/bin/dash - - set -xe - - for x in 0 1 2; do - ${pkgs.systemd}/bin/systemctl start "mnt-backups-''${x}.mount" - done && \ - /run/wrappers/bin/doas -u btrbk \ - ${pkgs.btrbk}/bin/btrbk \ - --config /etc/btrbk/offline-backups.conf \ - --progress \ - --verbose \ - "$@" - ''; - -in { + nixpkgs.hostPlatform = "x86_64-linux"; + imports = [ ./hardware-configuration.nix ./file-systems.nix + ./home-manager.nix + outputs.nixosModules.common + outputs.nixosModules.desktop ]; networking.networkmanager.wifi.macAddress = "CC:AF:78:75:29:32"; - nixpkgs.config.allowUnfree = true; programs.steam.enable = true; @@ -38,7 +24,7 @@ in # services.thermald.enable = true; services.tlp.enable = true; services.power-profiles-daemon.enable = false; - environment.systemPackages = with pkgs; [ powertop acpi offline-backups ]; + environment.systemPackages = with pkgs; [ powertop acpi ]; # todo: target and/or archive services.btrbk.instances = { diff --git a/nixos/hosts/capibara/file-systems.nix b/hosts/capibara/file-systems.nix similarity index 100% rename from nixos/hosts/capibara/file-systems.nix rename to hosts/capibara/file-systems.nix diff --git a/nixos/hosts/capibara/hardware-configuration.nix b/hosts/capibara/hardware-configuration.nix similarity index 100% rename from nixos/hosts/capibara/hardware-configuration.nix rename to hosts/capibara/hardware-configuration.nix diff --git a/hosts/capibara/home-manager.nix b/hosts/capibara/home-manager.nix new file mode 100644 index 0000000..b044230 --- /dev/null +++ b/hosts/capibara/home-manager.nix @@ -0,0 +1,19 @@ +{ inputs, outputs, config, pkgs, ... }: + +{ + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + extraSpecialArgs = { inherit inputs outputs; }; + users.rilla = { + home = { + packages = [ pkgs.offline-backups ]; + stateVersion = "22.11"; + }; + imports = [ + outputs.homeManagerModules.common + outputs.homeManagerModules.extra + ]; + }; + }; +} diff --git a/hosts/echidna/home.nix b/hosts/echidna/home.nix new file mode 100644 index 0000000..c9c0489 --- /dev/null +++ b/hosts/echidna/home.nix @@ -0,0 +1,18 @@ +{ inputs, outputs, config, pkgs, ... }: + +{ + nixpkgs = { + overlays = [ + outputs.overlays.additions + outputs.overlays.modifications + ]; + config = { + allowUnfree = true; + allowUnfreePredicate = (_: true); + }; + }; + + imports = [ outputs.homeManagerModules.common ]; + + home.stateVersion = "23.05"; +} diff --git a/nixos/hosts/trantor/default.nix b/hosts/trantor/default.nix similarity index 88% rename from nixos/hosts/trantor/default.nix rename to hosts/trantor/default.nix index 29449b8..3fdc87b 100644 --- a/nixos/hosts/trantor/default.nix +++ b/hosts/trantor/default.nix @@ -1,18 +1,18 @@ -{ config, pkgs, ... }: +{ inputs, outputs, config, pkgs, ... }: { + nixpkgs.hostPlatform = "x86_64-linux"; + imports = [ ./hardware-configuration.nix ./file-systems.nix - ]; - - home-manager.users.rilla.imports = [ - ../../../home/hosts/trantor.nix + ./home-manager.nix + outputs.nixosModules.common + outputs.nixosModules.desktop ]; networking.networkmanager.wifi.macAddress = "80:FA:5B:41:12:0F"; - nixpkgs.config.allowUnfree = true; programs.steam.enable = true; # todo: target and/or archive diff --git a/nixos/hosts/trantor/file-systems.nix b/hosts/trantor/file-systems.nix similarity index 100% rename from nixos/hosts/trantor/file-systems.nix rename to hosts/trantor/file-systems.nix diff --git a/nixos/hosts/trantor/hardware-configuration.nix b/hosts/trantor/hardware-configuration.nix similarity index 72% rename from nixos/hosts/trantor/hardware-configuration.nix rename to hosts/trantor/hardware-configuration.nix index c701109..7d41491 100644 --- a/nixos/hosts/trantor/hardware-configuration.nix +++ b/hosts/trantor/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, pkgs, modulesPath, ... }: { diff --git a/hosts/trantor/home-manager.nix b/hosts/trantor/home-manager.nix new file mode 100644 index 0000000..0efeb98 --- /dev/null +++ b/hosts/trantor/home-manager.nix @@ -0,0 +1,20 @@ +{ inputs, outputs, config, pkgs, ... }: + +{ + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + extraSpecialArgs = { inherit inputs outputs; }; + users.rilla = { + home = { + packages = [ pkgs.offline-backups ]; + stateVersion = "22.11"; + }; + imports = [ + outputs.homeManagerModules.common + outputs.homeManagerModules.extra + ]; + }; + }; +} + diff --git a/justfile b/justfile index ff717af..78f3a54 100644 --- a/justfile +++ b/justfile @@ -2,9 +2,7 @@ echidna: home-manager switch --flake .#rilla@echidna capibara: - doas nixos-rebuild switch --flake .#capibara && \ - home-manager switch --flake .#rilla@capibara + doas nixos-rebuild switch --flake .#capibara trantor: - doas nixos-rebuild switch --flake .#trantor && \ - home-manager switch --flake .#rilla@trantor + doas nixos-rebuild switch --flake .#trantor diff --git a/home/modules/alacritty/capibara.nix b/modules/home-manager/alacritty/capibara.nix similarity index 100% rename from home/modules/alacritty/capibara.nix rename to modules/home-manager/alacritty/capibara.nix diff --git a/home/modules/alacritty/common.nix b/modules/home-manager/alacritty/common.nix similarity index 100% rename from home/modules/alacritty/common.nix rename to modules/home-manager/alacritty/common.nix diff --git a/home/modules/alacritty/trantor.nix b/modules/home-manager/alacritty/trantor.nix similarity index 100% rename from home/modules/alacritty/trantor.nix rename to modules/home-manager/alacritty/trantor.nix diff --git a/home/modules/arduino/default.nix b/modules/home-manager/arduino/default.nix similarity index 100% rename from home/modules/arduino/default.nix rename to modules/home-manager/arduino/default.nix diff --git a/home/modules/barrier/default.nix b/modules/home-manager/barrier/default.nix similarity index 100% rename from home/modules/barrier/default.nix rename to modules/home-manager/barrier/default.nix diff --git a/modules/home-manager/browsers/default.nix b/modules/home-manager/browsers/default.nix new file mode 100644 index 0000000..8417234 --- /dev/null +++ b/modules/home-manager/browsers/default.nix @@ -0,0 +1,13 @@ +{ config, pkgs, ... }: + +{ + home.packages = [ pkgs.librewolf pkgs.tor-browser-bundle-bin ]; + + programs.firefox.enable = true; + home.sessionVariables.BROWSER = "${pkgs.firefox}/bin/firefox"; + + programs.chromium = { + enable = true; + package = pkgs.ungoogled-chromium; + }; +} diff --git a/home/modules/cheat/default.nix b/modules/home-manager/cheat/default.nix similarity index 100% rename from home/modules/cheat/default.nix rename to modules/home-manager/cheat/default.nix diff --git a/modules/home-manager/common/default.nix b/modules/home-manager/common/default.nix new file mode 100644 index 0000000..ad71828 --- /dev/null +++ b/modules/home-manager/common/default.nix @@ -0,0 +1,78 @@ +# common + +{ inputs, outputs, lib, config, pkgs, ... }: + +{ + home = { + username = "rilla"; + homeDirectory = "/home/rilla"; + }; + + programs.home-manager.enable = true; + + imports = [ + ../cheat + ../dav + ../fonts + ../foot + ../git + ../gpg + ../lf + ../mail + ../neovim + ../pass + ../rss + ../ssh + ../tmux + ../vitetris + ../xdg + ../zsh + ]; + + home.packages = with pkgs; [ + R + ansible + bind.dnsutils + docker-compose + file + just + gnumake + html-tidy + htop + inetutils # telnet + j2cli + jq + killall + kubectl + libnotify + mosh + neofetch + pandoc + podman-compose + pv + ripgrep + sassc + screen + shellcheck + signify + unzip + wget + ]; + + programs.bat = { + enable = true; + config = { theme = "gruvbox-dark"; }; + }; + + programs.fzf = { + enable = true; + enableZshIntegration = true; + tmux.enableShellIntegration = true; + }; + + programs.direnv = { + enable = true; + enableZshIntegration = true; + nix-direnv.enable = true; + }; +} diff --git a/home/modules/dav/davsync.nix b/modules/home-manager/dav/davsync.nix similarity index 100% rename from home/modules/dav/davsync.nix rename to modules/home-manager/dav/davsync.nix diff --git a/home/modules/dav/default.nix b/modules/home-manager/dav/default.nix similarity index 100% rename from home/modules/dav/default.nix rename to modules/home-manager/dav/default.nix diff --git a/modules/home-manager/default.nix b/modules/home-manager/default.nix new file mode 100644 index 0000000..9b21060 --- /dev/null +++ b/modules/home-manager/default.nix @@ -0,0 +1,43 @@ +{ + common = import ./common; + extra = import ./extra; + + alacritty = import ./alacritty; + arduino = import ./arduino; + barrier = import ./barrier; + browsers = import ./browsers; + cheat = import ./cheat; + dav = import ./dav; + default.txt = import ./default.txt; + desktop-river = import ./desktop-river; + desktop-xmonad = import ./desktop-xmonad; + drawterm = import ./drawterm; + fonts = import ./fonts; + foot = import ./foot; + gcloud = import ./gcloud; + git = import ./git; + gotify = import ./gotify; + gpg = import ./gpg; + idasen = import ./idasen; + lf = import ./lf; + mail = import ./mail; + maker = import ./maker; + minidisc = import ./minidisc; + mpd = import ./mpd; + msg = import ./msg; + music = import ./music; + neovim = import ./neovim; + pass = import ./pass; + rss = import ./rss; + snapcast = import ./snapcast; + sound = import ./sound; + ssh = import ./ssh; + syncthing = import ./syncthing; + theming = import ./theming; + tmux = import ./tmux; + vitetris = import ./vitetris; + wallets = import ./wallets; + wine = import ./wine; + xdg = import ./xdg; + zsh = import ./zsh; +} diff --git a/home/modules/desktop-river/bemenu.nix b/modules/home-manager/desktop-river/bemenu.nix similarity index 100% rename from home/modules/desktop-river/bemenu.nix rename to modules/home-manager/desktop-river/bemenu.nix diff --git a/home/modules/desktop-river/default.nix b/modules/home-manager/desktop-river/default.nix similarity index 100% rename from home/modules/desktop-river/default.nix rename to modules/home-manager/desktop-river/default.nix diff --git a/home/modules/desktop-river/init.nix b/modules/home-manager/desktop-river/init.nix similarity index 100% rename from home/modules/desktop-river/init.nix rename to modules/home-manager/desktop-river/init.nix diff --git a/home/modules/desktop-river/kanshi.nix b/modules/home-manager/desktop-river/kanshi.nix similarity index 100% rename from home/modules/desktop-river/kanshi.nix rename to modules/home-manager/desktop-river/kanshi.nix diff --git a/home/modules/desktop-river/kile/default.nix b/modules/home-manager/desktop-river/kile/default.nix similarity index 100% rename from home/modules/desktop-river/kile/default.nix rename to modules/home-manager/desktop-river/kile/default.nix diff --git a/home/modules/desktop-river/kile/layout.kl b/modules/home-manager/desktop-river/kile/layout.kl similarity index 100% rename from home/modules/desktop-river/kile/layout.kl rename to modules/home-manager/desktop-river/kile/layout.kl diff --git a/home/modules/desktop-river/mako.nix b/modules/home-manager/desktop-river/mako.nix similarity index 100% rename from home/modules/desktop-river/mako.nix rename to modules/home-manager/desktop-river/mako.nix diff --git a/home/modules/desktop-river/screenshot.nix b/modules/home-manager/desktop-river/screenshot.nix similarity index 100% rename from home/modules/desktop-river/screenshot.nix rename to modules/home-manager/desktop-river/screenshot.nix diff --git a/home/modules/desktop-river/swaybg.nix b/modules/home-manager/desktop-river/swaybg.nix similarity index 100% rename from home/modules/desktop-river/swaybg.nix rename to modules/home-manager/desktop-river/swaybg.nix diff --git a/home/modules/desktop-river/swaylock.nix b/modules/home-manager/desktop-river/swaylock.nix similarity index 100% rename from home/modules/desktop-river/swaylock.nix rename to modules/home-manager/desktop-river/swaylock.nix diff --git a/home/modules/desktop-river/waybar.nix b/modules/home-manager/desktop-river/waybar.nix similarity index 100% rename from home/modules/desktop-river/waybar.nix rename to modules/home-manager/desktop-river/waybar.nix diff --git a/home/modules/desktop-river/zathura.nix b/modules/home-manager/desktop-river/zathura.nix similarity index 100% rename from home/modules/desktop-river/zathura.nix rename to modules/home-manager/desktop-river/zathura.nix diff --git a/home/modules/desktop-xmonad/autorandr/capibara.nix b/modules/home-manager/desktop-xmonad/autorandr/capibara.nix similarity index 100% rename from home/modules/desktop-xmonad/autorandr/capibara.nix rename to modules/home-manager/desktop-xmonad/autorandr/capibara.nix diff --git a/home/modules/desktop-xmonad/autorandr/common.nix b/modules/home-manager/desktop-xmonad/autorandr/common.nix similarity index 100% rename from home/modules/desktop-xmonad/autorandr/common.nix rename to modules/home-manager/desktop-xmonad/autorandr/common.nix diff --git a/home/modules/desktop-xmonad/autorandr/trantor.nix b/modules/home-manager/desktop-xmonad/autorandr/trantor.nix similarity index 100% rename from home/modules/desktop-xmonad/autorandr/trantor.nix rename to modules/home-manager/desktop-xmonad/autorandr/trantor.nix diff --git a/home/modules/desktop-xmonad/capibara.nix b/modules/home-manager/desktop-xmonad/capibara.nix similarity index 100% rename from home/modules/desktop-xmonad/capibara.nix rename to modules/home-manager/desktop-xmonad/capibara.nix diff --git a/home/modules/desktop-xmonad/common.nix b/modules/home-manager/desktop-xmonad/common.nix similarity index 100% rename from home/modules/desktop-xmonad/common.nix rename to modules/home-manager/desktop-xmonad/common.nix diff --git a/home/modules/desktop-xmonad/desktop_config.nix b/modules/home-manager/desktop-xmonad/desktop_config.nix similarity index 100% rename from home/modules/desktop-xmonad/desktop_config.nix rename to modules/home-manager/desktop-xmonad/desktop_config.nix diff --git a/home/modules/desktop-xmonad/hmonitors.nix b/modules/home-manager/desktop-xmonad/hmonitors.nix similarity index 100% rename from home/modules/desktop-xmonad/hmonitors.nix rename to modules/home-manager/desktop-xmonad/hmonitors.nix diff --git a/home/modules/desktop-xmonad/icons/3cols.xpm b/modules/home-manager/desktop-xmonad/icons/3cols.xpm similarity index 100% rename from home/modules/desktop-xmonad/icons/3cols.xpm rename to modules/home-manager/desktop-xmonad/icons/3cols.xpm diff --git a/home/modules/desktop-xmonad/icons/float.xpm b/modules/home-manager/desktop-xmonad/icons/float.xpm similarity index 100% rename from home/modules/desktop-xmonad/icons/float.xpm rename to modules/home-manager/desktop-xmonad/icons/float.xpm diff --git a/home/modules/desktop-xmonad/icons/full.xpm b/modules/home-manager/desktop-xmonad/icons/full.xpm similarity index 100% rename from home/modules/desktop-xmonad/icons/full.xpm rename to modules/home-manager/desktop-xmonad/icons/full.xpm diff --git a/home/modules/desktop-xmonad/icons/grid.xpm b/modules/home-manager/desktop-xmonad/icons/grid.xpm similarity index 100% rename from home/modules/desktop-xmonad/icons/grid.xpm rename to modules/home-manager/desktop-xmonad/icons/grid.xpm diff --git a/home/modules/desktop-xmonad/icons/mtall.xpm b/modules/home-manager/desktop-xmonad/icons/mtall.xpm similarity index 100% rename from home/modules/desktop-xmonad/icons/mtall.xpm rename to modules/home-manager/desktop-xmonad/icons/mtall.xpm diff --git a/home/modules/desktop-xmonad/icons/tabs.xpm b/modules/home-manager/desktop-xmonad/icons/tabs.xpm similarity index 100% rename from home/modules/desktop-xmonad/icons/tabs.xpm rename to modules/home-manager/desktop-xmonad/icons/tabs.xpm diff --git a/home/modules/desktop-xmonad/icons/tall.xpm b/modules/home-manager/desktop-xmonad/icons/tall.xpm similarity index 100% rename from home/modules/desktop-xmonad/icons/tall.xpm rename to modules/home-manager/desktop-xmonad/icons/tall.xpm diff --git a/home/modules/desktop-xmonad/misc.nix b/modules/home-manager/desktop-xmonad/misc.nix similarity index 100% rename from home/modules/desktop-xmonad/misc.nix rename to modules/home-manager/desktop-xmonad/misc.nix diff --git a/home/modules/desktop-xmonad/obtoxmd.nix b/modules/home-manager/desktop-xmonad/obtoxmd.nix similarity index 100% rename from home/modules/desktop-xmonad/obtoxmd.nix rename to modules/home-manager/desktop-xmonad/obtoxmd.nix diff --git a/home/modules/desktop-xmonad/rofi.nix b/modules/home-manager/desktop-xmonad/rofi.nix similarity index 100% rename from home/modules/desktop-xmonad/rofi.nix rename to modules/home-manager/desktop-xmonad/rofi.nix diff --git a/home/modules/desktop-xmonad/trantor.nix b/modules/home-manager/desktop-xmonad/trantor.nix similarity index 100% rename from home/modules/desktop-xmonad/trantor.nix rename to modules/home-manager/desktop-xmonad/trantor.nix diff --git a/home/modules/desktop-xmonad/xmonad/lib/Bindings.hs b/modules/home-manager/desktop-xmonad/xmonad/lib/Bindings.hs similarity index 100% rename from home/modules/desktop-xmonad/xmonad/lib/Bindings.hs rename to modules/home-manager/desktop-xmonad/xmonad/lib/Bindings.hs diff --git a/home/modules/desktop-xmonad/xmonad/lib/DefaultConfig.hs b/modules/home-manager/desktop-xmonad/xmonad/lib/DefaultConfig.hs similarity index 100% rename from home/modules/desktop-xmonad/xmonad/lib/DefaultConfig.hs rename to modules/home-manager/desktop-xmonad/xmonad/lib/DefaultConfig.hs diff --git a/home/modules/desktop-xmonad/xmonad/lib/Layouts.hs b/modules/home-manager/desktop-xmonad/xmonad/lib/Layouts.hs similarity index 100% rename from home/modules/desktop-xmonad/xmonad/lib/Layouts.hs rename to modules/home-manager/desktop-xmonad/xmonad/lib/Layouts.hs diff --git a/home/modules/desktop-xmonad/xmonad/lib/ManageHook.hs b/modules/home-manager/desktop-xmonad/xmonad/lib/ManageHook.hs similarity index 100% rename from home/modules/desktop-xmonad/xmonad/lib/ManageHook.hs rename to modules/home-manager/desktop-xmonad/xmonad/lib/ManageHook.hs diff --git a/home/modules/desktop-xmonad/xmonad/lib/Polybar.hs b/modules/home-manager/desktop-xmonad/xmonad/lib/Polybar.hs similarity index 100% rename from home/modules/desktop-xmonad/xmonad/lib/Polybar.hs rename to modules/home-manager/desktop-xmonad/xmonad/lib/Polybar.hs diff --git a/home/modules/desktop-xmonad/xmonad/lib/Prompts.hs b/modules/home-manager/desktop-xmonad/xmonad/lib/Prompts.hs similarity index 100% rename from home/modules/desktop-xmonad/xmonad/lib/Prompts.hs rename to modules/home-manager/desktop-xmonad/xmonad/lib/Prompts.hs diff --git a/home/modules/desktop-xmonad/xmonad/lib/Utils.hs b/modules/home-manager/desktop-xmonad/xmonad/lib/Utils.hs similarity index 100% rename from home/modules/desktop-xmonad/xmonad/lib/Utils.hs rename to modules/home-manager/desktop-xmonad/xmonad/lib/Utils.hs diff --git a/home/modules/desktop-xmonad/xmonad/lib/Xmobar.hs b/modules/home-manager/desktop-xmonad/xmonad/lib/Xmobar.hs similarity index 100% rename from home/modules/desktop-xmonad/xmonad/lib/Xmobar.hs rename to modules/home-manager/desktop-xmonad/xmonad/lib/Xmobar.hs diff --git a/home/modules/desktop-xmonad/xmonad/xmonad.hs b/modules/home-manager/desktop-xmonad/xmonad/xmonad.hs similarity index 100% rename from home/modules/desktop-xmonad/xmonad/xmonad.hs rename to modules/home-manager/desktop-xmonad/xmonad/xmonad.hs diff --git a/home/modules/drawterm/default.nix b/modules/home-manager/drawterm/default.nix similarity index 100% rename from home/modules/drawterm/default.nix rename to modules/home-manager/drawterm/default.nix diff --git a/modules/home-manager/extra/default.nix b/modules/home-manager/extra/default.nix new file mode 100644 index 0000000..5829990 --- /dev/null +++ b/modules/home-manager/extra/default.nix @@ -0,0 +1,67 @@ +# extra + +{ inputs, outputs, lib, config, pkgs, ... }: + +{ + imports = [ + # ./minidisc + ../arduino + ../browsers + ../desktop-river + ../drawterm + ../gotify + ../idasen + ../maker + ../mpd + ../msg + ../music + ../snapcast + ../sound + ../syncthing + ../theming + ../wallets + ../wine + ]; + + home.packages = with pkgs; [ + # calibre + acpi + android-tools + # pyenv + gimp + john + libreoffice + lxqt.pcmanfm-qt + mpv + pynitrokey + networkmanagerapplet + nextcloud-client + vagrant + virt-manager + virtiofsd + ]; + + # services.kdeconnect = { + # enable = true; + # indicator = true; + # }; + + + + services.gnome-keyring = { + enable = true; + components = [ "secrets" ]; + }; + + services.nextcloud-client = { + enable = true; + startInBackground = true; + }; + + dconf.settings = { + "org/virt-manager/virt-manager/connections" = { + "autoconnect" = [ "qemu:///system" ]; + "uris" = [ "qemu:///system" ]; + }; + }; +} diff --git a/home/modules/fonts/default.nix b/modules/home-manager/fonts/default.nix similarity index 100% rename from home/modules/fonts/default.nix rename to modules/home-manager/fonts/default.nix diff --git a/home/modules/foot/default.nix b/modules/home-manager/foot/default.nix similarity index 95% rename from home/modules/foot/default.nix rename to modules/home-manager/foot/default.nix index 7f8c2a8..da57f71 100644 --- a/home/modules/foot/default.nix +++ b/modules/home-manager/foot/default.nix @@ -44,4 +44,5 @@ in }; }; + home.sessionVariables.TERMINAL = "${pkgs.foot}/bin/foot"; } diff --git a/home/modules/gcloud/default.nix b/modules/home-manager/gcloud/default.nix similarity index 100% rename from home/modules/gcloud/default.nix rename to modules/home-manager/gcloud/default.nix diff --git a/home/modules/git/default.nix b/modules/home-manager/git/default.nix similarity index 100% rename from home/modules/git/default.nix rename to modules/home-manager/git/default.nix diff --git a/home/modules/git/woodpecker-cli.nix b/modules/home-manager/git/woodpecker-cli.nix similarity index 100% rename from home/modules/git/woodpecker-cli.nix rename to modules/home-manager/git/woodpecker-cli.nix diff --git a/home/modules/gotify/default.nix b/modules/home-manager/gotify/default.nix similarity index 100% rename from home/modules/gotify/default.nix rename to modules/home-manager/gotify/default.nix diff --git a/home/modules/gpg/default.nix b/modules/home-manager/gpg/default.nix similarity index 100% rename from home/modules/gpg/default.nix rename to modules/home-manager/gpg/default.nix diff --git a/home/modules/idasen/default.nix b/modules/home-manager/idasen/default.nix similarity index 100% rename from home/modules/idasen/default.nix rename to modules/home-manager/idasen/default.nix diff --git a/home/modules/lf/cleaner.nix b/modules/home-manager/lf/cleaner.nix similarity index 100% rename from home/modules/lf/cleaner.nix rename to modules/home-manager/lf/cleaner.nix diff --git a/home/modules/lf/default.nix b/modules/home-manager/lf/default.nix similarity index 100% rename from home/modules/lf/default.nix rename to modules/home-manager/lf/default.nix diff --git a/home/modules/lf/lf-wrapper.nix b/modules/home-manager/lf/lf-wrapper.nix similarity index 100% rename from home/modules/lf/lf-wrapper.nix rename to modules/home-manager/lf/lf-wrapper.nix diff --git a/home/modules/lf/pv.nix b/modules/home-manager/lf/pv.nix similarity index 100% rename from home/modules/lf/pv.nix rename to modules/home-manager/lf/pv.nix diff --git a/home/modules/mail/default.nix b/modules/home-manager/mail/default.nix similarity index 100% rename from home/modules/mail/default.nix rename to modules/home-manager/mail/default.nix diff --git a/home/modules/mail/mailsync.nix b/modules/home-manager/mail/mailsync.nix similarity index 100% rename from home/modules/mail/mailsync.nix rename to modules/home-manager/mail/mailsync.nix diff --git a/home/modules/maker/default.nix b/modules/home-manager/maker/default.nix similarity index 100% rename from home/modules/maker/default.nix rename to modules/home-manager/maker/default.nix diff --git a/home/modules/minidisc/atracdenc.nix b/modules/home-manager/minidisc/atracdenc.nix similarity index 100% rename from home/modules/minidisc/atracdenc.nix rename to modules/home-manager/minidisc/atracdenc.nix diff --git a/home/modules/minidisc/default.nix b/modules/home-manager/minidisc/default.nix similarity index 100% rename from home/modules/minidisc/default.nix rename to modules/home-manager/minidisc/default.nix diff --git a/home/modules/minidisc/linux-minidisc.nix b/modules/home-manager/minidisc/linux-minidisc.nix similarity index 100% rename from home/modules/minidisc/linux-minidisc.nix rename to modules/home-manager/minidisc/linux-minidisc.nix diff --git a/home/modules/mpd/default.nix b/modules/home-manager/mpd/default.nix similarity index 100% rename from home/modules/mpd/default.nix rename to modules/home-manager/mpd/default.nix diff --git a/home/modules/msg/default.nix b/modules/home-manager/msg/default.nix similarity index 100% rename from home/modules/msg/default.nix rename to modules/home-manager/msg/default.nix diff --git a/home/modules/music/default.nix b/modules/home-manager/music/default.nix similarity index 100% rename from home/modules/music/default.nix rename to modules/home-manager/music/default.nix diff --git a/home/modules/neovim/default.nix b/modules/home-manager/neovim/default.nix similarity index 100% rename from home/modules/neovim/default.nix rename to modules/home-manager/neovim/default.nix diff --git a/home/modules/pass/default.nix b/modules/home-manager/pass/default.nix similarity index 100% rename from home/modules/pass/default.nix rename to modules/home-manager/pass/default.nix diff --git a/home/modules/rss/default.nix b/modules/home-manager/rss/default.nix similarity index 100% rename from home/modules/rss/default.nix rename to modules/home-manager/rss/default.nix diff --git a/home/modules/rss/rsssync.nix b/modules/home-manager/rss/rsssync.nix similarity index 100% rename from home/modules/rss/rsssync.nix rename to modules/home-manager/rss/rsssync.nix diff --git a/home/modules/snapcast/default.nix b/modules/home-manager/snapcast/default.nix similarity index 100% rename from home/modules/snapcast/default.nix rename to modules/home-manager/snapcast/default.nix diff --git a/home/modules/sound/default.nix b/modules/home-manager/sound/default.nix similarity index 100% rename from home/modules/sound/default.nix rename to modules/home-manager/sound/default.nix diff --git a/home/modules/ssh/default.nix b/modules/home-manager/ssh/default.nix similarity index 100% rename from home/modules/ssh/default.nix rename to modules/home-manager/ssh/default.nix diff --git a/home/modules/ssh/id_rsa_gpg-cert.pub b/modules/home-manager/ssh/id_rsa_gpg-cert.pub similarity index 100% rename from home/modules/ssh/id_rsa_gpg-cert.pub rename to modules/home-manager/ssh/id_rsa_gpg-cert.pub diff --git a/home/modules/ssh/id_rsa_gpg.pub b/modules/home-manager/ssh/id_rsa_gpg.pub similarity index 100% rename from home/modules/ssh/id_rsa_gpg.pub rename to modules/home-manager/ssh/id_rsa_gpg.pub diff --git a/home/modules/syncthing/default.nix b/modules/home-manager/syncthing/default.nix similarity index 100% rename from home/modules/syncthing/default.nix rename to modules/home-manager/syncthing/default.nix diff --git a/home/modules/theming/common.nix b/modules/home-manager/theming/common.nix similarity index 100% rename from home/modules/theming/common.nix rename to modules/home-manager/theming/common.nix diff --git a/home/modules/theming/default.nix b/modules/home-manager/theming/default.nix similarity index 100% rename from home/modules/theming/default.nix rename to modules/home-manager/theming/default.nix diff --git a/home/modules/theming/trantor.nix b/modules/home-manager/theming/trantor.nix similarity index 100% rename from home/modules/theming/trantor.nix rename to modules/home-manager/theming/trantor.nix diff --git a/home/modules/tmux/default.nix b/modules/home-manager/tmux/default.nix similarity index 100% rename from home/modules/tmux/default.nix rename to modules/home-manager/tmux/default.nix diff --git a/home/modules/vitetris/default.nix b/modules/home-manager/vitetris/default.nix similarity index 100% rename from home/modules/vitetris/default.nix rename to modules/home-manager/vitetris/default.nix diff --git a/home/modules/wallets/default.nix b/modules/home-manager/wallets/default.nix similarity index 100% rename from home/modules/wallets/default.nix rename to modules/home-manager/wallets/default.nix diff --git a/home/modules/wine/akai_lpk25_editor.nix b/modules/home-manager/wine/akai_lpk25_editor.nix similarity index 100% rename from home/modules/wine/akai_lpk25_editor.nix rename to modules/home-manager/wine/akai_lpk25_editor.nix diff --git a/home/modules/wine/default.nix b/modules/home-manager/wine/default.nix similarity index 100% rename from home/modules/wine/default.nix rename to modules/home-manager/wine/default.nix diff --git a/home/modules/xdg/default.nix b/modules/home-manager/xdg/default.nix similarity index 100% rename from home/modules/xdg/default.nix rename to modules/home-manager/xdg/default.nix diff --git a/home/modules/zsh/default.nix b/modules/home-manager/zsh/default.nix similarity index 100% rename from home/modules/zsh/default.nix rename to modules/home-manager/zsh/default.nix diff --git a/nixos/modules/common.nix b/modules/nixos/common.nix similarity index 90% rename from nixos/modules/common.nix rename to modules/nixos/common.nix index 41d1d5a..420d463 100644 --- a/nixos/modules/common.nix +++ b/modules/nixos/common.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ inputs, outputs, lib, config, pkgs, ... }: { nix = { @@ -13,6 +13,15 @@ }; }; + nixpkgs = { + overlays = [ + outputs.overlays.additions + outputs.overlays.modifications + # outputs.overlays.stable-packages + ]; + config.allowUnfree = true; + }; + time.timeZone = "Europe/Madrid"; # Select internationalisation properties. diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix new file mode 100644 index 0000000..5401411 --- /dev/null +++ b/modules/nixos/default.nix @@ -0,0 +1,4 @@ +{ + desktop = ./desktop.nix; + common = ./common.nix; +} diff --git a/nixos/modules/desktop.nix b/modules/nixos/desktop.nix similarity index 100% rename from nixos/modules/desktop.nix rename to modules/nixos/desktop.nix diff --git a/overlays/default.nix b/overlays/default.nix index fa55846..cd46513 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -1,6 +1,8 @@ { inputs, ... }: { + additions = final: prev: import ../pkgs { pkgs = final; }; + modifications = final: prev: { # # use lf fork with support for sixel graphics @@ -54,10 +56,11 @@ }; - stable-packages = final: prev: { - stable = import inputs.nixpkgs-stable { - system = final.system; - config.allowUnfree = true; - }; - }; + # stable-packages = final: prev: { + # stable = import inputs.nixpkgs-stable { + # system = final.system; + # config.allowUnfree = true; + # }; + # }; + } diff --git a/pkgs/default.nix b/pkgs/default.nix new file mode 100644 index 0000000..ee32b05 --- /dev/null +++ b/pkgs/default.nix @@ -0,0 +1,3 @@ +{ pkgs ? import {}}: rec { + offline-backups = pkgs.callPackage ./offline-backups {}; +} diff --git a/pkgs/offline-backups/default.nix b/pkgs/offline-backups/default.nix new file mode 100644 index 0000000..5c2badb --- /dev/null +++ b/pkgs/offline-backups/default.nix @@ -0,0 +1,17 @@ +{ pkgs, ... }: + +pkgs.writeShellApplication { + name = "offline-backups"; + runtimeInputs = [ "systemd" "btrbk" "doas" ]; + text = '' + for x in 0 1 2; do + systemctl start "mnt-backups-''${x}.mount" + done && \ + doas -u btrbk \ + btrbk \ + --config /etc/btrbk/offline-backups.conf \ + --progress \ + --verbose \ + "$@" + ''; +}