bro ion even no
This commit is contained in:
parent
69a92fdd5e
commit
ed13a64d87
9 changed files with 215 additions and 22 deletions
|
|
@ -14,11 +14,16 @@
|
|||
vscode
|
||||
steam
|
||||
bitwarden-desktop
|
||||
signal-desktop
|
||||
nixd
|
||||
treefmt
|
||||
tealdeer
|
||||
];
|
||||
|
||||
home.sessionVariables = {
|
||||
SSH_AUTH_SOCK = "/home/strix/.bitwarden-ssh-agent.sock";
|
||||
};
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
settings = {
|
||||
|
|
|
|||
BIN
common/profile.png
Normal file
BIN
common/profile.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 330 KiB |
|
|
@ -1,7 +1,19 @@
|
|||
{ home-manager, inputs, filter, ... }:
|
||||
{
|
||||
imports = [
|
||||
../util/profile-icons.nix
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.extraSpecialArgs = { inherit inputs filter; };
|
||||
home-manager.users.strix = ./home.nix;
|
||||
}
|
||||
];
|
||||
|
||||
users.users."strix" = {
|
||||
isNormalUser = true;
|
||||
icon = "${./common/profile.png}";
|
||||
description = "Strix";
|
||||
initialPassword = "changeme";
|
||||
extraGroups = [
|
||||
|
|
@ -14,13 +26,4 @@
|
|||
];
|
||||
};
|
||||
|
||||
imports = [
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.extraSpecialArgs = { inherit inputs filter; };
|
||||
home-manager.users.strix = ./home.nix;
|
||||
}
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{ ... }:
|
||||
{ pkgs, lib, ... }:
|
||||
{
|
||||
imports = [
|
||||
../../common
|
||||
|
|
@ -7,20 +7,31 @@
|
|||
|
||||
networking.hostName = "p14s";
|
||||
|
||||
boot.initrd.luks.devices."luks-d51bdb99-5966-40d3-a920-83ea78a73699".device = "/dev/disk/by-uuid/d51bdb99-5966-40d3-a920-83ea78a73699";
|
||||
# secure boot shit
|
||||
environment.systemPackages = [ pkgs.sbctl ];
|
||||
boot.loader.systemd-boot.enable = lib.mkForce false;
|
||||
boot.lanzaboote = {
|
||||
enable = true;
|
||||
pkiBundle = "/var/lib/sbctl";
|
||||
};
|
||||
|
||||
# swap & hibernate
|
||||
boot.initrd.luks.devices."luks-d51bdb99-5966-40d3-a920-83ea78a73699" = {
|
||||
device = "/dev/disk/by-uuid/d51bdb99-5966-40d3-a920-83ea78a73699";
|
||||
crypttabExtraOpts = [ "tpm2-device=auto" ];
|
||||
};
|
||||
boot.kernelParams = [ "resume=/dev/disk/by-uuid/d51bdb99-5966-40d3-a920-83ea78a73699" ];
|
||||
|
||||
# vm definition
|
||||
virtualisation.vmVariant = {
|
||||
virtualisation = {
|
||||
memorySize = 8192;
|
||||
cores = 6;
|
||||
};
|
||||
};
|
||||
|
||||
users.users."guest" = {
|
||||
isNormalUser = true;
|
||||
name = "Guest";
|
||||
initialPassword = "guest";
|
||||
createHome = true;
|
||||
environment.systemPackages = with pkgs; [
|
||||
spice-vdagentd
|
||||
];
|
||||
};
|
||||
|
||||
system.stateVersion = "26.05"; # yes
|
||||
|
|
|
|||
122
flake.lock
generated
122
flake.lock
generated
|
|
@ -1,5 +1,58 @@
|
|||
{
|
||||
"nodes": {
|
||||
"crane": {
|
||||
"locked": {
|
||||
"lastModified": 1781825982,
|
||||
"narHash": "sha256-SlXKwIRIhrOSAcTjCB3ftPLzJWZStQIPS7J1FlZPnKk=",
|
||||
"owner": "ipetkov",
|
||||
"repo": "crane",
|
||||
"rev": "469fd08d0bcf6926321fa973c6777fbc87785dd7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "ipetkov",
|
||||
"repo": "crane",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1767039857,
|
||||
"narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=",
|
||||
"owner": "NixOS",
|
||||
"repo": "flake-compat",
|
||||
"rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"gitignore": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"lanzaboote",
|
||||
"pre-commit",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1709087332,
|
||||
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
|
@ -20,6 +73,30 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"lanzaboote": {
|
||||
"inputs": {
|
||||
"crane": "crane",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"pre-commit": "pre-commit",
|
||||
"rust-overlay": "rust-overlay"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1782141370,
|
||||
"narHash": "sha256-hqijVSEETttmo8Okql9/LG0Ua34hdciKW1a5zzlj8mU=",
|
||||
"owner": "nix-community",
|
||||
"repo": "lanzaboote",
|
||||
"rev": "7c9a54a7f87b4539ddbd8bda09a8a5f5f9361aa9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "v1.1.0",
|
||||
"repo": "lanzaboote",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1787360063,
|
||||
|
|
@ -36,11 +113,56 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"pre-commit": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat",
|
||||
"gitignore": "gitignore",
|
||||
"nixpkgs": [
|
||||
"lanzaboote",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1781733627,
|
||||
"narHash": "sha256-U3yTuGBnmXvXoQI3qkpfEDsn9RovQPAjN7ndRco+3u0=",
|
||||
"owner": "cachix",
|
||||
"repo": "pre-commit-hooks.nix",
|
||||
"rev": "3bbec39bc90eadfa031e6f3b77272f3f60803e39",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "cachix",
|
||||
"repo": "pre-commit-hooks.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"home-manager": "home-manager",
|
||||
"lanzaboote": "lanzaboote",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
},
|
||||
"rust-overlay": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"lanzaboote",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1782012058,
|
||||
"narHash": "sha256-9mWUnReOUXfKjZuJAL/bAFH3LUyECTRtXgSNVjRw3UY=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "8534567325bd8a8d2928e6afd81e0a87d19efd3c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
|
|
|
|||
|
|
@ -7,6 +7,11 @@
|
|||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
inputs.lanzaboote = {
|
||||
url = "github:nix-community/lanzaboote/v1.1.0";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
outputs = inputs@{ self, nixpkgs, home-manager, ... }:
|
||||
let
|
||||
filter = with nixpkgs.lib;
|
||||
|
|
@ -23,6 +28,7 @@
|
|||
{
|
||||
nixosConfigurations.p14s = nixosConfig {
|
||||
modules = [
|
||||
inputs.lanzaboote.nixosModules.lanzaboote
|
||||
./devices/p14s
|
||||
./styles/desktop.nix
|
||||
];
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
{ config, pkgs, ... }:
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
imports = [ ];
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.timeout = 0;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
|
|
@ -11,15 +12,29 @@
|
|||
boot.initrd.verbose = false;
|
||||
boot.kernelParams = [
|
||||
"quiet"
|
||||
"udev.log_priority=3"
|
||||
"rd.udev.log_level=3"
|
||||
"rd.systemd.show_status=auto"
|
||||
];
|
||||
boot.initrd.checkJournalingFS = false;
|
||||
|
||||
|
||||
boot.plymouth = {
|
||||
enable = true;
|
||||
theme = "bgrt";
|
||||
package = pkgs.plymouth.overrideAttrs (old: {
|
||||
postInstall = (old.postInstall or "") + ''
|
||||
sed -i \
|
||||
-e 's/DialogClearsFirmwareBackground=true/DialogClearsFirmwareBackground=false/' \
|
||||
-e 's/DialogVerticalAlignment=.382/DialogVerticalAlignment=.55/' \
|
||||
-e 's/TitleVerticalAlignment=.382/TitleVerticalAlignment=.55/' \
|
||||
$out/share/plymouth/themes/bgrt/bgrt.plymouth
|
||||
'';
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
time.timeZone = "Europe/Amsterdam";
|
||||
|
|
@ -66,8 +81,6 @@
|
|||
programs.virt-manager.enable = true;
|
||||
virtualisation.libvirtd.enable = true;
|
||||
|
||||
programs.command-not-found.enable = true;
|
||||
|
||||
nix = {
|
||||
settings = {
|
||||
auto-optimise-store = true;
|
||||
|
|
@ -80,6 +93,7 @@
|
|||
|
||||
environment.systemPackages = with pkgs; [
|
||||
neovim
|
||||
htop
|
||||
dnsmasq
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@
|
|||
};
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
programs.command-not-found.enable = true;
|
||||
|
||||
nix = {
|
||||
settings = {
|
||||
|
|
|
|||
33
util/profile-icons.nix
Normal file
33
util/profile-icons.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{ lib, config, ...}:
|
||||
|
||||
let
|
||||
userOptions = with lib; {
|
||||
options.icon = mkOption { type = types.nullOr types.path; default = null; };
|
||||
};
|
||||
|
||||
mkGdmUserConf = icon: ''
|
||||
[User]
|
||||
Session=
|
||||
XSession=
|
||||
Icon=${icon}
|
||||
SystemAccount=false
|
||||
'';
|
||||
|
||||
userList = with lib; filter (entry: entry.icon != null) (mapAttrsToList (name: value: { inherit name; icon = value.icon; }) config.users.users);
|
||||
|
||||
mkBootCommand = entry: "echo -e '${mkGdmUserConf entry.icon}' > /var/lib/AccountsService/users/${entry.name}\n";
|
||||
|
||||
bootCommands = map mkBootCommand userList;
|
||||
in
|
||||
|
||||
{
|
||||
options = {
|
||||
users.users = with lib; with types; mkOption {
|
||||
type = attrsOf (submodule userOptions);
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.services.xserver.displayManager.gdm.enable {
|
||||
boot.postBootCommands = with lib; strings.concatStrings bootCommands;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue