mirror of
https://github.com/srid/nixos-config.git
synced 2026-01-07 08:37:34 +08:00
unfuck a few things
This commit is contained in:
parent
b274a4511b
commit
b551adfdee
2 changed files with 20 additions and 26 deletions
34
flake.nix
34
flake.nix
|
|
@ -21,21 +21,8 @@
|
|||
outputs = inputs@{ self, home-manager, nixpkgs, ... }:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
# Features common to all of my machines
|
||||
commonModules = [
|
||||
./features/self-ide.nix
|
||||
./features/caches
|
||||
./features/current-location.nix
|
||||
./features/passwordstore.nix
|
||||
./features/syncthing.nix
|
||||
./features/protonvpn.nix
|
||||
./features/server/harden.nix
|
||||
];
|
||||
graphicsCommonModules = [
|
||||
./features/monitor-brightness.nix
|
||||
];
|
||||
# Make configuration for any computer I use in my home office.
|
||||
mkHomeMachine = configurationNix: extraModules: nixpkgs.lib.nixosSystem {
|
||||
mkHomeMachine = bare: configurationNix: extraModules: nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
# Arguments to pass to all modules.
|
||||
specialArgs = { inherit system inputs; };
|
||||
|
|
@ -44,17 +31,26 @@
|
|||
# System configuration
|
||||
configurationNix
|
||||
|
||||
# common
|
||||
./features/self-ide.nix
|
||||
./features/caches
|
||||
./features/current-location.nix
|
||||
./features/passwordstore.nix
|
||||
./features/syncthing.nix
|
||||
./features/protonvpn.nix
|
||||
./features/server/harden.nix
|
||||
|
||||
# home-manager configuration
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.srid = import ./home.nix {
|
||||
inherit inputs system;
|
||||
inherit inputs system bare;
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
};
|
||||
}
|
||||
] ++ commonModules ++ extraModules
|
||||
] ++ extraModules
|
||||
);
|
||||
};
|
||||
in
|
||||
|
|
@ -62,8 +58,9 @@
|
|||
# The "name" in nixosConfigurations.${name} should match the `hostname`
|
||||
#
|
||||
nixosConfigurations.p71 = mkHomeMachine
|
||||
false
|
||||
./hosts/p71.nix
|
||||
(graphicsCommonModules ++ [
|
||||
[
|
||||
inputs.nixos-hardware.nixosModules.lenovo-thinkpad-p53
|
||||
./features/desktopish
|
||||
#./features/gnome.nix
|
||||
|
|
@ -75,7 +72,7 @@
|
|||
#./features/server-mode.nix
|
||||
# ./features/postgrest.nix
|
||||
./features/server/devserver.nix
|
||||
]);
|
||||
];
|
||||
nixosConfigurations.x1c7 = mkHomeMachine
|
||||
./hosts/x1c7.nix
|
||||
[
|
||||
|
|
@ -85,6 +82,7 @@
|
|||
./features/desktopish/guiapps.nix
|
||||
];
|
||||
nixosConfigurations.facade = mkHomeMachine
|
||||
true
|
||||
./hosts/facade.nix
|
||||
[
|
||||
];
|
||||
|
|
|
|||
12
home.nix
12
home.nix
|
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, inputs, system, ... }:
|
||||
{ bare ? false, pkgs, inputs, system, ... }:
|
||||
let
|
||||
nix-thunk =
|
||||
(import (builtins.fetchTarball "https://github.com/obsidiansystems/nix-thunk/archive/master.tar.gz") { }).command;
|
||||
|
|
@ -15,11 +15,10 @@ rec {
|
|||
home.username = "srid";
|
||||
home.homeDirectory = "/home/srid";
|
||||
|
||||
imports = [
|
||||
inputs.nix-doom-emacs.hmModule
|
||||
];
|
||||
imports = pkgs.lib.optional (!bare)
|
||||
inputs.nix-doom-emacs.hmModule;
|
||||
|
||||
home.packages = with pkgs; [
|
||||
home.packages = with pkgs; lib.optionals (!bare) [
|
||||
gnumake
|
||||
cachix
|
||||
tig
|
||||
|
|
@ -158,9 +157,6 @@ rec {
|
|||
"p71" = {
|
||||
hostname = "192.168.2.76";
|
||||
};
|
||||
"ryzen9" = {
|
||||
hostname = "162.55.241.231";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue