Use Nixos modules for home manager configurations
All checks were successful
/ build-all (push) Successful in 54s
All checks were successful
/ build-all (push) Successful in 54s
This commit is contained in:
parent
632061ac61
commit
85e75928dc
10 changed files with 65 additions and 91 deletions
93
flake.nix
93
flake.nix
|
|
@ -21,7 +21,6 @@
|
||||||
let
|
let
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
pkgs = inputs.nixpkgs.legacyPackages.${system};
|
pkgs = inputs.nixpkgs.legacyPackages.${system};
|
||||||
pkgs-unstable = inputs.unstable.legacyPackages.${system};
|
|
||||||
nixgl = inputs.nixgl.packages.${system};
|
nixgl = inputs.nixgl.packages.${system};
|
||||||
sshKeys = (import ./sshKeys.nix);
|
sshKeys = (import ./sshKeys.nix);
|
||||||
osConfig = modules: nixpkgs.lib.nixosSystem {
|
osConfig = modules: nixpkgs.lib.nixosSystem {
|
||||||
|
|
@ -35,12 +34,25 @@
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
|
|
||||||
extraSpecialArgs = {
|
extraSpecialArgs = {
|
||||||
inherit pkgs-unstable;
|
|
||||||
inherit inputs;
|
inherit inputs;
|
||||||
};
|
};
|
||||||
|
|
||||||
inherit modules;
|
inherit modules;
|
||||||
};
|
};
|
||||||
|
homeConfigInOs = {username, modules, userOptions ? []}: {
|
||||||
|
imports = [ inputs.home-manager.nixosModules.home-manager ];
|
||||||
|
users.users.${username} = { isNormalUser = true; } // userOptions;
|
||||||
|
home-manager = {
|
||||||
|
extraSpecialArgs = { inherit inputs; };
|
||||||
|
useGlobalPkgs = true;
|
||||||
|
useUserPackages = true;
|
||||||
|
users.${username} = {
|
||||||
|
imports = modules ++ [
|
||||||
|
{ home.username = username; }
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
in
|
in
|
||||||
rec {
|
rec {
|
||||||
homeConfigurations."anvaure@Allegro23-12" = homeConfig [
|
homeConfigurations."anvaure@Allegro23-12" = homeConfig [
|
||||||
|
|
@ -62,35 +74,6 @@
|
||||||
];
|
];
|
||||||
homeConfigurations."anvaure@msm-lnx-demo-01" = homeConfigurations."anvaure@msm-lnx-ipva-01";
|
homeConfigurations."anvaure@msm-lnx-demo-01" = homeConfigurations."anvaure@msm-lnx-ipva-01";
|
||||||
|
|
||||||
homeConfigurations."ant@hs" = homeConfig [
|
|
||||||
{ home.username = "ant"; }
|
|
||||||
./home/more-software.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
homeConfigurations."ant@ks" = homeConfig [
|
|
||||||
{ home.username = "ant"; }
|
|
||||||
./home/more-software.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
homeConfigurations."ant@basado" = homeConfig [
|
|
||||||
{ home.username = "ant"; }
|
|
||||||
./home/ui.nix
|
|
||||||
./home/more-software.nix
|
|
||||||
./home/gaming.nix
|
|
||||||
./home/syncthing.nix
|
|
||||||
{ services.kdeconnect.enable = true; }
|
|
||||||
./home/basado.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
homeConfigurations."ant@moon" = homeConfig [
|
|
||||||
{ home.username = "ant"; }
|
|
||||||
./home/more-software.nix
|
|
||||||
./home/ui.nix
|
|
||||||
./home/syncthing.nix
|
|
||||||
{ services.kdeconnect.enable = true; }
|
|
||||||
./home/moon.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
nixosConfigurations.basado = osConfig [
|
nixosConfigurations.basado = osConfig [
|
||||||
./os/basado/configuration.nix
|
./os/basado/configuration.nix
|
||||||
./os/basado/hardware-configuration.nix
|
./os/basado/hardware-configuration.nix
|
||||||
|
|
@ -102,14 +85,40 @@
|
||||||
./os/kdeconnect-ports.nix
|
./os/kdeconnect-ports.nix
|
||||||
(import ./os/swapfile.nix 64)
|
(import ./os/swapfile.nix 64)
|
||||||
./os/ccache.nix
|
./os/ccache.nix
|
||||||
|
(homeConfigInOs {
|
||||||
|
username = "ant";
|
||||||
|
modules = [
|
||||||
|
./home/ui.nix
|
||||||
|
./home/more-software.nix
|
||||||
|
./home/gaming.nix
|
||||||
|
./home/syncthing.nix
|
||||||
|
{ services.kdeconnect.enable = true; }
|
||||||
|
./home/basado.nix
|
||||||
|
];
|
||||||
|
userOptions = {
|
||||||
|
extraGroups = [ "networkmanager" "wheel" "video" "libvirtd" "msr" "docker" "gamemode" ];
|
||||||
|
};
|
||||||
|
})
|
||||||
];
|
];
|
||||||
nixosConfigurations.moon = osConfig [
|
nixosConfigurations.moon = osConfig [
|
||||||
./os/moon/configuration.nix
|
./os/moon/configuration.nix
|
||||||
./os/moon/hardware-configuration.nix
|
./os/moon/hardware-configuration.nix
|
||||||
|
|
||||||
./os/common.nix
|
./os/common.nix
|
||||||
./os/common-graphics.nix
|
./os/common-graphics.nix
|
||||||
./os/kdeconnect-ports.nix
|
./os/kdeconnect-ports.nix
|
||||||
|
(homeConfigInOs {
|
||||||
|
username = "ant";
|
||||||
|
modules = [
|
||||||
|
./home/more-software.nix
|
||||||
|
./home/ui.nix
|
||||||
|
./home/syncthing.nix
|
||||||
|
{ services.kdeconnect.enable = true; }
|
||||||
|
./home/moon.nix
|
||||||
|
];
|
||||||
|
userOptions = {
|
||||||
|
extraGroups = [ "networkmanager" "wheel" "video" ];
|
||||||
|
};
|
||||||
|
} )
|
||||||
];
|
];
|
||||||
nixosConfigurations.hs = osConfig [
|
nixosConfigurations.hs = osConfig [
|
||||||
./os/hs/configuration.nix
|
./os/hs/configuration.nix
|
||||||
|
|
@ -124,12 +133,28 @@
|
||||||
./os/builder.nix
|
./os/builder.nix
|
||||||
./os/ccache.nix
|
./os/ccache.nix
|
||||||
(import ./os/swapfile.nix 64)
|
(import ./os/swapfile.nix 64)
|
||||||
|
(homeConfigInOs {
|
||||||
|
username = "ant";
|
||||||
|
modules = [ ./home/more-software.nix ];
|
||||||
|
userOptions = {
|
||||||
|
extraGroups = [ "networkmanager" "wheel" "jellyfin" ];
|
||||||
|
openssh.authorizedKeys.keys = (with sshKeys; [ basado moon allegro hs ]);
|
||||||
|
};
|
||||||
|
})
|
||||||
];
|
];
|
||||||
nixosConfigurations.ks = osConfig [
|
nixosConfigurations.ks = osConfig [
|
||||||
./os/ks/configuration.nix
|
./os/ks/configuration.nix
|
||||||
./os/ks/hardware-configuration.nix
|
./os/ks/hardware-configuration.nix
|
||||||
./os/common.nix
|
./os/common.nix
|
||||||
./os/3proxy.nix
|
./os/3proxy.nix
|
||||||
|
(homeConfigInOs {
|
||||||
|
username = "ant";
|
||||||
|
modules = [ ./home/more-software.nix ];
|
||||||
|
userOptions = {
|
||||||
|
extraGroups = [ "networkmanager" "wheel" "jellyfin" ];
|
||||||
|
openssh.authorizedKeys.keys = with sshKeys; [ basado hs moon ];
|
||||||
|
};
|
||||||
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
build-all = pkgs.runCommand "build-all" {
|
build-all = pkgs.runCommand "build-all" {
|
||||||
|
|
@ -142,10 +167,6 @@
|
||||||
(osDerivation "hs")
|
(osDerivation "hs")
|
||||||
(osDerivation "ks")
|
(osDerivation "ks")
|
||||||
(homeDerivation "anvaure@Allegro23-12")
|
(homeDerivation "anvaure@Allegro23-12")
|
||||||
(homeDerivation "ant@hs")
|
|
||||||
(homeDerivation "ant@ks")
|
|
||||||
(homeDerivation "ant@basado")
|
|
||||||
(homeDerivation "ant@moon")
|
|
||||||
];
|
];
|
||||||
} ''
|
} ''
|
||||||
echo Build all derivations
|
echo Build all derivations
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,8 @@
|
||||||
{ config, lib, pkgs, ... }: {
|
{ config, lib, pkgs, ... }: {
|
||||||
|
nix.package = pkgs.nixVersions.latest;
|
||||||
|
home.homeDirectory = "/home/${config.home.username}";
|
||||||
|
nixpkgs.config = { allowUnfree = true; };
|
||||||
|
|
||||||
programs.fish = {
|
programs.fish = {
|
||||||
loginShellInit = ''
|
loginShellInit = ''
|
||||||
source ${pkgs.nix}/etc/profile.d/nix.fish
|
source ${pkgs.nix}/etc/profile.d/nix.fish
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,10 @@
|
||||||
{ inputs, config, lib, pkgs, pkgs-unstable, ... }:
|
{ system, inputs, config, lib, pkgs, ... }:
|
||||||
{
|
{
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
./fish.nix
|
./fish.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
nix.package = pkgs.nixVersions.latest;
|
|
||||||
home.homeDirectory = "/home/${config.home.username}";
|
|
||||||
|
|
||||||
home.stateVersion = "23.05"; # Please read the comment before changing.
|
home.stateVersion = "23.05"; # Please read the comment before changing.
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
|
|
@ -92,7 +89,7 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
viAlias = true;
|
viAlias = true;
|
||||||
defaultEditor = true;
|
defaultEditor = true;
|
||||||
package = pkgs-unstable.neovim-unwrapped;
|
package = inputs.unstable.legacyPackages.${pkgs.stdenv.hostPlatform.system}.neovim-unwrapped;
|
||||||
extraPackages = with pkgs; [
|
extraPackages = with pkgs; [
|
||||||
gcc
|
gcc
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
{ lib, config, pkgs, ... }: {
|
{ lib, config, pkgs, ... }: {
|
||||||
nixpkgs.config = { allowUnfree = true; };
|
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
lutris
|
lutris
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, config, pkgs, pkgs-unstable, ... }:
|
{ lib, config, pkgs, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./base.nix
|
./base.nix
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ in
|
||||||
config = {
|
config = {
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
inputs.st-flexipatch.packages.${system}.st
|
inputs.st-flexipatch.packages.${pkgs.stdenv.hostPlatform.system}.st
|
||||||
|
|
||||||
gentium
|
gentium
|
||||||
nerd-fonts.noto
|
nerd-fonts.noto
|
||||||
|
|
@ -54,11 +54,6 @@ in
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs.config.allowUnfreePredicate = pkg:
|
|
||||||
builtins.elem (lib.getName pkg) [
|
|
||||||
"joypixels"
|
|
||||||
];
|
|
||||||
nixpkgs.config.joypixels.acceptLicense = true;
|
|
||||||
|
|
||||||
home.file = {
|
home.file = {
|
||||||
".config/kitty/light.conf".source = dotfiles/kitty/light.conf;
|
".config/kitty/light.conf".source = dotfiles/kitty/light.conf;
|
||||||
|
|
|
||||||
|
|
@ -20,15 +20,6 @@
|
||||||
boot.supportedFilesystems = [ "ntfs" ];
|
boot.supportedFilesystems = [ "ntfs" ];
|
||||||
networking.hostName = "basado"; # Define your hostname.
|
networking.hostName = "basado"; # Define your hostname.
|
||||||
|
|
||||||
users.users.ant = {
|
|
||||||
isNormalUser = true;
|
|
||||||
shell = pkgs.fish;
|
|
||||||
description = "ant";
|
|
||||||
extraGroups =
|
|
||||||
[ "networkmanager" "wheel" "video" "libvirtd" "msr" "docker" "gamemode" ];
|
|
||||||
packages = with pkgs; [ ];
|
|
||||||
};
|
|
||||||
|
|
||||||
users.users.anvaure = {
|
users.users.anvaure = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
shell = pkgs.fish;
|
shell = pkgs.fish;
|
||||||
|
|
|
||||||
|
|
@ -23,16 +23,6 @@ in {
|
||||||
networking.hostName = "hs"; # Define your hostname.
|
networking.hostName = "hs"; # Define your hostname.
|
||||||
networking.domain = domain;
|
networking.domain = domain;
|
||||||
|
|
||||||
users.users.ant = {
|
|
||||||
isNormalUser = true;
|
|
||||||
description = "ant";
|
|
||||||
extraGroups = [
|
|
||||||
"networkmanager"
|
|
||||||
"wheel"
|
|
||||||
"jellyfin"
|
|
||||||
];
|
|
||||||
openssh.authorizedKeys.keys = (with sshKeys; [ basado moon allegro hs ]);
|
|
||||||
};
|
|
||||||
security.sudo.wheelNeedsPassword = false;
|
security.sudo.wheelNeedsPassword = false;
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
|
||||||
|
|
@ -23,20 +23,6 @@ in {
|
||||||
|
|
||||||
users.users.root.openssh.authorizedKeys.keys = [ sshKeys.hs ];
|
users.users.root.openssh.authorizedKeys.keys = [ sshKeys.hs ];
|
||||||
|
|
||||||
users.users.ant = {
|
|
||||||
isNormalUser = true;
|
|
||||||
description = "ant";
|
|
||||||
extraGroups = [
|
|
||||||
"networkmanager"
|
|
||||||
"wheel"
|
|
||||||
"jellyfin"
|
|
||||||
];
|
|
||||||
openssh.authorizedKeys.keys = with sshKeys; [
|
|
||||||
basado
|
|
||||||
hs
|
|
||||||
moon
|
|
||||||
];
|
|
||||||
};
|
|
||||||
security.sudo.wheelNeedsPassword = false;
|
security.sudo.wheelNeedsPassword = false;
|
||||||
|
|
||||||
services.fail2ban = {
|
services.fail2ban = {
|
||||||
|
|
|
||||||
|
|
@ -18,15 +18,6 @@
|
||||||
hardware.bluetooth.enable = true;
|
hardware.bluetooth.enable = true;
|
||||||
hardware.bluetooth.powerOnBoot = true;
|
hardware.bluetooth.powerOnBoot = true;
|
||||||
|
|
||||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
|
||||||
users.users.ant = {
|
|
||||||
isNormalUser = true;
|
|
||||||
shell = pkgs.fish;
|
|
||||||
description = "ant";
|
|
||||||
extraGroups = [ "networkmanager" "wheel" "video" ];
|
|
||||||
packages = with pkgs; [ ];
|
|
||||||
};
|
|
||||||
|
|
||||||
# Enable the OpenSSH daemon.
|
# Enable the OpenSSH daemon.
|
||||||
services.openssh = {
|
services.openssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue