Migrate explicit imports to home manager imports
That way I do not need to explicitly provide dependencies. But home-manager will pass all the special args.
This commit is contained in:
parent
2df4d4eeae
commit
d9ba963dad
70
home.nix
70
home.nix
|
@ -5,10 +5,10 @@
|
||||||
,...
|
,...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
{
|
||||||
|
_module.args = {
|
||||||
hostName = builtins.replaceStrings ["\n"] [""] (builtins.readFile /etc/hostname);
|
hostName = builtins.replaceStrings ["\n"] [""] (builtins.readFile /etc/hostname);
|
||||||
|
};
|
||||||
in {
|
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
./home/modules/programs/cmus.nix
|
./home/modules/programs/cmus.nix
|
||||||
|
@ -16,6 +16,22 @@ in {
|
||||||
./home/modules/programs/languagetool.nix
|
./home/modules/programs/languagetool.nix
|
||||||
./home/modules/programs/mailhog.nix
|
./home/modules/programs/mailhog.nix
|
||||||
./home/modules/programs/my-pidgin.nix
|
./home/modules/programs/my-pidgin.nix
|
||||||
|
|
||||||
|
./home/accounts.nix
|
||||||
|
./home/programs/nix.nix
|
||||||
|
./home/files.nix
|
||||||
|
./home/packages.nix
|
||||||
|
./home/packages/custom
|
||||||
|
./home/home.nix
|
||||||
|
./home/programs.nix
|
||||||
|
./home/xsession.nix
|
||||||
|
./home/windowManager/i3.nix
|
||||||
|
./home/xdg.nix
|
||||||
|
./home/dconf.nix
|
||||||
|
./home/qt.nix
|
||||||
|
./home/gtk.nix
|
||||||
|
./home/services.nix
|
||||||
|
./home/systemd.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
disabledModules = [
|
disabledModules = [
|
||||||
|
@ -38,64 +54,16 @@ in {
|
||||||
# changes in each release.
|
# changes in each release.
|
||||||
stateVersion = "22.05";
|
stateVersion = "22.05";
|
||||||
|
|
||||||
packages = import ./home/packages.nix {
|
|
||||||
inherit pkgs hostName;
|
|
||||||
};
|
|
||||||
|
|
||||||
file = import ./home/files.nix { };
|
|
||||||
|
|
||||||
} // import ./home/home.nix {
|
|
||||||
inherit config pkgs hostName;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
targets.genericLinux.enable = true;
|
targets.genericLinux.enable = true;
|
||||||
|
|
||||||
accounts = import ./home/accounts.nix {
|
|
||||||
inherit config pkgs;
|
|
||||||
};
|
|
||||||
|
|
||||||
nix = import ./home/programs/nix.nix {
|
|
||||||
inherit pkgs;
|
|
||||||
};
|
|
||||||
|
|
||||||
programs = import ./home/programs.nix {
|
|
||||||
inherit config pkgs hostName;
|
|
||||||
};
|
|
||||||
|
|
||||||
fonts.fontconfig.enable = true;
|
fonts.fontconfig.enable = true;
|
||||||
|
|
||||||
xsession = import ./home/xsession.nix {
|
|
||||||
inherit config pkgs hostName;
|
|
||||||
};
|
|
||||||
|
|
||||||
xdg = import ./home/xdg.nix {
|
|
||||||
inherit pkgs;
|
|
||||||
};
|
|
||||||
|
|
||||||
dconf = import ./home/dconf.nix {
|
|
||||||
inherit lib;
|
|
||||||
};
|
|
||||||
|
|
||||||
qt = import ./home/qt.nix {
|
|
||||||
inherit pkgs;
|
|
||||||
};
|
|
||||||
gtk = import ./home/gtk.nix {
|
|
||||||
inherit config pkgs;
|
|
||||||
};
|
|
||||||
|
|
||||||
services = import ./home/services.nix {
|
|
||||||
inherit config hostName pkgs;
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.user = import ./home/systemd.nix {
|
|
||||||
inherit config pkgs;
|
|
||||||
};
|
|
||||||
|
|
||||||
nixpkgs.config = {
|
nixpkgs.config = {
|
||||||
allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
|
allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
|
||||||
];
|
];
|
||||||
permittedInsecurePackages = [
|
permittedInsecurePackages = [
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
|
@ -1,8 +1,10 @@
|
||||||
{
|
{
|
||||||
lib
|
lib
|
||||||
|
,...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
dconf = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
"org/gtk/settings/file-chooser" = {
|
"org/gtk/settings/file-chooser" = {
|
||||||
|
@ -31,4 +33,5 @@
|
||||||
volume = 1.0;
|
volume = 1.0;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
_:
|
_:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
home.file = {
|
||||||
".nix-channels".source = ./files/nix-channels;
|
".nix-channels".source = ./files/nix-channels;
|
||||||
".profile".source = ./files/profile;
|
".profile".source = ./files/profile;
|
||||||
".myclirc".source = ./files/myclirc;
|
".myclirc".source = ./files/myclirc;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
config
|
config
|
||||||
,pkgs
|
,pkgs
|
||||||
|
,...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
# Possible alternatives:
|
# Possible alternatives:
|
||||||
|
@ -9,6 +10,7 @@
|
||||||
# And maybe use https://github.com/themix-project/oomox to adjust the color to follow my color scheme
|
# And maybe use https://github.com/themix-project/oomox to adjust the color to follow my color scheme
|
||||||
|
|
||||||
{
|
{
|
||||||
|
gtk = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
theme = {
|
theme = {
|
||||||
|
@ -43,5 +45,5 @@
|
||||||
gtk-application-prefer-dark-theme = 1;
|
gtk-application-prefer-dark-theme = 1;
|
||||||
gtk-enable-animations = 0;
|
gtk-enable-animations = 0;
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
config
|
config
|
||||||
,pkgs
|
,pkgs
|
||||||
,hostName
|
,hostName
|
||||||
|
,...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
@ -9,7 +10,7 @@ let
|
||||||
deLocale = "de_DE.utf8";
|
deLocale = "de_DE.utf8";
|
||||||
|
|
||||||
in {
|
in {
|
||||||
|
home = {
|
||||||
language = {
|
language = {
|
||||||
# English
|
# English
|
||||||
|
|
||||||
|
@ -104,4 +105,5 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
enableNixpkgsReleaseCheck = true;
|
enableNixpkgsReleaseCheck = true;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
{
|
{
|
||||||
pkgs
|
pkgs
|
||||||
,hostName
|
,hostName
|
||||||
|
,...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with pkgs; [
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
nix
|
nix
|
||||||
cacert
|
cacert
|
||||||
nvd
|
nvd
|
||||||
|
@ -79,7 +81,7 @@ with pkgs; [
|
||||||
unzip
|
unzip
|
||||||
|
|
||||||
gtk-engine-murrine
|
gtk-engine-murrine
|
||||||
] ++ (if hostName == "hikari" then [
|
] ++ (if hostName == "hikari" then [
|
||||||
# hikari
|
# hikari
|
||||||
|
|
||||||
acpilight # Used to support xbacklight
|
acpilight # Used to support xbacklight
|
||||||
|
@ -89,13 +91,12 @@ with pkgs; [
|
||||||
# Needs to be installed by ubuntu on ubuntu, therefore only add on hikari
|
# Needs to be installed by ubuntu on ubuntu, therefore only add on hikari
|
||||||
sound-juicer
|
sound-juicer
|
||||||
|
|
||||||
] else [
|
] else [
|
||||||
# hikari 2
|
# hikari 2
|
||||||
|
|
||||||
(callPackage ./packages/custom/update-ubuntu-system { })
|
(callPackage ./packages/custom/update-ubuntu-system { })
|
||||||
# TODO: Right now only for Ubuntu (hikari2) system
|
# TODO: Right now only for Ubuntu (hikari2) system
|
||||||
(callPackage ./packages/custom/backup { })
|
(callPackage ./packages/custom/backup { })
|
||||||
(callPackage ./packages/custom/vpn-reuter-dynamics { })
|
(callPackage ./packages/custom/vpn-reuter-dynamics { })
|
||||||
]) ++ (callPackage ./packages/custom {
|
]);
|
||||||
inherit hostName;
|
}
|
||||||
})
|
|
||||||
|
|
|
@ -1,19 +1,22 @@
|
||||||
{
|
{
|
||||||
callPackage
|
pkgs
|
||||||
,hostName
|
,hostName
|
||||||
|
,...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
[
|
{
|
||||||
(callPackage ./dmenu-scripts { })
|
home.packages = [
|
||||||
(callPackage ./update-system { })
|
(pkgs.callPackage ./dmenu-scripts { })
|
||||||
(callPackage ./nextcloud-sync/from-local.nix { })
|
(pkgs.callPackage ./update-system { })
|
||||||
(callPackage ./nextcloud-sync/from-remote.nix { })
|
(pkgs.callPackage ./nextcloud-sync/from-local.nix { })
|
||||||
(callPackage ./typo3-documentation-rendering { })
|
(pkgs.callPackage ./nextcloud-sync/from-remote.nix { })
|
||||||
(callPackage ./typo3-documentation-rendering-old { })
|
(pkgs.callPackage ./typo3-documentation-rendering { })
|
||||||
(callPackage ./typo3-serve-testing-instance { })
|
(pkgs.callPackage ./typo3-documentation-rendering-old { })
|
||||||
(callPackage ./typo3-push-core { })
|
(pkgs.callPackage ./typo3-serve-testing-instance { })
|
||||||
(callPackage ./zcat-progress { })
|
(pkgs.callPackage ./typo3-push-core { })
|
||||||
(callPackage ./project {
|
(pkgs.callPackage ./zcat-progress { })
|
||||||
|
(pkgs.callPackage ./project {
|
||||||
inherit hostName;
|
inherit hostName;
|
||||||
})
|
})
|
||||||
]
|
];
|
||||||
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
config
|
config
|
||||||
,pkgs
|
,pkgs
|
||||||
,hostName
|
,hostName
|
||||||
|
,...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
@ -10,6 +11,7 @@ let
|
||||||
};
|
};
|
||||||
|
|
||||||
in {
|
in {
|
||||||
|
programs = {
|
||||||
# Let Home Manager install and manage itself.
|
# Let Home Manager install and manage itself.
|
||||||
home-manager.enable = true;
|
home-manager.enable = true;
|
||||||
|
|
||||||
|
@ -61,4 +63,5 @@ in {
|
||||||
|
|
||||||
# Media
|
# Media
|
||||||
cmus.enable = true;
|
cmus.enable = true;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
{
|
{
|
||||||
pkgs
|
pkgs
|
||||||
|
,...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
nix = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
package = pkgs.nix;
|
package = pkgs.nix;
|
||||||
|
@ -25,5 +27,5 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,15 @@
|
||||||
{
|
{
|
||||||
pkgs
|
pkgs
|
||||||
|
,...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
qt = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
platformTheme = {
|
platformTheme = {
|
||||||
# Re use existing gtk theme
|
# Re use existing gtk theme
|
||||||
name = "gtk";
|
name = "gtk";
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,10 +2,11 @@
|
||||||
config
|
config
|
||||||
,hostName
|
,hostName
|
||||||
,pkgs
|
,pkgs
|
||||||
|
,...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
services = {
|
||||||
dunst = import ./services/dunst.nix {
|
dunst = import ./services/dunst.nix {
|
||||||
inherit config;
|
inherit config;
|
||||||
};
|
};
|
||||||
|
@ -21,8 +22,8 @@
|
||||||
|
|
||||||
languagetool.enable = true;
|
languagetool.enable = true;
|
||||||
mailhog.enable = true;
|
mailhog.enable = true;
|
||||||
|
} // (if hostName == "hikari" then {
|
||||||
} // (if hostName == "hikari" then {
|
|
||||||
network-manager-applet.enable = true;
|
network-manager-applet.enable = true;
|
||||||
} else {
|
} else {
|
||||||
})
|
});
|
||||||
|
}
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
{
|
{
|
||||||
config
|
config
|
||||||
,pkgs
|
,pkgs
|
||||||
|
,...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
systemd.user = {
|
||||||
services = {
|
services = {
|
||||||
batteryicon = import ./services/batteryicon.nix {
|
batteryicon = import ./services/batteryicon.nix {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
|
@ -14,4 +16,5 @@
|
||||||
"L ${config.xdg.dataHome}/themes - - - - ${config.home.profileDirectory}/share/themes"
|
"L ${config.xdg.dataHome}/themes - - - - ${config.home.profileDirectory}/share/themes"
|
||||||
"L ${config.xdg.dataHome}/icons/${config.gtk.iconTheme.name} - - - - ${config.home.profileDirectory}/share/icons/${config.gtk.iconTheme.name}"
|
"L ${config.xdg.dataHome}/icons/${config.gtk.iconTheme.name} - - - - ${config.home.profileDirectory}/share/icons/${config.gtk.iconTheme.name}"
|
||||||
];
|
];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,13 +2,14 @@
|
||||||
config
|
config
|
||||||
,pkgs
|
,pkgs
|
||||||
,hostName
|
,hostName
|
||||||
|
,...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
# Use `xbindkeys --key` to find key name, see: https://wiki.archlinux.org/title/Xbindkeys
|
# Use `xbindkeys --key` to find key name, see: https://wiki.archlinux.org/title/Xbindkeys
|
||||||
# Use `xset -dpms` to disable black out screen for power saving
|
# Use `xset -dpms` to disable black out screen for power saving
|
||||||
|
|
||||||
let
|
let
|
||||||
modifier = config.xsession.windowManager.i3.config.modifier;
|
inherit(config.xsession.windowManager.i3.config) modifier;
|
||||||
|
|
||||||
soundSwitcherForHikari2 = if hostName == "hikari" then "" else "-D pulse";
|
soundSwitcherForHikari2 = if hostName == "hikari" then "" else "-D pulse";
|
||||||
keyboardBrightnessDevice = if hostName == "hikari" then "--device smc::kbd_backlight" else "";
|
keyboardBrightnessDevice = if hostName == "hikari" then "--device smc::kbd_backlight" else "";
|
||||||
|
@ -16,6 +17,7 @@ let
|
||||||
displayBuiltInOutput = if hostName == "hikari" then "eDP-1" else "eDP1";
|
displayBuiltInOutput = if hostName == "hikari" then "eDP-1" else "eDP1";
|
||||||
displayDefaults = if hostName == "hikari" then "--output ${displayBuiltInOutput} --mode 1366x768 --scale 1.25x1.25" else "";
|
displayDefaults = if hostName == "hikari" then "--output ${displayBuiltInOutput} --mode 1366x768 --scale 1.25x1.25" else "";
|
||||||
in {
|
in {
|
||||||
|
xsession.windowManager.i3 = {
|
||||||
enable = true;
|
enable = true;
|
||||||
config = {
|
config = {
|
||||||
|
|
||||||
|
@ -378,4 +380,5 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
{
|
{
|
||||||
pkgs
|
pkgs
|
||||||
|
,...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
xdg = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
configFile = {
|
configFile = {
|
||||||
|
@ -136,5 +138,5 @@
|
||||||
"video/quicktime" = [ "vlc.desktop" ];
|
"video/quicktime" = [ "vlc.desktop" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
config
|
config
|
||||||
,pkgs
|
,pkgs
|
||||||
,hostName
|
,hostName
|
||||||
|
,...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
@ -21,6 +22,7 @@ let
|
||||||
xinput --set-prop 'DELL07E6:00 06CB:76AF Touchpad' 'libinput Natural Scrolling Enabled' 1
|
xinput --set-prop 'DELL07E6:00 06CB:76AF Touchpad' 'libinput Natural Scrolling Enabled' 1
|
||||||
'';
|
'';
|
||||||
in {
|
in {
|
||||||
|
xsession = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
numlock.enable = true;
|
numlock.enable = true;
|
||||||
|
@ -38,8 +40,5 @@ in {
|
||||||
# Increase mouse speed
|
# Increase mouse speed
|
||||||
xinput --set-prop 13 'libinput Accel Speed' 1
|
xinput --set-prop 13 'libinput Accel Speed' 1
|
||||||
'';
|
'';
|
||||||
|
|
||||||
windowManager.i3 = import ./windowManager/i3.nix {
|
|
||||||
inherit config pkgs hostName;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue