tried to de HM the cosmic flake

This commit is contained in:
RingOfStorms (Joshua Bell) 2024-12-29 03:11:30 -06:00
parent eaa2e08f5d
commit 0e0a250ca0
5 changed files with 56 additions and 36 deletions

32
hosts/oren/flake.lock generated
View file

@ -174,11 +174,11 @@
"locked": { "locked": {
"lastModified": 1, "lastModified": 1,
"narHash": "sha256-9Z/Z8Y4Q1q95zUeJWfUQFyeaAVkhb804kd3tiBpHfpI=", "narHash": "sha256-9Z/Z8Y4Q1q95zUeJWfUQFyeaAVkhb804kd3tiBpHfpI=",
"path": "/nix/store/sm477lnilan12wmmyd9s0dgphg6fqygf-source/modules/boot_systemd", "path": "/nix/store/zcwx1l0ry5ikll5rpzlaxw8s5ygbs9r8-source/modules/boot_systemd",
"type": "path" "type": "path"
}, },
"original": { "original": {
"path": "/nix/store/sm477lnilan12wmmyd9s0dgphg6fqygf-source/modules/boot_systemd", "path": "/nix/store/zcwx1l0ry5ikll5rpzlaxw8s5ygbs9r8-source/modules/boot_systemd",
"type": "path" "type": "path"
} }
}, },
@ -192,11 +192,11 @@
"locked": { "locked": {
"lastModified": 1, "lastModified": 1,
"narHash": "sha256-tSW1S2JPkgnJ563taboMx0RfcyCbcO4+zsaTjPYPRvI=", "narHash": "sha256-tSW1S2JPkgnJ563taboMx0RfcyCbcO4+zsaTjPYPRvI=",
"path": "/nix/store/sm477lnilan12wmmyd9s0dgphg6fqygf-source/modules/common", "path": "/nix/store/zcwx1l0ry5ikll5rpzlaxw8s5ygbs9r8-source/modules/common",
"type": "path" "type": "path"
}, },
"original": { "original": {
"path": "/nix/store/sm477lnilan12wmmyd9s0dgphg6fqygf-source/modules/common", "path": "/nix/store/zcwx1l0ry5ikll5rpzlaxw8s5ygbs9r8-source/modules/common",
"type": "path" "type": "path"
} }
}, },
@ -212,12 +212,12 @@
}, },
"locked": { "locked": {
"lastModified": 1, "lastModified": 1,
"narHash": "sha256-kTwFBa1QFUbcld1+ZUOK2M0OjOpg6rzVGrkuAB8CemA=", "narHash": "sha256-FjZF4kam1l427FeIHKCFSV+GbXGpQPS46mWribdVK/U=",
"path": "/nix/store/sm477lnilan12wmmyd9s0dgphg6fqygf-source/modules/de_cosmic", "path": "/nix/store/zcwx1l0ry5ikll5rpzlaxw8s5ygbs9r8-source/modules/de_cosmic",
"type": "path" "type": "path"
}, },
"original": { "original": {
"path": "/nix/store/sm477lnilan12wmmyd9s0dgphg6fqygf-source/modules/de_cosmic", "path": "/nix/store/zcwx1l0ry5ikll5rpzlaxw8s5ygbs9r8-source/modules/de_cosmic",
"type": "path" "type": "path"
} }
}, },
@ -230,12 +230,12 @@
}, },
"locked": { "locked": {
"lastModified": 1, "lastModified": 1,
"narHash": "sha256-9W9vNv25dFBOXVtiK8OeSrwU0epvI8y0dqdjfIEZhEc=", "narHash": "sha256-8aN/3ioMsr8IhBvo/Ym98bkFbHQ/4ODrww15W9b0i2g=",
"path": "/nix/store/sm477lnilan12wmmyd9s0dgphg6fqygf-source/modules/home_manager", "path": "/nix/store/zcwx1l0ry5ikll5rpzlaxw8s5ygbs9r8-source/modules/home_manager",
"type": "path" "type": "path"
}, },
"original": { "original": {
"path": "/nix/store/sm477lnilan12wmmyd9s0dgphg6fqygf-source/modules/home_manager", "path": "/nix/store/zcwx1l0ry5ikll5rpzlaxw8s5ygbs9r8-source/modules/home_manager",
"type": "path" "type": "path"
} }
}, },
@ -243,11 +243,11 @@
"locked": { "locked": {
"lastModified": 1, "lastModified": 1,
"narHash": "sha256-WfYwWhjnePj5MYb9d84AAH7DT4W77eXV7DE1HV5nWbk=", "narHash": "sha256-WfYwWhjnePj5MYb9d84AAH7DT4W77eXV7DE1HV5nWbk=",
"path": "/nix/store/sm477lnilan12wmmyd9s0dgphg6fqygf-source/modules/nebula", "path": "/nix/store/zcwx1l0ry5ikll5rpzlaxw8s5ygbs9r8-source/modules/nebula",
"type": "path" "type": "path"
}, },
"original": { "original": {
"path": "/nix/store/sm477lnilan12wmmyd9s0dgphg6fqygf-source/modules/nebula", "path": "/nix/store/zcwx1l0ry5ikll5rpzlaxw8s5ygbs9r8-source/modules/nebula",
"type": "path" "type": "path"
} }
}, },
@ -258,11 +258,11 @@
"locked": { "locked": {
"lastModified": 1, "lastModified": 1,
"narHash": "sha256-Do761YmlKOOr9+9vKUJnA2n5WQANXKPR2aesvsi/6VQ=", "narHash": "sha256-Do761YmlKOOr9+9vKUJnA2n5WQANXKPR2aesvsi/6VQ=",
"path": "/nix/store/sm477lnilan12wmmyd9s0dgphg6fqygf-source/modules/neovim", "path": "/nix/store/zcwx1l0ry5ikll5rpzlaxw8s5ygbs9r8-source/modules/neovim",
"type": "path" "type": "path"
}, },
"original": { "original": {
"path": "/nix/store/sm477lnilan12wmmyd9s0dgphg6fqygf-source/modules/neovim", "path": "/nix/store/zcwx1l0ry5ikll5rpzlaxw8s5ygbs9r8-source/modules/neovim",
"type": "path" "type": "path"
} }
}, },
@ -273,11 +273,11 @@
"locked": { "locked": {
"lastModified": 1, "lastModified": 1,
"narHash": "sha256-YjXJu/5Hcl7YpcpiHLd5wqCFUlJp39MM9CfQKhdpkk8=", "narHash": "sha256-YjXJu/5Hcl7YpcpiHLd5wqCFUlJp39MM9CfQKhdpkk8=",
"path": "/nix/store/sm477lnilan12wmmyd9s0dgphg6fqygf-source/modules/stormd", "path": "/nix/store/zcwx1l0ry5ikll5rpzlaxw8s5ygbs9r8-source/modules/stormd",
"type": "path" "type": "path"
}, },
"original": { "original": {
"path": "/nix/store/sm477lnilan12wmmyd9s0dgphg6fqygf-source/modules/stormd", "path": "/nix/store/zcwx1l0ry5ikll5rpzlaxw8s5ygbs9r8-source/modules/stormd",
"type": "path" "type": "path"
} }
}, },

View file

@ -108,16 +108,15 @@
../../components/hm/zsh.nix ../../components/hm/zsh.nix
]; ];
}; };
root = { # root = {
imports = [ # imports = [
# ../../components/hm/atuin.nix # ../../components/hm/nix_deprecations.nix
../../components/hm/nix_deprecations.nix # ../../components/hm/postgres.nix
../../components/hm/postgres.nix # ../../components/hm/starship.nix
../../components/hm/starship.nix # ../../components/hm/zoxide.nix
../../components/hm/zoxide.nix # ../../components/hm/zsh.nix
../../components/hm/zsh.nix # ];
]; # };
};
}; };
}; };
}; };

View file

@ -23,15 +23,27 @@
pkgs, pkgs,
... ...
}: }:
let
cosmicConfigDir = ./config;
cosmicFiles = builtins.attrNames (builtins.readDir cosmicConfigDir);
cosmicConfigFiles = map (fileName: {
name = "cosmic/${fileName}";
value = {
source = "${cosmicConfigDir}/${fileName}";
# mode = "0644";
};
}) cosmicFiles;
cosmicConfigFilesAttrs = builtins.listToAttrs cosmicConfigFiles;
in
with lib; with lib;
{ {
options.mods.de_cosmic = { options.mods.de_cosmic = {
users = mkOption { users = mkOption {
type = types.listOf types.str; type = types.listOf types.str;
description = "Users to apply cosmic DE settings to."; description = "Users to apply cosmic DE settings to.";
default = [ default = (
"root" lib.optionals (config.mods.common.primaryUser != null) [ config.mods.common.primaryUser ]
] ++ (lib.optionals (config.mods.common.primaryUser != null) [ config.mods.common.primaryUser ]); );
}; };
}; };
@ -60,12 +72,21 @@
cosmic-store cosmic-store
]; ];
# Config # there are cosmic-greeter files in /var/lib/cosmic-greeter/ and ~/.local/state/cosmic
environment.etc = lib.mkIf (config.mods.de_cosmic.users != null) ( # Config TODO my attempt to make this not home-manager driven...
lib.genAttrs config.mods.de_cosmic.users (user: { # environment.etc = cosmicConfigFilesAttrs;
source = ./config; # systemd.user.tmpfiles.rules = [
target = "/home/${user}/.config/cosmic"; # "L %h/.config/cosmic - - - - /etc/cosmic"
}) # ];
# Config TODO come up with a non home-manager way to do this. I dont want this flake to require home-manager from somewhere else to exist
home-manager.users = listToAttrs (
map (name: {
inherit name;
value = {
xdg.configFile = cosmicConfigFilesAttrs;
};
}) config.mods.de_cosmic.users
); );
}; };
}; };

View file

@ -39,6 +39,7 @@
home-manager.extraSpecialArgs = { home-manager.extraSpecialArgs = {
nixConfig = config; nixConfig = config;
}; };
home-manager.backupFileExtension = "bak";
home-manager.users = mapAttrs' (name: user: { home-manager.users = mapAttrs' (name: user: {
inherit name; inherit name;