1
0
Fork 0
forked from emily/nixfiles
This commit is contained in:
emily 2024-02-27 19:07:12 +01:00
parent d8b97ed1ca
commit d8f8e62dfb
Signed by untrusted user: emily
GPG key ID: F6F4C66207FCF995
8 changed files with 89 additions and 21 deletions

View file

@ -1,5 +1,11 @@
# emilys Nix Infra
## First deployment
```console
$ nix run github:nix-community/nixos-anywhere -- --flake ".#<configuration>" root@<target-host>
```
## Deploy changes on ...
### all hosts
@ -13,7 +19,6 @@ $ colmena apply --on @production
```console
$ colmena apply --on @router
```
## Structure
```
nixfiles

View file

@ -59,7 +59,6 @@ with lib; {
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nix.settings.trusted-users = [ "root" "@wheel" ];
nixpkgs.hostPlatform.system = "x86_64-linux";
nixpkgs.config.allowUnfree = true;
boot.tmp.cleanOnBoot = mkDefault true;
@ -80,9 +79,9 @@ with lib; {
echo 'en_EU.UTF-8/UTF-8 \' >>localedata/SUPPORTED
'';
}));
services.xserver = {
services.xserver.xkb = {
layout = "de";
xkbVariant = "neo_qwerty";
variant = "neo_qwerty";
};
console.useXkbConfig = true;
console.earlySetup = true;

View file

@ -5,6 +5,7 @@
users.users.emily = {
isNormalUser = true;
shell = pkgs.fish;
ignoreShellProgramCheck = true;
extraGroups = [ "wheel" ];
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA/+iN407+HsfHbbC3tfdA8Yf4TZ08qXQMb4tb/SDAs+ emily@card"
@ -20,6 +21,7 @@
home.packages = with pkgs; [
whois
htop
restic
] ++ lib.optionals config.kyouma.machine-type.graphical [
thunderbird

View file

@ -1,8 +1,8 @@
{ modulesPath, config, lib, pkgs, ... }: {
{ modulesPath, config, lib, inputs, pkgs, ... }: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
(modulesPath + "/profiles/qemu-guest.nix")
./config/common/users
inputs.home-manager.nixosModules.home-manager
];
boot.loader = {
@ -17,9 +17,60 @@
pkgs.gitMinimal
];
services.xserver.xkb = {
layout = "de";
variant = "neo_qwerty";
};
console.useXkbConfig = true;
console.earlySetup = true;
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nix.settings.trusted-users = [ "root" "@wheel" ];
security.sudo.wheelNeedsPassword = false;
users.users.root.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA/+iN407+HsfHbbC3tfdA8Yf4TZ08qXQMb4tb/SDAs+ emily@card"
];
users.users.emily = {
isNormalUser = true;
shell = pkgs.fish;
ignoreShellProgramCheck = true;
extraGroups = [ "wheel" ];
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA/+iN407+HsfHbbC3tfdA8Yf4TZ08qXQMb4tb/SDAs+ emily@card"
];
};
home-manager.useGlobalPkgs = true;
home-manager.users.emily = {
home.stateVersion = "23.11";
fonts.fontconfig.enable = true;
programs.gpg.enable = true;
programs.ripgrep.enable = true;
programs.eza = {
enable = true;
enableAliases = true;
icons = true;
git = true;
extraOptions = [
"--color-scale=all"
"--color-scale-mode=gradient"
"--group-directories-first"
];
};
programs.fish = {
enable = true;
interactiveShellInit = ''
set -U fish_greeting
'';
loginShellInit = ''
[ (tty) = /dev/tty1 ] ;and exec Hyprland
'';
};
};
system.stateVersion = "23.11";
}

View file

@ -3,7 +3,7 @@
inputs.disko.nixosModules.disko
];
disko.devices.disk.nvme = {
device = "/dev/vda";
device = "/dev/sda";
type = "disk";
content = {
type = "gpt";
@ -15,7 +15,7 @@
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [ "defaults" ];
mountOptions = [ "umask=0077" "defaults" ];
};
};
crypt = {

View file

@ -30,6 +30,7 @@ in {
"2a0f:be01:0:100::1312/128"
];
};
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
services.vyosBld = {
enable = true;
output = "/var/www/kyouma.net/vyos";

View file

@ -24,7 +24,6 @@
GDK_BACKEND = "wayland,x11";
MOZ_ENABLE_WAYLAND = "1";
CLUTTER_BACKEND = "wayland";
WLR_NO_HARDWARE_CURSORS = "1";
};
xdg.portal.wlr.enable = true;
@ -93,6 +92,14 @@
fi
'';
};
home.file."Pictures/wallpapers/sylviaritter/wallpaper.png" = {
enable = true;
source = config.stylix.image;
};
home.file."Pictures/wallpapers/lockscreen.png" = {
enable = true;
source = config.stylix.image;
};
home.file.".local/bin/hypr" = {
enable = true;
executable = true;
@ -384,6 +391,9 @@
"$mod, mouse:272, movewindow"
"$mod, mouse:273, resizewindow"
];
exec-once = [
"${pkgs.wpaperd}/bin/wpaperd"
];
};
};

View file

@ -386,11 +386,11 @@
]
},
"locked": {
"lastModified": 1708806879,
"narHash": "sha256-MSbxtF3RThI8ANs/G4o1zIqF5/XlShHvwjl9Ws0QAbI=",
"lastModified": 1708988456,
"narHash": "sha256-RCz7Xe64tN2zgWk+MVHkzg224znwqknJ1RnB7rVqUWw=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "4ee704cb13a5a7645436f400b9acc89a67b9c08a",
"rev": "1d085ea4444d26aa52297758b333b449b2aa6fca",
"type": "github"
},
"original": {
@ -407,11 +407,11 @@
]
},
"locked": {
"lastModified": 1708558280,
"narHash": "sha256-w1ns8evB6N9VTrAojcdXLWenROtd77g3vyClrqeFdG8=",
"lastModified": 1708806879,
"narHash": "sha256-MSbxtF3RThI8ANs/G4o1zIqF5/XlShHvwjl9Ws0QAbI=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "0b69d574162cfa6eb7919d5614a48d0185550891",
"rev": "4ee704cb13a5a7645436f400b9acc89a67b9c08a",
"type": "github"
},
"original": {
@ -468,11 +468,11 @@
]
},
"locked": {
"lastModified": 1708231718,
"narHash": "sha256-IZdieFWvhBkxoOFMDejqLUYqD94WN6k0YSpw0DFy+4g=",
"lastModified": 1708737761,
"narHash": "sha256-sR/1cYjpgr71ZSrt6Kp5Dg4Ul3mo6pZIG400tuzYks8=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "0e6857fa1d632637488666c08e7b02c08e3178f8",
"rev": "bbde06bed1b72eddff063fa42f18644e90a0121e",
"type": "github"
},
"original": {
@ -588,11 +588,11 @@
"pre-commit-hooks": "pre-commit-hooks"
},
"locked": {
"lastModified": 1708614940,
"narHash": "sha256-36muWApzetaV4WAEeqKsWxW4k2l0u3E841RI4sHPiz0=",
"lastModified": 1709038245,
"narHash": "sha256-pXi4kgnGTjwyFWENr/er4nEfzEoBFMkyeXC4d4a5Y3k=",
"owner": "nix-community",
"repo": "nixvim",
"rev": "060a05138ca1a46fc0a0f79ef27f080cac57a59e",
"rev": "8b013707cc1be375ae06fadd0ccb9eb1df277a10",
"type": "github"
},
"original": {