diff --git a/default.nix b/default.nix index a4468451..8285e38f 100644 --- a/default.nix +++ b/default.nix @@ -2,8 +2,9 @@ rec { sources = import ./nix/sources.nix; pkgs = import ./pkgs { inherit sources; }; witch = import ./lib/witch.nix { lib = pkgs.lib; }; + profiles = witch.modList { modulesDir = ./profiles; defaultFile = "nixos.nix"; }; - hosts = import ./lib/hosts.nix { inherit pkgs sources witch; }; + hosts = import ./lib/hosts.nix { inherit pkgs sources witch profiles; }; inherit (pkgs) lib; diff --git a/home.nix b/home.nix index 8c03dceb..c9280dd7 100644 --- a/home.nix +++ b/home.nix @@ -1,12 +1,6 @@ { pkgs, config, lib, witch, ... }: -let - homeModules = witch.modList { - modulesDir = ./profiles; - defaultFile = "home.nix"; - }; -in { - imports = lib.attrValues homeModules - ++ [ ./modules/home ./private/profile/home ]; +{ + imports = [ ./modules/home ./private/profile/home ]; } diff --git a/hosts/athame/nixos/default.nix b/hosts/athame/nixos/default.nix index a8338555..345ba4e1 100644 --- a/hosts/athame/nixos/default.nix +++ b/hosts/athame/nixos/default.nix @@ -1,8 +1,10 @@ -{ config, pkgs, ... }: +{ config, pkgs, profiles, ... }: { imports = [ ./hw.nix + # profiles + profiles.kat # host-specific services ./postgres.nix ./virtualhosts.nix @@ -20,7 +22,6 @@ ../../../services/matrix.nix ]; - deploy.profiles = [ "kat" ]; deploy.ssh.host = "athame.kittywit.ch"; boot.loader.grub.enable = true; diff --git a/hosts/samhain/nixos/default.nix b/hosts/samhain/nixos/default.nix index 73cb6707..a7fa3db8 100644 --- a/hosts/samhain/nixos/default.nix +++ b/hosts/samhain/nixos/default.nix @@ -1,8 +1,11 @@ -{ config, pkgs, lib, sources, witch, ... }: +{ config, pkgs, lib, profiles, sources, witch, ... }: { imports = [ ./hw.nix + profiles.gui + profiles.sway + profiles.kat ../../../services/zfs.nix ../../../services/nginx.nix ./thermal @@ -10,7 +13,6 @@ ./torrenting.nix ]; - deploy.profiles = [ "gui" "sway" "kat" "private" ]; deploy.groups = [ "gui" ]; deploy.ssh.host = "192.168.1.135"; diff --git a/hosts/yule/nixos/default.nix b/hosts/yule/nixos/default.nix index 614455bd..45929f9c 100644 --- a/hosts/yule/nixos/default.nix +++ b/hosts/yule/nixos/default.nix @@ -1,9 +1,15 @@ -{ config, pkgs, ... }: +{ config, pkgs, profiles, ... }: { - imports = [ ./hw.nix ../../../services/zfs.nix ]; + imports = [ + ./hw.nix + ../../../services/zfs.nix + profiles.gui + profiles.sway + profiles.kat + profiles.laptop + ]; - deploy.profiles = [ "gui" "sway" "kat" "laptop" "private" ]; deploy.groups = [ "gui" ]; deploy.ssh.host = "192.168.1.92"; diff --git a/lib/hosts.nix b/lib/hosts.nix index a38d72b1..e45a73ea 100644 --- a/lib/hosts.nix +++ b/lib/hosts.nix @@ -1,5 +1,4 @@ -{ pkgs, hostsDir ? ../hosts, privateHostsDir ? ../private/hosts -, commonImports ? [ ../nixos.nix ../modules/nixos ], pkgsPath ? ../pkgs +{ pkgs, hostsDir ? ../hosts, profiles, pkgsPath ? ../pkgs , sources ? { }, witch ? { } }: with pkgs.lib; @@ -12,10 +11,10 @@ rec { { config, ... }: { _module.args = { inherit hosts groups; }; imports = [ - (import (hostsDir + "/${hostName}/nixos")) - (import (privateHostsDir + "/${hostName}/nixos")) + ../nixos.nix + ../modules/nixos ../modules/nixos/deploy - ] ++ commonImports; + ]; networking = { inherit hostName; }; nixpkgs.pkgs = import pkgsPath { inherit (config.nixpkgs) config; @@ -32,7 +31,7 @@ rec { else { }) ]; - specialArgs = { inherit sources witch hostName; }; + specialArgs = { inherit sources profiles witch hostName; }; })) hostNames); groupNames = unique (concatLists diff --git a/modules/nixos/deploy/default.nix b/modules/nixos/deploy/default.nix index 31e686b6..49aa8529 100644 --- a/modules/nixos/deploy/default.nix +++ b/modules/nixos/deploy/default.nix @@ -38,10 +38,6 @@ in { type = types.bool; default = true; }; - profiles = mkOption { - type = with types; listOf str; - default = [ ]; - }; groups = mkOption { type = with types; listOf str; default = [ ]; @@ -50,9 +46,6 @@ in { }; config = mkIf cfg.enable { - deploy.profile = mkMerge (map (prof: { - ${if options ? deploy.profile.${prof} then prof else null} = true; - }) config.deploy.profiles); deploy.groups = [ "all" ]; system.build.deployScript = '' diff --git a/nixos.nix b/nixos.nix index 96eb8a58..e5fb9ff6 100644 --- a/nixos.nix +++ b/nixos.nix @@ -1,13 +1,13 @@ { pkgs, config, lib, sources, witch, options, hostName, ... }: -let - nixosModules = witch.modList { - modulesDir = ./profiles; - defaultFile = "nixos.nix"; - }; -in { +{ - imports = lib.attrValues nixosModules ++ [ ./private/profile/nixos ]; + imports = [ + (import (./hosts + "/${hostName}/nixos")) + (import (./private/hosts + "/${hostName}/nixos")) + ./profiles/common/nixos.nix + ./private/profile/nixos + ]; options.home-manager.users = lib.mkOption { type = lib.types.attrsOf (lib.types.submoduleWith { @@ -21,7 +21,6 @@ in { }; config = { - home-manager = { useUserPackages = true; useGlobalPkgs = true; @@ -29,10 +28,6 @@ in { users = { kat = { imports = [ ./home.nix (import (./hosts + "/${hostName}/home")) ]; - - deploy.profile = lib.mkMerge (map (prof: { - ${if options ? deploy.profile.${prof} then prof else null} = true; - }) config.deploy.profiles); }; }; }; diff --git a/profiles/common/nixos.nix b/profiles/common/nixos.nix index 2f8f08e5..182100ba 100644 --- a/profiles/common/nixos.nix +++ b/profiles/common/nixos.nix @@ -2,4 +2,6 @@ { imports = [ ./nixos ]; + + config = { home-manager.users.kat = { imports = [ ./home.nix ]; }; }; } diff --git a/profiles/gui/home.nix b/profiles/gui/home.nix index 18d2b645..aca44b65 100644 --- a/profiles/gui/home.nix +++ b/profiles/gui/home.nix @@ -3,5 +3,5 @@ { imports = [ ./home ]; - options = { deploy.profile.gui = lib.mkEnableOption "graphical system"; }; + options = { deploy.profile.gui = lib.mkEnableOption "graphical system" // { default = true; }; }; } diff --git a/profiles/gui/home/email.nix b/profiles/gui/home/email.nix index 0b9e4dde..a3c1c463 100644 --- a/profiles/gui/home/email.nix +++ b/profiles/gui/home/email.nix @@ -1,7 +1,6 @@ { config, lib, pkgs, ... }: { - config = lib.mkIf config.deploy.profile.gui { programs.notmuch = { enable = true; hooks = { preNew = "mbsync --all"; }; @@ -32,5 +31,4 @@ }; }; programs.vim.plugins = [ pkgs.arc.pkgs.vimPlugins.notmuch-vim ]; - }; } diff --git a/profiles/gui/home/firefox/default.nix b/profiles/gui/home/firefox/default.nix index 239d92fa..e71d7475 100644 --- a/profiles/gui/home/firefox/default.nix +++ b/profiles/gui/home/firefox/default.nix @@ -12,7 +12,6 @@ let "https://sync.kittywit.ch/token/1.0/sync/1.5"; }; in { - config = lib.mkIf config.deploy.profile.gui { programs.zsh.shellAliases = { ff-pm = "firefox --ProfileManager"; ff-main = "firefox -P main"; @@ -68,5 +67,4 @@ in { }; home.file.".config/tridactyl/tridactylrc".source = ./tridactylrc; - }; } diff --git a/profiles/gui/home/gpg.nix b/profiles/gui/home/gpg.nix index f500d4c8..915eebe9 100644 --- a/profiles/gui/home/gpg.nix +++ b/profiles/gui/home/gpg.nix @@ -1,7 +1,6 @@ { config, lib, pkgs, sources, ... }: { - config = lib.mkIf config.deploy.profile.gui { home.sessionVariables = { SSH_AUTH_SOCK = "\${SSH_AUTH_SOCK:-$(${pkgs.gnupg}/bin/gpgconf --list-dirs agent-ssh-socket)}"; @@ -19,5 +18,4 @@ "no-allow-external-cache" ]; }; - }; } diff --git a/profiles/gui/home/gtk.nix b/profiles/gui/home/gtk.nix index 965ebb1d..d74076da 100644 --- a/profiles/gui/home/gtk.nix +++ b/profiles/gui/home/gtk.nix @@ -1,7 +1,6 @@ { config, lib, pkgs, ... }: { - config = lib.mkIf config.deploy.profile.gui { gtk = { enable = true; iconTheme = { @@ -13,5 +12,4 @@ package = pkgs.arc-theme; }; }; - }; } diff --git a/profiles/gui/home/kitty.nix b/profiles/gui/home/kitty.nix index 78cc8a3f..5e7bd6d1 100644 --- a/profiles/gui/home/kitty.nix +++ b/profiles/gui/home/kitty.nix @@ -1,7 +1,6 @@ { config, lib, pkgs, witch, ... }: { - config = lib.mkIf config.deploy.profile.gui { programs.kitty = { enable = true; font.name = witch.style.font.name; @@ -21,5 +20,4 @@ # inactive_tab_foreground = "#665577"; }; # // witch.style.base16; }; - }; } diff --git a/profiles/gui/home/mpv.nix b/profiles/gui/home/mpv.nix index 3a4cd4a5..5d55c027 100644 --- a/profiles/gui/home/mpv.nix +++ b/profiles/gui/home/mpv.nix @@ -1,7 +1,6 @@ { config, lib, ... }: { - config = lib.mkIf config.deploy.profile.gui { programs.mpv = { enable = true; config = { @@ -11,5 +10,4 @@ hwdec = "auto"; }; }; - }; } diff --git a/profiles/gui/home/music.nix b/profiles/gui/home/music.nix index 8f92a175..ebfb242d 100644 --- a/profiles/gui/home/music.nix +++ b/profiles/gui/home/music.nix @@ -1,7 +1,6 @@ { config, lib, pkgs, witch, ... }: { - config = lib.mkIf config.deploy.profile.gui { programs.ncmpcpp = { enable = true; mpdMusicDir = "/home/kat/media-share/music"; @@ -98,5 +97,4 @@ } ''; }; - }; } diff --git a/profiles/gui/home/packages.nix b/profiles/gui/home/packages.nix index 5a663904..29de6f69 100644 --- a/profiles/gui/home/packages.nix +++ b/profiles/gui/home/packages.nix @@ -6,7 +6,6 @@ let ../../../private/files/bitw/master.gpg } "$@"''; in { - config = lib.mkIf config.deploy.profile.gui { home.packages = with pkgs; [ _1password bitwarden @@ -62,5 +61,4 @@ in { neofetch htop ]; - }; } diff --git a/profiles/gui/home/weechat.nix b/profiles/gui/home/weechat.nix index 0d4d6e3c..674eacd1 100644 --- a/profiles/gui/home/weechat.nix +++ b/profiles/gui/home/weechat.nix @@ -1,7 +1,6 @@ { config, pkgs, lib, superConfig, ... }: { - config = lib.mkIf config.deploy.profile.gui { home.file = { ".local/share/weechat/sec.conf" = lib.mkIf config.deploy.profile.private { source = "${../../../private/files/weechat/sec.conf}"; @@ -104,5 +103,4 @@ }; }; }; - }; } diff --git a/profiles/gui/nixos.nix b/profiles/gui/nixos.nix index 4b278b87..ee5c6a99 100644 --- a/profiles/gui/nixos.nix +++ b/profiles/gui/nixos.nix @@ -3,5 +3,7 @@ { imports = [ ./nixos ]; - options = { deploy.profile.gui = lib.mkEnableOption "graphical system"; }; + options = { deploy.profile.gui = lib.mkEnableOption "graphical system" // { default = true; }; }; + + config = { home-manager.users.kat = { imports = [ ./home.nix ]; }; }; } diff --git a/profiles/gui/nixos/dns.nix b/profiles/gui/nixos/dns.nix index dcb725bb..c0cba654 100644 --- a/profiles/gui/nixos/dns.nix +++ b/profiles/gui/nixos/dns.nix @@ -1,5 +1,4 @@ { config, lib, pkgs, ... }: { - config = lib.mkIf config.deploy.profile.gui { networking = { # networkmanager.enable = true; resolvconf.useLocalResolver = true; @@ -39,5 +38,4 @@ systemd.services.dnscrypt-proxy2.serviceConfig = { StateDirectory = "dnscrypt-proxy2"; }; - }; } diff --git a/profiles/gui/nixos/firefox.nix b/profiles/gui/nixos/firefox.nix index 8caba090..bd0207f9 100644 --- a/profiles/gui/nixos/firefox.nix +++ b/profiles/gui/nixos/firefox.nix @@ -1,7 +1,6 @@ { config, pkgs, lib, witch, ... }: { - config = lib.mkIf config.deploy.profile.gui { xdg = { portal = { enable = true; @@ -12,5 +11,4 @@ gtkUsePortal = true; }; }; - }; } diff --git a/profiles/gui/nixos/fonts.nix b/profiles/gui/nixos/fonts.nix index bb72782e..768fbc88 100644 --- a/profiles/gui/nixos/fonts.nix +++ b/profiles/gui/nixos/fonts.nix @@ -1,7 +1,6 @@ { config, pkgs, lib, ... }: { - config = lib.mkIf config.deploy.profile.gui { fonts.fontconfig.enable = true; fonts.fonts = with pkgs; [ font-awesome @@ -9,5 +8,4 @@ iosevka emacs-all-the-icons-fonts ]; - }; } diff --git a/profiles/gui/nixos/gpg.nix b/profiles/gui/nixos/gpg.nix index 79846f0c..be0c5914 100644 --- a/profiles/gui/nixos/gpg.nix +++ b/profiles/gui/nixos/gpg.nix @@ -1,7 +1,6 @@ { config, pkgs, lib, ... }: { - config = lib.mkIf config.deploy.profile.gui { services.pcscd.enable = true; services.udev.packages = [ pkgs.yubikey-personalization ]; @@ -10,5 +9,4 @@ enableSSHSupport = true; pinentryFlavor = "gtk2"; }; - }; } diff --git a/profiles/gui/nixos/mingetty.nix b/profiles/gui/nixos/mingetty.nix index 74daf494..7ca35f79 100644 --- a/profiles/gui/nixos/mingetty.nix +++ b/profiles/gui/nixos/mingetty.nix @@ -25,7 +25,6 @@ let " ${c1} .:::: :::: ${c2}'::::. " ]; in { - config = lib.mkIf config.deploy.profile.gui { services.mingetty = { greetingLine = '' \e[H\e[2J @@ -33,5 +32,4 @@ in { + "\\e[1;32m>>> NixOS ${config.system.nixos.label} (Linux \\r) - \\l\\e[0m"; helpLine = lib.mkForce ""; }; - }; } diff --git a/profiles/gui/nixos/sound.nix b/profiles/gui/nixos/sound.nix index 3fbcd6d0..2bc90326 100644 --- a/profiles/gui/nixos/sound.nix +++ b/profiles/gui/nixos/sound.nix @@ -1,7 +1,6 @@ { config, lib, pkgs, ... }: { - config = lib.mkIf config.deploy.profile.gui { sound = { enable = true; extraConfig = '' @@ -21,5 +20,4 @@ default-sample-channels = 2; }; }; - }; } diff --git a/profiles/kat/home.nix b/profiles/kat/home.nix index b9db2097..ffd7ea10 100644 --- a/profiles/kat/home.nix +++ b/profiles/kat/home.nix @@ -8,5 +8,5 @@ # imports = [ ../../../modules/home ]; #}; - options = { deploy.profile.kat = lib.mkEnableOption "uhh meow"; }; + options = { deploy.profile.kat = lib.mkEnableOption "uhh meow" // { default = true; };}; } diff --git a/profiles/kat/home/base16.nix b/profiles/kat/home/base16.nix index e58664c6..317c5561 100644 --- a/profiles/kat/home/base16.nix +++ b/profiles/kat/home/base16.nix @@ -1,7 +1,6 @@ { config, ... }: { - config = lib.mkIf config.deploy.profile.kat { base16 = { shell.enable = true; schemes = [ "rebecca.rebecca" ]; @@ -10,5 +9,4 @@ # enable = true; # defaultTheme = "rebecca.rebecca"; # }; - }; } diff --git a/profiles/kat/home/git.nix b/profiles/kat/home/git.nix index a9a09053..5528b17b 100644 --- a/profiles/kat/home/git.nix +++ b/profiles/kat/home/git.nix @@ -1,7 +1,6 @@ { config, pkgs, lib, ... }: { - config = lib.mkIf config.deploy.profile.kat { home.packages = with pkgs; [ git-crypt gitAndTools.gitRemoteGcrypt @@ -28,5 +27,4 @@ signByDefault = true; }; }; - }; } diff --git a/profiles/kat/home/packages.nix b/profiles/kat/home/packages.nix index 1dd2d8b7..00b30862 100644 --- a/profiles/kat/home/packages.nix +++ b/profiles/kat/home/packages.nix @@ -1,7 +1,5 @@ { config, lib, pkgs, ... }: { - config = lib.mkIf config.deploy.profile.kat { home.packages = with pkgs; [ kitty.terminfo hyperfine hexyl tokei ]; - }; } diff --git a/profiles/kat/home/ssh.nix b/profiles/kat/home/ssh.nix index 4ae60fbd..5519b550 100644 --- a/profiles/kat/home/ssh.nix +++ b/profiles/kat/home/ssh.nix @@ -1,7 +1,6 @@ { config, pkgs, lib, ... }: { - config = lib.mkIf config.deploy.profile.kat { programs.ssh = { enable = true; controlMaster = "auto"; @@ -23,5 +22,4 @@ "boline" = { hostname = "boline.kittywit.ch"; } // common; }; }; - }; } diff --git a/profiles/kat/home/tmux.nix b/profiles/kat/home/tmux.nix index 2e2c7626..2609123d 100644 --- a/profiles/kat/home/tmux.nix +++ b/profiles/kat/home/tmux.nix @@ -1,7 +1,6 @@ { config, lib, pkgs, ... }: { - config = lib.mkIf config.deploy.profile.kat { programs.zsh.shellAliases = { tne = "tmux new -s"; tat = "tmux attach -t"; @@ -53,5 +52,4 @@ set -g mouse on ''; }; - }; } diff --git a/profiles/kat/home/vim/default.nix b/profiles/kat/home/vim/default.nix index 284ab1b1..6d2f06ac 100644 --- a/profiles/kat/home/vim/default.nix +++ b/profiles/kat/home/vim/default.nix @@ -1,7 +1,6 @@ { config, lib, pkgs, witch, ... }: { - config = lib.mkIf config.deploy.profile.kat { home.sessionVariables.EDITOR = "vim"; programs.vim = { enable = true; @@ -35,5 +34,4 @@ xdg.configFile = { "vim/coc-settings.json".text = builtins.readFile ./coc-settings.json; }; - }; } diff --git a/profiles/kat/home/xdg.nix b/profiles/kat/home/xdg.nix index 09797426..7c83a269 100644 --- a/profiles/kat/home/xdg.nix +++ b/profiles/kat/home/xdg.nix @@ -1,7 +1,6 @@ { config, lib, ... }: { - config = lib.mkIf config.deploy.profile.kat { xdg = { enable = true; userDirs = { @@ -16,5 +15,4 @@ music = "$HOME/media-share/music"; }; }; - }; } diff --git a/profiles/kat/home/zsh/default.nix b/profiles/kat/home/zsh/default.nix index 59e02be2..5e5237f6 100644 --- a/profiles/kat/home/zsh/default.nix +++ b/profiles/kat/home/zsh/default.nix @@ -1,7 +1,6 @@ { config, lib, pkgs, ... }: { - config = lib.mkIf config.deploy.profile.kat { xdg.dataFile = { "z/.keep".text = ""; }; home.packages = with pkgs; [ fzf fd ]; programs.zsh = { @@ -59,5 +58,4 @@ enableZshIntegration = true; enableNixDirenvIntegration = true; }; - }; } diff --git a/profiles/kat/nixos.nix b/profiles/kat/nixos.nix index afb1eeff..0aa2594c 100644 --- a/profiles/kat/nixos.nix +++ b/profiles/kat/nixos.nix @@ -1,7 +1,9 @@ { config, pkgs, lib, ... }: { - config = lib.mkIf config.deploy.profile.kat { + config = { + home-manager.users.kat = { imports = [ ./home.nix ]; }; + users.users.kat = { uid = 1000; isNormalUser = true; @@ -15,5 +17,6 @@ }; }; - options = { deploy.profile.kat = lib.mkEnableOption "uhh meow"; }; + options = { deploy.profile.kat = lib.mkEnableOption "uhh meow" // { default = true; }; }; + } diff --git a/profiles/laptop/home.nix b/profiles/laptop/home.nix index 8f6de4d8..47442371 100644 --- a/profiles/laptop/home.nix +++ b/profiles/laptop/home.nix @@ -1,5 +1,5 @@ { lib, ... }: { - options = { deploy.profile.laptop = lib.mkEnableOption "lappytop"; }; + options = { deploy.profile.laptop = lib.mkEnableOption "lappytop" // { default = true; }; }; } diff --git a/profiles/laptop/nixos.nix b/profiles/laptop/nixos.nix index 6fc00512..accc11b7 100644 --- a/profiles/laptop/nixos.nix +++ b/profiles/laptop/nixos.nix @@ -3,5 +3,7 @@ { imports = [ ./nixos ]; - options = { deploy.profile.laptop = lib.mkEnableOption "lappytop"; }; + options = { deploy.profile.laptop = lib.mkEnableOption "lappytop" // { default = true; }; }; + + config = { home-manager.users.kat = { imports = [ ./home.nix ]; }; }; } diff --git a/profiles/laptop/nixos/wifi.nix b/profiles/laptop/nixos/wifi.nix index d1da9662..a8a721d7 100644 --- a/profiles/laptop/nixos/wifi.nix +++ b/profiles/laptop/nixos/wifi.nix @@ -1,5 +1,4 @@ { config, lib, pkgs, ... }: { - config = lib.mkIf config.deploy.profile.laptop { }; } diff --git a/profiles/sway/home.nix b/profiles/sway/home.nix index b931d1c8..1fe62fb0 100644 --- a/profiles/sway/home.nix +++ b/profiles/sway/home.nix @@ -3,5 +3,5 @@ { imports = [ ./home ]; - options = { deploy.profile.sway = lib.mkEnableOption "sway wm"; }; + options = { deploy.profile.sway = lib.mkEnableOption "sway wm" // { default = true; }; }; } diff --git a/profiles/sway/home/gammastep.nix b/profiles/sway/home/gammastep.nix index 9e206f3c..f4856cc0 100644 --- a/profiles/sway/home/gammastep.nix +++ b/profiles/sway/home/gammastep.nix @@ -1,11 +1,9 @@ { config, lib, ... }: { - config = lib.mkIf config.deploy.profile.sway { services.gammastep = { enable = true; latitude = "51.5074"; longitude = "0.1278"; }; - }; } diff --git a/profiles/sway/home/mako.nix b/profiles/sway/home/mako.nix index e7041670..06347109 100644 --- a/profiles/sway/home/mako.nix +++ b/profiles/sway/home/mako.nix @@ -1,7 +1,6 @@ { config, pkgs, lib, witch, ... }: { - config = lib.mkIf config.deploy.profile.sway { systemd.user.services = { mako = { Unit = { @@ -24,5 +23,4 @@ backgroundColor = "${witch.style.base16.color0}70"; textColor = witch.style.base16.color7; }; - }; } diff --git a/profiles/sway/home/sway.nix b/profiles/sway/home/sway.nix index 3d9f60a1..11473d4f 100644 --- a/profiles/sway/home/sway.nix +++ b/profiles/sway/home/sway.nix @@ -1,7 +1,6 @@ { config, pkgs, lib, witch, ... }: { - config = lib.mkIf config.deploy.profile.sway { home.sessionVariables = { MOZ_ENABLE_WAYLAND = 1; XDG_CURRENT_DESKTOP = "sway"; @@ -265,6 +264,5 @@ ${workspaceBindingsStr} ''; }; - }; } diff --git a/profiles/sway/home/swayidle.nix b/profiles/sway/home/swayidle.nix index 46599932..803f9590 100644 --- a/profiles/sway/home/swayidle.nix +++ b/profiles/sway/home/swayidle.nix @@ -1,7 +1,6 @@ { config, pkgs, lib, ... }: { - config = lib.mkIf config.deploy.profile.sway { systemd.user.services.swayidle = { Unit = { Description = "swayidle"; @@ -34,5 +33,4 @@ }; Install = { WantedBy = [ "sway-session.target" ]; }; }; - }; } diff --git a/profiles/sway/nixos.nix b/profiles/sway/nixos.nix index 63d232c5..7d983590 100644 --- a/profiles/sway/nixos.nix +++ b/profiles/sway/nixos.nix @@ -3,5 +3,7 @@ { imports = [ ./nixos ]; - options = { deploy.profile.sway = lib.mkEnableOption "sway wm"; }; + options = { deploy.profile.sway = lib.mkEnableOption "sway wm" // { default = true; }; }; + + config = { home-manager.users.kat = { imports = [ ./home.nix ]; }; }; } diff --git a/profiles/sway/nixos/sway.nix b/profiles/sway/nixos/sway.nix index 3d7ff252..ea348188 100644 --- a/profiles/sway/nixos/sway.nix +++ b/profiles/sway/nixos/sway.nix @@ -1,10 +1,8 @@ { config, pkgs, lib, sources, ... }: { - config = lib.mkIf config.deploy.profile.sway { programs.sway = { enable = true; extraPackages = with pkgs; lib.mkForce [ xwayland swaylock swayidle ]; }; - }; }