feat: fork config to enable alice migration

This commit is contained in:
buffet 2023-07-17 17:29:13 +02:00
parent f70799cf93
commit aeab773e97
8 changed files with 91 additions and 72 deletions

28
alice/default.nix Normal file
View file

@ -0,0 +1,28 @@
_: let
password = "$y$j9T$g/a4KaQ5VitWI9ZtAh9i3/$wjejk5W8LMc0gaVgw69kwrKLqBgZ95ekaOl/GaTOZVC";
in {
imports = [
./hardware-configuration.nix
];
# Don't change!
system.stateVersion = "23.05";
home-manager.users.buffet.home.stateVersion = "23.05";
users.users.buffet.hashedPassword = password;
users.users.root.hashedPassword = password;
networking.hostName = "alice";
services.tlp = {
enable = true;
settings = {
START_CHARGE_THRESH_BAT0 = 75;
STOP_CHARGE_THRESH_BAT0 = 80;
START_CHARGE_THRESH_BAT1 = 75;
STOP_CHARGE_THRESH_BAT1 = 80;
};
};
}

View file

@ -1,19 +1,21 @@
{ {pkgs, ...}: {
pkgs,
agenix,
home-manager,
nur,
...
}: let
password = "$6$FHwMlUwmRdAsPqS4$4XND0L0EEVf2Mhc/tvo6y3ZLIrMTOlsIZrG3w69EeXvtVZhdeNyoDOkPNIe.GBB8.PrchuUKDacqbvcvyuPkt0";
in {
imports = [ imports = [
agenix.nixosModules.default ./programs/bash.nix
home-manager.nixosModule ./programs/borg.nix
nur.nixosModules.nur ./programs/cargo.nix
./impermanence.nix ./programs/firefox.nix
./programs ./programs/foot.nix
./system.nix ./programs/git.nix
./programs/gpg.nix
./programs/ime.nix
./programs/lsd.nix
./programs/mako.nix
./programs/newsboat.nix
./programs/nvim.nix
./programs/pipewire.nix
./programs/sbcl.nix
./programs/sioyek.nix
./programs/sway.nix
]; ];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
@ -22,12 +24,10 @@ in {
]; ];
fonts.fonts = with pkgs; [ fonts.fonts = with pkgs; [
(nerdfonts.override {fonts = ["Go-Mono"];})
apl386 apl386
dejavu_fonts dejavu_fonts
noto-fonts noto-fonts
noto-fonts-cjk noto-fonts-cjk
source-han-serif
]; ];
home-manager.users.buffet = { home-manager.users.buffet = {
@ -105,11 +105,8 @@ in {
"uinput" "uinput"
"wheel" "wheel"
]; ];
hashedPassword = password;
}; };
users.users.root.hashedPassword = password;
systemd.coredump.enable = true; systemd.coredump.enable = true;
hardware = { hardware = {
@ -133,7 +130,6 @@ in {
enableNotifications = true; enableNotifications = true;
}; };
tlp.enable = true;
upower.enable = true; upower.enable = true;
systembus-notify.enable = true; systembus-notify.enable = true;
}; };

18
fanya/default.nix Normal file
View file

@ -0,0 +1,18 @@
_: let
password = "$6$FHwMlUwmRdAsPqS4$4XND0L0EEVf2Mhc/tvo6y3ZLIrMTOlsIZrG3w69EeXvtVZhdeNyoDOkPNIe.GBB8.PrchuUKDacqbvcvyuPkt0";
in {
imports = [
./hardware-configuration.nix
];
# Don't change!
system.stateVersion = "22.05";
home-manager.users.buffet.home.stateVersion = "22.05";
users.users.buffet.hashedPassword = password;
users.users.root.hashedPassword = password;
networking.hostName = "fanya";
services.tlp.enable = true;
}

View file

@ -68,24 +68,37 @@
}; };
outputs = { outputs = {
nixpkgs, agenix,
home-manager,
nur,
nixpkgs-unstable, nixpkgs-unstable,
nixpkgs,
... ...
} @ args: { } @ args: {
nixosConfigurations.fanya = let nixosConfigurations = let
system = "x86_64-linux"; mkSystem = system: module:
overlay-unstable = final: prev: {
unstable = nixpkgs-unstable.legacyPackages.${prev.system};
};
in
nixpkgs.lib.nixosSystem { nixpkgs.lib.nixosSystem {
inherit system; inherit system;
specialArgs = args; specialArgs = args;
modules = [ modules = let
./fanya.nix overlay-unstable = final: prev: {
unstable = nixpkgs-unstable.legacyPackages.${prev.system};
};
in [
module
agenix.nixosModules.default
home-manager.nixosModule
nur.nixosModules.nur
./common.nix
./impermanence.nix
./system.nix
(_: {nixpkgs.overlays = [(import ./overlay args) overlay-unstable];}) (_: {nixpkgs.overlays = [(import ./overlay args) overlay-unstable];})
]; ];
}; };
in {
alice = mkSystem "x86_64-linux" ./alice;
fanya = mkSystem "x86_64-linux" ./fanya;
};
}; };
} }

View file

@ -1,20 +0,0 @@
_: {
imports = [
./bash.nix
./borg.nix
./cargo.nix
./firefox.nix
./foot.nix
./git.nix
./gpg.nix
./ime.nix
./lsd.nix
./mako.nix
./newsboat.nix
./nvim.nix
./pipewire.nix
./sbcl.nix
./sioyek.nix
./sway.nix
];
}

View file

@ -3,18 +3,9 @@
nixpkgs-unstable, nixpkgs-unstable,
... ...
}: { }: {
imports = [
./hardware-configuration.nix
];
# Don't change!
system.stateVersion = "22.05";
home-manager.users.buffet.home.stateVersion = "22.05";
time.timeZone = "Europe/Berlin"; time.timeZone = "Europe/Berlin";
i18n.defaultLocale = "en_US.UTF-8"; i18n.defaultLocale = "en_US.UTF-8";
#boot.tmpOnTmpfs = true;
boot.loader = { boot.loader = {
systemd-boot.enable = true; systemd-boot.enable = true;
efi.canTouchEfiVariables = true; efi.canTouchEfiVariables = true;
@ -27,12 +18,6 @@
}; };
networking = { networking = {
useDHCP = false;
interfaces = {
enp0s25.useDHCP = true;
wlp3s0.useDHCP = true;
};
hostName = "fanya";
networkmanager.enable = true; networkmanager.enable = true;
nameservers = ["1.1.1.1"]; nameservers = ["1.1.1.1"];
}; };

View file

@ -2,7 +2,6 @@
light = false; light = false;
font = { font = {
#family = "GoMono Nerd Font";
family = "APL386 Unicode"; family = "APL386 Unicode";
size = 7; size = 7;
}; };